From 9b44406394c56b4d162e3feae6282777a63b5ec0 Mon Sep 17 00:00:00 2001 From: SerenaFeng Date: Fri, 24 Mar 2017 14:43:04 +0800 Subject: unify the way of getting openstack clients Change-Id: If3a1d1a8b74e11c5861c016bd722b78f4cf9b475 Signed-off-by: SerenaFeng --- deploy/post/nova.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'deploy/post/nova.py') diff --git a/deploy/post/nova.py b/deploy/post/nova.py index 6f5eae91..2b92450a 100644 --- a/deploy/post/nova.py +++ b/deploy/post/nova.py @@ -6,16 +6,15 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -import novaclient.client +from novaclient import client from deploy.common import query import keystoneauth -class Nova(keystoneauth.Keystoneauth): +class Nova(keystoneauth.ClientBase): def __init__(self, version='2', openrc=None): - super(Nova, self).__init__(openrc) - self.client = novaclient.client.Client(version, session=self.session) + super(Nova, self).__init__(client.Client, version, openrc) self.flavors = self.client.flavors def create_flavor(self, name, ram, vcpus, disk, is_public=True): -- cgit 1.2.3-korg