From 37487161bdd128e472247f54200a2af71483ef0e Mon Sep 17 00:00:00 2001 From: Henry Gessau Date: Fri, 25 Nov 2016 16:01:33 -0500 Subject: [PATCH] Use ExtensionDescriptor from neutron-lib ExtensionDescriptor has been rehomed to neutron-lib and is being removed from neutron core. See https://review.openstack.org/398113 Depends-On: I5a111e0033e518e39b3042f047ee9eebba77a0d5 Change-Id: I0f8b11bebed9bbb06273c0f9257ec1916e0201ea --- vmware_nsx/extensions/advancedserviceproviders.py | 2 +- vmware_nsx/extensions/api_replay.py | 4 +--- vmware_nsx/extensions/dhcp_mtu.py | 3 +-- vmware_nsx/extensions/dns_search_domain.py | 3 +-- vmware_nsx/extensions/lsn.py | 4 +++- vmware_nsx/extensions/maclearning.py | 3 +-- vmware_nsx/extensions/networkgw.py | 2 +- vmware_nsx/extensions/nsxpolicy.py | 2 +- vmware_nsx/extensions/providersecuritygroup.py | 3 ++- vmware_nsx/extensions/qos_queue.py | 3 ++- vmware_nsx/extensions/routersize.py | 2 +- vmware_nsx/extensions/routertype.py | 2 +- vmware_nsx/extensions/secgroup_rule_local_ip_prefix.py | 2 +- vmware_nsx/extensions/securitygrouplogging.py | 2 +- vmware_nsx/extensions/securitygrouppolicy.py | 4 +++- vmware_nsx/extensions/vnicindex.py | 2 +- 16 files changed, 22 insertions(+), 21 deletions(-) diff --git a/vmware_nsx/extensions/advancedserviceproviders.py b/vmware_nsx/extensions/advancedserviceproviders.py index f82fc3aa67..06902f8d6e 100644 --- a/vmware_nsx/extensions/advancedserviceproviders.py +++ b/vmware_nsx/extensions/advancedserviceproviders.py @@ -12,7 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. -from neutron.api import extensions +from neutron_lib.api import extensions # Attribute Map ADV_SERVICE_PROVIDERS = 'advanced_service_providers' diff --git a/vmware_nsx/extensions/api_replay.py b/vmware_nsx/extensions/api_replay.py index 06f51bb362..2e59e1ee55 100644 --- a/vmware_nsx/extensions/api_replay.py +++ b/vmware_nsx/extensions/api_replay.py @@ -15,11 +15,9 @@ # under the License. # +from neutron_lib.api import extensions from neutron_lib.db import constants as db_const -from neutron.api import extensions - - # The attributes map is here for 2 reasons: # 1) allow posting id for the different objects we are importing # 2) make sure security-group named 'default' is also copied diff --git a/vmware_nsx/extensions/dhcp_mtu.py b/vmware_nsx/extensions/dhcp_mtu.py index 14971a2747..b24b682244 100644 --- a/vmware_nsx/extensions/dhcp_mtu.py +++ b/vmware_nsx/extensions/dhcp_mtu.py @@ -12,8 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. -from neutron.api import extensions - +from neutron_lib.api import extensions from neutron_lib import constants DHCP_MTU = 'dhcp_mtu' diff --git a/vmware_nsx/extensions/dns_search_domain.py b/vmware_nsx/extensions/dns_search_domain.py index 11be494912..a3259c8f44 100644 --- a/vmware_nsx/extensions/dns_search_domain.py +++ b/vmware_nsx/extensions/dns_search_domain.py @@ -14,8 +14,7 @@ import re -from neutron.api import extensions - +from neutron_lib.api import extensions from neutron_lib.api import validators from neutron_lib import constants from neutron_lib.db import constants as db_const diff --git a/vmware_nsx/extensions/lsn.py b/vmware_nsx/extensions/lsn.py index b8c51e6bba..6cf3f23188 100644 --- a/vmware_nsx/extensions/lsn.py +++ b/vmware_nsx/extensions/lsn.py @@ -16,6 +16,8 @@ # from neutron.api import extensions from neutron.api.v2 import base + +from neutron_lib.api import extensions as api_extensions from neutron_lib.plugins import directory @@ -36,7 +38,7 @@ RESOURCE_ATTRIBUTE_MAP = { } -class Lsn(extensions.ExtensionDescriptor): +class Lsn(api_extensions.ExtensionDescriptor): """Enable LSN configuration for Neutron NSX networks.""" @classmethod diff --git a/vmware_nsx/extensions/maclearning.py b/vmware_nsx/extensions/maclearning.py index 02d2159c11..fbe90baafa 100644 --- a/vmware_nsx/extensions/maclearning.py +++ b/vmware_nsx/extensions/maclearning.py @@ -12,9 +12,8 @@ # License for the specific language governing permissions and limitations # under the License. -from neutron.api import extensions - from neutron_lib.api import converters +from neutron_lib.api import extensions from neutron_lib import constants diff --git a/vmware_nsx/extensions/networkgw.py b/vmware_nsx/extensions/networkgw.py index 99b2e36e95..1941c0dbf0 100644 --- a/vmware_nsx/extensions/networkgw.py +++ b/vmware_nsx/extensions/networkgw.py @@ -17,9 +17,9 @@ import abc from oslo_config import cfg -from neutron.api import extensions from neutron.api.v2 import resource_helper +from neutron_lib.api import extensions from neutron_lib.api import validators from neutron_lib import constants from neutron_lib.db import constants as db_const diff --git a/vmware_nsx/extensions/nsxpolicy.py b/vmware_nsx/extensions/nsxpolicy.py index d0fed28af7..2bd9f5e8e1 100644 --- a/vmware_nsx/extensions/nsxpolicy.py +++ b/vmware_nsx/extensions/nsxpolicy.py @@ -15,8 +15,8 @@ import abc -from neutron.api import extensions from neutron.api.v2 import resource_helper +from neutron_lib.api import extensions from neutron_lib import exceptions as nexception from vmware_nsx._i18n import _ diff --git a/vmware_nsx/extensions/providersecuritygroup.py b/vmware_nsx/extensions/providersecuritygroup.py index 13c632ce30..537af66fd4 100644 --- a/vmware_nsx/extensions/providersecuritygroup.py +++ b/vmware_nsx/extensions/providersecuritygroup.py @@ -12,9 +12,10 @@ # License for the specific language governing permissions and limitations # under the License. -from neutron.api import extensions from neutron.extensions import securitygroup + from neutron_lib.api import converters +from neutron_lib.api import extensions from neutron_lib import constants from neutron_lib import exceptions as nexception diff --git a/vmware_nsx/extensions/qos_queue.py b/vmware_nsx/extensions/qos_queue.py index 59537af34e..9b4981ef4f 100644 --- a/vmware_nsx/extensions/qos_queue.py +++ b/vmware_nsx/extensions/qos_queue.py @@ -20,6 +20,7 @@ from neutron.api import extensions from neutron.api.v2 import base from neutron_lib.api import converters +from neutron_lib.api import extensions as api_extensions from neutron_lib.db import constants as db_const from neutron_lib import exceptions as nexception from neutron_lib.plugins import directory @@ -166,7 +167,7 @@ EXTENDED_ATTRIBUTES_2_0 = { } -class Qos_queue(extensions.ExtensionDescriptor): +class Qos_queue(api_extensions.ExtensionDescriptor): """Port Queue extension.""" @classmethod diff --git a/vmware_nsx/extensions/routersize.py b/vmware_nsx/extensions/routersize.py index 2a3be102ea..f1fbfcc640 100644 --- a/vmware_nsx/extensions/routersize.py +++ b/vmware_nsx/extensions/routersize.py @@ -12,7 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. -from neutron.api import extensions +from neutron_lib.api import extensions from neutron_lib import constants diff --git a/vmware_nsx/extensions/routertype.py b/vmware_nsx/extensions/routertype.py index 89e5719ccf..796b82ada0 100644 --- a/vmware_nsx/extensions/routertype.py +++ b/vmware_nsx/extensions/routertype.py @@ -12,7 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. -from neutron.api import extensions +from neutron_lib.api import extensions from neutron_lib import constants diff --git a/vmware_nsx/extensions/secgroup_rule_local_ip_prefix.py b/vmware_nsx/extensions/secgroup_rule_local_ip_prefix.py index dfc5f4fa9c..82b445d1af 100644 --- a/vmware_nsx/extensions/secgroup_rule_local_ip_prefix.py +++ b/vmware_nsx/extensions/secgroup_rule_local_ip_prefix.py @@ -12,9 +12,9 @@ # License for the specific language governing permissions and limitations # under the License. -from neutron.api import extensions from neutron.extensions import securitygroup +from neutron_lib.api import extensions from neutron_lib import constants LOCAL_IP_PREFIX = 'local_ip_prefix' diff --git a/vmware_nsx/extensions/securitygrouplogging.py b/vmware_nsx/extensions/securitygrouplogging.py index 2dbb7f7646..072cf4a1ea 100644 --- a/vmware_nsx/extensions/securitygrouplogging.py +++ b/vmware_nsx/extensions/securitygrouplogging.py @@ -12,8 +12,8 @@ # License for the specific language governing permissions and limitations # under the License. -from neutron.api import extensions from neutron_lib.api import converters +from neutron_lib.api import extensions LOGGING = 'logging' diff --git a/vmware_nsx/extensions/securitygrouppolicy.py b/vmware_nsx/extensions/securitygrouppolicy.py index cad558ebde..a199b0f236 100644 --- a/vmware_nsx/extensions/securitygrouppolicy.py +++ b/vmware_nsx/extensions/securitygrouppolicy.py @@ -12,9 +12,11 @@ # License for the specific language governing permissions and limitations # under the License. -from neutron.api import extensions +from neutron_lib.api import extensions from neutron_lib import exceptions as nexception +from vmware_nsx._i18n import _ + POLICY = 'policy' RESOURCE_ATTRIBUTE_MAP = { diff --git a/vmware_nsx/extensions/vnicindex.py b/vmware_nsx/extensions/vnicindex.py index db782a0c20..61e3ae0849 100644 --- a/vmware_nsx/extensions/vnicindex.py +++ b/vmware_nsx/extensions/vnicindex.py @@ -12,8 +12,8 @@ # License for the specific language governing permissions and limitations # under the License. -from neutron.api import extensions from neutron_lib.api import converters +from neutron_lib.api import extensions # Attribute Map VNIC_INDEX = 'vnic_index'