Remove DhcpStart and DhcpEnd - Replaced by AllocationPools
THT change Ifdf3e9d22766c1b5ede151979b93754a3d244cc3 switched to use the AllocationPools parameter, replacing use of the DhcpStart and DhcpEnd parameters. Change-Id: Ia96c3af388c40c0bd6ca2b58d1ac5a242608c89d Related-Bug: #1806512 Depends-On: Ifdf3e9d22766c1b5ede151979b93754a3d244cc3
This commit is contained in:
parent
9ef0a30584
commit
5c293711d8
|
@ -158,8 +158,6 @@ class TestNetworkSettings(base.TestCase):
|
|||
'ctlplane-subnet': {
|
||||
'AllocationPools': [
|
||||
{'start': '192.168.24.5', 'end': '192.168.24.24'}],
|
||||
'DhcpRangeEnd': '192.168.24.24',
|
||||
'DhcpRangeStart': '192.168.24.5',
|
||||
'NetworkCidr': '192.168.24.0/24',
|
||||
'NetworkGateway': '192.168.24.1'}}}
|
||||
self.assertEqual(expected, env)
|
||||
|
@ -184,8 +182,6 @@ class TestNetworkSettings(base.TestCase):
|
|||
'AllocationPools': [
|
||||
{'start': '192.168.24.4', 'end': '192.168.24.99'},
|
||||
{'start': '192.168.24.121', 'end': '192.168.24.254'}],
|
||||
'DhcpRangeEnd': '192.168.24.255',
|
||||
'DhcpRangeStart': '192.168.24.0',
|
||||
'NetworkCidr': '192.168.24.0/24',
|
||||
'NetworkGateway': '192.168.24.1'}}}
|
||||
self.assertEqual(expected, env)
|
||||
|
@ -211,8 +207,6 @@ class TestNetworkSettings(base.TestCase):
|
|||
'AllocationPools': [
|
||||
{'start': '192.168.10.2', 'end': '192.168.10.99'},
|
||||
{'start': '192.168.10.121', 'end': '192.168.10.254'}],
|
||||
'DhcpRangeEnd': '192.168.24.24',
|
||||
'DhcpRangeStart': '192.168.24.5',
|
||||
'NetworkCidr': '192.168.10.0/24',
|
||||
'NetworkGateway': '192.168.10.1'}}}
|
||||
self.assertEqual(expected, env)
|
||||
|
@ -242,8 +236,6 @@ class TestNetworkSettings(base.TestCase):
|
|||
{'start': '192.168.10.51', 'end': '192.168.10.79'},
|
||||
{'start': '192.168.10.90', 'end': '192.168.10.99'},
|
||||
{'start': '192.168.10.121', 'end': '192.168.10.254'}],
|
||||
'DhcpRangeEnd': '192.168.24.24',
|
||||
'DhcpRangeStart': '192.168.24.5',
|
||||
'NetworkCidr': '192.168.10.0/24',
|
||||
'NetworkGateway': '192.168.10.1'}}}
|
||||
self.assertEqual(expected, env)
|
||||
|
@ -292,10 +284,6 @@ class TestNetworkSettings(base.TestCase):
|
|||
'AllocationPools': [
|
||||
{'start': '192.168.24.10', 'end': '192.168.24.99'},
|
||||
{'start': '192.168.24.121', 'end': '192.168.24.254'}],
|
||||
# TODO(hjensas): Remove DhcpRangeStart and DhcpRangeEnd
|
||||
# once change: Ifdf3e9d22766c1b5ede151979b93754a3d244cc3 is
|
||||
# merged and THT uses AllocationPools.
|
||||
'DhcpRangeStart': '192.168.24.10',
|
||||
'NetworkCidr': '192.168.24.0/24',
|
||||
'NetworkGateway': '192.168.24.1'}}
|
||||
}
|
||||
|
@ -321,10 +309,6 @@ class TestNetworkSettings(base.TestCase):
|
|||
'AllocationPools': [
|
||||
{'start': '192.168.24.4', 'end': '192.168.24.99'},
|
||||
{'start': '192.168.24.121', 'end': '192.168.24.220'}],
|
||||
# TODO(hjensas): Remove DhcpRangeStart and DhcpRangeEnd
|
||||
# once change: Ifdf3e9d22766c1b5ede151979b93754a3d244cc3 is
|
||||
# merged and THT uses AllocationPools.
|
||||
'DhcpRangeEnd': '192.168.24.220',
|
||||
'NetworkCidr': '192.168.24.0/24',
|
||||
'NetworkGateway': '192.168.24.1'}}
|
||||
}
|
||||
|
@ -388,25 +372,16 @@ class TestNetworkSettings(base.TestCase):
|
|||
'ctlplane-subnet': {
|
||||
'AllocationPools': [
|
||||
{'start': '192.168.24.5', 'end': '192.168.24.24'}],
|
||||
# TODO(hjensas): Remove DhcpRangeStart and DhcpRangeEnd
|
||||
# once change: Ifdf3e9d22766c1b5ede151979b93754a3d244cc3 is
|
||||
# merged and THT uses AllocationPools.
|
||||
'DhcpRangeEnd': '192.168.24.24',
|
||||
'DhcpRangeStart': '192.168.24.5',
|
||||
'NetworkCidr': '192.168.24.0/24',
|
||||
'NetworkGateway': '192.168.24.1'},
|
||||
'subnet1': {
|
||||
'AllocationPools': [
|
||||
{'start': '192.168.10.10', 'end': '192.168.10.99'}],
|
||||
'DhcpRangeEnd': '192.168.10.99',
|
||||
'DhcpRangeStart': '192.168.10.10',
|
||||
'NetworkCidr': '192.168.10.0/24',
|
||||
'NetworkGateway': '192.168.10.254'},
|
||||
'subnet2': {
|
||||
'AllocationPools': [
|
||||
{'start': '192.168.20.10', 'end': '192.168.20.99'}],
|
||||
'DhcpRangeEnd': '192.168.20.99',
|
||||
'DhcpRangeStart': '192.168.20.10',
|
||||
'NetworkCidr': '192.168.20.0/24',
|
||||
'NetworkGateway': '192.168.20.254'}
|
||||
}
|
||||
|
@ -458,25 +433,16 @@ class TestNetworkSettings(base.TestCase):
|
|||
'ctlplane-subnet': {
|
||||
'AllocationPools': [
|
||||
{'start': '192.168.24.5', 'end': '192.168.24.24'}],
|
||||
# TODO(hjensas): Remove DhcpRangeStart and DhcpRangeEnd
|
||||
# once change: Ifdf3e9d22766c1b5ede151979b93754a3d244cc3 is
|
||||
# merged and THT uses AllocationPools.
|
||||
'DhcpRangeEnd': '192.168.24.24',
|
||||
'DhcpRangeStart': '192.168.24.5',
|
||||
'NetworkCidr': '192.168.24.0/24',
|
||||
'NetworkGateway': '192.168.24.1'},
|
||||
'subnet1': {
|
||||
'AllocationPools': [
|
||||
{'start': '192.168.10.10', 'end': '192.168.10.99'}],
|
||||
'DhcpRangeEnd': '192.168.10.99',
|
||||
'DhcpRangeStart': '192.168.10.10',
|
||||
'NetworkCidr': '192.168.10.0/24',
|
||||
'NetworkGateway': '192.168.10.254'},
|
||||
'subnet2': {
|
||||
'AllocationPools': [
|
||||
{'start': '192.168.20.10', 'end': '192.168.20.99'}],
|
||||
'DhcpRangeEnd': '192.168.20.99',
|
||||
'DhcpRangeStart': '192.168.20.10',
|
||||
'NetworkCidr': '192.168.20.0/24',
|
||||
'NetworkGateway': '192.168.20.254'}
|
||||
}
|
||||
|
@ -514,11 +480,6 @@ class TestNetworkSettings(base.TestCase):
|
|||
'ctlplane-subnet': {
|
||||
'AllocationPools': [
|
||||
{'start': '192.168.24.5', 'end': '192.168.24.24'}],
|
||||
# TODO(hjensas): Remove DhcpRangeStart and DhcpRangeEnd
|
||||
# once change: Ifdf3e9d22766c1b5ede151979b93754a3d244cc3 is
|
||||
# merged and THT uses AllocationPools.
|
||||
'DhcpRangeEnd': '192.168.24.24',
|
||||
'DhcpRangeStart': '192.168.24.5',
|
||||
'NetworkCidr': '192.168.24.0/24',
|
||||
'NetworkGateway': '192.168.24.1'},
|
||||
'subnet1': {
|
||||
|
@ -561,11 +522,6 @@ class TestNetworkSettings(base.TestCase):
|
|||
'ctlplane-subnet': {
|
||||
'AllocationPools': [
|
||||
{'start': '192.168.24.5', 'end': '192.168.24.24'}],
|
||||
# TODO(hjensas): Remove DhcpRangeStart and DhcpRangeEnd
|
||||
# once change: Ifdf3e9d22766c1b5ede151979b93754a3d244cc3 is
|
||||
# merged and THT uses AllocationPools.
|
||||
'DhcpRangeEnd': '192.168.24.24',
|
||||
'DhcpRangeStart': '192.168.24.5',
|
||||
'NetworkCidr': '192.168.24.0/24',
|
||||
'NetworkGateway': '192.168.24.1'},
|
||||
'subnet1': {
|
||||
|
|
|
@ -316,15 +316,6 @@ def _process_network_args(env):
|
|||
env['UndercloudCtlplaneSubnets'][subnet] = {
|
||||
'AllocationPools': _calculate_allocation_pools(s)
|
||||
}
|
||||
# TODO(hjensas): Remove DhcpRangeStart and DhcpRangeEnd once change:
|
||||
# Ifdf3e9d22766c1b5ede151979b93754a3d244cc3 is merged and THT uses
|
||||
# AllocationPools.
|
||||
if s.get('dhcp_start'):
|
||||
env['UndercloudCtlplaneSubnets'][subnet].update(
|
||||
{'DhcpRangeStart': s.get('dhcp_start')[0]})
|
||||
if s.get('dhcp_end'):
|
||||
env['UndercloudCtlplaneSubnets'][subnet].update(
|
||||
{'DhcpRangeEnd': s.get('dhcp_end')[0]})
|
||||
for param_key, param_value in SUBNET_PARAMETER_MAPPING.items():
|
||||
if param_value:
|
||||
env['UndercloudCtlplaneSubnets'][subnet].update(
|
||||
|
|
Loading…
Reference in New Issue