diff options
author | Monty Taylor <mordred@inaugust.com> | 2016-08-18 11:35:50 -0500 |
---|---|---|
committer | Monty Taylor <mordred@inaugust.com> | 2016-08-18 11:47:08 -0500 |
commit | 9d757b3a9a89bdd63f56ce171b7c878ded9a4cd8 (patch) | |
tree | c50f49e5c46eb59335971a511b20ef54107f9704 /os_client_config/tests/test_config.py | |
parent | a6840f69ff5644065816309776365adccf017772 (diff) | |
download | os-client-config-9d757b3a9a89bdd63f56ce171b7c878ded9a4cd8.tar.gz |
Add support for configuring split-stack networks1.20.0
Some clouds, like OSIC and v1 of DreamCompute, have a split stack
network. This means that a single Neutron Network has both an IPv4 and
an IPv6 subnet, but that the IPv4 subnet is a private/RFC-1918 and the
IPv6 subnet is a Global network. As any inferrance information is
attached to the Network, it's impossible to properly categorize IP
addresses that are on the Server in such a scenario.
Add support for ipv4 and ipv6 versions of the current routes_externally
config value, with each of them defaulting to the value of the
un-specialized routes_externally.
Change-Id: I1e87a1423d20eac31175f44f5f7b38dfcf3a11cb
Diffstat (limited to 'os_client_config/tests/test_config.py')
-rw-r--r-- | os_client_config/tests/test_config.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/os_client_config/tests/test_config.py b/os_client_config/tests/test_config.py index baa35cd..b9dcb21 100644 --- a/os_client_config/tests/test_config.py +++ b/os_client_config/tests/test_config.py @@ -194,11 +194,19 @@ class TestConfig(base.TestCase): vendor_files=[self.vendor_yaml]) cc = c.get_one_cloud('_test-cloud-networks_') self.assertEqual( - ['a-public', 'another-public'], cc.get_external_networks()) + ['a-public', 'another-public', 'split-default'], + cc.get_external_networks()) self.assertEqual( - ['a-private', 'another-private'], cc.get_internal_networks()) + ['a-private', 'another-private', 'split-no-default'], + cc.get_internal_networks()) self.assertEqual('another-private', cc.get_nat_destination()) self.assertEqual('another-public', cc.get_default_network()) + self.assertEqual( + ['a-public', 'another-public', 'split-no-default'], + cc.get_external_ipv4_networks()) + self.assertEqual( + ['a-public', 'another-public', 'split-default'], + cc.get_external_ipv6_networks()) def test_get_one_cloud_no_networks(self): c = config.OpenStackConfig(config_files=[self.cloud_yaml], @@ -875,7 +883,9 @@ class TestBackwardsCompatibility(base.TestCase): expected = { 'networks': [ {'name': 'private', 'routes_externally': False, - 'nat_destination': False, 'default_interface': False}, + 'nat_destination': False, 'default_interface': False, + 'routes_ipv4_externally': False, + 'routes_ipv6_externally': False}, ] } self.assertEqual(expected, result) |