def tearDown(self): #step1:删除两个虚拟机 self.assertTrue(smart_del_vm(self.dm.vm_name)) self.assertTrue(smart_del_vm(self.dm.vm_name_new)) #step2:删除两个子模板 self.assertTrue(smart_delete_template(self.dm.temp_name, self.dm.version_name1)) self.assertTrue(smart_delete_template(self.dm.temp_name, self.dm.version_name2)) #step3:删除基础模板 self.assertTrue(smart_delete_template(self.dm.temp_name))
def TearDown(self): ''' @summary: 清理环境,卷删除后应在主机上执行下列操作: setfattr -x trusted.glusterfs.volume-id /test/data1 setfattr -x trusted.gfid /test/data1 ''' #step1:删除子模板 self.assertTrue(smart_delete_template(self.dm.base_temp_name,self.dm.temp_name)) #step2:删除基础模板 self.assertTrue(smart_delete_template(self.dm.base_temp_name)) #step3:删除虚拟机 self.assertTrue(smart_del_vm(self.dm.vm_name)) #step4:停止卷 self.assertTrue(smart_stop_volume(self.dm.cluster_name, 'disrep')) #step5:删除卷 self.assertTrue(smart_delete_volume(self.dm.cluster_name, 'disrep')) #step6:维护数据域 self.assertTrue(smart_deactive_storage_domain(self.dm.dc_nfs_name,self.dm.sd_name)) #step7:分离数据域 self.assertTrue(smart_detach_storage_domain(self.dm.dc_nfs_name, self.dm.sd_name)) #step8:删除数据域 self.assertTrue(smart_del_storage_domain(self.dm.sd_name, self.dm.xml_del_option))
def tearDown(self): LogPrint().info("Post-Test-1: Delete template %s."% self.dm.temp_name) self.assertTrue(smart_delete_template(self.dm.temp_name)) LogPrint().info("Post-Test-2: Delete vm %s."% self.dm.vm_name) self.assertTrue(smart_del_vm(self.dm.vm_name))
def tearDown(self): LogPrint().info("Post-Test: Delete template %s." % self.dm.temp_name) self.assertTrue(smart_delete_template(self.dm.temp_name))
def tearDown(self): for index in range(0, 5): LogPrint().info("Post-Test: Delete template %s." % self.dm.temp_name[index]) self.assertTrue(smart_delete_template(self.dm.temp_name[index]))
def tearDown(self): LogPrint().info("Post-Test-1: Delete template %s." % self.dm.temp_name) self.assertTrue(smart_delete_template(self.dm.temp_name)) LogPrint().info("Post-Test-2: Delete profile %s." % self.dm.profile_name) ProfilesAPIs().delProfile(self.dm.profile_name, self.nw_id)
def tearDown(self): LogPrint().info("Post-Test-1: Delete template %s."%self.dm.temp_name) self.assertTrue(smart_delete_template(self.dm.temp_name)) LogPrint().info("Post-Test-2: Delete profile %s."%self.dm.profile_name) ProfilesAPIs().delProfile(self.dm.profile_name, self.nw_id)
def tearDown(self): for index in range(0,5): LogPrint().info("Post-Test: Delete template %s."%self.dm.temp_name[index]) self.assertTrue(smart_delete_template(self.dm.temp_name[index]))