yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #72046
[Bug 1759743] [NEW] Multiple same query parameters are not reflected on "servers_link" value in the response
Public bug reported:
Description
===========
In "List Servers Detailed" API, when specifying multiple same query parameters (e.g. status=error&status=active),
only one pair of parameter and value (status=error) is included in the "servers_links"("href") of the response.
The 'collections.OrderedDict' eliminate duplications of query parameters.
So the issue occurrs.
https://github.com/openstack/nova/blob/3f08521d33c60e4bfe04bc236bb8761f654004df/nova/api/openstack/common.py#L390
Steps to reproduce
==================
Execute "List Servers Detailed" API with multiple same query parameters
(status=error&status=active) and 'limit' query parameter.
curl -g -i -X GET
"http://10.0.2.15/compute/v2.1/servers/detail?limit=1&status=error&status=active"
-H "OpenStack-API-Version: compute 2.60" -H "User-Agent: python-
novaclient" -H "Accept: application/json" -H "X-OpenStack-Nova-API-
Version: 2.60" -H "X-Auth-Token: $TOKEN"
Expected result
===============
All pairs of query parameter and value (status=error&status=active)
should be included in "servers_links".
{
"servers_links":[
{
"href":"http://10.0.2.15/compute/v2.1/servers/detail?limit=1&status=error&status=active&marker=e8c1d40e-2be7-4c8e-9283-88be8562bc5a",
"rel":"next"
}
],
"servers":[
(snipped...)
]
}
Actual result
=============
only one pair of parameter and value (status=error) is included.
{
"servers_links":[
{
"href":"http://10.0.2.15/compute/v2.1/servers/detail?limit=1&status=error&marker=e8c1d40e-2be7-4c8e-9283-88be8562bc5a",
"rel":"next"
}
],
"servers":[
(snipped...)
]
}
Environment
===========
OS: Ubuntu 16.04.2 LTS
nova master (commit 3f08521d33c60e4bfe04bc236bb8761f654004df)
** Affects: nova
Importance: Undecided
Assignee: Takashi NATSUME (natsume-takashi)
Status: In Progress
** Tags: api
** Tags added: api
** Changed in: nova
Status: New => In Progress
** Description changed:
Description
===========
- In "List Servers" API, when specifying multiple same query parameters (e.g. status=error&status=active),
+ In "List Servers Detailed" API, when specifying multiple same query parameters (e.g. status=error&status=active),
only one pair of parameter and value (status=error) is included in the "servers_links"("href") of the response.
The 'collections.OrderedDict' eliminate duplications of query parameters.
So the issue occurrs.
https://github.com/openstack/nova/blob/3f08521d33c60e4bfe04bc236bb8761f654004df/nova/api/openstack/common.py#L390
Steps to reproduce
==================
- Execute "List Servers" API with multiple same query parameters
+ Execute "List Servers Detailed" API with multiple same query parameters
(status=error&status=active) and 'limit' query parameter.
curl -g -i -X GET
"http://10.0.2.15/compute/v2.1/servers/detail?limit=1&status=error&status=active"
-H "OpenStack-API-Version: compute 2.60" -H "User-Agent: python-
novaclient" -H "Accept: application/json" -H "X-OpenStack-Nova-API-
Version: 2.60" -H "X-Auth-Token: $TOKEN"
-
Expected result
===============
All pairs of query parameter and value (status=error&status=active)
should be included in "servers_links".
{
- "servers_links":[
- {
- "href":"http://10.0.2.15/compute/v2.1/servers/detail?limit=1&status=error&status=active&marker=e8c1d40e-2be7-4c8e-9283-88be8562bc5a",
- "rel":"next"
- }
- ],
- "servers":[
+ "servers_links":[
+ {
+ "href":"http://10.0.2.15/compute/v2.1/servers/detail?limit=1&status=error&status=active&marker=e8c1d40e-2be7-4c8e-9283-88be8562bc5a",
+ "rel":"next"
+ }
+ ],
+ "servers":[
(snipped...)
- ]
+ ]
}
Actual result
=============
only one pair of parameter and value (status=error) is included.
{
- "servers_links":[
- {
- "href":"http://10.0.2.15/compute/v2.1/servers/detail?limit=1&status=error&marker=e8c1d40e-2be7-4c8e-9283-88be8562bc5a",
- "rel":"next"
- }
- ],
- "servers":[
+ "servers_links":[
+ {
+ "href":"http://10.0.2.15/compute/v2.1/servers/detail?limit=1&status=error&marker=e8c1d40e-2be7-4c8e-9283-88be8562bc5a",
+ "rel":"next"
+ }
+ ],
+ "servers":[
(snipped...)
- ]
+ ]
}
Environment
===========
OS: Ubuntu 16.04.2 LTS
nova master (commit 3f08521d33c60e4bfe04bc236bb8761f654004df)
--
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/1759743
Title:
Multiple same query parameters are not reflected on "servers_link"
value in the response
Status in OpenStack Compute (nova):
In Progress
Bug description:
Description
===========
In "List Servers Detailed" API, when specifying multiple same query parameters (e.g. status=error&status=active),
only one pair of parameter and value (status=error) is included in the "servers_links"("href") of the response.
The 'collections.OrderedDict' eliminate duplications of query parameters.
So the issue occurrs.
https://github.com/openstack/nova/blob/3f08521d33c60e4bfe04bc236bb8761f654004df/nova/api/openstack/common.py#L390
Steps to reproduce
==================
Execute "List Servers Detailed" API with multiple same query
parameters (status=error&status=active) and 'limit' query parameter.
curl -g -i -X GET
"http://10.0.2.15/compute/v2.1/servers/detail?limit=1&status=error&status=active"
-H "OpenStack-API-Version: compute 2.60" -H "User-Agent: python-
novaclient" -H "Accept: application/json" -H "X-OpenStack-Nova-API-
Version: 2.60" -H "X-Auth-Token: $TOKEN"
Expected result
===============
All pairs of query parameter and value (status=error&status=active)
should be included in "servers_links".
{
"servers_links":[
{
"href":"http://10.0.2.15/compute/v2.1/servers/detail?limit=1&status=error&status=active&marker=e8c1d40e-2be7-4c8e-9283-88be8562bc5a",
"rel":"next"
}
],
"servers":[
(snipped...)
]
}
Actual result
=============
only one pair of parameter and value (status=error) is included.
{
"servers_links":[
{
"href":"http://10.0.2.15/compute/v2.1/servers/detail?limit=1&status=error&marker=e8c1d40e-2be7-4c8e-9283-88be8562bc5a",
"rel":"next"
}
],
"servers":[
(snipped...)
]
}
Environment
===========
OS: Ubuntu 16.04.2 LTS
nova master (commit 3f08521d33c60e4bfe04bc236bb8761f654004df)
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1759743/+subscriptions