Browse Source

Use neutron-lib callbacks module

Change-Id: Id348f28655d2e414201bbd71b9b2e47760aaed5a
changes/61/459561/1
Adit Sarfaty 4 years ago
parent
commit
228181c7da
  1. 6
      vmware_nsx/db/extended_security_group.py
  2. 5
      vmware_nsx/plugins/nsx_v/drivers/abstract_router_driver.py
  3. 6
      vmware_nsx/plugins/nsx_v/plugin.py
  4. 8
      vmware_nsx/plugins/nsx_v3/plugin.py
  5. 6
      vmware_nsx/services/dynamic_routing/bgp_plugin.py
  6. 6
      vmware_nsx/services/flowclassifier/nsx_v/driver.py
  7. 6
      vmware_nsx/services/l2gateway/nsx_v3/driver.py
  8. 6
      vmware_nsx/services/lbaas/nsx_v/v2/loadbalancer_mgr.py
  9. 4
      vmware_nsx/services/trunk/nsx_v3/driver.py
  10. 2
      vmware_nsx/shell/admin/plugins/common/utils.py
  11. 2
      vmware_nsx/shell/admin/plugins/nsxv/resources/backup_edges.py
  12. 2
      vmware_nsx/shell/admin/plugins/nsxv/resources/config.py
  13. 2
      vmware_nsx/shell/admin/plugins/nsxv/resources/dhcp_binding.py
  14. 2
      vmware_nsx/shell/admin/plugins/nsxv/resources/edges.py
  15. 2
      vmware_nsx/shell/admin/plugins/nsxv/resources/metadata.py
  16. 6
      vmware_nsx/shell/admin/plugins/nsxv/resources/networks.py
  17. 2
      vmware_nsx/shell/admin/plugins/nsxv/resources/routers.py
  18. 2
      vmware_nsx/shell/admin/plugins/nsxv/resources/securitygroups.py
  19. 2
      vmware_nsx/shell/admin/plugins/nsxv/resources/spoofguard_policy.py
  20. 2
      vmware_nsx/shell/admin/plugins/nsxv3/resources/certificates.py
  21. 2
      vmware_nsx/shell/admin/plugins/nsxv3/resources/config.py
  22. 2
      vmware_nsx/shell/admin/plugins/nsxv3/resources/dhcp_binding.py
  23. 2
      vmware_nsx/shell/admin/plugins/nsxv3/resources/dhcp_servers.py
  24. 2
      vmware_nsx/shell/admin/plugins/nsxv3/resources/metadata_proxy.py
  25. 2
      vmware_nsx/shell/admin/plugins/nsxv3/resources/networks.py
  26. 2
      vmware_nsx/shell/admin/plugins/nsxv3/resources/ports.py
  27. 2
      vmware_nsx/shell/admin/plugins/nsxv3/resources/routers.py
  28. 2
      vmware_nsx/shell/admin/plugins/nsxv3/resources/securitygroups.py
  29. 2
      vmware_nsx/shell/nsxadmin.py
  30. 10
      vmware_nsx/tests/unit/services/l2gateway/test_nsxv3_driver.py
  31. 2
      vmware_nsx/tests/unit/shell/test_admin_utils.py

6
vmware_nsx/db/extended_security_group.py

@ -21,15 +21,15 @@ from sqlalchemy.orm import exc
from sqlalchemy import sql
from neutron.api.v2 import attributes
from neutron.callbacks import events
from neutron.callbacks import registry
from neutron.callbacks import resources
from neutron.common import utils as n_utils
from neutron.db import api as db_api
from neutron.db import db_base_plugin_v2
from neutron.db.models import securitygroup as securitygroups_db
from neutron.extensions import securitygroup as ext_sg
from neutron_lib.api import validators
from neutron_lib.callbacks import events
from neutron_lib.callbacks import registry
from neutron_lib.callbacks import resources
from neutron_lib import constants as n_constants
from neutron_lib.db import model_base
from neutron_lib.utils import helpers

