Merge pull request #99 from chmouel/no-auth-url-error
ensure we have auth_url and project_id fo the CLI when using API greater 1.0
This commit is contained in:
commit
3507905a7a
@ -158,6 +158,16 @@ class OpenStackComputeShell(object):
|
||||
raise exc.CommandError("You must provide an API key, either"
|
||||
"via --apikey or via"
|
||||
"env[NOVA_API_KEY]")
|
||||
if options.version and options.version != '1.0':
|
||||
if not projectid:
|
||||
raise exc.CommandError("You must provide an projectid, either"
|
||||
"via --projectid or via"
|
||||
"env[NOVA_PROJECT_ID")
|
||||
|
||||
if not url:
|
||||
raise exc.CommandError("You must provide a auth url, either"
|
||||
"via --url or via"
|
||||
"env[NOVA_URL")
|
||||
|
||||
self.cs = self.get_api_class(options.version)(user, apikey, projectid,
|
||||
url)
|
||||
|
Loading…
Reference in New Issue
Block a user