+1 for no microversion, it's internal implementation and we should be free to remove it since we didn't document it anywhere


-----GHANSHYAM MANN <ghanshyamm...@gmail.com> wrote: -----
To: "OpenStack Development Mailing List (not for usage questions)" <openstack-dev@lists.openstack.org>
From: GHANSHYAM MANN <ghanshyamm...@gmail.com>
Date: 02/16/2016 03:49AM
Subject: Re: [openstack-dev] [Nova][API] Does nova API allow the server_id parem as DB index?

Yes, currently Nova support that for show/update/delete server APIs etc (both v2 and v2.1) and python-novaclient too. But I think that was old behaviour and for ec2 API mainly?

I searched on ec2 repo [1] and they get the instance from nova using UUID, i did not find any place they are fetching using id. Hut not sure if external interface directly fetch that on nova by 'id'.

But apart from that, may be some users using 'id' instead of 'uuid' but that was not recommended or documented anywhere So in that case can we remove this old behaviour without version bump?



Regards
Ghanshyam Mann

On Tue, Feb 16, 2016 at 11:24 AM, Anne Gentle <annegen...@justwriteclick.com> wrote:


On Mon, Feb 15, 2016 at 6:03 PM, 少合冯 <lvmxhs...@gmail.com> wrote:
I guess others may ask the same questions. 

I read the nova API doc: 
such as this API: 

GET /v2.1/​{tenant_id}​/servers/​{server_id}​
Show server details


Request parameters
ParameterStyleTypeDescription
tenant_idURIcsapi:UUID

The UUID of the tenant in a multi-tenancy cloud.

server_idURIcsapi: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


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. 


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-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev




--
Anne Gentle
Rackspace
Principal Engineer

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


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

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

Reply via email to