Merge "Revert "heatclient is not working with os-auth-token""

This commit is contained in:
Jenkins
2013-11-25 05:39:42 +00:00
committed by Gerrit Code Review
2 changed files with 3 additions and 22 deletions

View File

@@ -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"

View File

@@ -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):