yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #01793
[Bug 1158145] Re: list servers with limit:1 using xml request cann't work
I think the bug is invalid as servers?limit=1 is working as designed.
You aren't really getting two elements.
Following is what I am getting while testing:
<?xml version='1.0' encoding='UTF-8'?>
<servers xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1">
<server name="new-server-test" id="f6e592c8-c42a-48ce-a152-dd3241577e9a">
<atom:link href="http://openstack.example.com/v2/openstack/servers/f6e592c8-c42a-48ce-a152-dd3241577e9a" rel="self"/>
<atom:link href="http://openstack.example.com/openstack/servers/f6e592c8-c42a-48ce-a152-dd3241577e9a" rel="bookmark"/>
</server>
<atom:link href="http://openstack.example.com/v2/openstack/servers?limit=1&marker=f6e592c8-c42a-48ce-a152-dd3241577e9a" rel="next"/>
"server name", as in your example above, is only output once. Also, to clarify this further, please read the doc on pagination here:
http://docs.openstack.org/api/openstack-compute/2/content/Paginated_Collections-d1e664.html
"For convenience, collections are required to contain atom "next" links.
They may optionally also contain "previous" links. The last page in the
list will not contain a "next" link. The following examples illustrate
three pages in a collection of images. The first page was retrieved via
a GET to http://servers.api.openstack.org/v2/1234/images?limit=1. In
these examples, the limit parameter sets the page size to a single item.
Subsequent links will honor the initial page size. Thus, a client may
follow links to traverse a paginated collection without having to input
the marker parameter. "
** Changed in: nova
Status: In Progress => Invalid
--
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/1158145
Title:
list servers with limit:1 using xml request cann't work
Status in OpenStack Compute (Nova):
Invalid
Bug description:
send the request:
GET /v2/0857441177bf45efb4663fdaa1e5585b/servers?limit=1
the return body will be the following:
<?xml version='1.0' encoding='UTF-8'?>
<servers xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1"><server name="server909578" id="f85f7bb0-4b48-4d42-827b-b72e24213130"><atom:link href="http://192.168.122.51:8774/v2/38d0bc21dc2347cda90897d192c95e63/servers/f85f7bb0-4b48-4d42-827b-b72e24213130" rel="self"/><atom:link href="http://192.168.122.51:8774/38d0bc21dc2347cda90897d192c95e63/servers/f85f7bb0-4b48-4d42-827b-b72e24213130" rel="bookmark"/></server><atom:link href="http://192.168.122.51:8774/v2/38d0bc21dc2347cda90897d192c95e63/servers?limit=1&marker=f85f7bb0-4b48-4d42-827b-b72e24213130" rel="next"/></servers>
so there are two element under servers .
when send the request:
GET /v2/692903aaa1764df2b28fed8a7bc25b6f/servers/detail?limit=1
the body will be the following:
<?xml version='1.0' encoding='UTF-8'?>
<servers xmlns:OS-DCF="http://docs.openstack.org/compute/ext/disk_config/api/v1.1" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:OS-EXT-IPS="http://docs.openstack.org/compute/ext/extended_ips/api/v1.1" xmlns:OS-EXT-STS="http://docs.openstack.org/compute/ext/extended_status/api/v1.1" xmlns:OS-EXT-AZ="http://docs.openstack.org/compute/ext/extended_availability_zone/api/v2" xmlns="http://docs.openstack.org/compute/api/v1.1"><server status="ACTIVE" updated="2013-03-21T06:33:17Z" hostId="5515e754c59c9a433ef30bec103c77e63a879650c0953d67f1cca3c1" name="server988962" created="2013-03-21T06:32:57Z" userId="fc906dd337134dd9941af41b5cb5f299" tenantId="692903aaa1764df2b28fed8a7bc25b6f" accessIPv4="" accessIPv6="" progress="0" id="5c3fd175-1f98-42f7-9836-28178588240b" key_name="None" config_drive="" OS-EXT-STS:vm_state="active" OS-EXT-STS:task_state="None" OS-EXT-STS:power_state="1" OS-EXT-AZ:availability_zone="nova" OS-DCF:diskConfig="MANUAL"><image id="9fb2b091-81bc-4e81-a8ac-3b0c7e953c85"><atom:link href="http://192.168.122.51:8774/692903aaa1764df2b28fed8a7bc25b6f/images/9fb2b091-81bc-4e81-a8ac-3b0c7e953c85" rel="bookmark"/></image><flavor id="84"><atom:link href="http://192.168.122.51:8774/692903aaa1764df2b28fed8a7bc25b6f/flavors/84" rel="bookmark"/></flavor><metadata/><addresses><network id="private"><ip OS-EXT-IPS:type="fixed" version="4" addr="10.0.0.7"/></network></addresses><atom:link href="http://192.168.122.51:8774/v2/692903aaa1764df2b28fed8a7bc25b6f/servers/5c3fd175-1f98-42f7-9836-28178588240b" rel="self"/><atom:link href="http://192.168.122.51:8774/692903aaa1764df2b28fed8a7bc25b6f/servers/5c3fd175-1f98-42f7-9836-28178588240b" rel="bookmark"/><security_groups><security_group name="default"/></security_groups></server></servers>
there are just one element under the servers.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1158145/+subscriptions