integration test: update steps

This commit is contained in:
Wei Zhou 2020-11-23 09:06:42 +00:00 committed by dahn
parent 6a91b8ace7
commit a979ab9050
4 changed files with 126 additions and 15 deletions

View File

@ -308,6 +308,21 @@ class TestMultiplePublicIpSubnets(cloudstackTestCase):
# 17. release new ip 4
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,"
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> new ip 3, eth4 -> new ip 6
# 18. release new ip 3
# verify the available nics in VR should be "eth0,eth1,eth2,eth4,"
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth4 -> new ip 6
# 19. restart network
# verify the available nics in VR should be "eth0,eth1,eth2,eth4,"
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth4 -> new ip 6
# 20. reboot router
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,"
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> new ip 6
# 21. restart network with cleanup
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,"
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> new ip 6
# 22. restart network with cleanup, makeredundant=true
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,"
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> new ip 6
"""
# Create new domain1
@ -719,6 +734,8 @@ class TestMultiplePublicIpSubnets(cloudstackTestCase):
self.verify_router_publicnic_state(router, host, "eth2|eth4")
# 19. restart network
# verify the available nics in VR should be "eth0,eth1,eth2,eth4,"
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth4 -> new ip 6
self.network1.restart(self.apiclient)
routers = self.get_routers(self.network1.id)
for router in routers:
@ -733,7 +750,9 @@ class TestMultiplePublicIpSubnets(cloudstackTestCase):
self.verify_ip_address_in_router(router, host, ipaddress_6.ipaddress.ipaddress, "eth4", True)
self.verify_router_publicnic_state(router, host, "eth2|eth4")
# reboot router
# 20. reboot router
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,"
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> new ip 6
for router in routers:
cmd = rebootRouter.rebootRouterCmd()
cmd.id = router.id
@ -750,7 +769,9 @@ class TestMultiplePublicIpSubnets(cloudstackTestCase):
self.verify_ip_address_in_router(router, host, ipaddress_6.ipaddress.ipaddress, "eth3", True)
self.verify_router_publicnic_state(router, host, "eth2|eth3")
# 20. restart network with cleanup
# 21. restart network with cleanup
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,"
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> new ip 6
self.network1.restart(self.apiclient, cleanup=True)
routers = self.get_routers(self.network1.id)
for router in routers:
@ -764,7 +785,9 @@ class TestMultiplePublicIpSubnets(cloudstackTestCase):
self.verify_ip_address_in_router(router, host, ipaddress_5.ipaddress.ipaddress, "eth3", False)
self.verify_ip_address_in_router(router, host, ipaddress_6.ipaddress.ipaddress, "eth3", True)
# 21. restart network with cleanup, makeredundant=true
# 22. restart network with cleanup, makeredundant=true
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,"
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> new ip 6
self.network1.restart(self.apiclient, cleanup=True, makeredundant=True)
routers = self.get_routers(self.network1.id)
for router in routers:

View File

@ -308,6 +308,21 @@ class TestMultiplePublicIpSubnets(cloudstackTestCase):
# 17. release new ip 4
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,"
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> new ip 3, eth4 -> new ip 6
# 18. release new ip 3
# verify the available nics in VR should be "eth0,eth1,eth2,eth4,"
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth4 -> new ip 6
# 19. restart network
# verify the available nics in VR should be "eth0,eth1,eth2,eth4,"
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth4 -> new ip 6
# 20. reboot router
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,"
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> new ip 6
# 21. restart network with cleanup
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,"
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> new ip 6
# 22. restart network with cleanup, makeredundant=true
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,"
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> new ip 6
"""
# Create new domain1
@ -719,6 +734,8 @@ class TestMultiplePublicIpSubnets(cloudstackTestCase):
self.verify_router_publicnic_state(router, host, "eth2|eth4")
# 19. restart network
# verify the available nics in VR should be "eth0,eth1,eth2,eth4,"
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth4 -> new ip 6
self.network1.restart(self.apiclient)
routers = self.get_routers(self.network1.id)
for router in routers:
@ -733,7 +750,9 @@ class TestMultiplePublicIpSubnets(cloudstackTestCase):
self.verify_ip_address_in_router(router, host, ipaddress_6.ipaddress.ipaddress, "eth4", True)
self.verify_router_publicnic_state(router, host, "eth2|eth4")
# reboot router
# 20. reboot router
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,"
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> new ip 6
for router in routers:
cmd = rebootRouter.rebootRouterCmd()
cmd.id = router.id
@ -750,7 +769,9 @@ class TestMultiplePublicIpSubnets(cloudstackTestCase):
self.verify_ip_address_in_router(router, host, ipaddress_6.ipaddress.ipaddress, "eth3", True)
self.verify_router_publicnic_state(router, host, "eth2|eth3")
# 20. restart network with cleanup
# 21. restart network with cleanup
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,"
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> new ip 6
self.network1.restart(self.apiclient, cleanup=True)
routers = self.get_routers(self.network1.id)
for router in routers:
@ -764,3 +785,20 @@ class TestMultiplePublicIpSubnets(cloudstackTestCase):
self.verify_ip_address_in_router(router, host, ipaddress_5.ipaddress.ipaddress, "eth3", False)
self.verify_ip_address_in_router(router, host, ipaddress_6.ipaddress.ipaddress, "eth3", True)
self.verify_router_publicnic_state(router, host, "eth2|eth3")
# 22. restart network with cleanup, makeredundant=true
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,"
# verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> new ip 6
self.network1.restart(self.apiclient, cleanup=True, makeredundant=True)
routers = self.get_routers(self.network1.id)
for router in routers:
host = self.get_router_host(router)
self.verify_network_interfaces_in_router(router, host, "eth0,eth1,eth2,eth3,")
guestIp, controlIp, sourcenatIp = self.get_router_ips(router)
self.verify_ip_address_in_router(router, host, guestIp, "eth0", True)
self.verify_ip_address_in_router(router, host, controlIp, "eth1", True)
self.verify_ip_address_in_router(router, host, sourcenatIp, "eth2", True)
self.verify_ip_address_in_router(router, host, ipaddress_4.ipaddress.ipaddress, "eth3", False)
self.verify_ip_address_in_router(router, host, ipaddress_5.ipaddress.ipaddress, "eth3", False)
self.verify_ip_address_in_router(router, host, ipaddress_6.ipaddress.ipaddress, "eth3", True)
self.verify_router_publicnic_state(router, host, "eth2|eth3")

