@@ -57,8 +57,8 @@ def __init__(self):
5757 "name" : "Tiny Instance" ,
5858 "displaytext" : "Tiny Instance" ,
5959 "cpunumber" : 1 ,
60- "cpuspeed" : 100 , # in MHz
61- "memory" : 64 , # In MBs
60+ "cpuspeed" : 100 , # in MHz
61+ "memory" : 64 , # In MBs
6262 },
6363 "virtual_machine" : {
6464 "displayname" : "Test VM" ,
@@ -78,7 +78,7 @@ def __init__(self):
7878 "ostypeid" : 'aaf6e8c9-b609-441d-9ebd-b4eaa030a275' ,
7979 "url" : "http://download.cloud.com/releases/2.0.0/UbuntuServer-10-04-64bit.vhd.bz2" ,
8080 "hypervisor" : 'XenServer' ,
81- "format" : 'VHD' ,
81+ "format" : 'VHD' ,
8282 "isfeatured" : True ,
8383 "ispublic" : True ,
8484 "isextractable" : True ,
@@ -87,7 +87,7 @@ def __init__(self):
8787 # Cent OS 5.3 (64 bit)
8888 "sleep" : 60 ,
8989 "timeout" : 10 ,
90- "mode" :'advanced'
90+ "mode" : 'advanced'
9191 }
9292
9393
@@ -138,9 +138,9 @@ def tearDown(self):
138138 return
139139
140140 def test_01_create_account (self ):
141- """Test Create Account and user for that account
141+ """Test Create Account and user for that account
142142 """
143-
143+
144144 tags = ["advanced" , "basic" , "eip" , "advancedns" , "sg" ]
145145
146146 # Validate the following
@@ -273,9 +273,9 @@ def tearDown(self):
273273 return
274274
275275 def test_01_user_remove_VM_running (self ):
276- """Test Remove one user from the account
276+ """Test Remove one user from the account
277277 """
278-
278+
279279 tags = ["advanced" , "basic" , "eip" , "advancedns" , "sg" ]
280280
281281 # Validate the following
@@ -337,8 +337,8 @@ def test_01_user_remove_VM_running(self):
337337 id = self .account .account .id
338338 )
339339 self .assertEqual (
340- isinstance (accounts_response , list ),
341- True ,
340+ isinstance (accounts_response , list ),
341+ True ,
342342 "Check for valid list accounts response"
343343 )
344344
@@ -353,8 +353,8 @@ def test_01_user_remove_VM_running(self):
353353 domainid = self .account .account .domainid
354354 )
355355 self .assertEqual (
356- isinstance (vm_response , list ),
357- True ,
356+ isinstance (vm_response , list ),
357+ True ,
358358 "Check for valid list VM response"
359359 )
360360
@@ -372,11 +372,12 @@ def test_01_user_remove_VM_running(self):
372372 "Check state of VMs associated with account"
373373 )
374374 return
375+
375376 @unittest .skip ("Open Questions" )
376377 def test_02_remove_all_users (self ):
377- """Test Remove both users from the account
378+ """Test Remove both users from the account
378379 """
379-
380+
380381 tags = ["advanced" , "basic" , "eip" , "advancedns" , "sg" ]
381382
382383 # Validate the following
@@ -427,12 +428,12 @@ def test_02_remove_all_users(self):
427428 domainid = self .account .account .domainid
428429 )
429430 self .assertEqual (
430- isinstance (users , list ),
431- True ,
431+ isinstance (users , list ),
432+ True ,
432433 "Check for valid list users response"
433434 )
434435 for user in users :
435-
436+
436437 self .debug ("Deleting user: %s" % user .id )
437438 cmd = deleteUser .deleteUserCmd ()
438439 cmd .id = user .id
@@ -443,12 +444,12 @@ def test_02_remove_all_users(self):
443444 name = 'account.cleanup.interval'
444445 )
445446 self .assertEqual (
446- isinstance (interval , list ),
447- True ,
447+ isinstance (interval , list ),
448+ True ,
448449 "Check for valid list configurations response"
449450 )
450451 self .debug ("account.cleanup.interval: %s" % interval [0 ].value )
451-
452+
452453 # Sleep to ensure that all resources are deleted
453454 time .sleep (int (interval [0 ].value ))
454455
@@ -534,7 +535,7 @@ def tearDown(self):
534535
535536 def test_01_non_root_admin_Privileges (self ):
536537 """Test to verify Non Root admin previleges"""
537-
538+
538539 tags = ["advanced" , "basic" , "eip" , "advancedns" , "sg" ]
539540
540541 # Validate the following
@@ -562,11 +563,11 @@ def test_01_non_root_admin_Privileges(self):
562563 )
563564
564565 self .assertEqual (
565- isinstance (accounts_response , list ),
566- True ,
566+ isinstance (accounts_response , list ),
567+ True ,
567568 "Check list accounts response for valid data"
568569 )
569-
570+
570571 self .assertEqual (
571572 len (accounts_response ),
572573 1 ,
@@ -653,7 +654,7 @@ def tearDown(self):
653654
654655 def test_01_service_offering_siblings (self ):
655656 """Test to verify service offerings at same level in hierarchy"""
656-
657+
657658 tags = ["advanced" , "basic" , "eip" , "advancedns" , "sg" ]
658659
659660 # Validate the following
@@ -665,11 +666,11 @@ def test_01_service_offering_siblings(self):
665666 domainid = self .domain_1 .id
666667 )
667668 self .assertEqual (
668- isinstance (service_offerings , list ),
669- True ,
669+ isinstance (service_offerings , list ),
670+ True ,
670671 "Check if valid list service offerings response"
671672 )
672-
673+
673674 self .assertNotEqual (
674675 len (service_offerings ),
675676 0 ,
@@ -695,6 +696,7 @@ def test_01_service_offering_siblings(self):
695696 )
696697 return
697698
699+
698700@unittest .skip ("Open Questions" )
699701class TestServiceOfferingHierarchy (cloudstackTestCase ):
700702
@@ -768,7 +770,7 @@ def tearDown(self):
768770
769771 def test_01_service_offering_hierarchy (self ):
770772 """Test to verify service offerings at same level in hierarchy"""
771-
773+
772774 tags = ["advanced" , "basic" , "eip" , "advancedns" , "sg" ]
773775
774776 # Validate the following
@@ -821,6 +823,7 @@ def test_01_service_offering_hierarchy(self):
821823 )
822824 return
823825
826+
824827@unittest .skip ("Open Questions" )
825828class TesttemplateHierarchy (cloudstackTestCase ):
826829
@@ -899,7 +902,7 @@ def tearDown(self):
899902
900903 def test_01_template_hierarchy (self ):
901904 """Test to verify template at same level in hierarchy"""
902-
905+
903906 tags = ["advanced" , "basic" , "eip" , "advancedns" , "sg" ]
904907
905908 # Validate the following
@@ -959,6 +962,7 @@ def test_01_template_hierarchy(self):
959962 )
960963 return
961964
965+
962966class TestAddVmToSubDomain (cloudstackTestCase ):
963967
964968 @classmethod
@@ -1026,19 +1030,20 @@ def setUpClass(cls):
10261030 serviceofferingid = cls .service_offering .id
10271031 )
10281032 cls ._cleanup = [
1029- cls .account_2 ,
1030- cls .account_1 ,
1031- cls .sub_domain ,
1032- cls .service_offering
1033- ]
1033+ cls .account_2 ,
1034+ cls .account_1 ,
1035+ cls .sub_domain ,
1036+ cls .service_offering
1037+ ]
10341038 return
10351039
10361040 @classmethod
10371041 def tearDownClass (cls ):
1038- try :
1042+ try :
10391043 #Clean up, terminate the created resources
1040- cleanup_resources (cls .api_client ,cls ._cleanup )
1041- except Exception as e :
1044+ cleanup_resources (cls .api_client , cls ._cleanup )
1045+ except Exception as e :
1046+
10421047 raise Exception ("Warning: Exception during cleanup : %s" % e )
10431048 return
10441049
@@ -1056,11 +1061,10 @@ def tearDown(self):
10561061 raise Exception ("Warning: Exception during cleanup : %s" % e )
10571062 return
10581063
1059-
10601064 def test_01_add_vm_to_subdomain (self ):
10611065 """ Test Sub domain allowed to launch VM when a Domain level zone is
10621066 created"""
1063-
1067+
10641068 tags = ["advanced" , "basic" , "eip" , "advancedns" , "sg" ]
10651069
10661070 # Validate the following
0 commit comments