5
vmware_nsx/plugins/nsx_v/drivers/abstract_router_driver.py

@ -16,10 +16,11 @@ import abc
import six
from neutron.callbacks import events
from neutron.callbacks import registry
from neutron.db import l3_db
from neutron.db import models_v2
from neutron_lib.callbacks import events
from neutron_lib.callbacks import registry
from vmware_nsx._i18n import _
from vmware_nsx.common import exceptions as nsxv_exc
from vmware_nsx.common import nsxv_constants

6
vmware_nsx/plugins/nsx_v/plugin.py

@ -34,9 +34,6 @@ from sqlalchemy.orm import exc as sa_exc
from neutron.api import extensions as neutron_extensions
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 ipv6_utils
from neutron.common import rpc as n_rpc
from neutron.common import topics
@ -80,6 +77,9 @@ from neutron.quota import resource_registry
from neutron.services.flavors import flavors_plugin
from neutron.services.qos import qos_consts
from neutron_lib.api.definitions import portbindings as pbin
from neutron_lib.callbacks import events
from neutron_lib.callbacks import registry
from neutron_lib.callbacks import resources
from vmware_nsx.dvs import dvs
from vmware_nsx.services.qos.common import utils as qos_com_utils
from vmware_nsx.services.qos.nsx_v import driver as qos_driver

8
vmware_nsx/plugins/nsx_v3/plugin.py

@ -22,10 +22,6 @@ from neutron.api.rpc.handlers import dhcp_rpc
from neutron.api.rpc.handlers import metadata_rpc
from neutron.api.rpc.handlers import resources_rpc
from neutron.api.v2 import attributes
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 rpc as n_rpc
from neutron.common import topics
from neutron.db import _utils as db_utils
@ -63,6 +59,10 @@ from neutron.services.qos import qos_consts
from neutron_lib.api.definitions import portbindings as pbin
from neutron_lib.api.definitions import provider_net as pnet
from neutron_lib.api import validators
from neutron_lib.callbacks import events
from neutron_lib.callbacks import exceptions as callback_exc
from neutron_lib.callbacks import registry
from neutron_lib.callbacks import resources
from neutron_lib import constants as const
from neutron_lib import context as q_context
from neutron_lib import exceptions as n_exc

6
vmware_nsx/services/dynamic_routing/bgp_plugin.py

@ -14,11 +14,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from neutron.callbacks import events
from neutron.callbacks import registry
from neutron.callbacks import resources
from neutron_dynamic_routing.db import bgp_db
from neutron_dynamic_routing.extensions import bgp as bgp_ext
from neutron_lib.callbacks import events
from neutron_lib.callbacks import registry
from neutron_lib.callbacks import resources
from neutron_lib import context as n_context
from neutron_lib.services import base as service_base

6
vmware_nsx/services/flowclassifier/nsx_v/driver.py

@ -19,9 +19,9 @@ import xml.etree.ElementTree as et
from networking_sfc.extensions import flowclassifier
from networking_sfc.services.flowclassifier.common import exceptions as exc
from networking_sfc.services.flowclassifier.drivers import base as fc_driver
from neutron.callbacks import events
from neutron.callbacks import registry
from neutron.callbacks import resources
from neutron_lib.callbacks import events
from neutron_lib.callbacks import registry
from neutron_lib.callbacks import resources
from neutron_lib import context as n_context
from neutron_lib.plugins import directory
from oslo_config import cfg

6
vmware_nsx/services/l2gateway/nsx_v3/driver.py

@ -23,11 +23,11 @@ from oslo_log import log as logging
from oslo_utils import excutils
from oslo_utils import uuidutils
from neutron.callbacks import events
from neutron.callbacks import registry
from neutron.callbacks import resources
from neutron.plugins.common import utils as n_utils
from neutron_lib.api.definitions import provider_net as providernet
from neutron_lib.callbacks import events
from neutron_lib.callbacks import registry
from neutron_lib.callbacks import resources
from neutron_lib import constants
from neutron_lib import context
from neutron_lib import exceptions as n_exc

