]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
N1kv: Fixes fields argument not None
authorBob Melander <bob.melander@gmail.com>
Wed, 26 Feb 2014 18:20:40 +0000 (19:20 +0100)
committerBob Melander <bob.melander@gmail.com>
Sat, 1 Mar 2014 16:01:08 +0000 (17:01 +0100)
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

neutron/plugins/cisco/n1kv/n1kv_neutron_plugin.py

index a76d784908fdb3ee03c116e17d0dad60bc08ba03..3b0c1c842377db86060a47ba8fee6ae4dd3d0869 100644 (file)
@@ -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):