Merge "Use ExtensionDescriptor from neutron-lib"
This commit is contained in:
commit
97af096727
@ -30,7 +30,7 @@ import webob.exc
|
|||||||
|
|
||||||
from neutron._i18n import _, _LE, _LI, _LW
|
from neutron._i18n import _, _LE, _LI, _LW
|
||||||
from neutron.common import exceptions
|
from neutron.common import exceptions
|
||||||
import neutron.extensions
|
from neutron import extensions as core_extensions
|
||||||
from neutron.plugins.common import constants as const
|
from neutron.plugins.common import constants as const
|
||||||
from neutron.services import provider_configuration
|
from neutron.services import provider_configuration
|
||||||
from neutron import wsgi
|
from neutron import wsgi
|
||||||
@ -85,11 +85,6 @@ class PluginInterface(object):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
# Temporary redirector to prevent subprojects from breaking.
|
|
||||||
# TODO(HenryG): Remove once all subprojects are patched.
|
|
||||||
ExtensionDescriptor = api_extensions.ExtensionDescriptor
|
|
||||||
|
|
||||||
|
|
||||||
class ActionExtensionController(wsgi.Controller):
|
class ActionExtensionController(wsgi.Controller):
|
||||||
|
|
||||||
def __init__(self, application):
|
def __init__(self, application):
|
||||||
@ -430,7 +425,7 @@ class ExtensionManager(object):
|
|||||||
except AttributeError:
|
except AttributeError:
|
||||||
LOG.exception(_LE("Exception loading extension"))
|
LOG.exception(_LE("Exception loading extension"))
|
||||||
return False
|
return False
|
||||||
return isinstance(extension, ExtensionDescriptor)
|
return isinstance(extension, api_extensions.ExtensionDescriptor)
|
||||||
|
|
||||||
def _load_all_extensions(self):
|
def _load_all_extensions(self):
|
||||||
"""Load extensions from the configured path.
|
"""Load extensions from the configured path.
|
||||||
@ -629,7 +624,7 @@ def get_extensions_path(service_plugins=None):
|
|||||||
paths = collections.OrderedDict()
|
paths = collections.OrderedDict()
|
||||||
|
|
||||||
# Add Neutron core extensions
|
# Add Neutron core extensions
|
||||||
paths[neutron.extensions.__path__[0]] = 1
|
paths[core_extensions.__path__[0]] = 1
|
||||||
if service_plugins:
|
if service_plugins:
|
||||||
# Add Neutron *-aas extensions
|
# Add Neutron *-aas extensions
|
||||||
for plugin in service_plugins.values():
|
for plugin in service_plugins.values():
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
import abc
|
import abc
|
||||||
|
|
||||||
from neutron_lib.api import converters
|
from neutron_lib.api import converters
|
||||||
|
from neutron_lib.api import extensions as api_extensions
|
||||||
from neutron_lib import constants
|
from neutron_lib import constants
|
||||||
from neutron_lib import exceptions as nexception
|
from neutron_lib import exceptions as nexception
|
||||||
from neutron_lib.plugins import directory
|
from neutron_lib.plugins import directory
|
||||||
@ -94,7 +95,7 @@ class AddressScopeUpdateError(nexception.BadRequest):
|
|||||||
"%(reason)s")
|
"%(reason)s")
|
||||||
|
|
||||||
|
|
||||||
class Address_scope(extensions.ExtensionDescriptor):
|
class Address_scope(api_extensions.ExtensionDescriptor):
|
||||||
"""Extension class supporting Address Scopes."""
|
"""Extension class supporting Address Scopes."""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
import abc
|
import abc
|
||||||
|
|
||||||
from neutron_lib.api import converters
|
from neutron_lib.api import converters
|
||||||
|
from neutron_lib.api import extensions as api_extensions
|
||||||
from neutron_lib import exceptions
|
from neutron_lib import exceptions
|
||||||
from neutron_lib.plugins import directory
|
from neutron_lib.plugins import directory
|
||||||
import six
|
import six
|
||||||
@ -76,7 +77,7 @@ class MultipleAgentFoundByTypeHost(exceptions.Conflict):
|
|||||||
"host=%(host)s found")
|
"host=%(host)s found")
|
||||||
|
|
||||||
|
|
||||||
class Agent(extensions.ExtensionDescriptor):
|
class Agent(api_extensions.ExtensionDescriptor):
|
||||||
"""Agent management extension."""
|
"""Agent management extension."""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from neutron_lib.api import converters
|
from neutron_lib.api import converters
|
||||||
|
from neutron_lib.api import extensions
|
||||||
from neutron_lib.api import validators
|
from neutron_lib.api import validators
|
||||||
from neutron_lib import constants
|
from neutron_lib import constants
|
||||||
from neutron_lib import exceptions as nexception
|
from neutron_lib import exceptions as nexception
|
||||||
@ -20,7 +21,6 @@ from oslo_config import cfg
|
|||||||
import webob.exc
|
import webob.exc
|
||||||
|
|
||||||
from neutron._i18n import _
|
from neutron._i18n import _
|
||||||
from neutron.api import extensions
|
|
||||||
from neutron.conf.extensions import allowedaddresspairs as addr_pair
|
from neutron.conf.extensions import allowedaddresspairs as addr_pair
|
||||||
|
|
||||||
addr_pair.register_allowed_address_pair_opts()
|
addr_pair.register_allowed_address_pair_opts()
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from neutron_lib.api import converters
|
from neutron_lib.api import converters
|
||||||
|
from neutron_lib.api import extensions as api_extensions
|
||||||
from neutron_lib.plugins import directory
|
from neutron_lib.plugins import directory
|
||||||
|
|
||||||
from neutron.api import extensions
|
from neutron.api import extensions
|
||||||
@ -44,7 +45,7 @@ RESOURCE_ATTRIBUTE_MAP = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class Auto_allocated_topology(extensions.ExtensionDescriptor):
|
class Auto_allocated_topology(api_extensions.ExtensionDescriptor):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_name(cls):
|
def get_name(cls):
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
import abc
|
import abc
|
||||||
|
|
||||||
|
from neutron_lib.api import extensions as api_extensions
|
||||||
from neutron_lib.api import validators
|
from neutron_lib.api import validators
|
||||||
from neutron_lib import exceptions
|
from neutron_lib import exceptions
|
||||||
from neutron_lib.plugins import directory
|
from neutron_lib.plugins import directory
|
||||||
@ -78,7 +79,7 @@ class AvailabilityZoneNotFound(exceptions.NotFound):
|
|||||||
message = _("AvailabilityZone %(availability_zone)s could not be found.")
|
message = _("AvailabilityZone %(availability_zone)s could not be found.")
|
||||||
|
|
||||||
|
|
||||||
class Availability_zone(extensions.ExtensionDescriptor):
|
class Availability_zone(api_extensions.ExtensionDescriptor):
|
||||||
"""Availability zone extension."""
|
"""Availability zone extension."""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
@ -12,9 +12,9 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from neutron_lib.api import converters
|
from neutron_lib.api import converters
|
||||||
|
from neutron_lib.api import extensions
|
||||||
from neutron_lib import constants
|
from neutron_lib import constants
|
||||||
|
|
||||||
from neutron.api import extensions
|
|
||||||
from neutron.api.v2 import attributes
|
from neutron.api.v2 import attributes
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
import abc
|
import abc
|
||||||
|
|
||||||
|
from neutron_lib.api import extensions as api_extensions
|
||||||
from neutron_lib import constants
|
from neutron_lib import constants
|
||||||
from neutron_lib import exceptions
|
from neutron_lib import exceptions
|
||||||
from neutron_lib.plugins import directory
|
from neutron_lib.plugins import directory
|
||||||
@ -78,7 +79,7 @@ class DhcpAgentsHostingNetworkController(wsgi.Controller):
|
|||||||
request.context, kwargs['network_id'])
|
request.context, kwargs['network_id'])
|
||||||
|
|
||||||
|
|
||||||
class Dhcpagentscheduler(extensions.ExtensionDescriptor):
|
class Dhcpagentscheduler(api_extensions.ExtensionDescriptor):
|
||||||
"""Extension class supporting dhcp agent scheduler.
|
"""Extension class supporting dhcp agent scheduler.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -15,13 +15,13 @@
|
|||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
from neutron_lib.api import extensions
|
||||||
from neutron_lib.api import validators
|
from neutron_lib.api import validators
|
||||||
from neutron_lib import exceptions as n_exc
|
from neutron_lib import exceptions as n_exc
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
import six
|
import six
|
||||||
|
|
||||||
from neutron._i18n import _
|
from neutron._i18n import _
|
||||||
from neutron.api import extensions
|
|
||||||
from neutron.api.v2 import attributes as attr
|
from neutron.api.v2 import attributes as attr
|
||||||
from neutron.extensions import l3
|
from neutron.extensions import l3
|
||||||
|
|
||||||
|
@ -15,12 +15,12 @@
|
|||||||
import abc
|
import abc
|
||||||
|
|
||||||
from neutron_lib.api import converters
|
from neutron_lib.api import converters
|
||||||
|
from neutron_lib.api import extensions
|
||||||
from neutron_lib import constants
|
from neutron_lib import constants
|
||||||
from neutron_lib import exceptions
|
from neutron_lib import exceptions
|
||||||
import six
|
import six
|
||||||
|
|
||||||
from neutron._i18n import _
|
from neutron._i18n import _
|
||||||
from neutron.api import extensions
|
|
||||||
|
|
||||||
DISTRIBUTED = 'distributed'
|
DISTRIBUTED = 'distributed'
|
||||||
EXTENDED_ATTRIBUTES_2_0 = {
|
EXTENDED_ATTRIBUTES_2_0 = {
|
||||||
|
@ -14,10 +14,10 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from neutron_lib.api import converters
|
from neutron_lib.api import converters
|
||||||
|
from neutron_lib.api import extensions
|
||||||
from neutron_lib import exceptions as nexception
|
from neutron_lib import exceptions as nexception
|
||||||
|
|
||||||
from neutron._i18n import _
|
from neutron._i18n import _
|
||||||
from neutron.api import extensions
|
|
||||||
|
|
||||||
|
|
||||||
class ExternalNetworkInUse(nexception.InUse):
|
class ExternalNetworkInUse(nexception.InUse):
|
||||||
|
@ -14,11 +14,11 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from neutron_lib.api import converters
|
from neutron_lib.api import converters
|
||||||
|
from neutron_lib.api import extensions
|
||||||
from neutron_lib.api import validators
|
from neutron_lib.api import validators
|
||||||
from neutron_lib import exceptions
|
from neutron_lib import exceptions
|
||||||
|
|
||||||
from neutron._i18n import _
|
from neutron._i18n import _
|
||||||
from neutron.api import extensions
|
|
||||||
|
|
||||||
|
|
||||||
# ExtraDHcpOpts Exceptions
|
# ExtraDHcpOpts Exceptions
|
||||||
|
@ -14,11 +14,11 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from neutron_lib.api import converters
|
from neutron_lib.api import converters
|
||||||
|
from neutron_lib.api import extensions
|
||||||
from neutron_lib import constants
|
from neutron_lib import constants
|
||||||
from neutron_lib import exceptions as nexception
|
from neutron_lib import exceptions as nexception
|
||||||
|
|
||||||
from neutron._i18n import _
|
from neutron._i18n import _
|
||||||
from neutron.api import extensions
|
|
||||||
|
|
||||||
|
|
||||||
# Extra Routes Exceptions
|
# Extra Routes Exceptions
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from neutron_lib.api import converters
|
from neutron_lib.api import converters
|
||||||
|
from neutron_lib.api import extensions as api_extensions
|
||||||
from neutron_lib.api import validators
|
from neutron_lib.api import validators
|
||||||
from neutron_lib import exceptions as nexception
|
from neutron_lib import exceptions as nexception
|
||||||
from neutron_lib.plugins import directory
|
from neutron_lib.plugins import directory
|
||||||
@ -175,7 +176,7 @@ SUB_RESOURCE_ATTRIBUTE_MAP = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class Flavors(extensions.ExtensionDescriptor):
|
class Flavors(api_extensions.ExtensionDescriptor):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_name(cls):
|
def get_name(cls):
|
||||||
|
@ -12,7 +12,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from neutron.api import extensions
|
from neutron_lib.api import extensions
|
||||||
|
|
||||||
from neutron.api.v2 import attributes
|
from neutron.api.v2 import attributes
|
||||||
|
|
||||||
IP_ALLOCATION = 'ip_allocation'
|
IP_ALLOCATION = 'ip_allocation'
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from neutron.api import extensions
|
from neutron_lib.api import extensions
|
||||||
|
|
||||||
|
|
||||||
L2_ADJACENCY = 'l2_adjacency'
|
L2_ADJACENCY = 'l2_adjacency'
|
||||||
|
@ -16,11 +16,11 @@
|
|||||||
import abc
|
import abc
|
||||||
|
|
||||||
from neutron_lib.api import converters
|
from neutron_lib.api import converters
|
||||||
|
from neutron_lib.api import extensions
|
||||||
from neutron_lib import exceptions as nexception
|
from neutron_lib import exceptions as nexception
|
||||||
import six
|
import six
|
||||||
|
|
||||||
from neutron._i18n import _
|
from neutron._i18n import _
|
||||||
from neutron.api import extensions
|
|
||||||
from neutron.api.v2 import attributes as attr
|
from neutron.api.v2 import attributes as attr
|
||||||
from neutron.api.v2 import resource_helper
|
from neutron.api.v2 import resource_helper
|
||||||
from neutron.conf import quota
|
from neutron.conf import quota
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from neutron_lib.api import converters
|
from neutron_lib.api import converters
|
||||||
|
from neutron_lib.api import extensions
|
||||||
|
|
||||||
from neutron.api import extensions
|
|
||||||
from neutron.extensions import l3
|
from neutron.extensions import l3
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,11 +13,11 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from neutron_lib.api import converters
|
from neutron_lib.api import converters
|
||||||
|
from neutron_lib.api import extensions
|
||||||
from neutron_lib import constants
|
from neutron_lib import constants
|
||||||
from neutron_lib import exceptions
|
from neutron_lib import exceptions
|
||||||
|
|
||||||
from neutron._i18n import _
|
from neutron._i18n import _
|
||||||
from neutron.api import extensions
|
|
||||||
from neutron.common import constants as n_const
|
from neutron.common import constants as n_const
|
||||||
|
|
||||||
HA_INFO = 'ha'
|
HA_INFO = 'ha'
|
||||||
|
@ -12,9 +12,9 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
from neutron_lib.api import extensions
|
||||||
from neutron_lib import constants
|
from neutron_lib import constants
|
||||||
|
|
||||||
from neutron.api import extensions
|
|
||||||
|
|
||||||
EXTENDED_ATTRIBUTES_2_0 = {
|
EXTENDED_ATTRIBUTES_2_0 = {
|
||||||
'routers': {
|
'routers': {
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
import abc
|
import abc
|
||||||
|
|
||||||
|
from neutron_lib.api import extensions as api_extensions
|
||||||
from neutron_lib import constants
|
from neutron_lib import constants
|
||||||
from neutron_lib import exceptions
|
from neutron_lib import exceptions
|
||||||
from neutron_lib.plugins import directory
|
from neutron_lib.plugins import directory
|
||||||
@ -102,7 +103,7 @@ class L3AgentsHostingRouterController(wsgi.Controller):
|
|||||||
request.context, kwargs['router_id'])
|
request.context, kwargs['router_id'])
|
||||||
|
|
||||||
|
|
||||||
class L3agentscheduler(extensions.ExtensionDescriptor):
|
class L3agentscheduler(api_extensions.ExtensionDescriptor):
|
||||||
"""Extension class supporting l3 agent scheduler.
|
"""Extension class supporting l3 agent scheduler.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -15,11 +15,11 @@
|
|||||||
import abc
|
import abc
|
||||||
|
|
||||||
from neutron_lib.api import converters
|
from neutron_lib.api import converters
|
||||||
|
from neutron_lib.api import extensions
|
||||||
from neutron_lib import exceptions as nexception
|
from neutron_lib import exceptions as nexception
|
||||||
import six
|
import six
|
||||||
|
|
||||||
from neutron._i18n import _
|
from neutron._i18n import _
|
||||||
from neutron.api import extensions
|
|
||||||
from neutron.api.v2 import attributes as attr
|
from neutron.api.v2 import attributes as attr
|
||||||
from neutron.api.v2 import resource_helper
|
from neutron.api.v2 import resource_helper
|
||||||
from neutron.plugins.common import constants
|
from neutron.plugins.common import constants
|
||||||
|
@ -14,13 +14,13 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from neutron_lib.api import converters
|
from neutron_lib.api import converters
|
||||||
|
from neutron_lib.api import extensions
|
||||||
from neutron_lib.api import validators
|
from neutron_lib.api import validators
|
||||||
from neutron_lib import constants
|
from neutron_lib import constants
|
||||||
from neutron_lib import exceptions as nexception
|
from neutron_lib import exceptions as nexception
|
||||||
import webob.exc
|
import webob.exc
|
||||||
|
|
||||||
from neutron._i18n import _
|
from neutron._i18n import _
|
||||||
from neutron.api import extensions
|
|
||||||
from neutron.extensions import providernet as pnet
|
from neutron.extensions import providernet as pnet
|
||||||
|
|
||||||
SEGMENTS = 'segments'
|
SEGMENTS = 'segments'
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from neutron.api import extensions
|
from neutron_lib.api import extensions
|
||||||
|
|
||||||
|
|
||||||
MTU = 'mtu'
|
MTU = 'mtu'
|
||||||
|
@ -14,9 +14,9 @@
|
|||||||
|
|
||||||
import abc
|
import abc
|
||||||
|
|
||||||
|
from neutron_lib.api import extensions
|
||||||
import six
|
import six
|
||||||
|
|
||||||
from neutron.api import extensions
|
|
||||||
from neutron.extensions import availability_zone as az_ext
|
from neutron.extensions import availability_zone as az_ext
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
from neutron_lib.api import extensions as api_extensions
|
||||||
|
|
||||||
import neutron.api.extensions as extensions
|
import neutron.api.extensions as extensions
|
||||||
import neutron.api.v2.base as base
|
import neutron.api.v2.base as base
|
||||||
import neutron.services.network_ip_availability.plugin as plugin
|
import neutron.services.network_ip_availability.plugin as plugin
|
||||||
@ -41,7 +43,7 @@ RESOURCE_ATTRIBUTE_MAP = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class Network_ip_availability(extensions.ExtensionDescriptor):
|
class Network_ip_availability(api_extensions.ExtensionDescriptor):
|
||||||
"""Extension class supporting network ip availability information."""
|
"""Extension class supporting network ip availability information."""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
@ -11,13 +11,15 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
from neutron_lib.api import extensions as api_extensions
|
||||||
|
|
||||||
from neutron.api import extensions
|
from neutron.api import extensions
|
||||||
|
|
||||||
|
|
||||||
_ALIAS = 'pagination'
|
_ALIAS = 'pagination'
|
||||||
|
|
||||||
|
|
||||||
class Pagination(extensions.ExtensionDescriptor):
|
class Pagination(api_extensions.ExtensionDescriptor):
|
||||||
"""Fake extension that indicates that pagination is enabled."""
|
"""Fake extension that indicates that pagination is enabled."""
|
||||||
|
|
||||||
extensions.register_custom_supported_check(
|
extensions.register_custom_supported_check(
|
||||||
|
@ -13,9 +13,9 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from neutron_lib.api import extensions
|
||||||
from neutron_lib import constants
|
from neutron_lib import constants
|
||||||
|
|
||||||
from neutron.api import extensions
|
|
||||||
|
|
||||||
# The type of vnic that this port should be attached to
|
# The type of vnic that this port should be attached to
|
||||||
VNIC_TYPE = 'binding:vnic_type'
|
VNIC_TYPE = 'binding:vnic_type'
|
||||||
|
@ -13,11 +13,11 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from neutron_lib.api import converters
|
from neutron_lib.api import converters
|
||||||
|
from neutron_lib.api import extensions
|
||||||
from neutron_lib import constants
|
from neutron_lib import constants
|
||||||
from neutron_lib import exceptions as nexception
|
from neutron_lib import exceptions as nexception
|
||||||
|
|
||||||
from neutron._i18n import _
|
from neutron._i18n import _
|
||||||
from neutron.api import extensions
|
|
||||||
|
|
||||||
|
|
||||||
DEFAULT_PORT_SECURITY = True
|
DEFAULT_PORT_SECURITY = True
|
||||||
|
@ -11,13 +11,15 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
from neutron_lib.api import extensions as api_extensions
|
||||||
|
|
||||||
from neutron.api import extensions
|
from neutron.api import extensions
|
||||||
|
|
||||||
|
|
||||||
_ALIAS = 'project-id'
|
_ALIAS = 'project-id'
|
||||||
|
|
||||||
|
|
||||||
class Project_id(extensions.ExtensionDescriptor):
|
class Project_id(api_extensions.ExtensionDescriptor):
|
||||||
"""Extension that indicates that project_id is enabled.
|
"""Extension that indicates that project_id is enabled.
|
||||||
|
|
||||||
This extension indicates that the Keystone V3 'project_id' field
|
This extension indicates that the Keystone V3 'project_id' field
|
||||||
|
@ -14,12 +14,12 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from neutron_lib.api import converters
|
from neutron_lib.api import converters
|
||||||
|
from neutron_lib.api import extensions
|
||||||
from neutron_lib.api import validators
|
from neutron_lib.api import validators
|
||||||
from neutron_lib import constants
|
from neutron_lib import constants
|
||||||
from neutron_lib import exceptions as n_exc
|
from neutron_lib import exceptions as n_exc
|
||||||
|
|
||||||
from neutron._i18n import _
|
from neutron._i18n import _
|
||||||
from neutron.api import extensions
|
|
||||||
|
|
||||||
|
|
||||||
NETWORK_TYPE = 'provider:network_type'
|
NETWORK_TYPE = 'provider:network_type'
|
||||||
|
@ -18,6 +18,7 @@ import itertools
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
from neutron_lib.api import converters
|
from neutron_lib.api import converters
|
||||||
|
from neutron_lib.api import extensions as api_extensions
|
||||||
from neutron_lib.plugins import directory
|
from neutron_lib.plugins import directory
|
||||||
import six
|
import six
|
||||||
|
|
||||||
@ -130,7 +131,7 @@ EXTENDED_ATTRIBUTES_2_0 = {
|
|||||||
'validate': {'type:uuid_or_none': None}}}}
|
'validate': {'type:uuid_or_none': None}}}}
|
||||||
|
|
||||||
|
|
||||||
class Qos(extensions.ExtensionDescriptor):
|
class Qos(api_extensions.ExtensionDescriptor):
|
||||||
"""Quality of Service API extension."""
|
"""Quality of Service API extension."""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from neutron_lib.api import converters
|
from neutron_lib.api import converters
|
||||||
|
from neutron_lib.api import extensions as api_extensions
|
||||||
from neutron_lib import exceptions as n_exc
|
from neutron_lib import exceptions as n_exc
|
||||||
from neutron_lib.plugins import directory
|
from neutron_lib.plugins import directory
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
@ -126,7 +127,7 @@ class QuotaSetsController(wsgi.Controller):
|
|||||||
return {self._resource_name: self._get_quotas(request, id)}
|
return {self._resource_name: self._get_quotas(request, id)}
|
||||||
|
|
||||||
|
|
||||||
class Quotasv2(extensions.ExtensionDescriptor):
|
class Quotasv2(api_extensions.ExtensionDescriptor):
|
||||||
"""Quotas management support."""
|
"""Quotas management support."""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from neutron_lib.api import extensions as api_extensions
|
||||||
from neutron_lib import exceptions as n_exc
|
from neutron_lib import exceptions as n_exc
|
||||||
from neutron_lib.plugins import directory
|
from neutron_lib.plugins import directory
|
||||||
|
|
||||||
@ -81,7 +82,7 @@ RESOURCE_ATTRIBUTE_MAP = {
|
|||||||
quota.register_quota_opts(quota.rbac_quota_opts)
|
quota.register_quota_opts(quota.rbac_quota_opts)
|
||||||
|
|
||||||
|
|
||||||
class Rbac(extensions.ExtensionDescriptor):
|
class Rbac(api_extensions.ExtensionDescriptor):
|
||||||
"""RBAC policy support."""
|
"""RBAC policy support."""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
@ -11,7 +11,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from neutron.api import extensions
|
from neutron_lib.api import extensions
|
||||||
|
|
||||||
from neutron.db import standard_attr
|
from neutron.db import standard_attr
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,9 +14,9 @@
|
|||||||
|
|
||||||
import abc
|
import abc
|
||||||
|
|
||||||
|
from neutron_lib.api import extensions
|
||||||
import six
|
import six
|
||||||
|
|
||||||
from neutron.api import extensions
|
|
||||||
from neutron.extensions import availability_zone as az_ext
|
from neutron.extensions import availability_zone as az_ext
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from neutron.api import extensions
|
from neutron_lib.api import extensions
|
||||||
|
|
||||||
SERVICE_TYPE_ID = 'service_type_id'
|
SERVICE_TYPE_ID = 'service_type_id'
|
||||||
EXTENDED_ATTRIBUTES_2_0 = {
|
EXTENDED_ATTRIBUTES_2_0 = {
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
import abc
|
import abc
|
||||||
|
|
||||||
import netaddr
|
import netaddr
|
||||||
|
from neutron_lib.api import extensions as api_extensions
|
||||||
from neutron_lib.api import validators
|
from neutron_lib.api import validators
|
||||||
from neutron_lib import constants as const
|
from neutron_lib import constants as const
|
||||||
from neutron_lib import exceptions as nexception
|
from neutron_lib import exceptions as nexception
|
||||||
@ -281,7 +282,7 @@ EXTENDED_ATTRIBUTES_2_0 = {
|
|||||||
quota.register_quota_opts(quota.security_group_quota_opts)
|
quota.register_quota_opts(quota.security_group_quota_opts)
|
||||||
|
|
||||||
|
|
||||||
class Securitygroup(extensions.ExtensionDescriptor):
|
class Securitygroup(api_extensions.ExtensionDescriptor):
|
||||||
"""Security group extension."""
|
"""Security group extension."""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
@ -16,6 +16,7 @@ import abc
|
|||||||
import six
|
import six
|
||||||
|
|
||||||
from neutron_lib.api import converters
|
from neutron_lib.api import converters
|
||||||
|
from neutron_lib.api import extensions as api_extensions
|
||||||
from neutron_lib import constants
|
from neutron_lib import constants
|
||||||
from neutron_lib.plugins import directory
|
from neutron_lib.plugins import directory
|
||||||
|
|
||||||
@ -88,7 +89,7 @@ RESOURCE_ATTRIBUTE_MAP = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class Segment(extensions.ExtensionDescriptor):
|
class Segment(api_extensions.ExtensionDescriptor):
|
||||||
"""Extension class supporting Segments."""
|
"""Extension class supporting Segments."""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from neutron_lib.api import extensions as api_extensions
|
||||||
|
|
||||||
from neutron._i18n import _
|
from neutron._i18n import _
|
||||||
from neutron.api import extensions
|
from neutron.api import extensions
|
||||||
from neutron.api.v2 import base
|
from neutron.api.v2 import base
|
||||||
@ -40,7 +42,7 @@ RESOURCE_ATTRIBUTE_MAP = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class Servicetype(extensions.ExtensionDescriptor):
|
class Servicetype(api_extensions.ExtensionDescriptor):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_name(cls):
|
def get_name(cls):
|
||||||
|
@ -11,13 +11,15 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
from neutron_lib.api import extensions as api_extensions
|
||||||
|
|
||||||
from neutron.api import extensions
|
from neutron.api import extensions
|
||||||
|
|
||||||
|
|
||||||
_ALIAS = 'sorting'
|
_ALIAS = 'sorting'
|
||||||
|
|
||||||
|
|
||||||
class Sorting(extensions.ExtensionDescriptor):
|
class Sorting(api_extensions.ExtensionDescriptor):
|
||||||
"""Fake extension that indicates that sorting is enabled."""
|
"""Fake extension that indicates that sorting is enabled."""
|
||||||
|
|
||||||
extensions.register_custom_supported_check(
|
extensions.register_custom_supported_check(
|
||||||
|
@ -13,7 +13,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from neutron.api import extensions
|
from neutron_lib.api import extensions
|
||||||
|
|
||||||
from neutron.api.v2 import attributes as attr
|
from neutron.api.v2 import attributes as attr
|
||||||
from neutron.db import standard_attr
|
from neutron.db import standard_attr
|
||||||
|
|
||||||
|
@ -10,13 +10,13 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from neutron_lib.api import extensions
|
||||||
from neutron_lib.api import validators
|
from neutron_lib.api import validators
|
||||||
from neutron_lib import constants
|
from neutron_lib import constants
|
||||||
from neutron_lib import exceptions
|
from neutron_lib import exceptions
|
||||||
import webob.exc
|
import webob.exc
|
||||||
|
|
||||||
from neutron._i18n import _
|
from neutron._i18n import _
|
||||||
from neutron.api import extensions
|
|
||||||
from neutron.api.v2 import attributes
|
from neutron.api.v2 import attributes
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,10 +13,9 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from neutron_lib.api import extensions
|
||||||
from neutron_lib import constants
|
from neutron_lib import constants
|
||||||
|
|
||||||
from neutron.api import extensions
|
|
||||||
|
|
||||||
|
|
||||||
class Subnetallocation(extensions.ExtensionDescriptor):
|
class Subnetallocation(extensions.ExtensionDescriptor):
|
||||||
"""Extension class supporting subnet allocation."""
|
"""Extension class supporting subnet allocation."""
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
import abc
|
import abc
|
||||||
|
|
||||||
|
from neutron_lib.api import extensions as api_extensions
|
||||||
from neutron_lib.api import validators
|
from neutron_lib.api import validators
|
||||||
from neutron_lib import exceptions
|
from neutron_lib import exceptions
|
||||||
from neutron_lib.plugins import directory
|
from neutron_lib.plugins import directory
|
||||||
@ -121,7 +122,7 @@ class TagController(object):
|
|||||||
return self.plugin.delete_tags(request.context, parent, parent_id)
|
return self.plugin.delete_tags(request.context, parent, parent_id)
|
||||||
|
|
||||||
|
|
||||||
class Tag(extensions.ExtensionDescriptor):
|
class Tag(api_extensions.ExtensionDescriptor):
|
||||||
"""Extension class supporting tags."""
|
"""Extension class supporting tags."""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
@ -12,7 +12,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from neutron.api import extensions
|
from neutron_lib.api import extensions
|
||||||
|
|
||||||
from neutron.db import standard_attr
|
from neutron.db import standard_attr
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from neutron_lib.api.definitions import trunk
|
from neutron_lib.api.definitions import trunk
|
||||||
|
from neutron_lib.api import extensions
|
||||||
|
|
||||||
from neutron.api import extensions
|
|
||||||
from neutron.api.v2 import resource_helper
|
from neutron.api.v2 import resource_helper
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,8 +13,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from neutron_lib.api.definitions import trunk_details
|
from neutron_lib.api.definitions import trunk_details
|
||||||
|
from neutron_lib.api import extensions
|
||||||
from neutron.api import extensions
|
|
||||||
|
|
||||||
|
|
||||||
# NOTE(armax): because of the API machinery, this extension must be on
|
# NOTE(armax): because of the API machinery, this extension must be on
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from neutron_lib.api import converters
|
from neutron_lib.api import converters
|
||||||
|
from neutron_lib.api import extensions
|
||||||
from neutron_lib.api import validators
|
from neutron_lib.api import validators
|
||||||
from neutron_lib import constants
|
from neutron_lib import constants
|
||||||
from neutron_lib import exceptions
|
from neutron_lib import exceptions
|
||||||
@ -20,7 +21,6 @@ from oslo_config import cfg
|
|||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
|
|
||||||
from neutron._i18n import _, _LI
|
from neutron._i18n import _, _LI
|
||||||
from neutron.api import extensions
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -10,13 +10,15 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from neutron_lib.api import extensions as api_extensions
|
||||||
|
|
||||||
from neutron.api import extensions
|
from neutron.api import extensions
|
||||||
from neutron.api.v2 import base
|
from neutron.api.v2 import base
|
||||||
from neutron.pecan_wsgi import controllers
|
from neutron.pecan_wsgi import controllers
|
||||||
from neutron.pecan_wsgi.controllers import utils as pecan_utils
|
from neutron.pecan_wsgi.controllers import utils as pecan_utils
|
||||||
|
|
||||||
|
|
||||||
class FakeSingularCollectionExtension(extensions.ExtensionDescriptor):
|
class FakeSingularCollectionExtension(api_extensions.ExtensionDescriptor):
|
||||||
|
|
||||||
COLLECTION = 'topologies'
|
COLLECTION = 'topologies'
|
||||||
RESOURCE = 'topology'
|
RESOURCE = 'topology'
|
||||||
@ -104,7 +106,7 @@ def create_router(context, l3_plugin):
|
|||||||
'admin_state_up': True}})
|
'admin_state_up': True}})
|
||||||
|
|
||||||
|
|
||||||
class FakeExtension(extensions.ExtensionDescriptor):
|
class FakeExtension(api_extensions.ExtensionDescriptor):
|
||||||
|
|
||||||
HYPHENATED_RESOURCE = 'meh_meh'
|
HYPHENATED_RESOURCE = 'meh_meh'
|
||||||
HYPHENATED_COLLECTION = HYPHENATED_RESOURCE + 's'
|
HYPHENATED_COLLECTION = HYPHENATED_RESOURCE + 's'
|
||||||
|
@ -15,11 +15,13 @@
|
|||||||
|
|
||||||
import abc
|
import abc
|
||||||
|
|
||||||
|
from neutron_lib.api import extensions as api_extensions
|
||||||
|
|
||||||
from neutron.api import extensions
|
from neutron.api import extensions
|
||||||
from neutron import wsgi
|
from neutron import wsgi
|
||||||
|
|
||||||
|
|
||||||
class StubExtension(extensions.ExtensionDescriptor):
|
class StubExtension(api_extensions.ExtensionDescriptor):
|
||||||
|
|
||||||
def __init__(self, alias="stub_extension", optional=None):
|
def __init__(self, alias="stub_extension", optional=None):
|
||||||
self.alias = alias
|
self.alias = alias
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from neutron.api import extensions
|
from neutron_lib.api import extensions
|
||||||
|
|
||||||
EXTENDED_ATTRIBUTE = 'extended_attribute'
|
EXTENDED_ATTRIBUTE = 'extended_attribute'
|
||||||
EXTENDED_ATTRIBUTES_2_0 = {
|
EXTENDED_ATTRIBUTES_2_0 = {
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
import abc
|
import abc
|
||||||
|
|
||||||
|
from neutron_lib.api import extensions as api_extensions
|
||||||
from neutron_lib.plugins import directory
|
from neutron_lib.plugins import directory
|
||||||
|
|
||||||
from neutron.api import extensions
|
from neutron.api import extensions
|
||||||
@ -39,7 +40,7 @@ RESOURCE_ATTRIBUTE_MAP = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class Extensionattribute(extensions.ExtensionDescriptor):
|
class Extensionattribute(api_extensions.ExtensionDescriptor):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_name(cls):
|
def get_name(cls):
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
import abc
|
import abc
|
||||||
|
|
||||||
|
from neutron_lib.api import extensions as api_extensions
|
||||||
from oslo_serialization import jsonutils
|
from oslo_serialization import jsonutils
|
||||||
import six
|
import six
|
||||||
|
|
||||||
@ -36,7 +37,7 @@ class FoxInSocksPluginInterface(extensions.PluginInterface):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class Foxinsocks(extensions.ExtensionDescriptor):
|
class Foxinsocks(api_extensions.ExtensionDescriptor):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
pass
|
pass
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from neutron.api import extensions
|
from neutron_lib.api import extensions
|
||||||
|
|
||||||
|
|
||||||
EXTENDED_ATTRIBUTES_2_0 = {
|
EXTENDED_ATTRIBUTES_2_0 = {
|
||||||
|
@ -10,10 +10,10 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from neutron_lib.api import extensions
|
||||||
from neutron_lib import constants
|
from neutron_lib import constants
|
||||||
|
|
||||||
from neutron._i18n import _
|
from neutron._i18n import _
|
||||||
from neutron.api import extensions
|
|
||||||
|
|
||||||
|
|
||||||
EXTENDED_ATTRIBUTES_2_0 = {
|
EXTENDED_ATTRIBUTES_2_0 = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user