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: Sebastian Gebhard <[email protected]> --- test/py/cmdlib/cluster_unittest.py | 2 +- test/py/cmdlib/instance_unittest.py | 4 ++-- test/py/cmdlib/testsupport/config_mock.py | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/py/cmdlib/cluster_unittest.py b/test/py/cmdlib/cluster_unittest.py index 7ca0b96..5b8f2e1 100644 --- a/test/py/cmdlib/cluster_unittest.py +++ b/test/py/cmdlib/cluster_unittest.py @@ -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()) diff --git a/test/py/cmdlib/instance_unittest.py b/test/py/cmdlib/instance_unittest.py index 5230096..5ba68fc 100644 --- a/test/py/cmdlib/instance_unittest.py +++ b/test/py/cmdlib/instance_unittest.py @@ -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) diff --git a/test/py/cmdlib/testsupport/config_mock.py b/test/py/cmdlib/testsupport/config_mock.py index 7e2bff2..18b5c05 100644 --- a/test/py/cmdlib/testsupport/config_mock.py +++ b/test/py/cmdlib/testsupport/config_mock.py @@ -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, -- 1.8.1.2
