diff options
author | Vijendar Komalla <vijendar.komalla@RACKSPACE.COM> | 2013-11-05 14:28:45 -0600 |
---|---|---|
committer | Vijendar Komalla <vijendar.komalla@RACKSPACE.COM> | 2013-11-05 14:34:45 -0600 |
commit | 4eab568f79bdbfe4ba0d31038bf3c253d0858c59 (patch) | |
tree | 879ad88afe9982a92f974b0967906c568ca173b0 /heatclient/shell.py | |
parent | b16b116210636f7a826517d17e76c8ae2b1b02f9 (diff) | |
download | python-heatclient-4eab568f79bdbfe4ba0d31038bf3c253d0858c59.tar.gz |
heatclient is not working with os-auth-token
heatclient is failing if os-auth-token (OS_AUTH_TOKEN) is
provided. With this change, user can provide either auth token
or password with heatclient command line tool (heat).
Closes Bug: #1248265
Change-Id: I22b6af351dd3a371443f432b04785c706eff8325
Diffstat (limited to 'heatclient/shell.py')
-rw-r--r-- | heatclient/shell.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/heatclient/shell.py b/heatclient/shell.py index 3aa0e1a..2793ad5 100644 --- a/heatclient/shell.py +++ b/heatclient/shell.py @@ -282,9 +282,12 @@ class HeatShell(object): raise exc.CommandError("You must provide a username via" " either --os-username or env[OS_USERNAME]") - if not args.os_password: - raise exc.CommandError("You must provide a password via" - " either --os-password or env[OS_PASSWORD]") + if not args.os_password and not args.os_auth_token: + raise exc.CommandError("You must provide a password or auth token." + " To provide password use --os-password or " + "env[OS_PASSWORD]. To provide auth token " + "use --os-auth-token or " + "env[OS_AUTH_TOKEN]") if not (args.os_tenant_id or args.os_tenant_name): raise exc.CommandError("You must provide a tenant_id via" |