From 285c51f7e1b27a786fa9684abdc489998285b4e2 Mon Sep 17 00:00:00 2001 From: Ivan Kolodyazhny Date: Mon, 12 Aug 2019 16:19:44 +0300 Subject: [PATCH] Add custom SSL CA Cert support for api.cinder.get_microversion api.cinder.get_microversion function now supports OPENSTACK_SSL_NO_VERIFY and OPENSTACK_SSL_CACERT config options. This depends on commit 4a3a2c3c9a89ccff4e64d3da96de5b0af4303840 in python-cinderclient, so the minimum version of python-cinderclient is bumped to 5.0.0. NOTE(amotoki): The stretegy of backporting to stable branches needs a discussion with the requirements team as we cannot bump the minimum version (at least the major version bump is surprising). Change-Id: I22c6c60e10d8e9328f7f1e0c24d6c74496ec1a71 Closes-Bug: 1744670 --- lower-constraints.txt | 2 +- openstack_dashboard/api/cinder.py | 7 ++++++- requirements.txt | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lower-constraints.txt b/lower-constraints.txt index 1cc785950a..ca8821d2b5 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -93,7 +93,7 @@ pyOpenSSL==17.1.0 pyparsing==2.1.0 pyperclip==1.5.27 pyScss==1.3.4 -python-cinderclient==4.0.1 +python-cinderclient==5.0.0 python-dateutil==2.5.3 python-glanceclient==2.8.0 python-keystoneclient==3.15.0 diff --git a/openstack_dashboard/api/cinder.py b/openstack_dashboard/api/cinder.py index 9d3154fa60..4cea64276b 100644 --- a/openstack_dashboard/api/cinder.py +++ b/openstack_dashboard/api/cinder.py @@ -274,7 +274,12 @@ def get_microversion(request, features): continue else: return None - min_ver, max_ver = cinder_client.get_server_version(cinder_url) + + insecure = settings.OPENSTACK_SSL_NO_VERIFY + cacert = settings.OPENSTACK_SSL_CACERT + + min_ver, max_ver = cinder_client.get_server_version(cinder_url, + insecure, cacert) return microversions.get_microversion_for_features( 'cinder', features, api_versions.APIVersion, min_ver, max_ver) diff --git a/requirements.txt b/requirements.txt index 2c907d8da8..fa084b8962 100644 --- a/requirements.txt +++ b/requirements.txt @@ -31,7 +31,7 @@ osprofiler>=2.3.0 # Apache-2.0 Pint>=0.5 # BSD pymongo!=3.1,>=3.0.2 # Apache-2.0 pyScss!=1.3.5,>=1.3.4 # MIT License -python-cinderclient>=4.0.1 # Apache-2.0 +python-cinderclient>=5.0.0 # Apache-2.0 python-glanceclient>=2.8.0 # Apache-2.0 python-keystoneclient>=3.15.0 # Apache-2.0 python-neutronclient>=6.7.0 # Apache-2.0