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
This commit is contained in:
Zhenguo Niu 2015-09-09 22:27:34 +08:00
parent f42b7f5f5e
commit d5321666a5
1 changed files with 2 additions and 2 deletions

View File

@ -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()