Commit 4256f8fe authored by Sebastian Gebhard's avatar Sebastian Gebhard Committed by Klaus Aehlig
Browse files

Replace more IPs with reserved adresses



Recently, some IP addresses were changed to TEST-NETs from RFC 5737.
This patch changes some more occurences of wrong IPs and replaces them.

TEST-NET-1 is used for primary_ips, TEST-NET-2 for networks and TEST-NET-3 for
secondary_ips.
Signed-off-by: default avatarSebastian Gebhard <sege@fs.ei.tum.de>
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parent d45574de
......@@ -262,7 +262,7 @@ class TestLUClusterRedistConf(CmdlibTestCase):
class TestLUClusterRename(CmdlibTestCase):
NEW_NAME = "new-name.example.com"
NEW_IP = "203.0.113.1"
NEW_IP = "203.0.113.100"
def testNoChanges(self):
op = opcodes.OpClusterRename(name=self.cfg.GetClusterName())
......
......@@ -708,7 +708,7 @@ disk1_dump=mock_path
nic0_mode=bridged
nic0_link=br_mock
nic0_mac=f6:ab:f4:45:d1:af
nic0_ip=198.51.100.1
nic0_ip=192.0.2.1
tags=tag1 tag2
hypervisor=xen-hvm
[hypervisor]
......@@ -2004,7 +2004,7 @@ class TestLUInstanceSetParams(CmdlibTestCase):
self.cfg.ConnectNetworkToGroup(old_net, self.group)
inst = self.cfg.AddNewInstance(nics=[
self.cfg.CreateNic(network=old_net,
ip="192.168.123.2")])
ip="198.51.100.2")])
new_net = self.cfg.AddNewNetwork(mac_prefix="be")
self.cfg.ConnectNetworkToGroup(new_net, self.group)
......
......@@ -142,9 +142,9 @@ class ConfigMock(config.ConfigWriter):
if name is None:
name = "mock_node_%d.example.com" % node_id
if primary_ip is None:
primary_ip = "192.168.0.%d" % node_id
primary_ip = "192.0.2.%d" % node_id
if secondary_ip is None:
secondary_ip = "192.168.1.%d" % node_id
secondary_ip = "203.0.113.%d" % node_id
if group is None:
group = self._default_group.uuid
group = self._GetObjUuid(group)
......@@ -281,12 +281,12 @@ class ConfigMock(config.ConfigWriter):
if name is None:
name = "mock_net_%d" % net_id
if network is None:
network = "192.168.123.0/24"
network = "198.51.100.0/24"
if gateway is None:
if network[-3:] == "/24":
gateway = network[:-4] + "1"
else:
gateway = "192.168.123.1"
gateway = "198.51.100.1"
if network[-3:] == "/24" and gateway == network[:-4] + "1":
if reservations is None:
reservations = "0" * 256
......@@ -555,7 +555,7 @@ class ConfigMock(config.ConfigWriter):
reserved_lvs=None,
drbd_usermode_helper="/bin/true",
master_node=master_node_uuid,
master_ip="192.168.0.254",
master_ip="192.0.2.254",
master_netdev=constants.DEFAULT_BRIDGE,
master_netmask=None,
use_external_mip_script=None,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment