N1kv: Fixes fields argument not None
N1kv plugin includes 'fields' in call to get_<resource> function in superclass. This can trigger errors if other fields are used in the subsequent processing in the N1kv plugin's own get_<resource> function. Change-Id: I63687a830579a178c6daaa2b8f71bef7eb53d584 Closes-bug: #1285289
This commit is contained in:
parent
98dfb78473
commit
7e69cbf305
@ -1264,7 +1264,7 @@ class N1kvNeutronPluginV2(db_base_plugin_v2.NeutronDbPluginV2,
|
||||
:returns: port dictionary
|
||||
"""
|
||||
LOG.debug(_("Get port: %s"), id)
|
||||
port = super(N1kvNeutronPluginV2, self).get_port(context, id, fields)
|
||||
port = super(N1kvNeutronPluginV2, self).get_port(context, id, None)
|
||||
self._extend_port_dict_profile(context, port)
|
||||
return self._fields(port, fields)
|
||||
|
||||
@ -1285,7 +1285,7 @@ class N1kvNeutronPluginV2(db_base_plugin_v2.NeutronDbPluginV2,
|
||||
"""
|
||||
LOG.debug(_("Get ports"))
|
||||
ports = super(N1kvNeutronPluginV2, self).get_ports(context, filters,
|
||||
fields)
|
||||
None)
|
||||
for port in ports:
|
||||
self._extend_port_dict_profile(context, port)
|
||||
|
||||
@ -1350,7 +1350,7 @@ class N1kvNeutronPluginV2(db_base_plugin_v2.NeutronDbPluginV2,
|
||||
"""
|
||||
LOG.debug(_("Get subnet: %s"), id)
|
||||
subnet = super(N1kvNeutronPluginV2, self).get_subnet(context, id,
|
||||
fields)
|
||||
None)
|
||||
return self._fields(subnet, fields)
|
||||
|
||||
def get_subnets(self, context, filters=None, fields=None):
|
||||
@ -1371,7 +1371,7 @@ class N1kvNeutronPluginV2(db_base_plugin_v2.NeutronDbPluginV2,
|
||||
LOG.debug(_("Get subnets"))
|
||||
subnets = super(N1kvNeutronPluginV2, self).get_subnets(context,
|
||||
filters,
|
||||
fields)
|
||||
None)
|
||||
return [self._fields(subnet, fields) for subnet in subnets]
|
||||
|
||||
def create_network_profile(self, context, network_profile):
|
||||
|
Loading…
x
Reference in New Issue
Block a user