project show --parents simply show only specified project.
--parents option is expected to access "/projects/<project_id>?parents_as_list". but access projects?parents_as_list=True&name=<project_name>.
Real output is following:
$ openstack --debug project show prj2 --parents --domain 3ef17290fe25439d875726a5ff586695 START with options: ['--debug', 'project', 'show', 'prj2', '--parents', '--domain', '3ef17290fe25439d875726a5ff586695'] options: Namespace(access_token_endpoint='', auth_type='', auth_url='http://localhost:5000/v3', cacert='', client_id='', client_secret='', cloud='', debug=True, default_domain='default', deferred_help=False, domain_id='', domain_name='dom1', endpoint='', identity_provider='', identity_provider_url='', insecure=None, interface='', log_file=None, os_compute_api_version='', os_data_processing_api_version='1.1', os_identity_api_version='3', os_image_api_version='', os_network_api_version='', os_object_api_version='', os_policy_api_version='1', os_project_id=None, os_project_name=None, os_volume_api_version='', password='password', project_domain_id='', project_domain_name='', project_id='', project_name='', protocol='', region_name='', scope='', service_provider_endpoint='', timing=False, token='', trust_id='', url='', user_domain_id='3ef17290fe25439d875726a5ff586695', user_domain_name='', user_id='', username='adm1', verbose_level=3, verify=None) defaults: {'auth_type': 'password', 'compute_api_version': '2', 'key': None, 'database_api_version': '1.0', 'api_timeout': None, 'baremetal_api_version': '1', 'cacert': None, 'image_api_use_tasks': False, 'floating_ip_source': 'neutron', 'orchestration_api_version': '1', 'interface': None, 'network_api_version': '2', 'image_format': 'qcow2', 'object_api_version': '1', 'image_api_version': '2', 'verify': True, 'identity_api_version': '2', 'volume_api_version': '1', 'cert': None, 'secgroup_source': 'neutron', 'dns_api_version': '2', 'disable_vendor_agent': {}} cloud cfg: {'auth_type': 'password', 'compute_api_version': '2', 'orchestration_api_version': '1', 'database_api_version': '1.0', 'interface': None, 'policy_api_version': '1', 'network_api_version': '2', 'image_format': 'qcow2', 'object_api_version': '1', 'image_api_version': '2', 'verify': True, 'timing': False, 'dns_api_version': '2', 'verbose_level': 3, 'region_name': '', 'api_timeout': None, 'baremetal_api_version': '1', 'auth': {'username': 'adm1', 'password': 'password', 'auth_url': 'http://localhost:5000/v3', 'domain_name': 'dom1', 'user_domain_id': '3ef17290fe25439d875726a5ff586695'}, 'default_domain': 'default', 'image_api_use_tasks': False, 'floating_ip_source': 'neutron', 'key': None, 'cacert': None, 'data_processing_api_version': '1.1', 'deferred_help': False, 'identity_api_version': '3', 'volume_api_version': '1', 'cert': None, 'secgroup_source': 'neutron', 'debug': True, 'disable_vendor_agent': {}} compute API version 2, cmd group openstack.compute.v2 network API version 2, cmd group openstack.network.v2 image API version 2, cmd group openstack.image.v2 volume API version 1, cmd group openstack.volume.v1 identity API version 3, cmd group openstack.identity.v3 object_store API version 1, cmd group openstack.object_store.v1 congressclient API version 1, cmd group openstack.congressclient.v1 data_processing API version 1.1, cmd group openstack.data_processing.v1 command: project show -> openstackclient.identity.v3.project.ShowProject Auth plugin password selected auth_type: password Using auth plugin: password Using parameters {'username': 'adm1', 'user_domain_id': '3ef17290fe25439d875726a5ff586695', 'domain_name': 'dom1', 'auth_url': 'http://localhost:5000/v3', 'password': 'password', 'project_domain_id': 'default'} Get auth_ref REQ: curl -g -i -X GET http://localhost:5000/v3 -H "Accept: application/json" -H "User-Agent: python-openstackclient" Starting new HTTP connection (1): localhost "GET /v3 HTTP/1.1" 200 248 RESP: [200] content-length: 248 vary: X-Auth-Token connection: keep-alive date: Fri, 25 Sep 2015 18:37:07 GMT content-type: application/json x-openstack-request-id: req-da678ec6-9e93-4390-8971-9a94569c911b RESP BODY: {"version": {"status": "stable", "updated": "2015-03-30T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.4", "links": [{"href": "http://localhost:5000/v3/", "rel": "self"}]}}
Making authentication request to http://localhost:5000/v3/auth/tokens "POST /v3/auth/tokens HTTP/1.1" 201 985 take_action(Namespace(children=False, columns=[], domain='3ef17290fe25439d875726a5ff586695', formatter='table', max_width=0, noindent=False, parents=True, prefix='', project='prj2', variables=[])) Instantiating identity client: <class 'keystoneclient.v3.client.Client'> Making authentication request to http://localhost:5000/v3/auth/tokens "POST /v3/auth/tokens HTTP/1.1" 201 985 REQ: curl -g -i -X GET http://127.0.0.1:35357/v3 -H "Accept: application/json" -H "User-Agent: python-openstackclient" Starting new HTTP connection (1): 127.0.0.1 "GET /v3 HTTP/1.1" 200 249 RESP: [200] content-length: 249 vary: X-Auth-Token connection: keep-alive date: Fri, 25 Sep 2015 18:37:07 GMT content-type: application/json x-openstack-request-id: req-edd40a6d-671d-4f31-aaf9-8c26ddb0df2a RESP BODY: {"version": {"status": "stable", "updated": "2015-03-30T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.4", "links": [{"href": "http://127.0.0.1:35357/v3/", "rel": "self"}]}}
REQ: curl -g -i -X GET http://127.0.0.1:35357/v3/domains/3ef17290fe25439d875726a5ff586695 -H "User-Agent: python-keystoneclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}5eb6ba46518b5f148b677876b5b1be4ebd5eea84" "GET /v3/domains/3ef17290fe25439d875726a5ff586695 HTTP/1.1" 200 176 RESP: [200] content-length: 176 vary: X-Auth-Token connection: keep-alive date: Fri, 25 Sep 2015 18:37:07 GMT content-type: application/json x-openstack-request-id: req-a6ba0548-9faa-4eb6-bc6b-9fdae244fadc RESP BODY: {"domain": {"enabled": true, "id": "3ef17290fe25439d875726a5ff586695", "links": {"self": "http://127.0.0.1:35357/v3/domains/3ef17290fe25439d875726a5ff586695"}, "name": "dom1"}}
REQ: curl -g -i -X GET http://127.0.0.1:35357/v3/projects?subtree_as_list=False&domain_id=3ef17290fe25439d875726a5ff586695&parents_as_list=True&name=prj2 -H "User-Agent: python-keystoneclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}5eb6ba46518b5f148b677876b5b1be4ebd5eea84" "GET /v3/projects?subtree_as_list=False&domain_id=3ef17290fe25439d875726a5ff586695&parents_as_list=True&name=prj2 HTTP/1.1" 200 503 RESP: [200] content-length: 503 vary: X-Auth-Token connection: keep-alive date: Fri, 25 Sep 2015 18:37:07 GMT content-type: application/json x-openstack-request-id: req-7377f5ec-c9c5-4709-8425-35eda1e9f048 RESP BODY: {"links": {"self": "http://127.0.0.1:35357/v3/projects?subtree_as_list=False&domain_id=3ef17290fe25439d875726a5ff586695&parents_as_list=True&name=prj2", "previous": null, "next": null}, "projects": [{"is_domain": false, "description": "", "links": {"self": "http://127.0.0.1:35357/v3/projects/d9f4149431514e3d97ba1abff53e959a"}, "enabled": true, "id": "d9f4149431514e3d97ba1abff53e959a", "parent_id": "9b7a8b2f8b47444c8210f3fea7c1ae85", "domain_id": "3ef17290fe25439d875726a5ff586695", "name": "prj2"}]}
+-------------+----------------------------------+ | Field | Value | +-------------+----------------------------------+ | description | | | domain_id | 3ef17290fe25439d875726a5ff586695 | | enabled | True | | id | d9f4149431514e3d97ba1abff53e959a | | is_domain | False | | name | prj2 | | parent_id | 9b7a8b2f8b47444c8210f3fea7c1ae85 | +-------------+----------------------------------+ clean_up ShowProject: END return value: 0
project show --parents simply show only specified project.
--parents option is expected to access "/projects/ <project_ id>?parents_ as_list" . parents_ as_list= True&name= <project_ name>.
but access projects?
Real output is following:
$ openstack --debug project show prj2 --parents --domain 3ef17290fe25439 d875726a5ff5866 95 9d875726a5ff586 695'] access_ token_endpoint= '', auth_type='', auth_url='http:// localhost: 5000/v3', cacert='', client_id='', client_secret='', cloud='', debug=True, default_ domain= 'default' , deferred_ help=False, domain_id='', domain_name='dom1', endpoint='', identity_ provider= '', identity_ provider_ url='', insecure=None, interface='', log_file=None, os_compute_ api_version= '', os_data_ processing_ api_version= '1.1', os_identity_ api_version= '3', os_image_ api_version= '', os_network_ api_version= '', os_object_ api_version= '', os_policy_ api_version= '1', os_project_id=None, os_project_ name=None, os_volume_ api_version= '', password= 'password' , project_ domain_ id='', project_ domain_ name='' , project_id='', project_name='', protocol='', region_name='', scope='', service_ provider_ endpoint= '', timing=False, token='', trust_id='', url='', user_domain_ id='3ef17290fe2 5439d875726a5ff 586695' , user_domain_ name='' , user_id='', username='adm1', verbose_level=3, verify=None) api_version' : '2', 'key': None, 'database_ api_version' : '1.0', 'api_timeout': None, 'baremetal_ api_version' : '1', 'cacert': None, 'image_ api_use_ tasks': False, 'floating_ ip_source' : 'neutron', 'orchestration_ api_version' : '1', 'interface': None, 'network_ api_version' : '2', 'image_format': 'qcow2', 'object_ api_version' : '1', 'image_ api_version' : '2', 'verify': True, 'identity_ api_version' : '2', 'volume_ api_version' : '1', 'cert': None, 'secgroup_source': 'neutron', 'dns_api_version': '2', 'disable_ vendor_ agent': {}} api_version' : '2', 'orchestration_ api_version' : '1', 'database_ api_version' : '1.0', 'interface': None, 'policy_ api_version' : '1', 'network_ api_version' : '2', 'image_format': 'qcow2', 'object_ api_version' : '1', 'image_ api_version' : '2', 'verify': True, 'timing': False, 'dns_api_version': '2', 'verbose_level': 3, 'region_name': '', 'api_timeout': None, 'baremetal_ api_version' : '1', 'auth': {'username': 'adm1', 'password': 'password', 'auth_url': 'http:// localhost: 5000/v3', 'domain_name': 'dom1', 'user_domain_id': '3ef17290fe2543 9d875726a5ff586 695'}, 'default_domain': 'default', 'image_ api_use_ tasks': False, 'floating_ ip_source' : 'neutron', 'key': None, 'cacert': None, 'data_processin g_api_version' : '1.1', 'deferred_help': False, 'identity_ api_version' : '3', 'volume_ api_version' : '1', 'cert': None, 'secgroup_source': 'neutron', 'debug': True, 'disable_ vendor_ agent': {}} compute. v2 network. v2 identity. v3 object_ store.v1 congressclient. v1 data_processing .v1 .identity. v3.project. ShowProject 9d875726a5ff586 695', 'domain_name': 'dom1', 'auth_url': 'http:// localhost: 5000/v3', 'password': 'password', 'project_ domain_ id': 'default'} localhost: 5000/v3 -H "Accept: application/json" -H "User-Agent: python- openstackclient " request- id: req-da678ec6- 9e93-4390- 8971-9a94569c91 1b 30T00:00: 00Z", "media-types": [{"base": "application/json", "type": "application/ vnd.openstack. identity- v3+json" }], "id": "v3.4", "links": [{"href": "http:// localhost: 5000/v3/", "rel": "self"}]}}
START with options: ['--debug', 'project', 'show', 'prj2', '--parents', '--domain', '3ef17290fe2543
options: Namespace(
defaults: {'auth_type': 'password', 'compute_
cloud cfg: {'auth_type': 'password', 'compute_
compute API version 2, cmd group openstack.
network API version 2, cmd group openstack.
image API version 2, cmd group openstack.image.v2
volume API version 1, cmd group openstack.volume.v1
identity API version 3, cmd group openstack.
object_store API version 1, cmd group openstack.
congressclient API version 1, cmd group openstack.
data_processing API version 1.1, cmd group openstack.
command: project show -> openstackclient
Auth plugin password selected
auth_type: password
Using auth plugin: password
Using parameters {'username': 'adm1', 'user_domain_id': '3ef17290fe2543
Get auth_ref
REQ: curl -g -i -X GET http://
Starting new HTTP connection (1): localhost
"GET /v3 HTTP/1.1" 200 248
RESP: [200] content-length: 248 vary: X-Auth-Token connection: keep-alive date: Fri, 25 Sep 2015 18:37:07 GMT content-type: application/json x-openstack-
RESP BODY: {"version": {"status": "stable", "updated": "2015-03-
Making authentication request to http:// localhost: 5000/v3/ auth/tokens Namespace( children= False, columns=[], domain= '3ef17290fe2543 9d875726a5ff586 695', formatter='table', max_width=0, noindent=False, parents=True, prefix='', project='prj2', variables=[])) .v3.client. Client' > localhost: 5000/v3/ auth/tokens 127.0.0. 1:35357/ v3 -H "Accept: application/json" -H "User-Agent: python- openstackclient " request- id: req-edd40a6d- 671d-4f31- aaf9-8c26ddb0df 2a 30T00:00: 00Z", "media-types": [{"base": "application/json", "type": "application/ vnd.openstack. identity- v3+json" }], "id": "v3.4", "links": [{"href": "http:// 127.0.0. 1:35357/ v3/", "rel": "self"}]}}
"POST /v3/auth/tokens HTTP/1.1" 201 985
take_action(
Instantiating identity client: <class 'keystoneclient
Making authentication request to http://
"POST /v3/auth/tokens HTTP/1.1" 201 985
REQ: curl -g -i -X GET http://
Starting new HTTP connection (1): 127.0.0.1
"GET /v3 HTTP/1.1" 200 249
RESP: [200] content-length: 249 vary: X-Auth-Token connection: keep-alive date: Fri, 25 Sep 2015 18:37:07 GMT content-type: application/json x-openstack-
RESP BODY: {"version": {"status": "stable", "updated": "2015-03-
REQ: curl -g -i -X GET http:// 127.0.0. 1:35357/ v3/domains/ 3ef17290fe25439 d875726a5ff5866 95 -H "User-Agent: python- keystoneclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}5eb6ba465 18b5f148b677876 b5b1be4ebd5eea8 4" 3ef17290fe25439 d875726a5ff5866 95 HTTP/1.1" 200 176 request- id: req-a6ba0548- 9faa-4eb6- bc6b-9fdae244fa dc 9d875726a5ff586 695", "links": {"self": "http:// 127.0.0. 1:35357/ v3/domains/ 3ef17290fe25439 d875726a5ff5866 95"}, "name": "dom1"}}
"GET /v3/domains/
RESP: [200] content-length: 176 vary: X-Auth-Token connection: keep-alive date: Fri, 25 Sep 2015 18:37:07 GMT content-type: application/json x-openstack-
RESP BODY: {"domain": {"enabled": true, "id": "3ef17290fe2543
REQ: curl -g -i -X GET http:// 127.0.0. 1:35357/ v3/projects? subtree_ as_list= False&domain_ id=3ef17290fe25 439d875726a5ff5 86695&parents_ as_list= True&name= prj2 -H "User-Agent: python- keystoneclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}5eb6ba465 18b5f148b677876 b5b1be4ebd5eea8 4" subtree_ as_list= False&domain_ id=3ef17290fe25 439d875726a5ff5 86695&parents_ as_list= True&name= prj2 HTTP/1.1" 200 503 request- id: req-7377f5ec- c9c5-4709- 8425-35eda1e9f0 48 127.0.0. 1:35357/ v3/projects? subtree_ as_list= False&domain_ id=3ef17290fe25 439d875726a5ff5 86695&parents_ as_list= True&name= prj2", "previous": null, "next": null}, "projects": [{"is_domain": false, "description": "", "links": {"self": "http:// 127.0.0. 1:35357/ v3/projects/ d9f4149431514e3 d97ba1abff53e95 9a"}, "enabled": true, "id": "d9f4149431514e 3d97ba1abff53e9 59a", "parent_id": "9b7a8b2f8b4744 4c8210f3fea7c1a e85", "domain_id": "3ef17290fe2543 9d875726a5ff586 695", "name": "prj2"}]}
"GET /v3/projects?
RESP: [200] content-length: 503 vary: X-Auth-Token connection: keep-alive date: Fri, 25 Sep 2015 18:37:07 GMT content-type: application/json x-openstack-
RESP BODY: {"links": {"self": "http://
+------ ------- +------ ------- ------- ------- ------- + ------- +------ ------- ------- ------- ------- + d875726a5ff5866 95 | d97ba1abff53e95 9a | c8210f3fea7c1ae 85 | ------- +------ ------- ------- ------- ------- +
| Field | Value |
+------
| description | |
| domain_id | 3ef17290fe25439
| enabled | True |
| id | d9f4149431514e3
| is_domain | False |
| name | prj2 |
| parent_id | 9b7a8b2f8b47444
+------
clean_up ShowProject:
END return value: 0