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
changes/44/324244/2
ZhaoBo 6 years ago
parent 2af58f2918
commit 1896dfed5c
  1. 5
      octavia/common/clients.py
  2. 4
      octavia/common/constants.py

@ -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."))

@ -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'

Loading…
Cancel
Save