Comment 5 for bug 1028465

Revision history for this message
David Kranz (david-kranz) wrote : Re: [Bug 1028465] Re: Instances filters for server name, flavor and status no longer work

Hmm. In the etherpad http://etherpad.openstack.org/Hn8rKP7XgB I said:

Generally considered OK:

1. The change is the only way to fix a security bug
2
. Adding a new response header or value in a returned dictionary.
3. Change obviously buggy error behavior to a reasonable success result
4. Adding an optional keyword argument, if the existing API was coded to
ignore unexpected
     keywords.

*NOTE*: Should (4) be allowed? It would not break programs but has the
problem that there is no way for the user of an API to know which
arguments are supported.

This was an example of (2). I still think we should allow it but perhaps
there should be an asterisk around this one.

BTW, how do I change the name of the etherpad to something meaningful?
Searched for how but didn't find it.

  -David

On 7/24/2012 3:25 PM, Jay Pipes wrote:
> FINALLY figured out what is going on here...
>
> Turns out that the instance dict returned from POST /servers recently
> changed. The key_name key was added to this return.
>
> However, the instance dicts returned in a call to GET /servers DO NOT
> contain this key_name key. This is what caused the line:
>
> self.assertTrue(self.s1 in servers)
>
> to fail, because the dicts were not equal, as shown in this Python shell
> output:
>
>>>> print sorted(d.keys())
> [u'OS-DCF:diskConfig', u'OS-EXT-STS:power_state', u'OS-EXT-STS:task_state', u'OS-EXT-STS:vm_state', u'accessIPv4', u'accessIPv6', u'addresses', u'config_drive', u'created', u'flavor', u'hostId', u'id', u'image', u'key_name', u'links', u'metadata', u'name', u'progress', u'status', u'tenant_id', u'updated', u'user_id']
>>>> print sorted(i1[0].keys())
> [u'OS-DCF:diskConfig', u'OS-EXT-STS:power_state', u'OS-EXT-STS:task_state', u'OS-EXT-STS:vm_state', u'accessIPv4', u'accessIPv6', u'addresses', u'config_drive', u'created', u'flavor', u'hostId', u'id', u'image', u'links', u'metadata', u'name', u'progress', u'status', u'tenant_id', u'updated', u'user_id']
>
> The top dict is what is returned from POST /servers and the bottom dict
> is what is returned from GET /servers.
>
> Bottom line solution is really to fix the fragile test in Tempest. That
> said, however, it is a good warning when API results change in Nova! :)
>
> ** Changed in: tempest
> Status: Confirmed => Triaged
>
> ** Changed in: nova
> Status: In Progress => Opinion
>