← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1194520] Re: Small issue with update operation in base.py

 

** 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/1194520

Title:
  Small issue with update operation in base.py

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

Bug description:
  This expression:

  https://github.com/openstack/quantum/blob/master/quantum/api/v2/base.py#L462

  Will build a field list with more fields than required. For instance, the 'status' field will always be broguht in.
  This is a super-minor possibly irrelevant issue, but some plugins (well at least one) take a different path involving API calls to 3rd party backend when the 'status' field is passed in.

  The fix is straightforward: 
  diff --git a/quantum/api/v2/base.py b/quantum/api/v2/base.py
  index c8bbf42..df3d31b 100644
  --- a/quantum/api/v2/base.py
  +++ b/quantum/api/v2/base.py
  @@ -461,8 +461,8 @@ class Controller(object):
           # by the policy engine to the policy 'brain'
           field_list = [name for (name, value) in self._attr_info.iteritems()
                         if ('required_by_policy' in value and
  -                          value['required_by_policy'] or
  -                          'default' not in value)]
  +                          (value['required_by_policy'] or
  +                           'default' not in value))]
           orig_obj = self._item(request, id, field_list=field_list,
                                 parent_id=parent_id)
           orig_obj.update(body[self._resource])

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