use sub-resource API extension support

Now that neutron-lib supports sub-resources [1], there's no need for
extension classes to override update_attributes_map and
get_extended_resources to add their own sub-resources. This patch
removes those methods from the qos extensions class.

NeutronLibImpact

[1] I8ae11633962a48de6e8559b85447b8c8c753d705

Change-Id: Ibb66246091fd84e18c56009f5fcb8fdea3aff6b7
This commit is contained in:
Boden R 2018-04-12 15:36:33 -06:00
parent 7d6d277e40
commit 50e033fea1

View File

@ -79,22 +79,6 @@ class Qos(api_extensions.APIExtensionDescriptor):
return resources
def update_attributes_map(self, attributes, extension_attrs_map=None):
# TODO(boden): remove with I8ae11633962a48de6e8559b85447b8c8c753d705
super(Qos, self).update_attributes_map(
attributes,
extension_attrs_map=dict(
list(apidef.RESOURCE_ATTRIBUTE_MAP.items()) +
list(apidef.SUB_RESOURCE_ATTRIBUTE_MAP.items())))
def get_extended_resources(self, version):
# TODO(boden): remove with I8ae11633962a48de6e8559b85447b8c8c753d705
if version == "2.0":
return dict(list(apidef.RESOURCE_ATTRIBUTE_MAP.items()) +
list(apidef.SUB_RESOURCE_ATTRIBUTE_MAP.items()))
else:
return {}
@six.add_metaclass(abc.ABCMeta)
class QoSPluginBase(service_base.ServicePluginBase):