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
tags/12.1.0
Alex Schultz 5 months ago
parent
commit
45ab26770c
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

@@ -40,6 +40,9 @@ class OvercloudRcTest(base.TestCase):
self.assertIn("export no_proxy='foo,foo.com,[fd00::1]'",
result['overcloudrc'])
self.assertIn("OS_PASSWORD=AdminPassword", result['overcloudrc'])

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


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

@@ -89,8 +89,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', ''),


Loading…
Cancel
Save