> -----Original Message----- > From: Ken'ichi Ohmichi [mailto:[email protected]] > Sent: Thursday, September 18, 2014 10:16 PM > To: OpenStack Development Mailing List (not for usage questions) > Subject: Re: [openstack-dev] [nova] are we going to remove the novaclient v3 > shell or what? > >>> > >>> shell or what? > >>>> > >>>> This has come up a couple of times in IRC now but the people that > >>>> probably know the answer aren't available. > >>>> > >>>> There are python-novaclient patches that are adding new CLIs to the v2 > >>>> (v1_1) and v3 shells, but now that we have the v2.1 API (v2 on v3) why > >>>> do we still have a v3 shell in the client? Are there plans to remove > >>>> that? > >>>> > >>>> I don't really care either way, but need to know for code reviews. > >>>> > >>>> One example: [1] > >>>> > >>>> [1] https://review.openstack.org/#/c/108942/ > >>> > >>> Sorry for a little late response, > >>> I think we don't need new features of v3 into novaclient anymore. > >>> For example, the v3 part of the above[1] was not necessary because a new > >>> feature server-group quota is provided as v2 and v2.1, not v3. > >> > >> That would be true if there was a version of the client that supported > >> v2.1 today, but while the V2.1 API is still presented as V3 and doesn't > >> include the tenant_id - making the V3 client the only simple way to test > >> new > >> V2.1 features in devstack as far as I can see. > > v2.1 URL contains tenant_id already, and we can use /v2.1 endpoint like: > > $ curl -i > 'http://192.168.11.62:8774/v2.1/05d0f72534e449a0a3e70720c5d7c206/servers/detail' > -X GET -H "Accept: applica > tion/json" -H "X-Auth-Project-Id: demo" -H "X-Auth-Token: > f41776736ef34e56a7773e2b2d18d2e3" > HTTP/1.1 200 OK > Content-Type: application/json > Content-Length: 1749 > X-Openstack-Request-Id: req-96768644-be2a-43c4-8757-ad1802736970 > Date: Thu, 18 Sep 2014 13:03:54 GMT > > {"servers": [{"status": "ACTIVE", "updated": "2014-09-18T11:57:12Z", > "hostId": "8c63113abf9b1e13f1b11dd6a2dbdf511f7aa2199cff31e847582414", > "OS-EXT-SRV-ATTR:host": "oomichi-trusty", "addresses": {"private": > [{"version": 4, "type": "fixed", "addr": "10.0.0.14", "mac_addr": > "fa:16:3e:65:7e:ab"}]}, "links": [{"href": > "http://192.168.11.62:8774/v2.1/05d0f72534e449a0a3e70720c5d7c206/servers/bca4e77b-9763-4cf4-8a84-193df620eeb7", > "rel": "self"}, {"href": > "http://192.168.11.62:8774/05d0f72534e449a0a3e70720c5d7c206/servers/bca4e77b-9763-4cf4-8a84-193df620eeb7", > "rel": "bookmark"}], "key_name": "key-temporary", "image": {"id": > "2ac73d2e-f0d8-4576-a62c-3b53f70d071b", "links": [{"href": > "http://192.168.11.62:8774/05d0f72534e449a0a3e70720c5d7c206/images/2ac73d2e-f0d8-4576-a62c-3b53f70d071b", > "rel": "bookmark"}]}, "os-security-groups:security_groups": [{"name": > "sg-temporary"}], "os-pci:pci_devices": [], "OS-EXT-STS:task_state": > null, "os-extended-availability-zone:availability_zone": "nova", > "OS-EXT-STS:vm_state": "active", "OS-EXT-SRV-ATTR:instance_name": > "instance-0000000e", "OS-SRV-USG:launched_at": > "2014-09-18T11:57:12.000000", "OS-EXT-SRV-ATTR:hypervisor_hostname": > "oomichi-trusty", "flavor": {"id": "84", "links": [{"href": > "http://192.168.11.62:8774/05d0f72534e449a0a3e70720c5d7c206/flavors/84", > "rel": "bookmark"}]}, "id": "bca4e77b-9763-4cf4-8a84-193df620eeb7", > "OS-SRV-USG:terminated_at": null, "user_id": > "30bd25b4555d4664b1069d8d7e682eef", "name": "vm01", "created": > "2014-09-18T11:57:03Z", "tenant_id": > "05d0f72534e449a0a3e70720c5d7c206", > "os-extended-volumes:volumes_attached": [], "accessIPv4": "", > "accessIPv6": "", "OS-EXT-STS:locked_by": null, "progress": 0, > "OS-EXT-STS:power_state": 1, "config_drive": "", "metadata": {}}]} > $ > > DevStack doesn't register v2.1 endpoint to keytone now, but we can use > it with calling it directly. > It is true that it is difficult to use v2.1 API now and we can check > its behavior via v3 API instead.
I posted a patch[1] for registering v2.1 endpoint to keystone, and I confirmed --service-type option of current nova command works for it. $ nova --debug --service-type computev21 list [..] REQ: curl -i 'http://192.168.11.62:8774/v2.1/82e5da1a875a4f26a3767fbdf63c0acc/servers/detail' -X GET -H "Accept: application/json" -H "User-Agent: python-novaclient" -H "X-Auth-Project-Id: demo" -H "X-Auth-Token: {SHA1}1fc6d248a5e7646a2e72dd89c1dfead0403c9178" INFO (connectionpool:258) Starting new HTTP connection (1): 192.168.11.62 DEBUG (connectionpool:375) Setting read timeout to 600.0 DEBUG (connectionpool:415) "GET /v2.1/82e5da1a875a4f26a3767fbdf63c0acc/servers/detail HTTP/1.1" 200 1693 RESP: [200] CaseInsensitiveDict({'date': 'Fri, 19 Sep 2014 02:12:06 GMT', 'content-length': '1693', 'content-type': 'application/json', 'x-openstack-request-id': 'req-7de9edfd-8884-42e5-9a81-2f79f01b59ad'}) RESP BODY: {"servers": [{"OS-EXT-STS:task_state": null, "addresses": {"private": [{"version": 4, "type": "fixed", "addr": "10.0.0.2", "mac_addr": "fa:16:3e:25:70:9a"}]}, "links": [{"href": "http://192.168.11.62:8774/v2.1/82e5da1a875a4f26a3767fbdf63c0acc/servers/55ee8d4c-bdbe-4fe7-a759-dff7b9184626", "rel": "self"}, {"href": "http://192.168.11.62:8774/82e5da1a875a4f26a3767fbdf63c0acc/servers/55ee8d4c-bdbe-4fe7-a759-dff7b9184626", "rel": "bookmark"}], "image": {"id": "e5468cc9-3e91-4449-8c4f-e4203c71e365", "links": [{"href": "http://192.168.11.62:8774/82e5da1a875a4f26a3767fbdf63c0acc/images/e5468cc9-3e91-4449-8c4f-e4203c71e365", "rel": "bookmark"}]}, "os-pci:pci_devices": [], "OS-EXT-STS:vm_state": "active", "OS-EXT-SRV-ATTR:instance_name": "instance-00000001", "OS-SRV-USG:launched_at": "2014-09-19T02:08:45.000000", "flavor": {"id": "42", "links": [{"href": "http://192.168.11.62:8774/82e5da1a875a4f26a3767fbdf63c0acc/flavors/42", "rel": "bookmark"}]}, "id": "55ee8d4c-bdbe-4fe7-a759-dff7 b9184626", "security_groups": [{"name": "default"}], "user_id": "d5a640a28c2345a9a3654a9e30d1c700", "accessIPv4": "", "accessIPv6": "", "OS-EXT-STS:locked_by": null, "progress": 0, "OS-EXT-STS:power_state": 1, "OS-EXT-AZ:availability_zone": "nova", "config_drive": "", "status": "ACTIVE", "updated": "2014-09-19T02:08:45Z", "hostId": "25555a4ae2c040077b935a294b8b14b63c91cb2bce20c9e1aab56bad", "OS-EXT-SRV-ATTR:host": "oomichi-trusty", "OS-SRV-USG:terminated_at": null, "key_name": null, "OS-EXT-SRV-ATTR:hypervisor_hostname": "oomichi-trusty", "name": "vm01", "created": "2014-09-19T02:08:32Z", "tenant_id": "82e5da1a875a4f26a3767fbdf63c0acc", "os-extended-volumes:volumes_attached": [], "metadata": {}}]} +--------------------------------------+------+--------+------------+-------------+------------------+ | ID | Name | Status | Task State | Power State | Networks | +--------------------------------------+------+--------+------------+-------------+------------------+ | 55ee8d4c-bdbe-4fe7-a759-dff7b9184626 | vm01 | ACTIVE | - | Running | private=10.0.0.2 | +--------------------------------------+------+--------+------------+-------------+------------------+ [1]: https://review.openstack.org/#/c/122590/ Thanks Ken'ichi Ohmichi _______________________________________________ OpenStack-dev mailing list [email protected] http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
