Merge "Validate heat url is supplied for --os-no-client-auth."

This commit is contained in:
Jenkins
2013-07-22 17:22:48 +00:00
committed by Gerrit Code Review

View File

@@ -169,7 +169,7 @@ class HeatShell(object):
parser.add_argument('-t', '--token-only',
default=bool(False),
action='store_true',
help='DEPRECATED! Has no effect')
help=argparse.SUPPRESS)
return parser
@@ -278,6 +278,11 @@ class HeatShell(object):
raise exc.CommandError("You must provide an auth url via"
" either --os-auth-url or via "
"env[OS_AUTH_URL]")
if args.os_no_client_auth and not args.heat_url:
raise exc.CommandError("If you specify --os-no-client-auth"
" you must also specify a Heat API URL "
"via either --heat-url or "
"env[HEAT_URL]")
kwargs = {
'username': args.os_username,
'password': args.os_password,