return True
+@six.add_metaclass(abc.ABCMeta)
class ExtensionDescriptor(object):
- """Base class that defines the contract for extensions.
-
- Note that you don't have to derive from this class to have a valid
- extension; it is purely a convenience.
- """
+ """Base class that defines the contract for extensions."""
def get_name(self):
"""The name of the extension.
"host=%(host)s found")
-class Agent(object):
+class Agent(extensions.ExtensionDescriptor):
"""Agent management extension."""
@classmethod
import webob.exc
+from neutron.api import extensions
from neutron.api.v2 import attributes as attr
from neutron.common import exceptions as nexception
from oslo_config import cfg
}
-class Allowedaddresspairs(object):
+class Allowedaddresspairs(extensions.ExtensionDescriptor):
"""Extension class supporting allowed address pairs."""
@classmethod
import six
+from neutron.api import extensions
from neutron.api.v2 import attributes
from neutron.common import constants
from neutron.common import exceptions
message = _("Unable to generate unique DVR mac for host %(host)s.")
-class Dvr(object):
+class Dvr(extensions.ExtensionDescriptor):
"""Extension class supporting distributed virtual router."""
@classmethod
# License for the specific language governing permissions and limitations
# under the License.
-
+from neutron.api import extensions
from neutron.api.v2 import attributes as attr
from neutron.common import exceptions as nexception
}
-class Extraroute(object):
+class Extraroute(extensions.ExtensionDescriptor):
@classmethod
def get_name(cls):
# License for the specific language governing permissions and limitations
# under the License.
+from neutron.api import extensions
from neutron.api.v2 import attributes
from neutron.common import exceptions as nexception
}
-class Portsecurity(object):
+class Portsecurity(extensions.ExtensionDescriptor):
"""Extension class supporting port security."""
@classmethod
# License for the specific language governing permissions and limitations
# under the License.
+from neutron.api import extensions
SERVICE_TYPE_ID = 'service_type_id'
EXTENDED_ATTRIBUTES_2_0 = {
}
-class Routerservicetype(object):
+class Routerservicetype(extensions.ExtensionDescriptor):
"""Extension class supporting router service type."""
@classmethod
from oslo_log import log as logging
+from neutron.api import extensions
from neutron.api.v2 import attributes
}
-class Router_provider(object):
+class Router_provider(extensions.ExtensionDescriptor):
@classmethod
def get_name(cls):
return "Router Provider"
# License for the specific language governing permissions and limitations
# under the License.
+from neutron.api import extensions
# Attribute Map
ADV_SERVICE_PROVIDERS = 'advanced_service_providers'
'default': None}}}
-class Advancedserviceproviders(object):
+class Advancedserviceproviders(extensions.ExtensionDescriptor):
@classmethod
def get_name(cls):
return "Advanced Service Providers"
}
-class Lsn(object):
+class Lsn(extensions.ExtensionDescriptor):
"""Enable LSN configuration for Neutron NSX networks."""
@classmethod
# License for the specific language governing permissions and limitations
# under the License.
+from neutron.api import extensions
from neutron.api.v2 import attributes
}
-class Maclearning(object):
+class Maclearning(extensions.ExtensionDescriptor):
"""Extension class supporting port mac learning."""
@classmethod
from oslo_config import cfg
+from neutron.api import extensions
from neutron.api.v2 import attributes
from neutron.api.v2 import resource_helper
attributes.validators['type:connector_type'] = _validate_connector_type
-class Networkgw(object):
+class Networkgw(extensions.ExtensionDescriptor):
"""API extension for Layer-2 Gateway support.
The Layer-2 gateway feature allows for connecting neutron networks
}
-class Qos(object):
+class Qos(extensions.ExtensionDescriptor):
"""Port Queue extension."""
@classmethod
# License for the specific language governing permissions and limitations
# under the License.
+from neutron.api import extensions
from neutron.api.v2 import attributes
}
-class Routertype(object):
+class Routertype(extensions.ExtensionDescriptor):
"""Extension class supporting router type."""
@classmethod
# License for the specific language governing permissions and limitations
# under the License.
+from neutron.api import extensions
from neutron.api.v2 import attributes
# Attribute Map
'convert_to': attributes.convert_to_int_if_not_none}}}
-class Vnicindex(object):
+class Vnicindex(extensions.ExtensionDescriptor):
@classmethod
def get_name(cls):
return "VNIC Index"