Client compatibility fix

This patch fixes incompatibility with python-novaclient-3.1.0+

Change-Id: I2a896da77bd541306e09ebec942d6b1443764153
This commit is contained in:
Martin Mágr 2016-02-17 11:15:01 +01:00
parent ced73ed7a6
commit a9d3fda24e
1 changed files with 11 additions and 3 deletions

View File

@ -117,7 +117,7 @@ class Nova(object):
from novaclient import shell
self.nova = shell.OpenStackComputeShell()
self.base_argv = copy.deepcopy(sys.argv[1:])
self.nova.parser = self.nova.get_base_parser()
self.nova.parser = self.nova.get_base_parser(self.base_argv)
self.add_argument = self.nova.parser.add_argument
def setup(self):
@ -135,8 +135,16 @@ class Nova(object):
api_version,
options.os_username,
options.os_password,
options.os_tenant_name,
tenant_id=options.os_tenant_id,
getattr(
options, 'os_project_name', getattr(
options, 'os_tenant_name', None
)
),
tenant_id=getattr(
options, 'os_project_id', getattr(
options, 'os_tenant_id', None
)
),
auth_token=auth_token,
auth_url=options.os_auth_url,
region_name=options.os_region_name,