View File

@ -318,6 +318,23 @@ class TestMultiplePublicIpSubnets(cloudstackTestCase):
# 18. release new ip 4
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> tier 1, eth3 -> new ip 3, eth4 -> tier 2, eth5 -> new ip 6
# 19. release new ip 3
# verify the available nics in VR should be "eth0,eth1,eth2,eth4,eth5,"
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> tier 1, eth4 -> tier 2, eth5 -> new ip 6
# 20. restart tier1
# 22. restart VPC
# 23. Add private gateway
# verify the available nics in VR should be "eth0,eth1,eth2,eth4,eth5,"
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> tier 1, eth4 -> tier 2, eth5 -> new ip 6, eth3-> private gateway
# 24. reboot router
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> new ip 6, eth3 -> tier 1, eth4 -> private gateway, eth5 -> tier 2
# 25. restart VPC with cleanup
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> new ip 6, eth3 -> tier 1, eth4 -> private gateway, eth5 -> tier 2
# 26. restart VPC with cleanup, makeredundant=true
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> new ip 6, eth3 -> tier 1, eth4 -> private gateway, eth5 -> tier 2
"""
# Create new domain1
@ -796,7 +813,7 @@ class TestMultiplePublicIpSubnets(cloudstackTestCase):
self.verify_router_publicnic_state(router, host, "eth1|eth3|eth5")
# 19. release new ip 3
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
# verify the available nics in VR should be "eth0,eth1,eth2,eth4,eth5,"
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> tier 1, eth4 -> tier 2, eth5 -> new ip 6
ipaddress_3.delete(self.apiclient)
routers = self.get_vpc_routers(self.vpc1.id)
@ -855,7 +872,9 @@ class TestMultiplePublicIpSubnets(cloudstackTestCase):
self.verify_ip_address_in_router(router, host, ipaddress_6.ipaddress.ipaddress, "eth5", True)
self.verify_router_publicnic_state(router, host, "eth1|eth5")
# Add private gateway
# 23. Add private gateway
# verify the available nics in VR should be "eth0,eth1,eth2,eth4,eth5,"
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> tier 1, eth4 -> tier 2, eth5 -> new ip 6, eth3-> private gateway
private_gateway_ip = "172.16." + str(random_subnet_number + 2) + ".1"
private_gateway = PrivateGateway.create(
self.apiclient,
@ -879,7 +898,9 @@ class TestMultiplePublicIpSubnets(cloudstackTestCase):
self.verify_ip_address_in_router(router, host, ipaddress_6.ipaddress.ipaddress, "eth5", True)
self.verify_router_publicnic_state(router, host, "eth1|eth3|eth5")
# reboot router
# 24. reboot router
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> new ip 6, eth3 -> tier 1, eth4 -> private gateway, eth5 -> tier 2
routers = self.get_vpc_routers(self.vpc1.id)
for router in routers:
cmd = rebootRouter.rebootRouterCmd()
@ -897,7 +918,9 @@ class TestMultiplePublicIpSubnets(cloudstackTestCase):
self.verify_ip_address_in_router(router, host, tier2_Ip, "eth5", True)
self.verify_router_publicnic_state(router, host, "eth1|eth2|eth4")
# 23. restart VPC with cleanup
# 25. restart VPC with cleanup
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> new ip 6, eth3 -> tier 1, eth4 -> private gateway, eth5 -> tier 2
self.vpc1.restart(self.apiclient, cleanup=True)
routers = self.get_vpc_routers(self.vpc1.id)
for router in routers:
@ -912,7 +935,9 @@ class TestMultiplePublicIpSubnets(cloudstackTestCase):
self.verify_ip_address_in_router(router, host, tier2_Ip, "eth5", True)
self.verify_router_publicnic_state(router, host, "eth1|eth2|eth4")
# 24. restart VPC with cleanup, makeredundant=true
# 26. restart VPC with cleanup, makeredundant=true
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> new ip 6, eth3 -> tier 1, eth4 -> private gateway, eth5 -> tier 2
self.vpc1.restart(self.apiclient, cleanup=True, makeredundant=True)
routers = self.get_vpc_routers(self.vpc1.id)
for router in routers:

View File

@ -318,6 +318,23 @@ class TestMultiplePublicIpSubnets(cloudstackTestCase):
# 18. release new ip 4
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> tier 1, eth3 -> new ip 3, eth4 -> tier 2, eth5 -> new ip 6
# 19. release new ip 3
# verify the available nics in VR should be "eth0,eth1,eth2,eth4,eth5,"
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> tier 1, eth4 -> tier 2, eth5 -> new ip 6
# 20. restart tier1
# 22. restart VPC
# 23. Add private gateway
# verify the available nics in VR should be "eth0,eth1,eth2,eth4,eth5,"
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> tier 1, eth4 -> tier 2, eth5 -> new ip 6, eth3-> private gateway
# 24. reboot router
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> new ip 6, eth3 -> tier 1, eth4 -> private gateway, eth5 -> tier 2
# 25. restart VPC with cleanup
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> new ip 6, eth3 -> tier 1, eth4 -> private gateway, eth5 -> tier 2
# 26. restart VPC with cleanup, makeredundant=true
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> new ip 6, eth3 -> tier 1, eth4 -> private gateway, eth5 -> tier 2
"""
# Create new domain1
@ -796,7 +813,7 @@ class TestMultiplePublicIpSubnets(cloudstackTestCase):
self.verify_router_publicnic_state(router, host, "eth1|eth3|eth5")
# 19. release new ip 3
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
# verify the available nics in VR should be "eth0,eth1,eth2,eth4,eth5,"
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> tier 1, eth4 -> tier 2, eth5 -> new ip 6
ipaddress_3.delete(self.apiclient)
routers = self.get_vpc_routers(self.vpc1.id)
@ -855,7 +872,9 @@ class TestMultiplePublicIpSubnets(cloudstackTestCase):
self.verify_ip_address_in_router(router, host, ipaddress_6.ipaddress.ipaddress, "eth5", True)
self.verify_router_publicnic_state(router, host, "eth1|eth5")
# Add private gateway
# 23. Add private gateway
# verify the available nics in VR should be "eth0,eth1,eth2,eth4,eth5,"
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> tier 1, eth4 -> tier 2, eth5 -> new ip 6, eth3-> private gateway
private_gateway_ip = "172.16." + str(random_subnet_number + 2) + ".1"
private_gateway = PrivateGateway.create(
self.apiclient,
@ -879,7 +898,9 @@ class TestMultiplePublicIpSubnets(cloudstackTestCase):
self.verify_ip_address_in_router(router, host, ipaddress_6.ipaddress.ipaddress, "eth5", True)
self.verify_router_publicnic_state(router, host, "eth1|eth3|eth5")
# reboot router
# 24. reboot router
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> new ip 6, eth3 -> tier 1, eth4 -> private gateway, eth5 -> tier 2
routers = self.get_vpc_routers(self.vpc1.id)
for router in routers:
cmd = rebootRouter.rebootRouterCmd()
@ -897,7 +918,9 @@ class TestMultiplePublicIpSubnets(cloudstackTestCase):
self.verify_ip_address_in_router(router, host, tier2_Ip, "eth5", True)
self.verify_router_publicnic_state(router, host, "eth1|eth2|eth4")
# 23. restart VPC with cleanup
# 25. restart VPC with cleanup
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> new ip 6, eth3 -> tier 1, eth4 -> private gateway, eth5 -> tier 2
self.vpc1.restart(self.apiclient, cleanup=True)
routers = self.get_vpc_routers(self.vpc1.id)
for router in routers:
@ -912,7 +935,9 @@ class TestMultiplePublicIpSubnets(cloudstackTestCase):
self.verify_ip_address_in_router(router, host, tier2_Ip, "eth5", True)
self.verify_router_publicnic_state(router, host, "eth1|eth2|eth4")
# 24. restart VPC with cleanup, makeredundant=true
# 26. restart VPC with cleanup, makeredundant=true
# verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
# verify the IPs in VR. eth1 -> source nat IP, eth2 -> new ip 6, eth3 -> tier 1, eth4 -> private gateway, eth5 -> tier 2
self.vpc1.restart(self.apiclient, cleanup=True, makeredundant=True)
routers = self.get_vpc_routers(self.vpc1.id)
for router in routers: