Update Neutron initialization setup

Change-Id: Ia7ff03ca769edbf6a6091a347875b1336d7205e6
This commit is contained in:
Jiri Tomasek 2015-06-17 17:05:21 +02:00
parent bda9a94b60
commit bf7b1ac67e
2 changed files with 16 additions and 6 deletions

View File

@ -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):

View File

@ -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(