Merge "Remove get_namespace from API extensions"

This commit is contained in:
Jenkins 2015-06-24 14:54:12 +00:00 committed by Gerrit Code Review
commit 9d9684a1ab
50 changed files with 1 additions and 224 deletions

View File

@ -88,13 +88,6 @@ class ExtensionDescriptor(object):
""" """
raise NotImplementedError() 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): def get_updated(self):
"""The timestamp when the extension was last updated. """The timestamp when the extension was last updated.
@ -172,18 +165,6 @@ class ExtensionDescriptor(object):
if extended_attrs: if extended_attrs:
attrs.update(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): class ActionExtensionController(wsgi.Controller):
@ -232,7 +213,6 @@ class ExtensionController(wsgi.Controller):
ext_data['name'] = ext.get_name() ext_data['name'] = ext.get_name()
ext_data['alias'] = ext.get_alias() ext_data['alias'] = ext.get_alias()
ext_data['description'] = ext.get_description() ext_data['description'] = ext.get_description()
ext_data['namespace'] = ext.get_namespace()
ext_data['updated'] = ext.get_updated() ext_data['updated'] = ext.get_updated()
ext_data['links'] = [] # TODO(dprince): implement extension links ext_data['links'] = [] # TODO(dprince): implement extension links
return ext_data return ext_data
@ -500,7 +480,6 @@ class ExtensionManager(object):
LOG.debug('Ext name: %s', extension.get_name()) LOG.debug('Ext name: %s', extension.get_name())
LOG.debug('Ext alias: %s', extension.get_alias()) LOG.debug('Ext alias: %s', extension.get_alias())
LOG.debug('Ext description: %s', extension.get_description()) LOG.debug('Ext description: %s', extension.get_description())
LOG.debug('Ext namespace: %s', extension.get_namespace())
LOG.debug('Ext updated: %s', extension.get_updated()) LOG.debug('Ext updated: %s', extension.get_updated())
except AttributeError as ex: except AttributeError as ex:
LOG.exception(_LE("Exception loading extension: %s"), LOG.exception(_LE("Exception loading extension: %s"),

View File

@ -87,10 +87,6 @@ class Agent(extensions.ExtensionDescriptor):
def get_description(cls): def get_description(cls):
return "The agent management extension." return "The agent management extension."
@classmethod
def get_namespace(cls):
return "http://docs.openstack.org/ext/agent/api/v2.0"
@classmethod @classmethod
def get_updated(cls): def get_updated(cls):
return "2013-02-03T10:00:00-00:00" return "2013-02-03T10:00:00-00:00"

View File

@ -118,10 +118,6 @@ class Allowedaddresspairs(extensions.ExtensionDescriptor):
def get_description(cls): def get_description(cls):
return "Provides allowed address pairs" return "Provides allowed address pairs"
@classmethod
def get_namespace(cls):
return "http://docs.openstack.org/ext/allowedaddresspairs/api/v2.0"
@classmethod @classmethod
def get_updated(cls): def get_updated(cls):
return "2013-07-23T10:00:00-00:00" return "2013-07-23T10:00:00-00:00"

View File

@ -91,10 +91,6 @@ class Dhcpagentscheduler(extensions.ExtensionDescriptor):
def get_description(cls): def get_description(cls):
return "Schedule networks among dhcp agents" return "Schedule networks among dhcp agents"
@classmethod
def get_namespace(cls):
return "http://docs.openstack.org/ext/dhcp_agent_scheduler/api/v1.0"
@classmethod @classmethod
def get_updated(cls): def get_updated(cls):
return "2013-02-07T10:00:00-00:00" return "2013-02-07T10:00:00-00:00"

View File

@ -58,11 +58,6 @@ class Dvr(extensions.ExtensionDescriptor):
def get_description(cls): def get_description(cls):
return "Enables configuration of Distributed Virtual Routers." 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 @classmethod
def get_updated(cls): def get_updated(cls):
return "2014-06-1T10:00:00-00:00" return "2014-06-1T10:00:00-00:00"

View File

@ -16,7 +16,6 @@
from neutron.api import extensions from neutron.api import extensions
from neutron.api.v2 import attributes as attr from neutron.api.v2 import attributes as attr
from neutron.common import exceptions as nexception from neutron.common import exceptions as nexception
from neutron.extensions import l3
class ExternalNetworkInUse(nexception.InUse): class ExternalNetworkInUse(nexception.InUse):
@ -50,10 +49,6 @@ class External_net(extensions.ExtensionDescriptor):
def get_description(cls): def get_description(cls):
return _("Adds external network attribute to network resource.") 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 @classmethod
def get_updated(cls): def get_updated(cls):
return "2013-01-14T10:00:00-00:00" return "2013-01-14T10:00:00-00:00"
@ -63,6 +58,3 @@ class External_net(extensions.ExtensionDescriptor):
return EXTENDED_ATTRIBUTES_2_0 return EXTENDED_ATTRIBUTES_2_0
else: else:
return {} return {}
def get_alias_namespace_compatibility_map(self):
return {l3.L3.get_alias(): l3.L3.get_namespace()}

View File

@ -84,10 +84,6 @@ class Extra_dhcp_opt(extensions.ExtensionDescriptor):
"be specified (e.g. tftp-server, server-ip-address, " "be specified (e.g. tftp-server, server-ip-address, "
"bootfile-name)") "bootfile-name)")
@classmethod
def get_namespace(cls):
return "http://docs.openstack.org/ext/neutron/extra_dhcp_opt/api/v1.0"
@classmethod @classmethod
def get_updated(cls): def get_updated(cls):
return "2013-03-17T12:00:00-00:00" return "2013-03-17T12:00:00-00:00"

