本文整理汇总了Python中marvin.lib.utils.cleanup_resources函数的典型用法代码示例。如果您正苦于以下问题:Python cleanup_resources函数的具体用法?Python cleanup_resources怎么用?Python cleanup_resources使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了cleanup_resources函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: tearDownClass
def tearDownClass(self):
try:
self.apiclient = super(TestvGPUWindowsVm, self).getClsTestClient().getApiClient()
cleanup_resources(self.apiclient, self._cleanup)
except Exception as e:
raise Exception("Warning: Exception during cleanup : %s" % e)
return
示例2: tearDownClass
def tearDownClass(cls):
try:
cleanup_resources(cls.api_client, cls._proj_toclean)
cleanup_resources(cls.api_client, cls._cleanup)
cls.domain.delete(cls.api_client, cleanup=True)
except Exception as e:
raise Exception("Warning: Exception during cleanup : %s" % e)
示例3: tearDownClass
def tearDownClass(cls):
try:
cleanup_resources(cls.apiClient, cls._cleanup)
cls.primary_storage.delete(cls.apiClient)
except Exception as e:
logging.debug("Exception in tearDownClass(cls): %s" % e)
示例4: tearDown
def tearDown(self):
try:
self.logger.debug("Cleaning up resources")
self.cleanup.reverse()
cleanup_resources(self.apiclient, self.cleanup, self.logger)
except Exception as e:
raise Exception("Cleanup failed with %s" % e)
示例5: tearDownClass
def tearDownClass(cls):
try:
cleanup_resources(cls.apiClient, cls._cleanup)
cls._purge_solidfire_volumes()
except Exception as e:
logging.debug("Exception in tearDownClass(cls): %s" % e)
示例6: tearDown
def tearDown(self):
try:
self.entity_manager.destroy_routers()
cleanup_resources(self.apiclient, self.cleanup)
except Exception as e:
raise Exception("Warning: Exception during cleanup : %s" % e)
return
示例7: tearDownClass
def tearDownClass(cls):
try:
#Clean up, terminate the created resources
cleanup_resources(cls.api_client, cls._cleanup)
except Exception as e:
raise Exception("Warning: Exception during cleanup : %s" % e)
return
示例8: tearDown
def tearDown(self):
try:
# Clean up, terminate the created instance, volumes and snapshots
cleanup_resources(self.apiclient, self.cleanup)
except Exception as e:
raise Exception("Warning: Exception during cleanup : %s" % e)
return
示例9: tearDownClass
def tearDownClass(cls):
try:
cls.logger.debug("Cleaning up resources")
cleanup_resources(cls.apiclient, cls.cleanup)
except Exception, e:
raise Exception("Cleanup failed with %s" % e)
示例10: tearDown
def tearDown(self):
try:
self.account.delete(self.apiclient)
cleanup_resources(self.apiclient, self.cleanup)
except Exception as e:
raise Exception("Warning: Exception during cleanup : %s" % e)
return
示例11: tearDown
def tearDown(self):
try:
cleanup_resources(self.api_client, self.method_cleanup, self.logger)
except Exception as e:
raise Exception("Exception: %s" % e)
示例12: tearDown
def tearDown(self):
try:
self.debug("Cleaning up the resources")
cleanup_resources(self.apiclient, reversed(self.cleanup))
self.debug("Cleanup complete!")
except Exception as e:
self.debug("Warning! Exception in tearDown: %s" % e)
示例13: tearDownClass
def tearDownClass(cls):
try:
cls.apiclient = super(TestVpcRemoteAccessVpn, cls).getClsTestClient().getApiClient()
cleanup_resources(cls.apiclient, cls._cleanup)
except Exception as e:
raise Exception("Warning: Exception during cleanup : %s" % e)
return
示例14: tearDown
def tearDown(self):
try:
cleanup_resources(self.apiclient, self.cleanup)
except Exception as e:
self.debug("Warning: Exception during cleanup : %s" % e)
# raise Exception("Warning: Exception during cleanup : %s" % e)
return
示例15: tearDown
def tearDown(self):
try:
for storagePool in self.pools:
StoragePool.update(self.apiclient, id=storagePool.id, tags="")
if hasattr(self, "data_volume_created"):
data_volumes_list = Volume.list(
self.userapiclient,
id=self.data_volume_created.id,
virtualmachineid=self.vm.id
)
if data_volumes_list:
self.vm.detach_volume(
self.userapiclient,
data_volumes_list[0]
)
status = validateList(data_volumes_list)
self.assertEqual(
status[0],
PASS,
"DATA Volume List Validation Failed")
cleanup_resources(self.apiclient, self.cleanup)
except Exception as e:
raise Exception("Warning: Exception during cleanup : %s" % e)
return