← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1223888] Re: Object get() doesn't return extra fields

 

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

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1223888

Title:
  Object get() doesn't return extra fields

Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  In nova/objects/base.py the get method doesn't consider the fields
  stored in obj_extra_fields.  If code calls instance.get('name') it
  fails since 'name' is an extra field of an instance object.

  The fix is to change the logic to also check the extra fields before
  raising the AttributeError exception.

  In the get() method of NovaObject in base.py:

  this line:
  <if key not in self.fields:

  should be:
  >if key not in self.fields and key not in self.obj_extra_fields:

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