@@ -79,6 +79,7 @@ def setUp(self):
79
79
self .apiclient ,
80
80
self .services ["service_offerings" ]["hasmall" ]
81
81
)
82
+ self .cleanup = [self .service_offering ]
82
83
83
84
self .template = get_test_template (
84
85
self .apiclient ,
@@ -87,7 +88,6 @@ def setUp(self):
87
88
)
88
89
89
90
self .configureAndDisableHostHa ()
90
- self .cleanup = [self .service_offering ]
91
91
92
92
def updateConfiguration (self , name , value ):
93
93
cmd = updateConfiguration .updateConfigurationCmd ()
@@ -116,9 +116,10 @@ def tearDown(self):
116
116
self .dbclient .execute ("delete from mshost where runid=%s" % self .getFakeMsRunId ())
117
117
self .dbclient .execute ("delete from cluster_details where name='outOfBandManagementEnabled'" )
118
118
self .dbclient .execute ("delete from data_center_details where name='outOfBandManagementEnabled'" )
119
- cleanup_resources (self .apiclient , self .cleanup )
120
119
except Exception as e :
121
120
raise Exception ("Warning: Exception during cleanup : %s" % e )
121
+ finally :
122
+ super (TestHAKVM , self ).tearDown ()
122
123
123
124
def getHostHaEnableCmd (self ):
124
125
cmd = enableHAForHost .enableHAForHostCmd ()
@@ -292,7 +293,6 @@ def test_hostha_enable_ha_when_host_in_maintenance(self):
292
293
# Enable HA
293
294
self .configureAndEnableHostHa ()
294
295
295
-
296
296
# Prepare for maintenance Host
297
297
self .setHostToMaintanance (self .host .id )
298
298
@@ -341,7 +341,6 @@ def test_remove_ha_provider_not_possible(self):
341
341
"""
342
342
self .logger .debug ("Starting test_remove_ha_provider_not_possible" )
343
343
344
-
345
344
# Enable HA
346
345
self .apiclient .configureHAForHost (self .getHostHaConfigCmd ())
347
346
cmd = self .getHostHaEnableCmd ()
@@ -393,7 +392,6 @@ def test_hostha_kvm_host_degraded(self):
393
392
self .startAgent ()
394
393
self .waitUntilHostInState ("Available" )
395
394
396
-
397
395
@attr (tags = ["devcloud" , "advanced" , "advancedns" , "smoke" , "basic" , "sg" ], required_hardware = "true" )
398
396
def test_hostha_kvm_host_recovering (self ):
399
397
"""
@@ -581,7 +579,6 @@ def getIpmiServerIp(self):
581
579
return s .getsockname ()[0 ]
582
580
583
581
def get_non_configured_ha_host (self ):
584
-
585
582
response = list_hosts (
586
583
self .apiclient ,
587
584
type = 'Routing'
0 commit comments