]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Update common network type consts to same origin
authorJustin Hammond <justin.hammond@rackspace.com>
Mon, 2 Sep 2013 16:58:10 +0000 (11:58 -0500)
committerJustin Hammond <justin.hammond@rackspace.com>
Tue, 10 Dec 2013 19:29:12 +0000 (19:29 +0000)
commit4cdccd69a45aec19d547c10f29f61359b69ad6c1
treecdcb00a62f6c9a41cf5f907d79ae32b59439ad3f
parentf4fd1a096c5912cb9d27da70ba99737db8d79eaa
Update common network type consts to same origin

This patch removes new definitions of common network type constants (TYPE_FLAT,
TYPE_LOCAL, etc.) and modifies uses of aforementioned constants to a common
place where constants are defined (neutron.plugins.common.constants). This
patch does not change values that are equal in value but different in name:
NETWORK_TYPE_FLAT vs TYPE_FLAT. A second changeset will be made to handle that
case.

Unit tests were modified as well when they referred to the constant.

Finally, the ovs agent code refers to the OVS plugin constants directly and
these had to be changed as well. A TODO flag was put in that file due to use
of another plugin specific constant.

Network types that were only defined in a single plugin, such as mellanox's
infiniband (IB) network type was not carried over to the common constants file.

Fixes-bug: #1196170

Change-Id: Ib6bfc8275496a24bf247946d177c734b62ae44bb
23 files changed:
neutron/agent/linux/ovs_lib.py
neutron/plugins/common/constants.py
neutron/plugins/hyperv/agent/hyperv_neutron_agent.py
neutron/plugins/hyperv/common/constants.py
neutron/plugins/hyperv/hyperv_neutron_plugin.py
neutron/plugins/linuxbridge/agent/linuxbridge_neutron_agent.py
neutron/plugins/linuxbridge/common/constants.py
neutron/plugins/linuxbridge/lb_neutron_plugin.py
neutron/plugins/ml2/drivers/type_flat.py
neutron/plugins/ml2/drivers/type_gre.py
neutron/plugins/ml2/drivers/type_local.py
neutron/plugins/ml2/drivers/type_vlan.py
neutron/plugins/ml2/drivers/type_vxlan.py
neutron/plugins/mlnx/agent/eswitch_neutron_agent.py
neutron/plugins/mlnx/common/constants.py
neutron/plugins/mlnx/mlnx_plugin.py
neutron/plugins/openvswitch/agent/ovs_neutron_agent.py
neutron/plugins/openvswitch/common/constants.py
neutron/plugins/openvswitch/ovs_neutron_plugin.py
neutron/tests/unit/linuxbridge/test_lb_neutron_agent.py
neutron/tests/unit/ml2/test_type_vxlan.py
neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py
neutron/tests/unit/openvswitch/test_ovs_tunnel.py