use api def ALIAS in _supported_extension_aliases
Today a number of classes define their _supported_extension_aliases using static strings rather than API definition ALIASes. This patch switches them to use the ALIAS where applicable. Change-Id: Id3be9ff7d84811c05793811306a13262fd3c0787
This commit is contained in:
parent
3b8d3b6f1b
commit
f0051e68f6
neutron
@ -14,6 +14,7 @@
|
||||
# under the License.
|
||||
|
||||
from neutron_lib.api.definitions import dns as dns_apidef
|
||||
from neutron_lib.api.definitions import dns_domain_ports
|
||||
from neutron_lib.api import validators
|
||||
from neutron_lib.callbacks import events
|
||||
from neutron_lib.callbacks import registry
|
||||
@ -380,7 +381,7 @@ class DNSExtensionDriverML2(DNSExtensionDriver):
|
||||
|
||||
|
||||
class DNSDomainPortsExtensionDriver(DNSExtensionDriverML2):
|
||||
_supported_extension_aliases = [dns_apidef.ALIAS, 'dns-domain-ports']
|
||||
_supported_extension_aliases = [dns_apidef.ALIAS, dns_domain_ports.ALIAS]
|
||||
|
||||
@property
|
||||
def extension_aliases(self):
|
||||
|
@ -16,15 +16,30 @@
|
||||
from eventlet import greenthread
|
||||
from neutron_lib.agent import constants as agent_consts
|
||||
from neutron_lib.agent import topics
|
||||
from neutron_lib.api.definitions import address_scope
|
||||
from neutron_lib.api.definitions import agent as agent_apidef
|
||||
from neutron_lib.api.definitions import allowedaddresspairs as addr_apidef
|
||||
from neutron_lib.api.definitions import availability_zone as az_def
|
||||
from neutron_lib.api.definitions import availability_zone_filter
|
||||
from neutron_lib.api.definitions import default_subnetpools
|
||||
from neutron_lib.api.definitions import dhcpagentscheduler
|
||||
from neutron_lib.api.definitions import empty_string_filtering
|
||||
from neutron_lib.api.definitions import external_net
|
||||
from neutron_lib.api.definitions import extra_dhcp_opt as edo_ext
|
||||
from neutron_lib.api.definitions import filter_validation as filter_apidef
|
||||
from neutron_lib.api.definitions import ip_substring_port_filtering
|
||||
from neutron_lib.api.definitions import multiprovidernet
|
||||
from neutron_lib.api.definitions import network as net_def
|
||||
from neutron_lib.api.definitions import network_availability_zone
|
||||
from neutron_lib.api.definitions import network_mtu as mtu_apidef
|
||||
from neutron_lib.api.definitions import network_mtu_writable as mtuw_apidef
|
||||
from neutron_lib.api.definitions import port as port_def
|
||||
from neutron_lib.api.definitions import port_mac_address_regenerate
|
||||
from neutron_lib.api.definitions import port_security as psec
|
||||
from neutron_lib.api.definitions import portbindings
|
||||
from neutron_lib.api.definitions import portbindings_extended as pbe_ext
|
||||
from neutron_lib.api.definitions import provider_net
|
||||
from neutron_lib.api.definitions import security_groups_port_filtering
|
||||
from neutron_lib.api.definitions import subnet as subnet_def
|
||||
from neutron_lib.api.definitions import vlantransparent as vlan_apidef
|
||||
from neutron_lib.api import extensions
|
||||
@ -154,25 +169,29 @@ class Ml2Plugin(db_base_plugin_v2.NeutronDbPluginV2,
|
||||
__filter_validation_support = True
|
||||
|
||||
# List of supported extensions
|
||||
_supported_extension_aliases = ["provider", "external-net", "binding",
|
||||
"quotas", "security-group", "agent",
|
||||
"dhcp_agent_scheduler",
|
||||
"multi-provider", "allowed-address-pairs",
|
||||
"extra_dhcp_opt", "subnet_allocation",
|
||||
"net-mtu", "net-mtu-writable",
|
||||
"vlan-transparent",
|
||||
"address-scope",
|
||||
"availability_zone",
|
||||
"network_availability_zone",
|
||||
"availability_zone_filter",
|
||||
"default-subnetpools",
|
||||
_supported_extension_aliases = [provider_net.ALIAS,
|
||||
external_net.ALIAS, portbindings.ALIAS,
|
||||
"quotas", "security-group",
|
||||
agent_apidef.ALIAS,
|
||||
dhcpagentscheduler.ALIAS,
|
||||
multiprovidernet.ALIAS,
|
||||
addr_apidef.ALIAS,
|
||||
edo_ext.ALIAS, "subnet_allocation",
|
||||
mtu_apidef.ALIAS,
|
||||
mtuw_apidef.ALIAS,
|
||||
vlan_apidef.ALIAS,
|
||||
address_scope.ALIAS,
|
||||
az_def.ALIAS,
|
||||
network_availability_zone.ALIAS,
|
||||
availability_zone_filter.ALIAS,
|
||||
default_subnetpools.ALIAS,
|
||||
"subnet-service-types",
|
||||
"ip-substring-filtering",
|
||||
"port-security-groups-filtering",
|
||||
"empty-string-filtering",
|
||||
"filter-validation",
|
||||
"port-mac-address-regenerate",
|
||||
"binding-extended"]
|
||||
ip_substring_port_filtering.ALIAS,
|
||||
security_groups_port_filtering.ALIAS,
|
||||
empty_string_filtering.ALIAS,
|
||||
filter_apidef.ALIAS,
|
||||
port_mac_address_regenerate.ALIAS,
|
||||
pbe_ext.ALIAS]
|
||||
|
||||
# List of agent types for which all binding_failed ports should try to be
|
||||
# rebound when agent revive
|
||||
|
@ -14,7 +14,17 @@
|
||||
# under the License.
|
||||
|
||||
from neutron_lib.agent import topics
|
||||
from neutron_lib.api.definitions import dvr
|
||||
from neutron_lib.api.definitions import extraroute
|
||||
from neutron_lib.api.definitions import fip_port_details
|
||||
from neutron_lib.api.definitions import floatingip_pools
|
||||
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 l3_ext_ha_mode
|
||||
from neutron_lib.api.definitions import l3_flavors
|
||||
from neutron_lib.api.definitions import l3_port_ip_change_not_allowed
|
||||
from neutron_lib.api.definitions import qos_gateway_ip
|
||||
from neutron_lib.api.definitions import router_availability_zone
|
||||
from neutron_lib import constants as n_const
|
||||
from neutron_lib.db import resource_extend
|
||||
from neutron_lib.plugins import constants as plugin_constants
|
||||
@ -82,13 +92,16 @@ class L3RouterPlugin(service_base.ServicePluginBase,
|
||||
l3_db.L3_NAT_db_mixin, l3_hamode_db.L3_HA_NAT_db_mixin,
|
||||
l3_dvr_db.L3_NAT_with_dvr_db_mixin, and extraroute_db.ExtraRoute_db_mixin.
|
||||
"""
|
||||
_supported_extension_aliases = ["dvr", "router", "ext-gw-mode",
|
||||
"extraroute", "l3_agent_scheduler",
|
||||
"l3-ha", "router_availability_zone",
|
||||
"l3-flavors", "qos-fip",
|
||||
"fip-port-details", "floatingip-pools",
|
||||
"qos-gateway-ip",
|
||||
"l3-port-ip-change-not-allowed"]
|
||||
_supported_extension_aliases = [dvr.ALIAS, l3_apidef.ALIAS,
|
||||
l3_ext_gw_mode.ALIAS,
|
||||
extraroute.ALIAS, "l3_agent_scheduler",
|
||||
l3_ext_ha_mode.ALIAS,
|
||||
router_availability_zone.ALIAS,
|
||||
l3_flavors.ALIAS, "qos-fip",
|
||||
fip_port_details.ALIAS,
|
||||
floatingip_pools.ALIAS,
|
||||
qos_gateway_ip.ALIAS,
|
||||
l3_port_ip_change_not_allowed.ALIAS]
|
||||
|
||||
__native_pagination_support = True
|
||||
__native_sorting_support = True
|
||||
|
Loading…
x
Reference in New Issue
Block a user