diff --git a/heatclient/shell.py b/heatclient/shell.py index e87f4f5d..cac817bb 100644 --- a/heatclient/shell.py +++ b/heatclient/shell.py @@ -286,12 +286,9 @@ class HeatShell(object): raise exc.CommandError("You must provide a username via" " either --os-username or env[OS_USERNAME]") - 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_password: + raise exc.CommandError("You must provide a password via" + " either --os-password or env[OS_PASSWORD]") if not (args.os_tenant_id or args.os_tenant_name): raise exc.CommandError("You must provide a tenant_id via" diff --git a/heatclient/tests/test_shell.py b/heatclient/tests/test_shell.py index 25c27a54..6737237c 100644 --- a/heatclient/tests/test_shell.py +++ b/heatclient/tests/test_shell.py @@ -154,22 +154,6 @@ class ShellParamValidationTest(TestCase): cmd = '%s --template-file=%s ' % (self.command, template_file) self.shell_error(cmd, self.err) - def test_no_token_no_password(self): - self.m.StubOutWithMock(ksclient, 'Client') - self.m.StubOutWithMock(v1client.Client, 'json_request') - - self.m.ReplayAll() - fake_env = { - 'OS_USERNAME': 'username', - 'OS_TENANT_NAME': 'tenant_name', - 'OS_AUTH_URL': 'http://no.where', - } - self.set_fake_env(fake_env) - template_file = os.path.join(TEST_VAR_DIR, 'minimal.template') - cmd = '%s --template-file=%s ' % (self.command, template_file) - err = 'You must provide a password or auth token.' - self.shell_error(cmd, err) - class ShellValidationTest(TestCase):