Using Identity API v3, with a user called "username" in the "default" domain, and a user called "username" in the "admin" domain, the following command fails:
ERROR: openstack More than one user exists with the name 'username'.
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/cliff/app.py", line 314, in run_subcommand
result = cmd.run(parsed_args)
File "/usr/lib/python2.7/site-packages/cliff/display.py", line 92, in run column_names, data = self.take_action(parsed_args)
File "/usr/lib/python2.7/site-packages/openstackclient/identity/v3/role_assignment.py", line 86, in take_action parsed_args.user,
File "/usr/lib/python2.7/site-packages/openstackclient/identity/common.py", line 73, in find_user
users.User, domain_id=domain_id)
File "/usr/lib/python2.7/site-packages/openstackclient/identity/common.py", line 105, in _find_identity_resource
name_or_id, **kwargs)
File "/usr/lib/python2.7/site-packages/openstackclient/common/utils.py", line 96, in find_resource
raise exceptions.CommandError(msg)
CommandError: More than one user exists with the name 'username'.
DEBUG: openstackclient.shell clean_up ListRoleAssignment: More than one user exists with the name 'username'.
More than one user exists with the name 'username'.
I would have expected that command to list the role assignments of the users called "username" in all the domains. But even when trying to restrict the search to a specific domain, the command fails:
ERROR: openstack More than one user exists with the name 'username'.
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/cliff/app.py", line 314, in run_subcommand
result = cmd.run(parsed_args)
File "/usr/lib/python2.7/site-packages/cliff/display.py", line 92, in run column_names, data = self.take_action(parsed_args)
File "/usr/lib/python2.7/site-packages/openstackclient/identity/v3/role_assignment.py", line 86, in take_action parsed_args.user,
File "/usr/lib/python2.7/site-packages/openstackclient/identity/common.py", line 73, in find_user
users.User, domain_id=domain_id)
File "/usr/lib/python2.7/site-packages/openstackclient/identity/common.py", line 105, in _find_identity_resource
name_or_id, **kwargs)
File "/usr/lib/python2.7/site-packages/openstackclient/common/utils.py", line 96, in find_resource
raise exceptions.CommandError(msg)
CommandError: More than one user exists with the name 'username'.
DEBUG: openstackclient.shell clean_up ListRoleAssignment: More than one user exists with the name 'username'.
More than one user exists with the name 'username'.
Using Identity API v3, with a user called "username" in the "default" domain, and a user called "username" in the "admin" domain, the following command fails:
(openstack) role assignment list --user username .shell command: role assignment list -> openstackclient .identity. v3.role_ assignment. ListRoleAssignm ent .identity. v3.role_ assignment. ListRoleAssignm ent take_action( Namespace( columns= [], domain=None, effective=False, formatter='table', group=None, max_width=0, project=None, quote_mode= 'nonnumeric' , role=None, user='username')) session REQ: curl -g -i -X GET https:/ /openstack. example. com:35357/ v3/users? name=username -H "User-Agent: python- keystoneclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}3ccfd4004 fb1b6c698457ee3 c74f8c177cde51b 4" packages. urllib3. connectionpool "GET /v3/users? name=username HTTP/1.1" 200 663 session RESP: [200] date: Thu, 09 Jul 2015 06:08:20 GMT vary: X-Auth-Token content-length: 663 content-type: application/json x-distribution: Ubuntu /openstack. example. com:5000/ v3/users/ f3cf0a620733fd8 5456cdf8c50e1d9 e9"}, "domain_id": "default", "enabled": true, "email": "<email address hidden>", "id": "f3cf0a620733fd 85456cdf8c50e1d 9e9"}, {"name": "username", "links": {"self": "https:/ /openstack. example. com:5000/ v3/users/ 76667091c17e533 febe58b8cea318a 38"}, "domain_id": "4015bc9ee91e43 7d90df83fb64fbb e31", "enabled": true, "email": "<email address hidden>", "id": "76667091c17e53 3febe58b8cea318 a38"}], "links": {"self": "https:/ /openstack. example. com:5000/ v3/users? name=username", "previous": null, "next": null}}
INFO: openstackclient
DEBUG: openstackclient
DEBUG: keystoneclient.
DEBUG: requests.
DEBUG: keystoneclient.
RESP BODY: {"users": [{"name": "username", "links": {"self": "https:/
ERROR: openstack More than one user exists with the name 'username'. python2. 7/site- packages/ cliff/app. py", line 314, in run_subcommand parsed_ args) python2. 7/site- packages/ cliff/display. py", line 92, in run
column_ names, data = self.take_ action( parsed_ args) python2. 7/site- packages/ openstackclient /identity/ v3/role_ assignment. py", line 86, in take_action
parsed_ args.user, python2. 7/site- packages/ openstackclient /identity/ common. py", line 73, in find_user id=domain_ id) python2. 7/site- packages/ openstackclient /identity/ common. py", line 105, in _find_identity_ resource python2. 7/site- packages/ openstackclient /common/ utils.py" , line 96, in find_resource CommandError( msg) .shell clean_up ListRoleAssignment: More than one user exists with the name 'username'.
Traceback (most recent call last):
File "/usr/lib/
result = cmd.run(
File "/usr/lib/
File "/usr/lib/
File "/usr/lib/
users.User, domain_
File "/usr/lib/
name_or_id, **kwargs)
File "/usr/lib/
raise exceptions.
CommandError: More than one user exists with the name 'username'.
DEBUG: openstackclient
More than one user exists with the name 'username'.
I would have expected that command to list the role assignments of the users called "username" in all the domains. But even when trying to restrict the search to a specific domain, the command fails:
(openstack) role assignment list --domain admin --user username .shell command: role assignment list -> openstackclient .identity. v3.role_ assignment. ListRoleAssignm ent .identity. v3.role_ assignment. ListRoleAssignm ent take_action( Namespace( columns= [], domain='admin', effective=False, formatter='table', group=None, max_width=0, project=None, quote_mode= 'nonnumeric' , role=None, user='username')) session REQ: curl -g -i -X GET https:/ /openstack. example. com:35357/ v3/users? name=username -H "User-Agent: python- keystoneclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}951a86ffc 52c1cb4b9be7a37 4ad404e3151e04b 3" packages. urllib3. connectionpool Resetting dropped connection: openstack. example. com packages. urllib3. connectionpool "GET /v3/users? name=username HTTP/1.1" 200 663 session RESP: [200] date: Thu, 09 Jul 2015 04:55:51 GMT vary: X-Auth-Token content-length: 663 content-type: application/json x-distribution: Ubuntu /openstack. example. com:5000/ v3/users/ f3cf0a620733fd8 5456cdf8c50e1d9 e9"}, "domain_id": "default", "enabled": true, "email": "<email address hidden>", "id": "f3cf0a620733fd 85456cdf8c50e1d 9e9"}, {"name": "username", "links": {"self": "https:/ /openstack. example. com:5000/ v3/users/ 76667091c17e533 febe58b8cea318a 38"}, "domain_id": "4015bc9ee91e43 7d90df83fb64fbb e31", "enabled": true, "email": "<email address hidden>", "id": "76667091c17e53 3febe58b8cea318 a38"}], "links": {"self": "https:/ /openstack. example. com:5000/ v3/users? name=username", "previous": null, "next": null}}
INFO: openstackclient
DEBUG: openstackclient
DEBUG: keystoneclient.
INFO: requests.
DEBUG: requests.
DEBUG: keystoneclient.
RESP BODY: {"users": [{"name": "username", "links": {"self": "https:/
ERROR: openstack More than one user exists with the name 'username'. python2. 7/site- packages/ cliff/app. py", line 314, in run_subcommand parsed_ args) python2. 7/site- packages/ cliff/display. py", line 92, in run
column_ names, data = self.take_ action( parsed_ args) python2. 7/site- packages/ openstackclient /identity/ v3/role_ assignment. py", line 86, in take_action
parsed_ args.user, python2. 7/site- packages/ openstackclient /identity/ common. py", line 73, in find_user id=domain_ id) python2. 7/site- packages/ openstackclient /identity/ common. py", line 105, in _find_identity_ resource python2. 7/site- packages/ openstackclient /common/ utils.py" , line 96, in find_resource CommandError( msg) .shell clean_up ListRoleAssignment: More than one user exists with the name 'username'.
Traceback (most recent call last):
File "/usr/lib/
result = cmd.run(
File "/usr/lib/
File "/usr/lib/
File "/usr/lib/
users.User, domain_
File "/usr/lib/
name_or_id, **kwargs)
File "/usr/lib/
raise exceptions.
CommandError: More than one user exists with the name 'username'.
DEBUG: openstackclient
More than one user exists with the name 'username'.