From e1c6f92cdac07949b00c758bab5c79ff20639dd9 Mon Sep 17 00:00:00 2001 From: Tim Rozet Date: Thu, 3 Jan 2019 10:31:23 -0500 Subject: Renders service net map for THT Previously if a service mapped to a network which was disabled, the disabled network would fallback to using the ctlplane network. With the recent change in THT, this is no longer the case: https://review.openstack.org/#/c/614457/ With the above change, now any service pointing to a disabled network now results in an empty string value being given for network variables. This patch sets the service netmap in network-enviornment.yaml appropriately based on which networks are enabled in apex. Change-Id: Idf2919935aa707da6ca48968a04cf6653923d19d Signed-off-by: Tim Rozet --- apex/tests/test_apex_network_environment.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'apex/tests/test_apex_network_environment.py') diff --git a/apex/tests/test_apex_network_environment.py b/apex/tests/test_apex_network_environment.py index 79a72a55..7aa6ef15 100644 --- a/apex/tests/test_apex_network_environment.py +++ b/apex/tests/test_apex_network_environment.py @@ -165,3 +165,10 @@ class TestNetworkEnvironment: e = NetworkEnvException("test") print(e) assert_is_instance(e, NetworkEnvException) + + def test_service_netmap(self): + ns = copy(self.ns) + ns.enabled_network_list = ['admin'] + ne = NetworkEnvironment(ns, os.path.join(TEST_BUILD_DIR, NET_ENV_FILE)) + for network in ne['parameter_defaults']['ServiceNetMap'].values(): + assert_equal(network, 'ctlplane') -- cgit 1.2.3-korg