diff --git a/octavia/common/clients.py b/octavia/common/clients.py index fd52eb4f41..59f9af8d88 100644 --- a/octavia/common/clients.py +++ b/octavia/common/clients.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.")) diff --git a/octavia/common/constants.py b/octavia/common/constants.py index 72218c0f5b..93f5a5a3fa 100644 --- a/octavia/common/constants.py +++ b/octavia/common/constants.py @@ -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'