NSX: make use of neutron_lib constants

Commit 87a79256c494c36f2d9597313f430b24c0110161 added neutron_lib
for shared constants. This patch moves us to make use of the
aforementioned library.

Change-Id: I9f541602a2c321c56f4d99c3ddf5a3f4b7e07ffe
This commit is contained in:
Gary Kotton 2016-02-29 00:04:28 -08:00
parent 2fabb839a6
commit 7dde4283b7
24 changed files with 25 additions and 24 deletions

View File

@ -11,6 +11,7 @@ retrying!=1.3.0,>=1.2.3 # Apache-2.0
SQLAlchemy<1.1.0,>=1.0.10 # MIT
six>=1.9.0 # MIT
stevedore>=1.5.0 # Apache-2.0
neutron-lib>=0.0.1 # Apache-2.0
oslo.concurrency>=3.5.0 # Apache-2.0
oslo.config>=3.7.0 # Apache-2.0
oslo.db>=4.1.0 # Apache-2.0

View File

@ -15,13 +15,13 @@
import random
from neutron_lib import constants
from oslo_log import log
from oslo_serialization import jsonutils
from oslo_service import loopingcall
from oslo_utils import timeutils
import six
from neutron.common import constants
from neutron.common import exceptions
from neutron import context
from neutron.db import external_net_db

View File

@ -16,8 +16,9 @@
#
from neutron.api.rpc.agentnotifiers import dhcp_rpc_agent_api
from neutron.common import constants as const
from neutron.common import topics
from neutron_lib import constants as const
from vmware_nsx.dhcp_meta import nsx as nsx_svc
from vmware_nsx.dhcp_meta import rpc as nsx_rpc

View File

@ -14,8 +14,8 @@
# License for the specific language governing permissions and limitations
# under the License.
#
from neutron.common import constants as const
from neutron.db import l3_db
from neutron_lib import constants as const
# A unique MAC to quickly identify the LSN port used for metadata services
# when dhcp on the subnet is off. Inspired by leet-speak for 'metadata'.

View File

@ -15,9 +15,9 @@
# under the License.
#
from neutron.common import constants as const
from neutron.common import exceptions as n_exc
from neutron.extensions import external_net
from neutron_lib import constants as const
from oslo_log import log as logging
from vmware_nsx._i18n import _, _LE

View File

@ -15,6 +15,7 @@
# under the License.
#
from neutron_lib import constants as const
from oslo_concurrency import lockutils
from oslo_config import cfg
from oslo_log import log as logging
@ -23,7 +24,6 @@ from oslo_utils import importutils
from neutron.api.rpc.agentnotifiers import dhcp_rpc_agent_api
from neutron.api.rpc.handlers import dhcp_rpc
from neutron.api.rpc.handlers import metadata_rpc
from neutron.common import constants as const
from neutron.common import rpc as n_rpc
from neutron.common import topics
from neutron.db import agents_db

View File

@ -15,12 +15,12 @@
# under the License.
#
from neutron_lib import constants as const
from oslo_config import cfg
from oslo_log import log as logging
from oslo_utils import excutils
from neutron.api.v2 import attributes as attr
from neutron.common import constants as const
from neutron.common import exceptions as n_exc
from neutron.db import db_base_plugin_v2
from neutron.db import l3_db

View File

@ -16,12 +16,12 @@
from eventlet import greenthread
import netaddr
from neutron_lib import constants as const
from oslo_config import cfg
from oslo_log import log as logging
from neutron.api.rpc.agentnotifiers import dhcp_rpc_agent_api
from neutron.api.v2 import attributes
from neutron.common import constants as const
from neutron.common import exceptions as ntn_exc
from neutron.db import db_base_plugin_v2
from neutron.db import models_v2

View File

@ -13,11 +13,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from neutron_lib import constants
from oslo_log import log
from oslo_serialization import jsonutils
from oslo_utils import excutils
from neutron.common import constants
from neutron.common import exceptions
from vmware_nsx._i18n import _LW

View File

@ -14,11 +14,11 @@
# under the License.
#
from neutron_lib import constants
from oslo_config import cfg
from oslo_log import log
from oslo_serialization import jsonutils
from neutron.common import constants
from neutron.common import exceptions as exception
from vmware_nsx._i18n import _, _LE, _LI, _LW

View File

@ -20,7 +20,7 @@ NSX-V3 Plugin security integration module
import uuid
from neutron.common import constants
from neutron_lib import constants
from oslo_config import cfg
from oslo_log import log

View File

@ -15,6 +15,7 @@
import uuid
from neutron_lib import constants
from oslo_concurrency import lockutils
from oslo_config import cfg
from oslo_db import exception as db_exc
@ -28,7 +29,6 @@ import webob.exc
from neutron.api import extensions as neutron_extensions
from neutron.api.v2 import attributes as attr
from neutron.api.v2 import base
from neutron.common import constants
from neutron.common import exceptions as n_exc
from neutron import context as q_context
from neutron.db import agentschedulers_db

View File

@ -19,8 +19,8 @@ import hmac
import netaddr
from neutron.api.v2 import attributes as attr
from neutron.common import constants
from neutron import context as neutron_context
from neutron_lib import constants as constants
from oslo_config import cfg
from oslo_log import log as logging

View File

