From 4f85dd747df8fbca9b2d126e85deeec0645beb2a Mon Sep 17 00:00:00 2001 From: Xuchu Jiang Date: Tue, 14 Apr 2020 14:50:44 +0800 Subject: [PATCH] [DS8000] Update cinder driver configuration guide Some examples in DS8000 cinder driver configuration guide are written with Python2. This patch update these examples with Python3. Change-Id: Ice5b0cd4fc11b39db7c23e9d72d3df2119b34fdd Closes-Bug: #1872637 --- .../drivers/ibm-storage-volume-driver.rst | 39 ++++++++++--------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/doc/source/configuration/block-storage/drivers/ibm-storage-volume-driver.rst b/doc/source/configuration/block-storage/drivers/ibm-storage-volume-driver.rst index a2399e4275c..770565b0d0b 100644 --- a/doc/source/configuration/block-storage/drivers/ibm-storage-volume-driver.rst +++ b/doc/source/configuration/block-storage/drivers/ibm-storage-volume-driver.rst @@ -368,7 +368,7 @@ in use. (in PEM format) into the /etc/pki/ca-trust/source/anchors/ directory. Then, run the ``sudo update-ca-trust`` command. -#. For Ubuntu 16.04, place the certificate to be trusted +#. For Ubuntu 18.04, place the certificate to be trusted (in PEM format) into the /usr/local/share/ca-certificates/ directory. Rename the file, using the ``*.crt`` extension. Then, run the ``sudo update-ca-certificates`` command. @@ -379,7 +379,7 @@ in use. .. code-block:: ini - cat ca_public_certificate.pem >> /usr/local/lib/python2.7/ + cat ca_public_certificate.pem >> /usr/local/lib/python3.6/ dist-packages/certifi/cacert.pem. @@ -395,39 +395,42 @@ Verify the chain of trust has been established successfully. .. code-block:: console - # python - Python 2.7.5 (default, Oct 11 2015, 17:47:16) - [GCC 4.8.3 20140911 (Red Hat 4.8.3-9)] on linux2 + # python3 + Python 3.6.8 (default, Aug 7 2019, 17:28:10) + [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import requests - >>> print requests.certs.where() - /etc/pki/tls/certs/ca-bundle.crt + >>> print(requests.certs.where()) + /etc/pki/ca-trust/extracted/openssl/ + ca-bundle.trust.crt -#. Ubuntu 16.04: +#. Ubuntu 18.04: .. code-block:: console - # python - Python 2.7.6 (default, Jun 22 2015, 17:58:13) - [GCC 4.8.2] on linux2 + # python3 + Python 3.6.9 (default, Nov 7 2019, 10:44:02) + [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import requests - >>> print requests.certs.where() + >>> print(requests.certs.where()) /etc/ssl/certs/ca-certificates.crt #. Python requests library with certifi: .. code-block:: console - # python - Python 2.7.6 (default, Jun 22 2015, 17:58:13) - [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" - or "license" for more information. + # python3 + Python 3.6.9 (default, Nov 7 2019, 10:44:02) + [GCC 8.3.0] on linux + Type "help", "copyright", "credits" or "license" for + more information. >>> import requests - >>> print requests.certs.where() /usr/local/lib/python2.7/ - dist-packages/certifi/cacert.pem + >>> print(requests.certs.where()) + /usr/local/lib/python3.6/dist-packages/ + certifi/cacert.pem #. Run the ``openssl s_client -CAfile -connect :8452