"""
raise NotImplementedError()
- def get_namespace(self):
- """The XML namespace for the extension.
-
- e.g. 'http://www.fox.in.socks/api/ext/pie/v1.0'
- """
- raise NotImplementedError()
-
def get_updated(self):
"""The timestamp when the extension was last updated.
if extended_attrs:
attrs.update(extended_attrs)
- def get_alias_namespace_compatibility_map(self):
- """Returns mappings between extension aliases and XML namespaces.
-
- The mappings are XML namespaces that should, for backward compatibility
- reasons, be added to the XML serialization of extended attributes.
- This allows an established extended attribute to be provided by
- another extension than the original one while keeping its old alias
- in the name.
- :return: A dictionary of extension_aliases and namespace strings.
- """
- return {}
-
class ActionExtensionController(wsgi.Controller):
ext_data['name'] = ext.get_name()
ext_data['alias'] = ext.get_alias()
ext_data['description'] = ext.get_description()
- ext_data['namespace'] = ext.get_namespace()
ext_data['updated'] = ext.get_updated()
ext_data['links'] = [] # TODO(dprince): implement extension links
return ext_data
LOG.debug('Ext name: %s', extension.get_name())
LOG.debug('Ext alias: %s', extension.get_alias())
LOG.debug('Ext description: %s', extension.get_description())
- LOG.debug('Ext namespace: %s', extension.get_namespace())
LOG.debug('Ext updated: %s', extension.get_updated())
except AttributeError as ex:
LOG.exception(_LE("Exception loading extension: %s"), unicode(ex))
def get_description(cls):
return "The agent management extension."
- @classmethod
- def get_namespace(cls):
- return "http://docs.openstack.org/ext/agent/api/v2.0"
-
@classmethod
def get_updated(cls):
return "2013-02-03T10:00:00-00:00"
def get_description(cls):
return "Provides allowed address pairs"
- @classmethod
- def get_namespace(cls):
- return "http://docs.openstack.org/ext/allowedaddresspairs/api/v2.0"
-
@classmethod
def get_updated(cls):
return "2013-07-23T10:00:00-00:00"
def get_description(cls):
return "Schedule networks among dhcp agents"
- @classmethod
- def get_namespace(cls):
- return "http://docs.openstack.org/ext/dhcp_agent_scheduler/api/v1.0"
-
@classmethod
def get_updated(cls):
return "2013-02-07T10:00:00-00:00"
def get_description(cls):
return "Enables configuration of Distributed Virtual Routers."
- @classmethod
- def get_namespace(cls):
- return ("http://docs.openstack.org/ext/"
- "%s/api/v1.0" % constants.L3_DISTRIBUTED_EXT_ALIAS)
-
@classmethod
def get_updated(cls):
return "2014-06-1T10:00:00-00:00"
from neutron.api import extensions
from neutron.api.v2 import attributes as attr
from neutron.common import exceptions as nexception
-from neutron.extensions import l3
class ExternalNetworkInUse(nexception.InUse):
def get_description(cls):
return _("Adds external network attribute to network resource.")
- @classmethod
- def get_namespace(cls):
- return "http://docs.openstack.org/ext/neutron/external_net/api/v1.0"
-
@classmethod
def get_updated(cls):
return "2013-01-14T10:00:00-00:00"
return EXTENDED_ATTRIBUTES_2_0
else:
return {}
-
- def get_alias_namespace_compatibility_map(self):
- return {l3.L3.get_alias(): l3.L3.get_namespace()}
"be specified (e.g. tftp-server, server-ip-address, "
"bootfile-name)")
- @classmethod
- def get_namespace(cls):
- return "http://docs.openstack.org/ext/neutron/extra_dhcp_opt/api/v1.0"
-
@classmethod
def get_updated(cls):
return "2013-03-17T12:00:00-00:00"
def get_description(cls):
return "Extra routes configuration for L3 router"
- @classmethod
- def get_namespace(cls):
- return "http://docs.openstack.org/ext/neutron/extraroutes/api/v1.0"
-
@classmethod
def get_updated(cls):
return "2013-02-01T10:00:00-00:00"
def get_description(cls):
return "Flavor"
- @classmethod
- def get_namespace(cls):
- return "http://docs.openstack.org/ext/flavor/api/v1.0"
-
@classmethod
def get_updated(cls):
return "2012-07-20T10:00:00-00:00"
" between L2 Neutron networks and access to external"
" networks via a NAT gateway.")
- @classmethod
- def get_namespace(cls):
- return "http://docs.openstack.org/ext/neutron/router/api/v1.0"
-
@classmethod
def get_updated(cls):
return "2012-07-20T10:00:00-00:00"
return ("Extension of the router abstraction for specifying whether "
"SNAT should occur on the external gateway")
- @classmethod
- def get_namespace(cls):
- return "http://docs.openstack.org/ext/neutron/ext-gw-mode/api/v1.0"
-
@classmethod
def get_updated(cls):
return "2013-03-28T10:00:00-00:00"
def get_description(cls):
return "Add HA capability to routers."
- @classmethod
- def get_namespace(cls):
- return ""
-
@classmethod
def get_updated(cls):
return "2014-04-26T00:00:00-00:00"
def get_description(cls):
return "Schedule routers among l3 agents"
- @classmethod
- def get_namespace(cls):
- return "http://docs.openstack.org/ext/l3_agent_scheduler/api/v1.0"
-
@classmethod
def get_updated(cls):
return "2013-02-07T10:00:00-00:00"
def get_description(cls):
return "Neutron Metering extension."
- @classmethod
- def get_namespace(cls):
- return "http://wiki.openstack.org/wiki/Neutron/Metering/Bandwidth#API"
-
@classmethod
def get_updated(cls):
return "2013-06-12T10:00:00-00:00"
return ("Expose mapping of virtual networks to multiple physical "
"networks")
- @classmethod
- def get_namespace(cls):
- return "http://docs.openstack.org/ext/multi-provider/api/v1.0"
-
@classmethod
def get_updated(cls):
return "2013-06-27T10:00:00-00:00"
def get_description(cls):
return "Provides MTU attribute for a network resource."
- @classmethod
- def get_namespace(cls):
- return "http://docs.openstack.org/ext/net_mtu/api/v1.0"
-
@classmethod
def get_updated(cls):
return "2015-03-25T10:00:00-00:00"
def get_description(cls):
return "Expose port bindings of a virtual port to external application"
- @classmethod
- def get_namespace(cls):
- return "http://docs.openstack.org/ext/binding/api/v1.0"
-
@classmethod
def get_updated(cls):
return "2014-02-03T10:00:00-00:00"
def get_description(cls):
return "Provides port security"
- @classmethod
- def get_namespace(cls):
- return "http://docs.openstack.org/ext/portsecurity/api/v1.0"
-
@classmethod
def get_updated(cls):
return "2012-07-23T10:00:00-00:00"
def get_description(cls):
return "Expose mapping of virtual networks to physical networks"
- @classmethod
- def get_namespace(cls):
- return "http://docs.openstack.org/ext/provider/api/v1.0"
-
@classmethod
def get_updated(cls):
return "2012-09-07T10:00:00-00:00"
description += ' per tenant'
return description
- @classmethod
- def get_namespace(cls):
- return "http://docs.openstack.org/network/ext/quotas-sets/api/v2.0"
-
@classmethod
def get_updated(cls):
return "2012-07-29T10:00:00-00:00"
def get_description(cls):
return "Provides router service type"
- @classmethod
- def get_namespace(cls):
- return ""
-
@classmethod
def get_updated(cls):
return "2013-01-29T00:00:00-00:00"
def get_description(cls):
return "The security groups extension."
- @classmethod
- def get_namespace(cls):
- # todo
- return "http://docs.openstack.org/ext/securitygroups/api/v2.0"
-
@classmethod
def get_updated(cls):
return "2012-10-05T10:00:00-00:00"
return _("API for retrieving service providers for "
"Neutron advanced services")
- @classmethod
- def get_namespace(cls):
- return "http://docs.openstack.org/ext/neutron/service-type/api/v1.0"
-
@classmethod
def get_updated(cls):
return "2013-01-20T00:00:00-00:00"
def get_description(cls):
return "Enables allocation of subnets from a subnet pool"
- @classmethod
- def get_namespace(cls):
- return ("http://docs.openstack.org/ext/"
- "%s/api/v1.0" % constants.SUBNET_ALLOCATION_EXT_ALIAS)
-
@classmethod
def get_updated(cls):
return "2015-03-30T10:00:00-00:00"
def get_description(cls):
return "Provides Vlan Transparent Networks"
- @classmethod
- def get_namespace(cls):
- return "http://docs.openstack.org/ext/vlantransparent/api/v1.0"
-
@classmethod
def get_updated(cls):
return "2015-03-23T09:00:00-00:00"
"""Returns Extended Resource Description."""
return "Credential include username and password"
- @classmethod
- def get_namespace(cls):
- """Returns Extended Resource Namespace."""
- return "http://docs.ciscocloud.com/api/ext/credential/v2.0"
-
@classmethod
def get_updated(cls):
"""Returns Extended Resource Update Time."""
def get_description(cls):
return "Expose network profile"
- @classmethod
- def get_namespace(cls):
- return "http://docs.openstack.org/ext/n1kv/api/v2.0"
-
@classmethod
def get_updated(cls):
return "2012-11-15T10:00:00-00:00"
def get_description(cls):
return ("Profile includes the type of profile for N1kv")
- @classmethod
- def get_namespace(cls):
- return "http://docs.openstack.org/ext/n1kv/network-profile/api/v2.0"
-
@classmethod
def get_updated(cls):
return "2012-07-20T10:00:00-00:00"
def get_description(cls):
return "Profile includes the type of profile for N1kv"
- @classmethod
- def get_namespace(cls):
- return "http://docs.openstack.org/ext/n1kv/policy-profile/api/v2.0"
-
@classmethod
def get_updated(cls):
return "2012-07-20T10:00:00-00:00"
"""Returns Ext Resource Description."""
return "qos includes qos_name and qos_desc"
- @classmethod
- def get_namespace(cls):
- """Returns Ext Resource Namespace."""
- return "http://docs.ciscocloud.com/api/ext/qos/v1.0"
-
@classmethod
def get_updated(cls):
"""Returns Ext Resource update."""
def get_description(cls):
return _("Add new policy profile attribute to port resource.")
- @classmethod
- def get_namespace(cls):
- return "http://docs.openstack.org/ext/neutron/n1kv/api/v2.0"
-
@classmethod
def get_updated(cls):
return "2014-11-23T13:33:25-00:00"
def get_description(cls):
return "PacketFilters on OFC"
- @classmethod
- def get_namespace(cls):
- return "http://www.nec.co.jp/api/ext/packet_filter/v2.0"
-
@classmethod
def get_updated(cls):
return "2013-07-16T00:00:00+09:00"
def get_description(cls):
return "Router Provider Support"
- @classmethod
- def get_namespace(cls):
- return "http://docs.openstack.org/ext/router_provider/api/v1.0"
-
@classmethod
def get_updated(cls):
return "2013-08-20T10:00:00-00:00"
def get_description(cls):
return "Id of the advanced service providers attached to the subnet"
- @classmethod
- def get_namespace(cls):
- return(
- "http://docs.openstack.org/ext/neutron/"
- "advanced_service_providers/api/v1.0")
-
@classmethod
def get_updated(cls):
return "2014-12-11T12:00:00-00:00"
def get_description(cls):
return "Enables configuration of NSX Logical Services Node."
- @classmethod
- def get_namespace(cls):
- return "http://docs.openstack.org/ext/%s/api/v2.0" % EXT_ALIAS
-
@classmethod
def get_updated(cls):
return "2013-10-05T10:00:00-00:00"
def get_description(cls):
return "Provides MAC learning capabilities."
- @classmethod
- def get_namespace(cls):
- return "http://docs.openstack.org/ext/maclearning/api/v1.0"
-
@classmethod
def get_updated(cls):
return "2013-05-1T10:00:00-00:00"
def get_description(cls):
return "Connects Neutron networks with external networks at layer 2."
- @classmethod
- def get_namespace(cls):
- return "http://docs.openstack.org/ext/network-gateway/api/v1.0"
-
@classmethod
def get_updated(cls):
return "2014-01-01T00:00:00-00:00"
@classmethod
def get_description(cls):
return "NVP QoS extension (deprecated)."
-
- @classmethod
- def get_namespace(cls):
- return "http://docs.openstack.org/ext/nvp-qos/api/v2.0"
def get_description(cls):
return "NSX QoS extension."
- @classmethod
- def get_namespace(cls):
- return "http://docs.openstack.org/ext/qos-queue/api/v2.0"
-
@classmethod
def get_updated(cls):
return "2014-01-01T00:00:00-00:00"
def get_description(cls):
return "Enables configuration of NSXv router type."
- @classmethod
- def get_namespace(cls):
- return "http://docs.openstack.org/ext/router-type/api/v1.0"
-
@classmethod
def get_updated(cls):
return "2015-1-12T10:00:00-00:00"
def get_description(cls):
return ("Enable a port to be associated with a VNIC index")
- @classmethod
- def get_namespace(cls):
- return "http://docs.openstack.org/ext/neutron/vnic_index/api/v1.0"
-
@classmethod
def get_updated(cls):
return "2014-09-15T12:00:00-00:00"
self.assertIn('updated', ext_details.keys())
self.assertIn('name', ext_details.keys())
self.assertIn('description', ext_details.keys())
- self.assertIn('namespace', ext_details.keys())
self.assertIn('links', ext_details.keys())
self.assertIn('alias', ext_details.keys())
self.assertEqual(ext_details['name'], ext_name)
"""Invalid extension.
This Extension doesn't implement extension methods :
- get_name, get_description, get_namespace and get_updated
+ get_name, get_description and get_updated
"""
def get_alias(self):
return "invalid_extension"
foxnsox = res_body["extensions"][0]
self.assertEqual(foxnsox["alias"], "FOXNSOX")
- self.assertEqual(foxnsox["namespace"],
- "http://www.fox.in.socks/api/ext/pie/v1.0")
def test_extension_can_be_accessed_by_alias(self):
response = self.test_app.get("/extensions/FOXNSOX." + self.fmt)
foxnsox_extension = self.deserialize(response)
foxnsox_extension = foxnsox_extension['extension']
self.assertEqual(foxnsox_extension["alias"], "FOXNSOX")
- self.assertEqual(foxnsox_extension["namespace"],
- "http://www.fox.in.socks/api/ext/pie/v1.0")
def test_show_returns_not_found_for_non_existent_extension(self):
response = self.test_app.get("/extensions/non_existent" + self.fmt,
def get_description(cls):
return "Dummy stuff"
- @classmethod
- def get_namespace(cls):
- return "http://docs.openstack.org/ext/neutron/dummy/api/v1.0"
-
@classmethod
def get_updated(cls):
return "2012-11-20T10:00:00-00:00"
def get_description(self):
return ""
- def get_namespace(self):
- return ""
-
def get_updated(self):
return ""
def get_description(cls):
return "Provides extended_attr attribute to router"
- @classmethod
- def get_namespace(cls):
- return ""
-
@classmethod
def get_updated(cls):
return "2013-02-05T00:00:00-00:00"
def get_description(cls):
return "Extension Test Resource"
- @classmethod
- def get_namespace(cls):
- return ""
-
@classmethod
def get_updated(cls):
return "2013-02-05T10:00:00-00:00"
def get_description(self):
return "The Fox In Socks Extension"
- def get_namespace(self):
- return "http://www.fox.in.socks/api/ext/pie/v1.0"
-
def get_updated(self):
return "2011-01-22T13:25:27-06:00"
def get_description(self):
return "Demonstrates extended attributes on V2 core resources"
- def get_namespace(self):
- return "http://docs.openstack.org/ext/examples/v2attributes/api/v1.0"
-
def get_updated(self):
return "2012-07-18T10:00:00-00:00"
def get_description(cls):
return _("Adds test attributes to core resources.")
- @classmethod
- def get_namespace(cls):
- return ("http://docs.openstack.org/ext/neutron/ml2/test/"
- "fake_extension/api/v1.0")
-
@classmethod
def get_updated(cls):
return "2014-07-16T10:00:00-00:00"