From 31899c01ce6b42e98b0ebb95089d5944c3c4950c Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Mon, 17 Dec 2012 17:11:03 +0100 Subject: [PATCH] Fix importing of novaclient exceptions Broken by 3c702e38e9a51a15a8d1626b60f610c75cb1f8b7 Also, use novaclient's own mechanism for selecting the correct API version; don't go fishing in the internals. Change-Id: I296312f185735026587ba9849343aa79177856a3 Signed-off-by: Zane Bitter --- heat/engine/clients.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/heat/engine/clients.py b/heat/engine/clients.py index c28f796e..5868313c 100644 --- a/heat/engine/clients.py +++ b/heat/engine/clients.py @@ -19,7 +19,7 @@ logger = logging.getLogger(__name__) from heat.common import heat_keystoneclient as hkc -from novaclient.v1_1 import client as novaclient +from novaclient import client as novaclient try: from swiftclient import client as swiftclient except ImportError: @@ -80,13 +80,13 @@ class Clients(object): # Workaround for issues with python-keyring, need no_cache=True # ref https://bugs.launchpad.net/python-novaclient/+bug/1020238 # TODO(shardy): May be able to remove when the bug above is fixed - client = novaclient.Client(no_cache=True, **args) + client = novaclient.Client(1.1, no_cache=True, **args) client.authenticate() self._nova[service_type] = client except TypeError: # for compatibility with essex, which doesn't have no_cache=True # TODO(shardy): remove when we no longer support essex - client = novaclient.Client(**args) + client = novaclient.Client(1.1, **args) client.authenticate() self._nova[service_type] = client -- 2.45.2