← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1397239] Re: API comments mismatch for get_ports_from_devices

 

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

** Changed in: neutron
    Milestone: None => kilo-2

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

Title:
  API comments mismatch for get_ports_from_devices

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

Bug description:
  get_ports_from_devices in ml2/plugin.py will return a emtry dict when the secgroup associated is empty, due to this line
          ports = db.get_ports_and_sgs(port_ids)

  
  but refer to the comment in neutron/db/securitygroups_rpc_base.py, seems it should at least return a dict whose secgroup's value  is emtry

      def get_port_from_device(self, device):
          """Get port dict from device name on an agent.

          Subclass must provide this method or get_ports_from_devices.

          :param device: device name which identifies a port on the agent side.
          What is specified in "device" depends on a plugin agent implementation.
          For example, it is a port ID in OVS agent and netdev name in Linux
          Bridge agent.
          :return: port dict returned by DB plugin get_port(). In addition,
          it must contain the following fields in the port dict returned.
          - device
          - security_groups
          - security_group_rules,
          - security_group_source_groups
          - fixed_ips

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


References