@@ -328,13 +328,13 @@ def test_03_acquire_public_ips_in_vpc_with_single_vr(self):
328328 # verify the IPs in VR. eth1 -> source nat IP, eth2 -> tier 1, eth4 -> tier 2, eth5 -> new ip 6, eth3-> private gateway
329329 # 24. reboot router
330330 # verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
331- # verify the IPs in VR. eth1 -> source nat IP, eth2 -> new ip 6, eth3 -> tier 1 , eth4 -> private gateway , eth5 -> tier 2
331+ # verify the IPs in VR. eth1 -> source nat IP, eth2 -> new ip 6, eth3 -> private gateway , eth4 -> tier 1 , eth5 -> tier 2
332332 # 25. restart VPC with cleanup
333333 # verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
334- # verify the IPs in VR. eth1 -> source nat IP, eth2 -> new ip 6, eth3 -> tier 1 , eth4 -> private gateway , eth5 -> tier 2
334+ # verify the IPs in VR. eth1 -> source nat IP, eth2 -> new ip 6, eth3 -> private gateway , eth4 -> tier 1 , eth5 -> tier 2
335335 # 26. restart VPC with cleanup, makeredundant=true
336336 # verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
337- # verify the IPs in VR. eth1 -> source nat IP, eth2 -> new ip 6, eth3 -> tier 1 , eth4 -> private gateway , eth5 -> tier 2
337+ # verify the IPs in VR. eth1 -> source nat IP, eth2 -> new ip 6, eth3 -> private gateway , eth4 -> tier 1 , eth5 -> tier 2
338338 """
339339
340340 # Create new domain1
@@ -479,7 +479,7 @@ def test_03_acquire_public_ips_in_vpc_with_single_vr(self):
479479 # 6. create new public ip range 1
480480 self .services ["publiciprange" ]["zoneid" ] = self .zone .id
481481 self .services ["publiciprange" ]["forvirtualnetwork" ] = "true"
482- random_subnet_number = random .randrange (10 ,20 )
482+ random_subnet_number = random .randrange (10 ,50 )
483483 self .services ["publiciprange" ]["vlan" ] = get_free_vlan (
484484 self .apiclient ,
485485 self .zone .id )[1 ]
@@ -900,9 +900,10 @@ def test_03_acquire_public_ips_in_vpc_with_single_vr(self):
900900
901901 # 24. reboot router
902902 # verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
903- # verify the IPs in VR. eth1 -> source nat IP, eth2 -> new ip 6, eth3 -> tier 1 , eth4 -> private gateway , eth5 -> tier 2
903+ # verify the IPs in VR. eth1 -> source nat IP, eth2 -> new ip 6, eth3 -> private gateway , eth4 -> tier 1 , eth5 -> tier 2
904904 routers = self .get_vpc_routers (self .vpc1 .id )
905- for router in routers :
905+ if len (routers ) > 0 :
906+ router = routers [0 ]
906907 cmd = rebootRouter .rebootRouterCmd ()
907908 cmd .id = router .id
908909 self .apiclient .rebootRouter (cmd )
@@ -913,14 +914,14 @@ def test_03_acquire_public_ips_in_vpc_with_single_vr(self):
913914 self .verify_ip_address_in_router (router , host , controlIp , "eth0" , True )
914915 self .verify_ip_address_in_router (router , host , sourcenatIp , "eth1" , True )
915916 self .verify_ip_address_in_router (router , host , ipaddress_6 .ipaddress .ipaddress , "eth2" , True )
916- self .verify_ip_address_in_router (router , host , tier1_Ip , "eth3" , True )
917- self .verify_ip_address_in_router (router , host , private_gateway_ip , "eth4" , True )
917+ self .verify_ip_address_in_router (router , host , private_gateway_ip , "eth3" , True )
918+ self .verify_ip_address_in_router (router , host , tier1_Ip , "eth4" , True )
918919 self .verify_ip_address_in_router (router , host , tier2_Ip , "eth5" , True )
919- self .verify_router_publicnic_state (router , host , "eth1|eth2|eth4 " )
920+ self .verify_router_publicnic_state (router , host , "eth1|eth2|eth3 " )
920921
921922 # 25. restart VPC with cleanup
922923 # verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
923- # verify the IPs in VR. eth1 -> source nat IP, eth2 -> new ip 6, eth3 -> tier 1 , eth4 -> private gateway , eth5 -> tier 2
924+ # verify the IPs in VR. eth1 -> source nat IP, eth2 -> new ip 6, eth3 -> private gateway , eth4 -> tier 1 , eth5 -> tier 2
924925 self .vpc1 .restart (self .apiclient , cleanup = True )
925926 routers = self .get_vpc_routers (self .vpc1 .id )
926927 for router in routers :
@@ -930,14 +931,14 @@ def test_03_acquire_public_ips_in_vpc_with_single_vr(self):
930931 self .verify_ip_address_in_router (router , host , controlIp , "eth0" , True )
931932 self .verify_ip_address_in_router (router , host , sourcenatIp , "eth1" , True )
932933 self .verify_ip_address_in_router (router , host , ipaddress_6 .ipaddress .ipaddress , "eth2" , True )
933- self .verify_ip_address_in_router (router , host , tier1_Ip , "eth3" , True )
934- self .verify_ip_address_in_router (router , host , private_gateway_ip , "eth4" , True )
934+ self .verify_ip_address_in_router (router , host , private_gateway_ip , "eth3" , True )
935+ self .verify_ip_address_in_router (router , host , tier1_Ip , "eth4" , True )
935936 self .verify_ip_address_in_router (router , host , tier2_Ip , "eth5" , True )
936- self .verify_router_publicnic_state (router , host , "eth1|eth2|eth4 " )
937+ self .verify_router_publicnic_state (router , host , "eth1|eth2|eth3 " )
937938
938939 # 26. restart VPC with cleanup, makeredundant=true
939940 # verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
940- # verify the IPs in VR. eth1 -> source nat IP, eth2 -> new ip 6, eth3 -> tier 1 , eth4 -> private gateway , eth5 -> tier 2
941+ # verify the IPs in VR. eth1 -> source nat IP, eth2 -> new ip 6, eth3 -> private gateway , eth4 -> tier 1 , eth5 -> tier 2
941942 self .vpc1 .restart (self .apiclient , cleanup = True , makeredundant = True )
942943 routers = self .get_vpc_routers (self .vpc1 .id )
943944 for router in routers :
@@ -947,7 +948,7 @@ def test_03_acquire_public_ips_in_vpc_with_single_vr(self):
947948 self .verify_ip_address_in_router (router , host , controlIp , "eth0" , True )
948949 self .verify_ip_address_in_router (router , host , sourcenatIp , "eth1" , True )
949950 self .verify_ip_address_in_router (router , host , ipaddress_6 .ipaddress .ipaddress , "eth2" , True )
950- self .verify_ip_address_in_router (router , host , tier1_Ip , "eth3" , True )
951- self .verify_ip_address_in_router (router , host , private_gateway_ip , "eth4" , True )
951+ self .verify_ip_address_in_router (router , host , private_gateway_ip , "eth3" , True )
952+ self .verify_ip_address_in_router (router , host , tier1_Ip , "eth4" , True )
952953 self .verify_ip_address_in_router (router , host , tier2_Ip , "eth5" , True )
953- self .verify_router_publicnic_state (router , host , "eth1|eth2|eth4 " )
954+ self .verify_router_publicnic_state (router , host , "eth1|eth2|eth3 " )
0 commit comments