@ -18,6 +18,7 @@ import six
import uuid
import netaddr
from neutron_lib import constants
from oslo_config import cfg
from oslo_log import log as logging
from oslo_utils import excutils
@ -29,7 +30,6 @@ from neutron.api.v2 import attributes as attr
from neutron.callbacks import events
from neutron.callbacks import registry
from neutron.callbacks import resources
from neutron.common import constants
from neutron.common import exceptions as n_exc
from neutron.db import agents_db
from neutron.db import allowedaddresspairs_db as addr_pair_db

View File

@ -23,7 +23,6 @@ from neutron.callbacks import events
from neutron.callbacks import exceptions as callback_exc
from neutron.callbacks import registry
from neutron.callbacks import resources
from neutron.common import constants as const
from neutron.common import exceptions as n_exc
from neutron.common import rpc as n_rpc
from neutron.common import topics
@ -53,6 +52,7 @@ from neutron.extensions import providernet as pnet
from neutron.extensions import securitygroup as ext_sg
from neutron.plugins.common import constants as plugin_const
from neutron.plugins.common import utils as n_utils
from neutron_lib import constants as const
from oslo_config import cfg
from oslo_log import log
from oslo_utils import excutils

View File

@ -15,10 +15,10 @@
import mock
import netaddr
from neutron_lib import constants
from oslo_config import cfg
import webob.exc
from neutron.common import constants
from neutron.common import exceptions as n_exc
from neutron import manager

View File

@ -14,9 +14,9 @@
# under the License.
import mock
from neutron_lib import constants
from oslo_config import cfg
from neutron.common import constants
from neutron.tests.unit.db import test_agentschedulers_db # noqa
from vmware_nsx.common import sync

View File

@ -14,9 +14,9 @@
# limitations under the License.
import mock
from neutron_lib import constants as n_consts
from oslo_config import cfg
from neutron.common import constants as n_consts
from neutron.common import exceptions as n_exc
from neutron import context
from neutron.tests import base

View File

@ -17,7 +17,6 @@ import uuid
import mock
from neutron.api.v2 import attributes
from neutron.common import constants
from neutron.common import exceptions as ntn_exc
from neutron import context
from neutron.extensions import dvr
@ -35,6 +34,7 @@ import neutron.tests.unit.extensions.test_l3 as test_l3_plugin
import neutron.tests.unit.extensions.test_l3_ext_gw_mode as test_ext_gw_mode
import neutron.tests.unit.extensions.test_securitygroup as ext_sg
from neutron.tests.unit import testlib_api
from neutron_lib import constants
from oslo_config import cfg
from oslo_db import exception as db_exc
from oslo_log import log

View File

@ -18,12 +18,12 @@ import contextlib
import time
import mock
from neutron_lib import constants
from oslo_config import cfg
from oslo_log import log
from oslo_serialization import jsonutils
from neutron.api.v2 import attributes as attr
from neutron.common import constants
from neutron.common import exceptions as n_exc
from neutron import context
from neutron.extensions import l3

View File

@ -18,7 +18,6 @@ from eventlet import greenthread
import mock
import netaddr
from neutron.api.v2 import attributes
from neutron.common import constants
from neutron.common import exceptions as n_exc
from neutron import context
from neutron.extensions import dvr as dist_router
@ -30,7 +29,6 @@ from neutron.extensions import portsecurity as psec
from neutron.extensions import providernet as pnet
from neutron.extensions import securitygroup as secgrp
from neutron import manager
from neutron.tests.unit import _test_extension_portbindings as test_bindings
import neutron.tests.unit.db.test_allowedaddresspairs_db as test_addr_pair
import neutron.tests.unit.db.test_db_base_plugin_v2 as test_plugin
@ -39,6 +37,7 @@ import neutron.tests.unit.extensions.test_l3_ext_gw_mode as test_ext_gw_mode
import neutron.tests.unit.extensions.test_portsecurity as test_psec
import neutron.tests.unit.extensions.test_securitygroup as ext_sg
from neutron.tests.unit import testlib_api
from neutron_lib import constants
from oslo_config import cfg
from oslo_db import exception as db_exc
from oslo_utils import uuidutils

View File

@ -16,7 +16,6 @@ import mock
import six
from neutron.api.v2 import attributes
from neutron.common import constants
from neutron.common import exceptions as n_exc
from neutron import context
from neutron.db import models_v2
@ -40,6 +39,7 @@ from neutron.tests.unit.scheduler \
import test_dhcp_agent_scheduler as test_dhcpagent
from neutron import version
from neutron_lib import constants
from oslo_config import cfg
from oslo_serialization import jsonutils
from oslo_utils import uuidutils

View File

@ -14,9 +14,9 @@
# limitations under the License.
#
from neutron.common import constants
from neutron.common import exceptions
from neutron.tests.unit.api.v2 import test_base
from neutron_lib import constants
from vmware_nsx.nsxlib import mh as nsxlib
from vmware_nsx.nsxlib.mh import secgroup as secgrouplib

View File

@ -17,9 +17,9 @@
import hashlib
import mock
from neutron.common import constants
from neutron.common import exceptions
from neutron.tests.unit.api.v2 import test_base
from neutron_lib import constants
from vmware_nsx.common import utils
from vmware_nsx.nsxlib.mh import switch as switchlib