Browse Source

Fix quoting for PYTHONWARNINGS

The fix for 1854868 introduced double quoting for the PYTHONWARNINGS
variable which leads to a message about an Invalid -W option being
displayed.

Change-Id: I6a9b2704a9c6c7c1c9903532a5423408ede8ffc9
Closes-Bug: #1858113
(cherry picked from commit 45ab26770c)
changes/85/700985/1
Alex Schultz 1 month ago
parent
commit
68028747f7
2 changed files with 5 additions and 2 deletions
  1. +3
    -0
      tripleo_common/tests/utils/test_overcloudrc.py
  2. +2
    -2
      tripleo_common/utils/overcloudrc.py

+ 3
- 0
tripleo_common/tests/utils/test_overcloudrc.py View File

@@ -41,6 +41,9 @@ class OvercloudRcTest(base.TestCase):
result['overcloudrc'])
self.assertIn("OS_PASSWORD=AdminPassword", result['overcloudrc'])
self.assertIn("OS_PASSWORD=AdminPassword", result['overcloudrc.v3'])

self.assertIn("export PYTHONWARNINGS='ignore:Certificate",
result['overcloudrc'])
self.assertIn("OS_IDENTITY_API_VERSION=3", result['overcloudrc'])
self.assertIn("OS_IDENTITY_API_VERSION=3", result['overcloudrc.v3'])
self.assertIn(overcloudrc.CLOUDPROMPT, result['overcloudrc'])

+ 2
- 2
tripleo_common/utils/overcloudrc.py View File

@@ -101,8 +101,8 @@ def create_overcloudrc(stack, no_proxy, admin_password, region_name):
'OS_NO_CACHE': 'True',
'OS_CLOUDNAME': stack.stack_name,
'no_proxy': ','.join(no_proxy_list),
'PYTHONWARNINGS': ('"ignore:Certificate has no, ignore:A true '
'SSLContext object is not available"'),
'PYTHONWARNINGS': ('ignore:Certificate has no, ignore:A true '
'SSLContext object is not available'),
'OS_AUTH_TYPE': 'password',
'OS_PASSWORD': admin_password,
'OS_AUTH_URL': overcloud_endpoint.replace('/v2.0', '') + '/v3',

Loading…
Cancel
Save