View File

@ -58,10 +58,6 @@ class Extraroute(extensions.ExtensionDescriptor):
def get_description(cls): def get_description(cls):
return "Extra routes configuration for L3 router" return "Extra routes configuration for L3 router"
@classmethod
def get_namespace(cls):
return "http://docs.openstack.org/ext/neutron/extraroutes/api/v1.0"
@classmethod @classmethod
def get_updated(cls): def get_updated(cls):
return "2013-02-01T10:00:00-00:00" return "2013-02-01T10:00:00-00:00"

View File

@ -53,10 +53,6 @@ class Flavor(extensions.ExtensionDescriptor):
def get_description(cls): def get_description(cls):
return "Flavor" return "Flavor"
@classmethod
def get_namespace(cls):
return "http://docs.openstack.org/ext/flavor/api/v1.0"
@classmethod @classmethod
def get_updated(cls): def get_updated(cls):
return "2012-07-20T10:00:00-00:00" return "2012-07-20T10:00:00-00:00"

View File

@ -175,10 +175,6 @@ class L3(extensions.ExtensionDescriptor):
" between L2 Neutron networks and access to external" " between L2 Neutron networks and access to external"
" networks via a NAT gateway.") " networks via a NAT gateway.")
@classmethod
def get_namespace(cls):
return "http://docs.openstack.org/ext/neutron/router/api/v1.0"
@classmethod @classmethod
def get_updated(cls): def get_updated(cls):
return "2012-07-20T10:00:00-00:00" return "2012-07-20T10:00:00-00:00"

View File

