Merge "use api def ALIAS in supported_extension_aliases"

This commit is contained in:
Zuul 2019-04-08 22:50:44 +00:00 committed by Gerrit Code Review
commit f21444f247
36 changed files with 121 additions and 61 deletions

View File

@ -14,6 +14,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from neutron_lib.api.definitions import auto_allocated_topology
from neutron.services.auto_allocate import db
@ -22,7 +24,7 @@ class Plugin(db.AutoAllocatedTopologyMixin):
_instance = None
supported_extension_aliases = ["auto-allocated-topology"]
supported_extension_aliases = [auto_allocated_topology.ALIAS]
__filter_validation_support = True

View File

@ -13,6 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from neutron_lib.api.definitions import flavors
from neutron_lib.api.definitions import servicetype
from neutron_lib.plugins import constants
from neutron_lib.services import base as service_base
@ -23,7 +25,7 @@ class FlavorsPlugin(service_base.ServicePluginBase,
flavors_db.FlavorsDbMixin):
"""Implements Neutron Flavors Service plugin."""
supported_extension_aliases = ['flavors', 'service-type']
supported_extension_aliases = [flavors.ALIAS, servicetype.ALIAS]
__filter_validation_support = True

View File

@ -94,7 +94,8 @@ class L3RouterPlugin(service_base.ServicePluginBase,
"""
_supported_extension_aliases = [dvr.ALIAS, l3_apidef.ALIAS,
l3_ext_gw_mode.ALIAS,
extraroute.ALIAS, "l3_agent_scheduler",
extraroute.ALIAS,
n_const.L3_AGENT_SCHEDULER_EXT_ALIAS,
l3_ext_ha_mode.ALIAS,
router_availability_zone.ALIAS,
l3_flavors.ALIAS, "qos-fip",

View File

@ -13,6 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from neutron_lib.api.definitions import logging
from neutron_lib.db import api as db_api
from neutron.db import db_base_plugin_common
@ -28,7 +29,7 @@ from neutron.services.logapi.drivers import manager as driver_mgr
class LoggingPlugin(log_ext.LoggingPluginBase):
"""Implementation of the Neutron logging api plugin."""
supported_extension_aliases = ['logging']
supported_extension_aliases = [logging.ALIAS]
__native_pagination_support = True
__native_sorting_support = True

View File

@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from neutron_lib.api.definitions import network_ip_availability
from neutron_lib.db import utils as db_utils
from neutron_lib import exceptions
@ -25,7 +26,7 @@ class NetworkIPAvailabilityPlugin(ip_availability_db.IpAvailabilityMixin,
"""This plugin exposes IP availability data for networks and subnets."""
_instance = None
supported_extension_aliases = ["network-ip-availability"]
supported_extension_aliases = [network_ip_availability.ALIAS]
__filter_validation_support = True

View File

@ -17,6 +17,7 @@ import collections
import functools
import netaddr
from neutron_lib.api.definitions import expose_port_forwarding_in_fip
from neutron_lib.api.definitions import floating_ip_port_forwarding as apidef
from neutron_lib.api.definitions import l3
from neutron_lib.callbacks import events
@ -76,8 +77,8 @@ class PortForwardingPlugin(fip_pf.PortForwardingPluginBase):
required_service_plugins = ['router']
supported_extension_aliases = ['floating-ip-port-forwarding',
'expose-port-forwarding-in-fip']
supported_extension_aliases = [apidef.ALIAS,
expose_port_forwarding_in_fip.ALIAS]
__native_pagination_support = True
__native_sorting_support = True

View File

@ -17,7 +17,10 @@ from neutron_lib.api.definitions import port as port_def
from neutron_lib.api.definitions import port_resource_request
from neutron_lib.api.definitions import portbindings
from neutron_lib.api.definitions import qos as qos_apidef
from neutron_lib.api.definitions import qos_bw_limit_direction
from neutron_lib.api.definitions import qos_bw_minimum_ingress
from neutron_lib.api.definitions import qos_default
from neutron_lib.api.definitions import qos_rule_type_details
from neutron_lib.api.definitions import qos_rules_alias
from neutron_lib.callbacks import events as callbacks_events
from neutron_lib.callbacks import registry as callbacks_registry
@ -53,9 +56,9 @@ class QoSPlugin(qos.QoSPluginBase):
"""
supported_extension_aliases = [qos_apidef.ALIAS,
'qos-bw-limit-direction',
'qos-default',
'qos-rule-type-details',
qos_bw_limit_direction.ALIAS,
qos_default.ALIAS,
qos_rule_type_details.ALIAS,
port_resource_request.ALIAS,
qos_bw_minimum_ingress.ALIAS,
qos_rules_alias.ALIAS]

View File

@ -11,6 +11,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from neutron_lib.api.definitions import revisionifmatch
from neutron_lib.db import api as db_api
from neutron_lib.db import resource_extend
from neutron_lib.services import base as service_base
@ -31,7 +32,7 @@ class RevisionPlugin(service_base.ServicePluginBase):
"""Plugin to populate revision numbers into standard attr resources."""
supported_extension_aliases = ['standard-attr-revisions',
'revision-if-match']
revisionifmatch.ALIAS]
__filter_validation_support = True

