@@ -196,7 +196,7 @@ def tearDown(self):
196196 try :
197197 cleanup_resources (self .apiclient , self .cleanup )
198198 except Exception as e :
199- self .debug ("Warning: Exception during cleanup : %s" % e )
199+ self .warn ("Warning: Exception during cleanup : %s" % e )
200200 #raise Exception("Warning: Exception during cleanup : %s" % e)
201201 return
202202
@@ -391,7 +391,7 @@ def test_RvR_multicluster(self):
391391 cmd .allocationstate = 'Disabled'
392392 self .apiclient .updatePod (cmd )
393393
394- self .debug ("Warning: Disabled all pods in zone" )
394+ self .warn ("Warning: Disabled all pods in zone" )
395395
396396 cmd = updatePod .updatePodCmd ()
397397 cmd .id = pods [0 ].id
@@ -528,11 +528,12 @@ def test_RvR_multicluster(self):
528528 allocationstate = "Disabled"
529529 )
530530
531- for pod in pods :
532- cmd = updatePod .updatePodCmd ()
533- cmd .id = pod .id
534- cmd .allocationstate = 'Enabled'
535- self .apiclient .updatePod (cmd )
531+ if pods is not None :
532+ for pod in pods :
533+ cmd = updatePod .updatePodCmd ()
534+ cmd .id = pod .id
535+ cmd .allocationstate = 'Enabled'
536+ self .apiclient .updatePod (cmd )
536537 return
537538
538539 @attr (tags = ["advanced" , "advancedns" ])
@@ -611,7 +612,7 @@ def test_RvR_multiprimarystorage(self):
611612 cmd .allocationstate = 'Disabled'
612613 self .apiclient .updatePod (cmd )
613614
614- self .debug ("Warning: Disabled all pods in zone" )
615+ self .warn ("Warning: Disabled all pods in zone" )
615616
616617 cmd = updatePod .updatePodCmd ()
617618 cmd .id = pods [0 ].id
@@ -627,7 +628,7 @@ def test_RvR_multiprimarystorage(self):
627628 cmd .allocationstate = 'Disabled'
628629 self .apiclient .updateCluster (cmd )
629630
630- self .debug ("Warning: Disabled all pods in zone" )
631+ self .warn ("Warning: Disabled all pods in zone" )
631632
632633 cmd = updateCluster .updateClusterCmd ()
633634 cmd .id = clusters [0 ].id
@@ -751,17 +752,12 @@ def test_RvR_multiprimarystorage(self):
751752 listall = True ,
752753 allocationstate = "Disabled"
753754 )
754- self .assertEqual (
755- isinstance (pods , list ),
756- True ,
757- "List pods should not return an empty response"
758- )
759-
760- for pod in pods :
761- cmd = updatePod .updatePodCmd ()
762- cmd .id = pod .id
763- cmd .allocationstate = 'Enabled'
764- self .apiclient .updatePod (cmd )
755+ if pods is not None :
756+ for pod in pods :
757+ cmd = updatePod .updatePodCmd ()
758+ cmd .id = pod .id
759+ cmd .allocationstate = 'Enabled'
760+ self .apiclient .updatePod (cmd )
765761
766762 clusters = Cluster .list (
767763 self .apiclient ,
@@ -770,11 +766,12 @@ def test_RvR_multiprimarystorage(self):
770766 listall = True
771767 )
772768
773- for cluster in clusters :
774- cmd = updateCluster .updateClusterCmd ()
775- cmd .id = cluster .id
776- cmd .allocationstate = 'Enabled'
777- self .apiclient .updateCluster (cmd )
769+ if clusters is not None :
770+ for cluster in clusters :
771+ cmd = updateCluster .updateClusterCmd ()
772+ cmd .id = cluster .id
773+ cmd .allocationstate = 'Enabled'
774+ self .apiclient .updateCluster (cmd )
778775 return
779776
780777 @attr (tags = ["advanced" , "advancedns" , "ssh" ])
@@ -852,7 +849,7 @@ def test_RvR_multihosts(self):
852849 cmd .allocationstate = 'Disabled'
853850 self .apiclient .updatePod (cmd )
854851
855- self .debug ("Warning: Disabled all pods in zone" )
852+ self .warn ("Warning: Disabled all pods in zone" )
856853
857854 cmd = updatePod .updatePodCmd ()
858855 cmd .id = pods [0 ].id
@@ -868,7 +865,7 @@ def test_RvR_multihosts(self):
868865 cmd .allocationstate = 'Disabled'
869866 self .apiclient .updateCluster (cmd )
870867
871- self .debug ("Warning: Disabled all pods in zone" )
868+ self .warn ("Warning: Disabled all pods in zone" )
872869
873870 cmd = updateCluster .updateClusterCmd ()
874871 cmd .id = clusters [0 ].id
0 commit comments