@ -54,10 +54,6 @@ class L3_ext_gw_mode(extensions.ExtensionDescriptor):
return ("Extension of the router abstraction for specifying whether " return ("Extension of the router abstraction for specifying whether "
"SNAT should occur on the external gateway") "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 @classmethod
def get_updated(cls): def get_updated(cls):
return "2013-03-28T10:00:00-00:00" return "2013-03-28T10:00:00-00:00"

View File

@ -82,10 +82,6 @@ class L3_ext_ha_mode(extensions.ExtensionDescriptor):
def get_description(cls): def get_description(cls):
return "Add HA capability to routers." return "Add HA capability to routers."
@classmethod
def get_namespace(cls):
return ""
@classmethod @classmethod
def get_updated(cls): def get_updated(cls):
return "2014-04-26T00:00:00-00:00" return "2014-04-26T00:00:00-00:00"

View File

@ -120,10 +120,6 @@ class L3agentscheduler(extensions.ExtensionDescriptor):
def get_description(cls): def get_description(cls):
return "Schedule routers among l3 agents" return "Schedule routers among l3 agents"
@classmethod
def get_namespace(cls):
return "http://docs.openstack.org/ext/l3_agent_scheduler/api/v1.0"
@classmethod @classmethod
def get_updated(cls): def get_updated(cls):
return "2013-02-07T10:00:00-00:00" return "2013-02-07T10:00:00-00:00"

View File

@ -97,10 +97,6 @@ class Metering(extensions.ExtensionDescriptor):
def get_description(cls): def get_description(cls):
return "Neutron Metering extension." return "Neutron Metering extension."
@classmethod
def get_namespace(cls):
return "http://wiki.openstack.org/wiki/Neutron/Metering/Bandwidth#API"
@classmethod @classmethod
def get_updated(cls): def get_updated(cls):
return "2013-06-12T10:00:00-00:00" return "2013-06-12T10:00:00-00:00"

View File

@ -107,10 +107,6 @@ class Multiprovidernet(extensions.ExtensionDescriptor):
return ("Expose mapping of virtual networks to multiple physical " return ("Expose mapping of virtual networks to multiple physical "
"networks") "networks")
@classmethod
def get_namespace(cls):
return "http://docs.openstack.org/ext/multi-provider/api/v1.0"
@classmethod @classmethod
def get_updated(cls): def get_updated(cls):
return "2013-06-27T10:00:00-00:00" return "2013-06-27T10:00:00-00:00"

View File

@ -39,10 +39,6 @@ class Netmtu(extensions.ExtensionDescriptor):
def get_description(cls): def get_description(cls):
return "Provides MTU attribute for a network resource." 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 @classmethod
def get_updated(cls): def get_updated(cls):
return "2015-03-25T10:00:00-00:00" return "2015-03-25T10:00:00-00:00"

View File

@ -124,10 +124,6 @@ class Portbindings(extensions.ExtensionDescriptor):
def get_description(cls): def get_description(cls):
return "Expose port bindings of a virtual port to external application" 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 @classmethod
def get_updated(cls): def get_updated(cls):
return "2014-02-03T10:00:00-00:00" return "2014-02-03T10:00:00-00:00"

View File

@ -64,10 +64,6 @@ class Portsecurity(extensions.ExtensionDescriptor):
def get_description(cls): def get_description(cls):
return "Provides port security" return "Provides port security"
@classmethod
def get_namespace(cls):
return "http://docs.openstack.org/ext/portsecurity/api/v1.0"
@classmethod @classmethod
def get_updated(cls): def get_updated(cls):
return "2012-07-23T10:00:00-00:00" return "2012-07-23T10:00:00-00:00"

View File

@ -85,10 +85,6 @@ class Providernet(extensions.ExtensionDescriptor):
def get_description(cls): def get_description(cls):
return "Expose mapping of virtual networks to physical networks" 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 @classmethod
def get_updated(cls): def get_updated(cls):
return "2012-09-07T10:00:00-00:00" return "2012-09-07T10:00:00-00:00"

View File

@ -125,10 +125,6 @@ class Quotasv2(extensions.ExtensionDescriptor):
description += ' per tenant' description += ' per tenant'
return description return description
@classmethod
def get_namespace(cls):
return "http://docs.openstack.org/network/ext/quotas-sets/api/v2.0"
@classmethod @classmethod
def get_updated(cls): def get_updated(cls):
return "2012-07-29T10:00:00-00:00" return "2012-07-29T10:00:00-00:00"

View File

@ -39,10 +39,6 @@ class Routerservicetype(extensions.ExtensionDescriptor):
def get_description(cls): def get_description(cls):
return "Provides router service type" return "Provides router service type"
@classmethod
def get_namespace(cls):
return ""
@classmethod @classmethod
def get_updated(cls): def get_updated(cls):
return "2013-01-29T00:00:00-00:00" return "2013-01-29T00:00:00-00:00"

View File

@ -291,11 +291,6 @@ class Securitygroup(extensions.ExtensionDescriptor):
def get_description(cls): def get_description(cls):
return "The security groups extension." return "The security groups extension."
@classmethod
def get_namespace(cls):
# todo
return "http://docs.openstack.org/ext/securitygroups/api/v2.0"
@classmethod @classmethod
def get_updated(cls): def get_updated(cls):
return "2012-10-05T10:00:00-00:00" return "2012-10-05T10:00:00-00:00"

View File

@ -58,10 +58,6 @@ class Servicetype(extensions.ExtensionDescriptor):
return _("API for retrieving service providers for " return _("API for retrieving service providers for "
"Neutron advanced services") "Neutron advanced services")
@classmethod
def get_namespace(cls):
return "http://docs.openstack.org/ext/neutron/service-type/api/v1.0"
@classmethod @classmethod
def get_updated(cls): def get_updated(cls):
return "2013-01-20T00:00:00-00:00" return "2013-01-20T00:00:00-00:00"

View File

@ -32,11 +32,6 @@ class Subnetallocation(extensions.ExtensionDescriptor):
def get_description(cls): def get_description(cls):
return "Enables allocation of subnets from a subnet pool" 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 @classmethod
def get_updated(cls): def get_updated(cls):
return "2015-03-30T10:00:00-00:00" return "2015-03-30T10:00:00-00:00"

View File

@ -61,10 +61,6 @@ class Vlantransparent(extensions.ExtensionDescriptor):
def get_description(cls): def get_description(cls):
return "Provides Vlan Transparent Networks" return "Provides Vlan Transparent Networks"
@classmethod
def get_namespace(cls):
return "http://docs.openstack.org/ext/vlantransparent/api/v1.0"
@classmethod @classmethod
def get_updated(cls): def get_updated(cls):
return "2015-03-23T09:00:00-00:00" return "2015-03-23T09:00:00-00:00"

View File

@ -55,11 +55,6 @@ class Credential(extensions.ExtensionDescriptor):
"""Returns Extended Resource Description.""" """Returns Extended Resource Description."""
return "Credential include username and password" 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 @classmethod
def get_updated(cls): def get_updated(cls):
"""Returns Extended Resource Update Time.""" """Returns Extended Resource Update Time."""

View File

@ -84,10 +84,6 @@ class N1kv(extensions.ExtensionDescriptor):
def get_description(cls): def get_description(cls):
return "Expose network profile" return "Expose network profile"
@classmethod
def get_namespace(cls):
return "http://docs.openstack.org/ext/n1kv/api/v2.0"
@classmethod @classmethod
def get_updated(cls): def get_updated(cls):
return "2012-11-15T10:00:00-00:00" return "2012-11-15T10:00:00-00:00"

View File

@ -75,10 +75,6 @@ class Network_profile(extensions.ExtensionDescriptor):
def get_description(cls): def get_description(cls):
return ("Profile includes the type of profile for N1kv") 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 @classmethod
def get_updated(cls): def get_updated(cls):
return "2012-07-20T10:00:00-00:00" return "2012-07-20T10:00:00-00:00"

View File

@ -54,10 +54,6 @@ class Policy_profile(extensions.ExtensionDescriptor):
def get_description(cls): def get_description(cls):
return "Profile includes the type of profile for N1kv" 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 @classmethod
def get_updated(cls): def get_updated(cls):
return "2012-07-20T10:00:00-00:00" return "2012-07-20T10:00:00-00:00"

View File

@ -42,11 +42,6 @@ class Qos(extensions.ExtensionDescriptor):
"""Returns Ext Resource Description.""" """Returns Ext Resource Description."""
return "qos includes qos_name and qos_desc" 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 @classmethod
def get_updated(cls): def get_updated(cls):
"""Returns Ext Resource update.""" """Returns Ext Resource update."""

View File

@ -42,10 +42,6 @@ class N1kv(extensions.ExtensionDescriptor):
def get_description(cls): def get_description(cls):
return _("Add new policy profile attribute to port resource.") 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 @classmethod
def get_updated(cls): def get_updated(cls):
return "2014-11-23T13:33:25-00:00" return "2014-11-23T13:33:25-00:00"

View File

@ -174,10 +174,6 @@ class Packetfilter(extensions.ExtensionDescriptor):
def get_description(cls): def get_description(cls):
return "PacketFilters on OFC" return "PacketFilters on OFC"
@classmethod
def get_namespace(cls):
return "http://www.nec.co.jp/api/ext/packet_filter/v2.0"
@classmethod @classmethod
def get_updated(cls): def get_updated(cls):
return "2013-07-16T00:00:00+09:00" return "2013-07-16T00:00:00+09:00"

View File

@ -45,10 +45,6 @@ class Router_provider(extensions.ExtensionDescriptor):
def get_description(cls): def get_description(cls):
return "Router Provider Support" return "Router Provider Support"
@classmethod
def get_namespace(cls):
return "http://docs.openstack.org/ext/router_provider/api/v1.0"
@classmethod @classmethod
def get_updated(cls): def get_updated(cls):
return "2013-08-20T10:00:00-00:00" return "2013-08-20T10:00:00-00:00"

View File

@ -40,12 +40,6 @@ class Advancedserviceproviders(extensions.ExtensionDescriptor):
def get_description(cls): def get_description(cls):
return "Id of the advanced service providers attached to the subnet" 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 @classmethod
def get_updated(cls): def get_updated(cls):
return "2014-12-11T12:00:00-00:00" return "2014-12-11T12:00:00-00:00"

View File

@ -52,10 +52,6 @@ class Lsn(extensions.ExtensionDescriptor):
def get_description(cls): def get_description(cls):
return "Enables configuration of NSX Logical Services Node." 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 @classmethod
def get_updated(cls): def get_updated(cls):
return "2013-10-05T10:00:00-00:00" return "2013-10-05T10:00:00-00:00"

View File

@ -42,10 +42,6 @@ class Maclearning(extensions.ExtensionDescriptor):
def get_description(cls): def get_description(cls):
return "Provides MAC learning capabilities." return "Provides MAC learning capabilities."
@classmethod
def get_namespace(cls):
return "http://docs.openstack.org/ext/maclearning/api/v1.0"
@classmethod @classmethod
def get_updated(cls): def get_updated(cls):
return "2013-05-1T10:00:00-00:00" return "2013-05-1T10:00:00-00:00"

View File

@ -174,10 +174,6 @@ class Networkgw(extensions.ExtensionDescriptor):
def get_description(cls): def get_description(cls):
return "Connects Neutron networks with external networks at layer 2." 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 @classmethod
def get_updated(cls): def get_updated(cls):
return "2014-01-01T00:00:00-00:00" return "2014-01-01T00:00:00-00:00"

View File

@ -34,7 +34,3 @@ class Nvp_qos(qos.Qos):
@classmethod @classmethod
def get_description(cls): def get_description(cls):
return "NVP QoS extension (deprecated)." return "NVP QoS extension (deprecated)."
@classmethod
def get_namespace(cls):
return "http://docs.openstack.org/ext/nvp-qos/api/v2.0"

View File

@ -176,10 +176,6 @@ class Qos(extensions.ExtensionDescriptor):
def get_description(cls): def get_description(cls):
return "NSX QoS extension." return "NSX QoS extension."
@classmethod
def get_namespace(cls):
return "http://docs.openstack.org/ext/qos-queue/api/v2.0"
@classmethod @classmethod
def get_updated(cls): def get_updated(cls):
return "2014-01-01T00:00:00-00:00" return "2014-01-01T00:00:00-00:00"

View File

@ -42,10 +42,6 @@ class Routertype(extensions.ExtensionDescriptor):
def get_description(cls): def get_description(cls):
return "Enables configuration of NSXv router type." return "Enables configuration of NSXv router type."
@classmethod
def get_namespace(cls):
return "http://docs.openstack.org/ext/router-type/api/v1.0"
@classmethod @classmethod
def get_updated(cls): def get_updated(cls):
return "2015-1-12T10:00:00-00:00" return "2015-1-12T10:00:00-00:00"

View File

@ -42,10 +42,6 @@ class Vnicindex(extensions.ExtensionDescriptor):
def get_description(cls): def get_description(cls):
return ("Enable a port to be associated with a VNIC index") 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 @classmethod
def get_updated(cls): def get_updated(cls):
return "2014-09-15T12:00:00-00:00" return "2014-09-15T12:00:00-00:00"

View File

@ -61,7 +61,6 @@ class ExtensionsTestJSON(base.BaseNetworkTest):
self.assertIn('updated', ext_details.keys()) self.assertIn('updated', ext_details.keys())
self.assertIn('name', ext_details.keys()) self.assertIn('name', ext_details.keys())
self.assertIn('description', ext_details.keys()) self.assertIn('description', ext_details.keys())
self.assertIn('namespace', ext_details.keys())
self.assertIn('links', ext_details.keys()) self.assertIn('links', ext_details.keys())
self.assertIn('alias', ext_details.keys()) self.assertIn('alias', ext_details.keys())
self.assertEqual(ext_details['name'], ext_name) self.assertEqual(ext_details['name'], ext_name)

View File

@ -474,7 +474,7 @@ class ExtensionManagerTest(base.BaseTestCase):
"""Invalid extension. """Invalid extension.
This Extension doesn't implement extension methods : 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): def get_alias(self):
return "invalid_extension" return "invalid_extension"
@ -621,16 +621,12 @@ class ExtensionControllerTest(testlib_api.WebTestCase):
foxnsox = res_body["extensions"][0] foxnsox = res_body["extensions"][0]
self.assertEqual(foxnsox["alias"], "FOXNSOX") 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): def test_extension_can_be_accessed_by_alias(self):
response = self.test_app.get("/extensions/FOXNSOX." + self.fmt) response = self.test_app.get("/extensions/FOXNSOX." + self.fmt)
foxnsox_extension = self.deserialize(response) foxnsox_extension = self.deserialize(response)
foxnsox_extension = foxnsox_extension['extension'] foxnsox_extension = foxnsox_extension['extension']
self.assertEqual(foxnsox_extension["alias"], "FOXNSOX") 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): def test_show_returns_not_found_for_non_existent_extension(self):
response = self.test_app.get("/extensions/non_existent" + self.fmt, response = self.test_app.get("/extensions/non_existent" + self.fmt,

View File

@ -62,10 +62,6 @@ class Dummy(object):
def get_description(cls): def get_description(cls):
return "Dummy stuff" return "Dummy stuff"
@classmethod
def get_namespace(cls):
return "http://docs.openstack.org/ext/neutron/dummy/api/v1.0"
@classmethod @classmethod
def get_updated(cls): def get_updated(cls):
return "2012-11-20T10:00:00-00:00" return "2012-11-20T10:00:00-00:00"

View File

@ -33,9 +33,6 @@ class StubExtension(object):
def get_description(self): def get_description(self):
return "" return ""
def get_namespace(self):
return ""
def get_updated(self): def get_updated(self):
return "" return ""

View File

@ -39,10 +39,6 @@ class Extendedattribute(extensions.ExtensionDescriptor):
def get_description(cls): def get_description(cls):
return "Provides extended_attr attribute to router" return "Provides extended_attr attribute to router"
@classmethod
def get_namespace(cls):
return ""
@classmethod @classmethod
def get_updated(cls): def get_updated(cls):
return "2013-02-05T00:00:00-00:00" return "2013-02-05T00:00:00-00:00"

View File

@ -52,10 +52,6 @@ class Extensionattribute(extensions.ExtensionDescriptor):
def get_description(cls): def get_description(cls):
return "Extension Test Resource" return "Extension Test Resource"
@classmethod
def get_namespace(cls):
return ""
@classmethod @classmethod
def get_updated(cls): def get_updated(cls):
return "2013-02-05T10:00:00-00:00" return "2013-02-05T10:00:00-00:00"

View File

@ -51,9 +51,6 @@ class Foxinsocks(object):
def get_description(self): def get_description(self):
return "The Fox In Socks Extension" 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): def get_updated(self):
return "2011-01-22T13:25:27-06:00" return "2011-01-22T13:25:27-06:00"

View File

@ -35,9 +35,6 @@ class V2attributes(object):
def get_description(self): def get_description(self):
return "Demonstrates extended attributes on V2 core resources" 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): def get_updated(self):
return "2012-07-18T10:00:00-00:00" return "2012-07-18T10:00:00-00:00"

View File

@ -53,11 +53,6 @@ class Fake_extension(extensions.ExtensionDescriptor):
def get_description(cls): def get_description(cls):
return _("Adds test attributes to core resources.") 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 @classmethod
def get_updated(cls): def get_updated(cls):
return "2014-07-16T10:00:00-00:00" return "2014-07-16T10:00:00-00:00"