@@ -72,7 +72,6 @@ def __init__(self):
7272 },
7373 "serviceCapabilityList" : {
7474 "SourceNat" : {"SupportedSourceNatTypes" : "peraccount" },
75- "Lb" : {"lbSchemes" : "public" , "SupportedLbIsolation" : "dedicated" }
7675 },
7776 },
7877 "network_off_netscaler" : {
@@ -95,7 +94,6 @@ def __init__(self):
9594 },
9695 "serviceCapabilityList" : {
9796 "SourceNat" : {"SupportedSourceNatTypes" : "peraccount" },
98- "Lb" : {"lbSchemes" : "public" , "SupportedLbIsolation" : "dedicated" }
9997 },
10098 },
10199 "network_off_shared" : {
@@ -229,25 +227,7 @@ def setUp(self):
229227 admin = True ,
230228 domainid = self .domain .id
231229 )
232- self .cleanup = [self .account ]
233- return
234-
235- def tearDown (self ):
236- try :
237- #Clean up, terminate the created network offerings
238- cleanup_resources (self .apiclient , self .cleanup )
239- interval = list_configurations (
240- self .apiclient ,
241- name = 'network.gc.interval'
242- )
243- wait = list_configurations (
244- self .apiclient ,
245- name = 'network.gc.wait'
246- )
247- # Sleep to ensure that all resources are deleted
248- time .sleep (int (interval [0 ].value ) + int (wait [0 ].value ))
249- except Exception as e :
250- raise Exception ("Warning: Exception during cleanup : %s" % e )
230+ self ._cleanup .insert (0 , self .account )
251231 return
252232
253233 def validate_vpc_offering (self , vpc_offering ):
@@ -394,7 +374,7 @@ def test_01_create_network(self):
394374
395375 @attr (tags = ["advanced" , "intervlan" ])
396376 def test_02_create_network_fail (self ):
397- """ Test create network in VPC
377+ """ Test create network in VPC mismatched services (Should fail)
398378 """
399379
400380 # Validate the following
@@ -712,7 +692,7 @@ def test_05_create_network_ext_LB(self):
712692
713693 @attr (tags = ["advanced" , "intervlan" ])
714694 def test_06_create_network_with_rvr (self ):
715- """ Test create network with eredundant router capability
695+ """ Test create network with redundant router capability
716696 """
717697
718698 # Validate the following
@@ -1094,25 +1074,7 @@ def setUp(self):
10941074 admin = True ,
10951075 domainid = self .domain .id
10961076 )
1097- self .cleanup = [self .account ]
1098- return
1099-
1100- def tearDown (self ):
1101- try :
1102- #Clean up, terminate the created network offerings
1103- cleanup_resources (self .apiclient , self .cleanup )
1104- interval = list_configurations (
1105- self .apiclient ,
1106- name = 'network.gc.interval'
1107- )
1108- wait = list_configurations (
1109- self .apiclient ,
1110- name = 'network.gc.wait'
1111- )
1112- # Sleep to ensure that all resources are deleted
1113- time .sleep (int (interval [0 ].value ) + int (wait [0 ].value ))
1114- except Exception as e :
1115- raise Exception ("Warning: Exception during cleanup : %s" % e )
1077+ self ._cleanup .insert (0 , self .account )
11161078 return
11171079
11181080 def validate_vpc_offering (self , vpc_offering ):
@@ -1365,6 +1327,7 @@ def test_04_create_network_overlapping_range(self):
13651327 # 3. Add network2 with cidr - 10.1.1.1/24 to this VPC
13661328 # 4. Add network3 with cidr - 10.1.1.1/26 to this VPC
13671329 # 5. Network creation in step 3 & 4 should fail.
1330+ self .services = Services ().services
13681331
13691332 self .debug ("Creating a VPC offering" )
13701333 vpc_off = VpcOffering .create (
@@ -1606,19 +1569,7 @@ def setUp(self):
16061569 admin = True ,
16071570 domainid = self .domain .id
16081571 )
1609- self .cleanup = [self .account ]
1610- return
1611-
1612- def tearDown (self ):
1613- try :
1614- #Clean up, terminate the created network offerings
1615- cleanup_resources (self .apiclient , self .cleanup )
1616- wait_for_cleanup (self .apiclient , [
1617- "network.gc.interval" ,
1618- "network.gc.wait" ])
1619-
1620- except Exception as e :
1621- raise Exception ("Warning: Exception during cleanup : %s" % e )
1572+ self ._cleanup .insert (0 , self .account )
16221573 return
16231574
16241575 def validate_vpc_offering (self , vpc_offering ):
@@ -1673,8 +1624,7 @@ def validate_vpc_network(self, network, state=None):
16731624
16741625 @attr (tags = ["advanced" , "intervlan" ])
16751626 def test_01_network_services_upgrade (self ):
1676- """ Test update Network that is part of a VPC to a network offering
1677- that has more services.
1627+ """ Test update Network that is part of a VPC to a network offering that has more services
16781628 """
16791629
16801630 # Validate the following
@@ -2027,8 +1977,7 @@ def test_01_network_services_upgrade(self):
20271977
20281978 @attr (tags = ["advanced" , "intervlan" ])
20291979 def test_02_network_vpcvr2vr_upgrade (self ):
2030- """ Test update Network that is NOT part of a VPC to a nw offering
2031- that has services that are provided by VPCVR and vice versa.
1980+ """ Test update Network that is NOT part of a VPC to a nw offering that has services that are provided by VPCVR and vice versa
20321981 """
20331982
20341983 # Validate the following
@@ -2298,7 +2247,6 @@ def setUp(self):
22982247 cmd = stopVirtualMachine .stopVirtualMachineCmd ()
22992248 cmd .id = vm .id
23002249 self .apiclient .stopVirtualMachine (cmd )
2301- self .cleanup = []
23022250 return
23032251
23042252 def tearDown (self ):
@@ -2311,15 +2259,7 @@ def tearDown(self):
23112259 )
23122260 for vm in vms :
23132261 if vm .state == "Stopped" :
2314- cmd = startVirtualMachine .startVirtualMachineCmd ()
2315- cmd .id = vm .id
2316- self .apiclient .startVirtualMachine (cmd )
2317-
2318- try :
2319- #Clean up, terminate the created network offerings
2320- cleanup_resources (self .apiclient , self .cleanup )
2321- except Exception as e :
2322- raise Exception ("Warning: Exception during cleanup : %s" % e )
2262+ vm .start (self .apiclient )
23232263 return
23242264
23252265 def validate_vpc_offering (self , vpc_offering ):
0 commit comments