Comment 0 for bug 1499657

Revision history for this message
Hidekazu Nakamura (nakamura-h) wrote :

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