Fix 'set user' command

* missing --name arguemnt in parser for SetUser()
* correct Identity api call for SetUser()

Fix bug 1001384

Change-Id: I51169a0585c1bfe106ddd2e390269f69fc32852c
This commit is contained in:
Dean Troyer 2012-05-18 17:19:10 -05:00
parent 0c4e131c6e
commit ec586a75f4

View File

@ -166,6 +166,11 @@ class SetUser(command.OpenStackCommand):
metavar='<user>',
help='Name or ID of user to change',
)
parser.add_argument(
'--name',
metavar='<new-user-name>',
help='New user name',
)
parser.add_argument(
'--password',
metavar='<user-password>',
@ -217,7 +222,7 @@ class SetUser(command.OpenStackCommand):
if not len(kwargs):
stdout.write("User not updated, no arguments present")
return
identity_client.users.delete(user.id)
identity_client.users.update(user.id, **kwargs)
return