From d5321666a5f9c68be85f49c09f84cc7395fe7e06 Mon Sep 17 00:00:00 2001 From: Zhenguo Niu Date: Wed, 9 Sep 2015 22:27:34 +0800 Subject: [PATCH] Fix usage of python-novaclient in Mistral Direct `from novaclient.v2 import client` became source of problems since the introduction of microversions in Nova. According to novaclient docs, `from novaclient import client` (with the following specification of version 2 in Client constructor) is a proper way of using it. Change-Id: I33879675aced1905ea0c71c22574cce1064e77d4 Closes-Bug: #1493576 --- mistral/actions/openstack/actions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mistral/actions/openstack/actions.py b/mistral/actions/openstack/actions.py index 56b0836e1..cbc0aaba9 100644 --- a/mistral/actions/openstack/actions.py +++ b/mistral/actions/openstack/actions.py @@ -20,7 +20,7 @@ from heatclient.v1 import client as heatclient from keystoneclient import httpclient from keystoneclient.v3 import client as keystoneclient from neutronclient.v2_0 import client as neutronclient -from novaclient.v2 import client as novaclient +from novaclient import client as novaclient from oslo_config import cfg from oslo_log import log @@ -36,7 +36,7 @@ CONF = cfg.CONF class NovaAction(base.OpenStackAction): - _client_class = novaclient.Client + _client_class = novaclient.get_client_class(2) def _get_client(self): ctx = context.ctx()