Update nova api version to 2.1

The nova team has decided to remove nova v2 API code completely. And it
had merged: https://review.openstack.org/#/c/311653/

we should bump to use v2.1 ASAP

Change-Id: Iee5582b5a74bceead2484684b214fca685dbaede
Closes-Bug: #1588171
This commit is contained in:
ZhaoBo 2016-06-02 14:46:43 +08:00
parent 2af58f2918
commit 1896dfed5c
2 changed files with 5 additions and 4 deletions

View File

@ -12,6 +12,7 @@
from glanceclient import client as glance_client
from neutronclient.neutron import client as neutron_client
from novaclient import api_versions
from novaclient import client as nova_client
from oslo_log import log as logging
from oslo_utils import excutils
@ -22,7 +23,7 @@ from octavia.i18n import _LE
LOG = logging.getLogger(__name__)
GLANCE_VERSION = '2'
NEUTRON_VERSION = '2.0'
NOVA_VERSION = '2'
NOVA_VERSION = '2.1'
class NovaAuth(object):
@ -56,7 +57,7 @@ class NovaAuth(object):
kwargs['cacert'] = cacert
try:
cls.nova_client = nova_client.Client(
NOVA_VERSION, **kwargs)
version=api_versions.APIVersion(NOVA_VERSION), **kwargs)
except Exception:
with excutils.save_and_reraise_exception():
LOG.exception(_LE("Error creating Nova client."))

View File

@ -244,9 +244,9 @@ RELOAD_LB_AFTER_AMP_ASSOC_FULL_GRAPH = 'reload-lb-after-amp-assoc-full-graph'
RELOAD_LB_AFTER_PLUG_VIP = 'reload-lb-after-plug-vip'
NOVA_1 = '1.1'
NOVA_2 = '2'
NOVA_21 = '2.1'
NOVA_3 = '3'
NOVA_VERSIONS = (NOVA_1, NOVA_2, NOVA_3)
NOVA_VERSIONS = (NOVA_1, NOVA_21, NOVA_3)
RPC_NAMESPACE_CONTROLLER_AGENT = 'controller'