[openstack-dev] [Nova][API] Does nova API allow the server_id parem as DB index?

Anne Gentle annegentle at justwriteclick.com
Tue Feb 16 02:24:59 UTC 2016


On Mon, Feb 15, 2016 at 6:03 PM, 少合冯 <lvmxhster at gmail.com> wrote:

> I guess others may ask the same questions.
>
> I read the nova API doc:
> such as this API:
> http://developer.openstack.org/api-ref-compute-v2.1.html#showServer
>
> GET /v2.1/​{tenant_id}​/servers/​{server_id}​
> *Show server details*
>
>
> *Request parameters*
> ParameterStyleTypeDescription
> tenant_id URI csapi:UUID
>
> The UUID of the tenant in a multi-tenancy cloud.
> server_id URI csapi:UUID
>
> The UUID of the server.
>
> But I can get the server by DB index:
>
> curl -s -H X-Auth-Token:6b8968eb38df47c6a09ac9aee81ea0c6
> http://192.168.2.103:8774/v2.1/f5a8829cc14c4825a2728b273aa91aa1/servers/2
> {
>     "server": {
>         "OS-DCF:diskConfig": "MANUAL",
>         "OS-EXT-AZ:availability_zone": "nova",
>         "OS-EXT-SRV-ATTR:host": "shaohe1",
>         "OS-EXT-SRV-ATTR:hypervisor_hostname": "shaohe1",
>         "OS-EXT-SRV-ATTR:instance_name": "instance-00000002",
>         "OS-EXT-STS:power_state": 1,
>         "OS-EXT-STS:task_state": "migrating",
>         "OS-EXT-STS:vm_state": "error",
>         "OS-SRV-USG:launched_at": "2015-12-18T07:41:00.000000",
>         "OS-SRV-USG:terminated_at": null,
>         ......
>     }
> }
>
> and the code really allow it use  DB index
> https://github.com/openstack/nova/blob/master/nova/compute/api.py#L1939
>
>
Nice find. Can you log this as an API bug and we'll triage it -- can even
help you fix it on the site if you like.

https://bugs.launchpad.net/openstack-api-site/+filebug

Basically, click that link, write a short summary, then copy and paste in
this email's contents, it has lots of good info.

Let me know if you'd also like to fix the bug on the site.

And hey nova team, if you think it's actually an API bug, we'll move it
over to you.

Thanks for reporting it!
Anne



> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>


-- 
Anne Gentle
Rackspace
Principal Engineer
www.justwriteclick.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20160215/2198371a/attachment.html>


More information about the OpenStack-dev mailing list