summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-06-24 10:50:08 +0000
committerGerrit Code Review <review@openstack.org>2015-06-24 10:50:08 +0000
commit5f377344311c044383da7040479ef35f7559c10e (patch)
tree4979d1dd225a0b0229093cc7c877afbfc28b89f1
parent8c785057b9e8bc21334e3a2fbe9ea482f22fd48a (diff)
parentbf7b1ac67e7d11283dadb57eb8a7d8792c52d3ca (diff)
downloadtuskar-ui-5f377344311c044383da7040479ef35f7559c10e.tar.gz
Merge "Update Neutron initialization setup"
-rw-r--r--tuskar_ui/infrastructure/overview/forms.py12
-rw-r--r--tuskar_ui/infrastructure/overview/tests.py10
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(