6
vmware_nsx/services/lbaas/nsx_v/v2/loadbalancer_mgr.py

@ -13,9 +13,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from neutron.callbacks import events
from neutron.callbacks import registry
from neutron.callbacks import resources
from neutron_lib.callbacks import events
from neutron_lib.callbacks import registry
from neutron_lib.callbacks import resources
from neutron_lib import constants
from neutron_lib import exceptions as n_exc
from oslo_log import helpers as log_helpers

4
vmware_nsx/services/trunk/nsx_v3/driver.py

@ -18,11 +18,11 @@ from oslo_config import cfg
from oslo_log import log as logging
from oslo_utils import excutils
from neutron.callbacks import events
from neutron.callbacks import registry
from neutron.services.trunk import constants as trunk_consts
from neutron.services.trunk.drivers import base
from neutron_lib.api.definitions import portbindings
from neutron_lib.callbacks import events
from neutron_lib.callbacks import registry
from vmware_nsx.common import nsx_constants as nsx_consts
from vmware_nsx.common import utils as nsx_utils

2
vmware_nsx/shell/admin/plugins/common/utils.py

@ -18,8 +18,8 @@ import sys
from vmware_nsx._i18n import _
from vmware_nsx.shell import resources as nsxadmin
from neutron.callbacks import registry
from neutron.common import profiler # noqa
from neutron_lib.callbacks import registry
from oslo_log import log as logging
LOG = logging.getLogger(__name__)

2
vmware_nsx/shell/admin/plugins/nsxv/resources/backup_edges.py

@ -13,8 +13,8 @@
# under the License.
from neutron.callbacks import registry
from neutron.db import l3_db
from neutron_lib.callbacks import registry
from neutron_lib import exceptions
from oslo_log import log as logging
from oslo_utils import uuidutils

2
vmware_nsx/shell/admin/plugins/nsxv/resources/config.py

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from neutron.callbacks import registry
from neutron_lib.callbacks import registry
from oslo_config import cfg
from oslo_log import log as logging

2
vmware_nsx/shell/admin/plugins/nsxv/resources/dhcp_binding.py

@ -24,8 +24,8 @@ import vmware_nsx.shell.admin.plugins.common.utils as admin_utils
import vmware_nsx.shell.admin.plugins.nsxv.resources.utils as utils
import vmware_nsx.shell.resources as shell
from neutron.callbacks import registry
from neutron.db import l3_db
from neutron_lib.callbacks import registry
from vmware_nsx.common import locking
from vmware_nsx.db import nsxv_db

2
vmware_nsx/shell/admin/plugins/nsxv/resources/edges.py

@ -25,7 +25,7 @@ import vmware_nsx.shell.admin.plugins.common.utils as admin_utils
import vmware_nsx.shell.admin.plugins.nsxv.resources.utils as utils
import vmware_nsx.shell.resources as shell
from neutron.callbacks import registry
from neutron_lib.callbacks import registry
from neutron_lib import exceptions
from oslo_log import log as logging

2
vmware_nsx/shell/admin/plugins/nsxv/resources/metadata.py

@ -16,8 +16,8 @@
import hashlib
import hmac
from neutron.callbacks import registry
from neutron.db import models_v2
from neutron_lib.callbacks import registry
from oslo_config import cfg
from oslo_log import log as logging

6
vmware_nsx/shell/admin/plugins/nsxv/resources/networks.py

@ -12,12 +12,14 @@
# License for the specific language governing permissions and limitations
# under the License.
from neutron_lib import context
from oslo_log import log as logging
from oslo_serialization import jsonutils
import re
import xml.etree.ElementTree as et
from neutron_lib.callbacks import registry
from neutron_lib import context
from vmware_nsx.db import db as nsx_db
from vmware_nsx.plugins.nsx_v.vshield.common import exceptions
from vmware_nsx.shell.admin.plugins.common import constants
@ -26,8 +28,6 @@ from vmware_nsx.shell.admin.plugins.common import utils as admin_utils
from vmware_nsx.shell.admin.plugins.nsxv.resources import utils as utils
from vmware_nsx.shell import resources as shell
from neutron.callbacks import registry
LOG = logging.getLogger(__name__)
nsxv = utils.get_nsxv_client()
network_types = ['Network', 'VirtualWire', 'DistributedVirtualPortgroup']

2
vmware_nsx/shell/admin/plugins/nsxv/resources/routers.py

@ -18,7 +18,7 @@ import vmware_nsx.shell.admin.plugins.common.utils as admin_utils
import vmware_nsx.shell.admin.plugins.nsxv.resources.utils as utils
import vmware_nsx.shell.resources as shell
from neutron.callbacks import registry
from neutron_lib.callbacks import registry
from neutron_lib import context as n_context
from oslo_config import cfg
from oslo_log import log as logging

2
vmware_nsx/shell/admin/plugins/nsxv/resources/securitygroups.py

@ -15,12 +15,12 @@
import xml.etree.ElementTree as et
from neutron.callbacks import registry
from neutron.db import api as db_api
from neutron.db.models import securitygroup as sg_models
from neutron.db import models_v2
from neutron.db import securitygroups_db
from neutron.extensions import securitygroup as ext_sg
from neutron_lib.callbacks import registry
from neutron_lib import context as n_context
from oslo_log import log as logging

2
vmware_nsx/shell/admin/plugins/nsxv/resources/spoofguard_policy.py

@ -20,7 +20,7 @@ import vmware_nsx.shell.admin.plugins.common.utils as admin_utils
import vmware_nsx.shell.admin.plugins.nsxv.resources.utils as utils
import vmware_nsx.shell.resources as shell
from neutron.callbacks import registry
from neutron_lib.callbacks import registry
from neutron_lib import exceptions
from vmware_nsx.db import nsxv_db

2
vmware_nsx/shell/admin/plugins/nsxv3/resources/certificates.py

@ -23,7 +23,7 @@ from vmware_nsx.shell import resources as shell
from vmware_nsxlib.v3 import client_cert
from vmware_nsxlib.v3 import trust_management
from neutron.callbacks import registry
from neutron_lib.callbacks import registry
from neutron_lib import context
from neutron_lib import exceptions
from oslo_config import cfg

2
vmware_nsx/shell/admin/plugins/nsxv3/resources/config.py

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from neutron.callbacks import registry
from neutron_lib.callbacks import registry
from oslo_log import log as logging
from vmware_nsx.shell.admin.plugins.common import constants

2
vmware_nsx/shell/admin/plugins/nsxv3/resources/dhcp_binding.py

@ -14,7 +14,7 @@
import netaddr
from neutron.callbacks import registry
from neutron_lib.callbacks import registry
from neutron_lib import constants as const
from oslo_config import cfg
from oslo_log import log as logging

2
vmware_nsx/shell/admin/plugins/nsxv3/resources/dhcp_servers.py

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from neutron.callbacks import registry
from neutron_lib.callbacks import registry
from neutron_lib import context
from oslo_config import cfg
from oslo_log import log as logging

2
vmware_nsx/shell/admin/plugins/nsxv3/resources/metadata_proxy.py

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from neutron.callbacks import registry
from neutron_lib.callbacks import registry
from neutron_lib import constants as const
from oslo_config import cfg
from oslo_log import log as logging

2
vmware_nsx/shell/admin/plugins/nsxv3/resources/networks.py

@ -21,8 +21,8 @@ from vmware_nsx.shell.admin.plugins.nsxv3.resources import utils
from vmware_nsx.shell import resources as shell
from vmware_nsxlib.v3 import exceptions as nsx_exc
from neutron.callbacks import registry
from neutron.db import db_base_plugin_v2
from neutron_lib.callbacks import registry
from neutron_lib import context as neutron_context
from oslo_log import log as logging

2
vmware_nsx/shell/admin/plugins/nsxv3/resources/ports.py

@ -30,11 +30,11 @@ from vmware_nsx.shell import resources as shell
from vmware_nsxlib.v3 import exceptions as nsx_exc
from vmware_nsxlib.v3 import resources
from neutron.callbacks import registry
from neutron.db import allowedaddresspairs_db as addr_pair_db
from neutron.db import db_base_plugin_v2
from neutron.db import portsecurity_db
from neutron.extensions import allowedaddresspairs
from neutron_lib.callbacks import registry
from neutron_lib import constants as const
from neutron_lib import context as neutron_context
from neutron_lib.plugins import directory

2
vmware_nsx/shell/admin/plugins/nsxv3/resources/routers.py

@ -22,9 +22,9 @@ from vmware_nsx.shell import resources as shell
from vmware_nsxlib.v3 import exceptions as nsx_exc
from vmware_nsxlib.v3 import resources as nsx_resources
from neutron.callbacks import registry
from neutron.db import db_base_plugin_v2
from neutron.db import l3_db
from neutron_lib.callbacks import registry
from neutron_lib import context as neutron_context
from oslo_log import log as logging

2
vmware_nsx/shell/admin/plugins/nsxv3/resources/securitygroups.py

@ -12,11 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from neutron.callbacks import registry
from neutron.db import api as db_api
from neutron.db import common_db_mixin as common_db
from neutron.db.models import securitygroup
from neutron.db import securitygroups_db
from neutron_lib.callbacks import registry
from neutron_lib import context as neutron_context
from oslo_log import log as logging

2
vmware_nsx/shell/nsxadmin.py

@ -27,9 +27,9 @@ TODO: Autocomplete command line args
import requests
import sys
from neutron.callbacks import registry
from neutron.common import config as neutron_config
from neutron.conf import common as neutron_common_config
from neutron_lib.callbacks import registry
from vmware_nsx.common import config # noqa

10
vmware_nsx/tests/unit/services/l2gateway/test_nsxv3_driver.py

@ -20,17 +20,17 @@ from networking_l2gw.services.l2gateway.common import constants
from networking_l2gw.services.l2gateway import exceptions as l2gw_exc
from networking_l2gw.services.l2gateway import plugin as core_l2gw_plugin
from networking_l2gw.tests.unit.db import test_l2gw_db
from neutron_lib import context
from oslo_config import cfg
from oslo_utils import importutils
from oslo_utils import uuidutils
from neutron.callbacks import events
from neutron.callbacks import registry
from neutron.callbacks import resources
from neutron.tests import base
from neutron_lib.callbacks import events
from neutron_lib.callbacks import registry
from neutron_lib.callbacks import resources
from neutron_lib import context
from neutron_lib import exceptions as n_exc
from vmware_nsx.services.l2gateway.nsx_v3 import driver as nsx_v3_driver
from vmware_nsx.tests.unit.nsx_v3 import test_plugin as test_nsx_v3_plugin
from vmware_nsxlib.tests.unit.v3 import mocks as nsx_v3_mocks

2
vmware_nsx/tests/unit/shell/test_admin_utils.py

@ -22,12 +22,12 @@ from oslo_log import _options
from oslo_log import log as logging
from oslo_utils import uuidutils
from neutron.callbacks import registry
from neutron.common import config as neutron_config
from neutron.db import servicetype_db # noqa
from neutron.quota import resource_registry
from neutron.tests import base
from neutron.tests.unit.api import test_extensions
from neutron_lib.callbacks import registry
from vmware_nsx._i18n import _
from vmware_nsx.common import config # noqa

Loading…
Cancel
Save