Update the novaclient version from 1.1 to 2

Change-Id: Idd333afe94277837b1bb5c497722d0924e3517db
This commit is contained in:
Guillaume Espanel 2015-09-18 15:23:36 +02:00 committed by Cedric Brandily
parent 154afdee8c
commit 3194c0a852
1 changed files with 4 additions and 3 deletions

View File

@ -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,