summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Hardy <shardy@redhat.com>2013-11-18 15:24:22 +0000
committerSteven Hardy <shardy@redhat.com>2013-11-18 15:26:53 +0000
commit1f388064fb0120c9614c8ea2684e4fae51a2587f (patch)
treeecbd7a63aa4686444609206fa4315493bc0a182a
parent56f97606d83ce124eaee41891be043385a15e05c (diff)
downloadpython-heatclient-1f388064fb0120c9614c8ea2684e4fae51a2587f.tar.gz
Revert "heatclient is not working with os-auth-token"
This reverts commit 4eab568f79bdbfe4ba0d31038bf3c253d0858c59. The commit breaks the unit tests (and for some reason still passed the gate...?), and also doesn't fix the issues with auth_token, ref bug #1252248. So revert this patch, while I work on a more comprehensive fix to the auth_token issues. Change-Id: I34b9e808928d091384c4c466f14260252a45fd2e Closes-Bug: 1252313
-rw-r--r--heatclient/shell.py9
-rw-r--r--heatclient/tests/test_shell.py16
2 files changed, 3 insertions, 22 deletions
diff --git a/heatclient/shell.py b/heatclient/shell.py
index 2793ad5..3aa0e1a 100644
--- a/heatclient/shell.py
+++ b/heatclient/shell.py
@@ -282,12 +282,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 25c27a5..6737237 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):