Skip to content

Commit b5b3a8a

Browse files
committed
Convert TEST_*_PROXY to *_proxy env vars in neutron setup
If TEST_{NO,HTTP,HTTPS}_PROXY are provided, convert them to http_proxy etc so that code will use them. Here we apply to neutron.setup.
1 parent 178230e commit b5b3a8a

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

  • zaza/openstack/charm_tests/neutron

zaza/openstack/charm_tests/neutron/setup.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030

3131
import zaza.charm_lifecycle.utils as lifecycle_utils
3232

33-
3433
# The overcloud network configuration settings are declared.
3534
# These are the network configuration settings under test.
3635
OVERCLOUD_NETWORK_CONFIG = {
@@ -80,6 +79,14 @@
8079
"fip_service_subnet_cidr": "100.64.0.0/24"
8180
}
8281

82+
# Set proxy vars if provided so that all code gets to use it.
83+
for key, val in os.environ.items():
84+
if not key.startswith('TEST_') or 'PROXY' not in key:
85+
continue
86+
87+
_key = key.partition('TEST_')[2]
88+
os.environ[_key.lower()] = val
89+
8390

8491
def undercloud_and_charm_setup(limit_gws=None):
8592
"""Perform undercloud and charm setup for network plumbing.

0 commit comments

Comments
 (0)