View File

@ -22,7 +22,11 @@ from neutron_lib.api.definitions import ip_allocation as ipalloc_apidef
from neutron_lib.api.definitions import l2_adjacency as l2adj_apidef
from neutron_lib.api.definitions import network as net_def
from neutron_lib.api.definitions import port as port_def
from neutron_lib.api.definitions import segment as seg_apidef
from neutron_lib.api.definitions import segments_peer_subnet_host_routes
from neutron_lib.api.definitions import standard_attr_segment
from neutron_lib.api.definitions import subnet as subnet_def
from neutron_lib.api.definitions import subnet_segmentid_writable
from neutron_lib.api import validators
from neutron_lib.callbacks import events
from neutron_lib.callbacks import registry
@ -61,11 +65,12 @@ class Plugin(db.SegmentDbMixin, segment.SegmentPluginBase):
_instance = None
supported_extension_aliases = ["segment", "ip_allocation",
supported_extension_aliases = [seg_apidef.ALIAS,
ipalloc_apidef.ALIAS,
l2adj_apidef.ALIAS,
"standard-attr-segment",
"subnet-segmentid-writable",
'segments-peer-subnet-host-routes']
standard_attr_segment.ALIAS,
subnet_segmentid_writable.ALIAS,
segments_peer_subnet_host_routes.ALIAS]
__native_pagination_support = True
__native_sorting_support = True

View File

@ -16,6 +16,8 @@ import copy
from neutron_lib.api.definitions import port as port_def
from neutron_lib.api.definitions import portbindings
from neutron_lib.api.definitions import trunk as trunk_apidef
from neutron_lib.api.definitions import trunk_details
from neutron_lib.callbacks import events
from neutron_lib.callbacks import registry
from neutron_lib.callbacks import resources
@ -46,7 +48,8 @@ LOG = logging.getLogger(__name__)
class TrunkPlugin(service_base.ServicePluginBase,
common_db_mixin.CommonDbMixin):
supported_extension_aliases = ["trunk", "trunk-details"]
supported_extension_aliases = [trunk_apidef.ALIAS,
trunk_details.ALIAS]
__native_pagination_support = True
__native_sorting_support = True

View File

@ -18,6 +18,8 @@ import os
import mock
from neutron_lib.api import attributes
from neutron_lib.api import converters
from neutron_lib.api.definitions import empty_string_filtering
from neutron_lib.api.definitions import filter_validation
from neutron_lib.callbacks import registry
from neutron_lib import constants
from neutron_lib import context
@ -86,8 +88,8 @@ class APIv2TestBase(base.BaseTestCase):
self._plugin_patcher = mock.patch(plugin, autospec=True)
self.plugin = self._plugin_patcher.start()
instance = self.plugin.return_value
instance.supported_extension_aliases = ['empty-string-filtering',
'filter-validation']
instance.supported_extension_aliases = [empty_string_filtering.ALIAS,
filter_validation.ALIAS]
instance._NeutronPluginBaseV2__native_pagination_support = True
instance._NeutronPluginBaseV2__native_sorting_support = True
instance._NeutronPluginBaseV2__filter_validation_support = True

View File

