From 3194c0a852b43ed364f841964c41b92276bdea26 Mon Sep 17 00:00:00 2001 From: Guillaume Espanel Date: Fri, 18 Sep 2015 15:23:36 +0200 Subject: [PATCH] Update the novaclient version from 1.1 to 2 Change-Id: Idd333afe94277837b1bb5c497722d0924e3517db --- flameclient/managers.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/flameclient/managers.py b/flameclient/managers.py index 7c8a2b8..ae58bd0 100644 --- a/flameclient/managers.py +++ b/flameclient/managers.py @@ -27,7 +27,7 @@ from keystoneclient.openstack.common.apiclient import ( exceptions as keystone_exceptions) from keystoneclient.v2_0 import client as keystone_client from neutronclient.v2_0 import client as neutron_client -from novaclient.v1_1 import client as nova_client +from novaclient import client as nova_client class KeystoneManager(object): @@ -67,7 +67,7 @@ class KeystoneManager(object): return catalog[service_type][0][endpoint_type] def get_project_id(self): - return self.client().tenant_id + return self.client().project_id class NeutronManager(object): @@ -155,7 +155,8 @@ class NovaManager(object): def client(self): if not self._client: - self._client = nova_client.Client(self.username, self.password, + self._client = nova_client.Client('2', + self.username, self.password, self.project, self.auth_url, region_name=self.region_name, insecure=self.insecure,