From bf7b1ac67e7d11283dadb57eb8a7d8792c52d3ca Mon Sep 17 00:00:00 2001 From: Jiri Tomasek Date: Wed, 17 Jun 2015 17:05:21 +0200 Subject: Update Neutron initialization setup Change-Id: Ia7ff03ca769edbf6a6091a347875b1336d7205e6 --- tuskar_ui/infrastructure/overview/forms.py | 12 +++++++++--- tuskar_ui/infrastructure/overview/tests.py | 10 +++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/tuskar_ui/infrastructure/overview/forms.py b/tuskar_ui/infrastructure/overview/forms.py index 24a27178..115d4064 100644 --- a/tuskar_ui/infrastructure/overview/forms.py +++ b/tuskar_ui/infrastructure/overview/forms.py @@ -366,12 +366,16 @@ class PostDeployInit(horizon.forms.SelfHandlingForm): label=_("Float Allocation End"), initial="10.255.255.254") float_cidr = horizon.forms.CharField( label=_("Float CIDR"), initial="10.0.0.0/8") + overcloud_nameserver = horizon.forms.CharField( + label=_("Overcloud Nameserver"), initial="8.8.8.8") external_allocation_start = horizon.forms.CharField( label=_("External Allocation Start"), initial="172.17.0.45") external_allocation_end = horizon.forms.CharField( label=_("External Allocation End"), initial="172.17.0.64") external_cidr = horizon.forms.CharField( label=_("External CIDR"), initial="172.17.0.0/16") + bm_network_gateway = horizon.forms.CharField( + label=_("Network Gateway"), initial="192.0.2.1") def build_endpoints(self, plan, controller_role): return { @@ -414,16 +418,18 @@ class PostDeployInit(horizon.forms.SelfHandlingForm): # go from Tuskar parameters in the future. return { "float": { + "cidr": data['float_cidr'], "name": "default-net", + "nameserver": data['overcloud_nameserver'], "allocation_start": data['float_allocation_start'], - "allocation_end": data['float_allocation_end'], - "cidr": data['float_cidr'] + "allocation_end": data['float_allocation_end'] }, "external": { "name": "ext-net", "allocation_start": data['external_allocation_start'], "allocation_end": data['external_allocation_end'], - "cidr": data['external_cidr'] + "cidr": data['external_cidr'], + "gateway": data['bm_network_gateway'] }} def handle(self, request, data): diff --git a/tuskar_ui/infrastructure/overview/tests.py b/tuskar_ui/infrastructure/overview/tests.py index 85cad236..72697671 100644 --- a/tuskar_ui/infrastructure/overview/tests.py +++ b/tuskar_ui/infrastructure/overview/tests.py @@ -248,7 +248,9 @@ class OverviewTests(test.BaseAdminViewTests): 'float_cidr': '10.0.0.0/8', 'external_allocation_start': '192.0.2.45', 'external_allocation_end': '192.0.2.64', - 'external_cidr': '192.0.2.0/24' + 'external_cidr': '192.0.2.0/24', + "overcloud_nameserver": '8.8.8.8', + "bm_network_gateway": '192.0.2.1' } with contextlib.nested( @@ -304,12 +306,14 @@ class OverviewTests(test.BaseAdminViewTests): {'cidr': '10.0.0.0/8', 'allocation_start': '10.0.0.2', 'name': 'default-net', - 'allocation_end': '10.255.255.254'}, + 'allocation_end': '10.255.255.254', + 'nameserver': '8.8.8.8'}, 'external': {'cidr': '192.0.2.0/24', 'allocation_start': '192.0.2.45', 'name': 'ext-net', - 'allocation_end': '192.0.2.64'}}, + 'allocation_end': '192.0.2.64', + 'gateway': '192.0.2.1'}}, keystone_client='keystone_client', neutron_client='neutron_client') mock_get_keystone_client.assert_called_once_with( -- cgit v1.2.1