@ -50,7 +50,7 @@ class AllowedAddressPairTestPlugin(portsecurity_db.PortSecurityDbMixin,
associating ports with port security and allowed address pairs.
"""
supported_extension_aliases = ["allowed-address-pairs"]
supported_extension_aliases = [addr_apidef.ALIAS]
def create_port(self, context, port):
p = port['port']

View File

@ -305,7 +305,7 @@ class TestPlugin(db_base_plugin_v2.NeutronDbPluginV2,
__native_pagination_support = True
__native_sorting_support = True
supported_extension_aliases = ["binding"]
supported_extension_aliases = [portbindings.ALIAS]
def get_plugin_description(self):
return "Test Plugin"

View File

@ -14,7 +14,9 @@
import mock
from neutron_lib.api.definitions import dvr as dvr_apidef
from neutron_lib.api.definitions import external_net as extnet_apidef
from neutron_lib.api.definitions import l3_ext_ha_mode
from neutron_lib.api.definitions import port as port_def
from neutron_lib.api.definitions import portbindings
from neutron_lib.api.definitions import provider_net as providernet
@ -402,7 +404,8 @@ class L3HATestCase(L3HATestFramework):
def test_get_ha_sync_data_for_host_with_non_dvr_agent(self):
with mock.patch.object(self.plugin,
'_get_dvr_sync_data') as mock_get_sync:
self.plugin.supported_extension_aliases = ['dvr', 'l3-ha']
self.plugin.supported_extension_aliases = [
dvr_apidef.ALIAS, l3_ext_ha_mode.ALIAS]
self.plugin.get_ha_sync_data_for_host(self.admin_ctx,
self.agent1['host'],
self.agent1)
@ -411,7 +414,8 @@ class L3HATestCase(L3HATestFramework):
def test_get_ha_sync_data_for_host_with_dvr_agent(self):
with mock.patch.object(self.plugin,
'_get_dvr_sync_data') as mock_get_sync:
self.plugin.supported_extension_aliases = ['dvr', 'l3-ha']
self.plugin.supported_extension_aliases = [
dvr_apidef.ALIAS, l3_ext_ha_mode.ALIAS]
self.plugin.get_ha_sync_data_for_host(self.admin_ctx,
self.agent2['host'],
self.agent2)

View File

@ -11,6 +11,7 @@
# under the License.
import mock
from neutron_lib.api.definitions import port_security
from neutron_lib.plugins import constants
from neutron_lib.plugins import directory
@ -23,7 +24,7 @@ common = pdc.PortSecurityDbCommon
class FakePlugin(pd.PortSecurityDbMixin):
supported_extension_aliases = ['port-security']
supported_extension_aliases = [port_security.ALIAS]
class PortSecurityDbMixinTestCase(base.BaseTestCase):

View File

@ -115,7 +115,7 @@ class AddressScopeTestPlugin(db_base_plugin_v2.NeutronDbPluginV2,
__native_pagination_support = True
__native_sorting_support = True
supported_extension_aliases = ["address-scope"]
supported_extension_aliases = [apidef.ALIAS]
class TestAddressScope(AddressScopeTestCase):

View File

@ -17,6 +17,7 @@ import copy
from datetime import datetime
import time
from neutron_lib.api.definitions import agent as agent_apidef
from neutron_lib import constants
from neutron_lib import context
from oslo_config import cfg
@ -56,7 +57,7 @@ class AgentTestExtensionManager(object):
# This plugin class is just for testing
class TestAgentPlugin(db_base_plugin_v2.NeutronDbPluginV2,
agents_db.AgentDbMixin):
supported_extension_aliases = ["agent"]
supported_extension_aliases = [agent_apidef.ALIAS]
class AgentDBTestMixIn(object):

View File

@ -11,7 +11,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from neutron_lib.api.definitions import agent as agent_apidef
from neutron_lib.api.definitions import availability_zone as az_def
from neutron_lib.api.definitions import availability_zone_filter as azf_def
from neutron_lib import context
from neutron_lib.exceptions import availability_zone as az_exc
@ -39,8 +41,8 @@ class AZExtensionManager(object):
class AZTestPlugin(db_base_plugin_v2.NeutronDbPluginV2,
agents_db.AgentDbMixin):
supported_extension_aliases = ["agent", "availability_zone",
"availability_zone_filter"]
supported_extension_aliases = [agent_apidef.ALIAS, az_def.ALIAS,
azf_def.ALIAS]
class AZTestCommon(test_db_base_plugin_v2.NeutronDbPluginV2TestCase):

View File

@ -45,7 +45,7 @@ class DataPlaneStatusTestExtensionManager(object):
class DataPlaneStatusExtensionTestPlugin(db_base_plugin_v2.NeutronDbPluginV2,
dps_db.DataPlaneStatusMixin):
supported_extension_aliases = ["data-plane-status"]
supported_extension_aliases = [dps_lib.ALIAS]
@staticmethod
@resource_extend.extends([port_def.COLLECTION_NAME])

View File

@ -15,6 +15,8 @@
import math
import netaddr
from neutron_lib.api.definitions import dns as dns_apidef
from neutron_lib.api.definitions import l3 as l3_apdef
from neutron_lib import constants
from neutron_lib import context
from neutron_lib.db import constants as db_const
@ -47,7 +49,7 @@ class DnsExtensionTestPlugin(db_base_plugin_v2.NeutronDbPluginV2):
"""Test plugin to mixin the DNS Integration extensions.
"""
supported_extension_aliases = ["dns-integration", "router"]
supported_extension_aliases = [dns_apidef.ALIAS, l3_apdef.ALIAS]
class DnsExtensionTestCase(test_plugin.Ml2PluginV2TestCase):

View File

@ -12,8 +12,11 @@
# under the License.
import mock
from neutron_lib.api.definitions import dns as dns_apidef
from neutron_lib.api.definitions import dvr as dvr_apidef
from neutron_lib.api.definitions import external_net as extnet_apidef
from neutron_lib.api.definitions import floating_ip_port_forwarding as apidef
from neutron_lib.api.definitions import l3 as l3_apidef
from neutron_lib import constants
from neutron_lib import context
from neutron_lib.plugins import constants as plugin_constants
@ -40,8 +43,8 @@ CORE_PLUGIN = 'neutron.tests.unit.extensions.test_l3.TestNoL3NatPlugin'
class TestL3PorForwardingServicePlugin(test_l3.TestL3NatServicePlugin,
l3_fip_qos.FloatingQoSDbMixin):
supported_extension_aliases = ["router", "dns-integration",
"dvr", "qos-fip"]
supported_extension_aliases = [l3_apidef.ALIAS, dns_apidef.ALIAS,
dvr_apidef.ALIAS, "qos-fip"]
def _get_expected(ref):

View File

@ -34,7 +34,7 @@ class ExtraDhcpOptTestPlugin(db_base_plugin_v2.NeutronDbPluginV2,
associating ports with extra dhcp options.
"""
supported_extension_aliases = ["extra_dhcp_opt"]
supported_extension_aliases = [edo_ext.ALIAS]
def create_port(self, context, port):
with context.session.begin(subtransactions=True):

View File

@ -13,7 +13,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from neutron_lib.api.definitions import external_net as enet_apidef
from neutron_lib.api.definitions import extraroute as xroute_apidef
from neutron_lib.api.definitions import l3 as l3_apidef
from neutron_lib import constants
from neutron_lib import context
from neutron_lib.utils import helpers
@ -46,7 +48,7 @@ class ExtraRouteTestExtensionManager(object):
# This plugin class is for tests with plugin that integrates L3.
class TestExtraRouteIntPlugin(test_l3.TestL3NatIntPlugin,
extraroute_db.ExtraRoute_db_mixin):
supported_extension_aliases = ["external-net", "router",
supported_extension_aliases = [enet_apidef.ALIAS, l3_apidef.ALIAS,
xroute_apidef.ALIAS]
@ -54,7 +56,7 @@ class TestExtraRouteIntPlugin(test_l3.TestL3NatIntPlugin,
# plugins that delegate away L3 routing functionality
class TestExtraRouteL3NatServicePlugin(test_l3.TestL3NatServicePlugin,
extraroute_db.ExtraRoute_db_mixin):
supported_extension_aliases = ["router", xroute_apidef.ALIAS]
supported_extension_aliases = [l3_apidef.ALIAS, xroute_apidef.ALIAS]
class ExtraRouteDBTestCaseBase(object):

View File

@ -12,7 +12,9 @@
# under the License.
#
from neutron_lib.api.definitions import external_net as enet_apidef
from neutron_lib.api.definitions import fip_port_details as apidef
from neutron_lib.api.definitions import l3 as l3_apidef
from oslo_config import cfg
from neutron.db import l3_fip_port_details
@ -35,14 +37,14 @@ class FloatingIPPortDetailsTestExtensionManager(object):
class TestFloatingIPPortDetailsIntPlugin(
test_l3.TestL3NatIntPlugin,
l3_fip_port_details.Fip_port_details_db_mixin):
supported_extension_aliases = ["external-net", "router",
supported_extension_aliases = [enet_apidef.ALIAS, l3_apidef.ALIAS,
apidef.ALIAS]
class TestFloatingIPPortDetailsL3NatServicePlugin(
test_l3.TestL3NatServicePlugin,
l3_fip_port_details.Fip_port_details_db_mixin):
supported_extension_aliases = ["router", apidef.ALIAS]
supported_extension_aliases = [l3_apidef.ALIAS, apidef.ALIAS]
class FloatingIPPortDetailsDBTestCaseBase(test_l3.L3NatTestCaseMixin):

View File

@ -15,7 +15,9 @@
import ddt
import mock
from neutron_lib.api.definitions import external_net as enet_apidef
from neutron_lib.api.definitions import floatingip_pools as apidef
from neutron_lib.api.definitions import l3 as l3_apidef
from neutron_lib import constants as lib_const
from neutron_lib import context
from neutron_lib.plugins import constants as plugin_constants
@ -45,14 +47,14 @@ class FloatingIPPoolsTestExtensionManager(object):
class TestFloatingIPPoolsIntPlugin(
test_l3.TestL3NatIntPlugin,
l3_fip_pools_db.FloatingIPPoolsDbMixin):
supported_extension_aliases = ["external-net", "router",
supported_extension_aliases = [enet_apidef.ALIAS, l3_apidef.ALIAS,
apidef.ALIAS]
class TestFloatingIPPoolsL3NatServicePlugin(
test_l3.TestL3NatServicePlugin,
l3_fip_pools_db.FloatingIPPoolsDbMixin):
supported_extension_aliases = ["router", apidef.ALIAS]
supported_extension_aliases = [l3_apidef.ALIAS, apidef.ALIAS]
@ddt.ddt

View File

@ -19,6 +19,7 @@ import copy
import mock
import netaddr
from neutron_lib.api.definitions import dns as dns_apidef
from neutron_lib.api.definitions import external_net as extnet_apidef
from neutron_lib.api.definitions import l3 as l3_apidef
from neutron_lib.api.definitions import portbindings
@ -306,7 +307,8 @@ class TestL3NatIntPlugin(TestL3NatBasePlugin,
__native_pagination_support = True
__native_sorting_support = True
supported_extension_aliases = ["external-net", "router", "dns-integration"]
supported_extension_aliases = [extnet_apidef.ALIAS, l3_apidef.ALIAS,
dns_apidef.ALIAS]
# This plugin class is for tests with plugin that integrates L3 and L3 agent
@ -316,8 +318,8 @@ class TestL3NatIntAgentSchedulingPlugin(TestL3NatIntPlugin,
L3AgentSchedulerDbMixin,
l3_hamode_db.L3_HA_NAT_db_mixin):
supported_extension_aliases = ["external-net", "router",
"l3_agent_scheduler"]
supported_extension_aliases = [extnet_apidef.ALIAS, l3_apidef.ALIAS,
lib_constants.L3_AGENT_SCHEDULER_EXT_ALIAS]
router_scheduler = importutils.import_object(
cfg.CONF.router_scheduler_driver)
@ -328,7 +330,7 @@ class TestNoL3NatPlugin(TestL3NatBasePlugin):
__native_pagination_support = True
__native_sorting_support = True
supported_extension_aliases = ["external-net"]
supported_extension_aliases = [extnet_apidef.ALIAS]
# A L3 routing service plugin class for tests with plugins that
@ -341,7 +343,7 @@ class TestL3NatServicePlugin(TestL3PluginBaseAttributes,
__native_pagination_support = True
__native_sorting_support = True
supported_extension_aliases = ["router", "dns-integration"]
supported_extension_aliases = [l3_apidef.ALIAS, dns_apidef.ALIAS]
@classmethod
def get_plugin_type(cls):
@ -358,7 +360,8 @@ class TestL3NatAgentSchedulingServicePlugin(TestL3NatServicePlugin,
L3_DVRsch_db_mixin,
l3_hamode_db.L3_HA_NAT_db_mixin):
supported_extension_aliases = ["router", "l3_agent_scheduler"]
supported_extension_aliases = [l3_apidef.ALIAS,
lib_constants.L3_AGENT_SCHEDULER_EXT_ALIAS]
def __init__(self):
super(TestL3NatAgentSchedulingServicePlugin, self).__init__()

View File

@ -16,7 +16,9 @@
import mock
import netaddr
from neutron_lib.api.definitions import external_net as enet_apidef
from neutron_lib.api.definitions import l3 as l3_apidef
from neutron_lib.api.definitions import l3_ext_gw_mode
from neutron_lib import constants
from neutron_lib import context as nctx
from neutron_lib.db import api as db_api
@ -70,7 +72,8 @@ class TestExtensionManager(object):
class TestDbIntPlugin(test_l3.TestL3NatIntPlugin,
l3_gwmode_db.L3_NAT_db_mixin):
supported_extension_aliases = ["external-net", "router", "ext-gw-mode"]
supported_extension_aliases = [enet_apidef.ALIAS, l3_apidef.ALIAS,
l3_ext_gw_mode.ALIAS]
# A simple class for making a concrete class out of the mixin
@ -78,7 +81,7 @@ class TestDbIntPlugin(test_l3.TestL3NatIntPlugin,
class TestDbSepPlugin(test_l3.TestL3NatServicePlugin,
l3_gwmode_db.L3_NAT_db_mixin):
supported_extension_aliases = ["router", "ext-gw-mode"]
supported_extension_aliases = [l3_apidef.ALIAS, l3_ext_gw_mode.ALIAS]
class TestGetEnableSnat(testscenarios.WithScenarios, base.BaseTestCase):

View File

@ -63,7 +63,7 @@ class PortSecurityTestPlugin(db_base_plugin_v2.NeutronDbPluginV2,
associating ports with security groups and port security.
"""
supported_extension_aliases = ["security-group", "port-security"]
supported_extension_aliases = ["security-group", psec.ALIAS]
def create_network(self, context, network):
tenant_id = network['network'].get('tenant_id')

View File

@ -70,7 +70,7 @@ class ProvidernetExtensionTestCase(testlib_api.WebTestCase):
instance = self.plugin.return_value
instance.get_networks_count.return_value = 1
# Register mock plugin and enable the 'provider' extension
instance.supported_extension_aliases = ["provider"]
instance.supported_extension_aliases = [provider_net.ALIAS]
tools.make_mock_plugin_json_encodable(instance)
directory.add_plugin(constants.CORE, instance)
ext_mgr = ProviderExtensionManager()

View File

@ -12,6 +12,8 @@
# under the License.
#
from neutron_lib.api.definitions import external_net as enet_apidef
from neutron_lib.api.definitions import l3 as l3_apidef
from neutron_lib import context
from neutron_lib.exceptions import qos as qos_exc
from neutron_lib.services.qos import constants as qos_consts
@ -42,14 +44,14 @@ class FloatingIPQoSTestExtensionManager(object):
class TestFloatingIPQoSIntPlugin(
test_l3.TestL3NatIntPlugin,
l3_fip_qos.FloatingQoSDbMixin):
supported_extension_aliases = ["external-net", "router",
supported_extension_aliases = [enet_apidef.ALIAS, l3_apidef.ALIAS,
qos_fip.FIP_QOS_ALIAS]
class TestFloatingIPQoSL3NatServicePlugin(
test_l3.TestL3NatServicePlugin,
l3_fip_qos.FloatingQoSDbMixin):
supported_extension_aliases = ["router", qos_fip.FIP_QOS_ALIAS]
supported_extension_aliases = [l3_apidef.ALIAS, qos_fip.FIP_QOS_ALIAS]
class FloatingIPQoSDBTestCaseBase(object):

View File

@ -15,7 +15,9 @@
# under the License.
#
from neutron_lib.api.definitions import external_net as enet_apidef
from neutron_lib.api.definitions import l3 as l3_apidef
from neutron_lib.api.definitions import l3_ext_gw_mode
from neutron_lib.api.definitions import qos_gateway_ip
from neutron_lib import context
from neutron_lib.services.qos import constants as qos_consts
@ -46,17 +48,17 @@ class GatewayIPQoSTestExtensionManager(object):
class TestGatewayIPQoSIntPlugin(
test_l3.TestL3NatIntPlugin,
l3_gateway_ip_qos.L3_gw_ip_qos_db_mixin):
supported_extension_aliases = ["external-net",
"router",
"ext-gw-mode",
supported_extension_aliases = [enet_apidef.ALIAS,
l3_apidef.ALIAS,
l3_ext_gw_mode.ALIAS,
qos_gateway_ip.ALIAS]
class TestGatewayIPQoSL3NatServicePlugin(
test_l3.TestL3NatServicePlugin,
l3_gateway_ip_qos.L3_gw_ip_qos_db_mixin):
supported_extension_aliases = ["router",
"ext-gw-mode",
supported_extension_aliases = [l3_apidef.ALIAS,
l3_ext_gw_mode.ALIAS,
qos_gateway_ip.ALIAS]

View File

@ -11,6 +11,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from neutron_lib.api.definitions import l3 as l3_apidef
from neutron_lib.api.definitions import router_availability_zone
from neutron_lib import constants as lib_const
from neutron_lib.plugins import constants
from neutron.db.availability_zone import router as router_az_db
@ -33,8 +36,9 @@ class AZRouterTestPlugin(common_db_mixin.CommonDbMixin,
l3_db.L3_NAT_db_mixin,
router_az_db.RouterAvailabilityZoneMixin,
l3_agentschedulers_db.AZL3AgentSchedulerDbMixin):
supported_extension_aliases = ["router", "l3_agent_scheduler",
"router_availability_zone"]
supported_extension_aliases = [l3_apidef.ALIAS,
lib_const.L3_AGENT_SCHEDULER_EXT_ALIAS,
router_availability_zone.ALIAS]
@classmethod
def get_plugin_type(cls):

View File

@ -20,6 +20,7 @@ from neutron_lib.api.definitions import ip_allocation as ipalloc_apidef
from neutron_lib.api.definitions import l2_adjacency as l2adj_apidef
from neutron_lib.api.definitions import port as port_apidef
from neutron_lib.api.definitions import portbindings
from neutron_lib.api.definitions import segment as seg_apidef
from neutron_lib.callbacks import events
from neutron_lib.callbacks import exceptions
from neutron_lib.callbacks import registry
@ -128,7 +129,8 @@ class SegmentTestPlugin(db_base_plugin_v2.NeutronDbPluginV2,
__native_pagination_support = True
__native_sorting_support = True
supported_extension_aliases = ["segment", "binding", "ip_allocation"]
supported_extension_aliases = [seg_apidef.ALIAS, portbindings.ALIAS,
ipalloc_apidef.ALIAS]
def get_plugin_description(self):
return "Network Segments"

View File

@ -42,7 +42,7 @@ class SubnetServiceTypesExtensionTestPlugin(
"""Test plugin to mixin the subnet service_types extension.
"""
supported_extension_aliases = ["subnet-service-types", "binding"]
supported_extension_aliases = ["subnet-service-types", portbindings.ALIAS]
class SubnetServiceTypesExtensionTestCase(

View File

@ -43,7 +43,7 @@ class VlanTransparentExtensionTestPlugin(db_base_plugin_v2.NeutronDbPluginV2,
vlt_db.Vlantransparent_db_mixin):
"""Test plugin to mixin the VLAN transparent extensions."""
supported_extension_aliases = ["vlan-transparent"]
supported_extension_aliases = [vlan_apidef.ALIAS]
def create_network(self, context, network):
with context.session.begin(subtransactions=True):

View File

@ -18,7 +18,9 @@ import contextlib
import datetime
import mock
from neutron_lib.api.definitions import l3_ext_ha_mode
from neutron_lib.api.definitions import portbindings
from neutron_lib.api.definitions import router_availability_zone
from neutron_lib import constants
from neutron_lib import context as n_context
from neutron_lib.exceptions import l3 as l3_exc
@ -1452,7 +1454,8 @@ class L3DvrSchedulerTestCase(L3SchedulerBaseMixin,
class L3HAPlugin(db_v2.NeutronDbPluginV2,
l3_hamode_db.L3_HA_NAT_db_mixin,
l3_hascheduler_db.L3_HA_scheduler_db_mixin):
supported_extension_aliases = ["l3-ha", "router_availability_zone"]
supported_extension_aliases = [l3_ext_ha_mode.ALIAS,
router_availability_zone.ALIAS]
@classmethod
def get_plugin_type(cls):