Updated --version to default to NOVA_VERSION, quick fix.
This commit is contained in:
parent
ea4b625e7b
commit
32fd202ab0
@ -86,10 +86,13 @@ class OpenStackComputeShell(object):
|
||||
self.subcommands = {}
|
||||
subparsers = parser.add_subparsers(metavar='<subcommand>')
|
||||
|
||||
actions_module = {
|
||||
'1.0': shell_v1_0,
|
||||
'1.1': shell_v1_1,
|
||||
}[version]
|
||||
try:
|
||||
actions_module = {
|
||||
'1.0': shell_v1_0,
|
||||
'1.1': shell_v1_1,
|
||||
}[version]
|
||||
except KeyError:
|
||||
actions_module = shell_v1_0
|
||||
|
||||
self._find_actions(subparsers, actions_module)
|
||||
self._find_actions(subparsers, self)
|
||||
|
@ -17,7 +17,6 @@ class ShellTest(utils.TestCase):
|
||||
'NOVA_USERNAME': 'username',
|
||||
'NOVA_API_KEY': 'password',
|
||||
'NOVA_PROJECT_ID': 'project_id',
|
||||
'NOVA_VERSION': '1.0',
|
||||
}
|
||||
_old_env, os.environ = os.environ, fake_env.copy()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user