This was the case until about two weeks ago. Since 1.0.0 release we have been defaulting to Images API v2 instead of v1 [0].
If you want to exercise the v1 functionality from the CLI client you would need to specify the either environmental variable OS_IMAGE_API_VERSION=1 or use the command line option –os-image-api-version 1. Either case –debug can be used with glanceclient to provide detailed information about where the request is being sent and what the responses are. If you haven’t moved to the latest client yet, forget about the above apart from the –debug part. [0] https://github.com/openstack/python-glanceclient/blob/master/doc/source/index.rst - Erno From: Fei Long Wang [mailto:[email protected]] Sent: Thursday, September 10, 2015 1:04 AM To: [email protected]<mailto:[email protected]> Subject: Re: [openstack-dev] [glance] differences between def detail() and def index() in glance/registry/api/v1/images.py I assume you're using Glance client, if so, by default, when you issuing command 'glance image-list', it will call /v1/images/detail instead of /v1/images, you can use curl or any browser http client to see the difference. Basically, just like the endpoint name, /v1/images/detail will give you more details. See below difference of their response. Response from /v1/images/detail { "images": [ { "status": "active", "deleted_at": null, "name": "fedora-21-atomic-3", "deleted": false, "container_format": "bare", "created_at": "2015-09-03T22:56:37.000000", "disk_format": "qcow2", "updated_at": "2015-09-03T23:00:15.000000", "min_disk": 0, "protected": false, "id": "b940521b-97ff-48d9-a22e-ecc981ec0513", "min_ram": 0, "checksum": "d3b3da0e07743805dcc852785c7fc258", "owner": "5f290ac4b100440b8b4c83fce78c2db7", "is_public": true, "virtual_size": null, "properties": { "os_distro": "fedora-atomic" }, "size": 770179072 } ] } Response with /v1/images { "images": [ { "name": "fedora-21-atomic-3", "container_format": "bare", "disk_format": "qcow2", "checksum": "d3b3da0e07743805dcc852785c7fc258", "id": "b940521b-97ff-48d9-a22e-ecc981ec0513", "size": 770179072 } ] } On 10/09/15 11:46, Su Zhang wrote: Hello, I am hitting an error and its trace passes def index () in glance/registry/api/v1/images.py. I assume def index() is called by glance image-list. However, while testing glance image-list I realized that def detail() is called under glance/registry/api/v1/images.py instead of def index(). Could someone let me know what's the difference between the two functions? How can I test out def index() under glance/registry/api/v1/images.py through CLI or API? Thanks, -- Su Zhang __________________________________________________________________________ OpenStack Development Mailing List (not for usage questions) Unsubscribe: [email protected]?subject:unsubscribe<mailto:[email protected]?subject:unsubscribe> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev -- Cheers & Best regards, Fei Long Wang (王飞龙) -------------------------------------------------------------------------- Senior Cloud Software Engineer Tel: +64-48032246 Email: [email protected]<mailto:[email protected]> Catalyst IT Limited Level 6, Catalyst House, 150 Willis Street, Wellington --------------------------------------------------------------------------
__________________________________________________________________________ OpenStack Development Mailing List (not for usage questions) Unsubscribe: [email protected]?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
