← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1169706] Re: list floating IPs does not honor port_id filter

 

** Changed in: quantum/grizzly
       Status: Fix Committed => Fix Released

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

Title:
  list floating IPs does not honor port_id filter

Status in OpenStack Quantum (virtual network service):
  Fix Committed
Status in quantum grizzly series:
  Fix Released

Bug description:
  When listing floating IPs, the port_id filter is not honored.  This
  appears to be due to a mismatch between the attribute name 'port_id'
  and the database column name 'fixed_port_id'.

  Note that this has interesting effects on the 'nova list' command.
  Nova is making a 'list floating IPs' call as 'admin' user, passing in
  a 'port_id' filter.  Because quantum ignores the filter, nova gets
  back all floating IPs visible to 'admin' user, instead of just the
  floating IPs assigned to the port.

  Potential fix in quantum/db/l3_db.py:

  # Maps API field to DB column  
  API_TO_DB_COL = {'port_id': 'fixed_port_id'} 

      def get_floatingips(self, context, filters=None, fields=None, 
               :
           # Maps API filter keys to DB column name  
           if filters is not None:  
               for f in set(filters.keys()).\  
                       intersection(set(API_TO_DB_COL.keys())):  
                   filters[API_TO_DB_COL[f]] = filters.pop(f) 

          return self._get_collection(context, FloatingIP,
               :

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