示例#1
0
 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))
示例#2
0
 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))
示例#3
0
 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))
示例#4
0
 def tearDown(self):
     LogPrint().info("Post-Test: Delete template %s." % self.dm.temp_name)
     self.assertTrue(smart_delete_template(self.dm.temp_name))
示例#5
0
 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]))
示例#6
0
 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)
示例#7
0
 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)
示例#8
0
 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]))