← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1195047] Re: get_port(s) iterate once more due to adding binding info

 

** Changed in: neutron
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1195047

Title:
  get_port(s) iterate once more due to adding binding info

Status in OpenStack Neutron (virtual network service):
  Fix Released

Bug description:
  many plugins still add binding information by iterating once more:
      def get_port(self, context, port_id, fields=None):
          with context.session.begin(subtransactions=True):
              port = super(BrocadePluginV2, self).get_port(
                  context, port_id, fields)
              self._extend_port_dict_binding(context, port)

          return self._fields(port, fields)

      def get_ports(self, context, filters=None, fields=None):
          res_ports = []
          with context.session.begin(subtransactions=True):
              ports = super(BrocadePluginV2, self).get_ports(context,
                                                             filters,
                                                             fields)
              for port in ports:
                  self._extend_port_dict_binding(context, port)
                  res_ports.append(self._fields(port, fields))

          return res_ports

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1195047/+subscriptions