• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python utils.cleanup_resources函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中marvin.lib.utils.cleanup_resources函数的典型用法代码示例。如果您正苦于以下问题:Python cleanup_resources函数的具体用法?Python cleanup_resources怎么用?Python cleanup_resources使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了cleanup_resources函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
开发者ID:aali-dincloud,项目名称:cloudstack,代码行数:7,代码来源:test_deploy_vgpu_vm.py


示例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)
开发者ID:Accelerite,项目名称:cloudstack,代码行数:7,代码来源:test_affinity_groups_projects.py


示例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)
开发者ID:nvazquez,项目名称:cloudstack,代码行数:7,代码来源:TestVMMigrationWithStorage.py


示例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)
开发者ID:MissionCriticalCloud,项目名称:cosmic,代码行数:7,代码来源:test_vpc_vpn.py


示例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)
开发者ID:CIETstudents,项目名称:cloudstack,代码行数:7,代码来源:TestAddRemoveHosts.py


示例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
开发者ID:PCextreme,项目名称:cloudstack,代码行数:7,代码来源:test_routers_iptables_default_policy.py


示例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
开发者ID:wilderrodrigues,项目名称:cloudstack_integration_tests,代码行数:7,代码来源:test_accounts.py


示例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
开发者ID:MANIKANDANVEN,项目名称:cloudstack,代码行数:7,代码来源:test_memory_limits.py


示例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)
开发者ID:CIETstudents,项目名称:cloudstack,代码行数:7,代码来源:test_vpc_vpn.py


示例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
开发者ID:bheuvel,项目名称:cloudstack,代码行数:7,代码来源:test_deploy_vm_userdata_multi_nic.py


示例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)
开发者ID:MissionCriticalCloud,项目名称:cosmic,代码行数:7,代码来源:test_privategw_acl.py


示例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)
开发者ID:PCextreme,项目名称:cloudstack,代码行数:7,代码来源:test_assign_vm.py


示例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
开发者ID:EdwardBetts,项目名称:blackhole,代码行数:7,代码来源:test_vpc_vpn.py


示例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
开发者ID:miguelaferreira,项目名称:cosmic-core,代码行数:7,代码来源:test_volumes.py


示例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
开发者ID:EdwardBetts,项目名称:blackhole,代码行数:27,代码来源:testpath_attach_disk_zwps.py


示例16: tearDownClass

 def tearDownClass(cls):
    try:
       #Clean up, terminate the created templates
       cls.domain.delete(cls.api_client, cleanup=True)
       cleanup_resources(cls.api_client, cls._cleanup)
    except Exception as e:
       raise Exception("Warning: Exception during cleanup : %s" % e)
开发者ID:CIETstudents,项目名称:cloudstack,代码行数:7,代码来源:test_affinity_groups_projects.py


示例17: tearDownClass

 def tearDownClass(cls):
     cls.apiclient = super(TestVMLifeCycle, cls).getClsTestClient().getApiClient()
     try:
         cleanup_resources(cls.apiclient, cls._cleanup)
     except Exception as e:
         raise Exception("Warning: Exception during cleanup : %s" % e)
     return
开发者ID:miguelaferreira,项目名称:cosmic-core,代码行数:7,代码来源:test_vm_life_cycle.py


示例18: tearDownClass

    def tearDownClass(cls):

        try:
            cleanup_resources(cls.api_client, cls.class_cleanup, cls.logger)

        except Exception as e:
            raise Exception("Exception: %s" % e)
开发者ID:MissionCriticalCloud,项目名称:cosmic,代码行数:7,代码来源:test_privategw_acl.py


示例19: tearDown

 def tearDown(self):
     try:
         self.destroy_routers()
         cleanup_resources(self.apiclient, self.cleanup)
     except Exception as e:
         self.logger.debug("Warning: Exception during cleanup : %s" % e)
     return
开发者ID:MissionCriticalCloud,项目名称:cosmic,代码行数:7,代码来源:test_vpc_router_nics.py


示例20: tearDownClass

    def tearDownClass(cls):
        try:
            # Cleanup resources used

            if cls.updateclone:
                Configurations.update(cls.api_client,
                                      "vmware.create.full.clone",
                                      value="false",storageid=cls.storageID)
                Configurations.update(cls.api_client,
                                              "vmware.create.full.clone",
                                              value="false")
                Configurations.update(cls.api_client,
                                              "vmware.root.disk.controller",
                                              value=cls.defaultdiskcontroller)
                StoragePool.update(cls.api_client, id=cls.storageID,
                                   tags="")
                cls.restartServer()

                #Giving 30 seconds to management to warm-up,
                #Experienced failures when trying to deploy a VM exactly when management came up
                time.sleep(30)

            cleanup_resources(cls.api_client, cls._cleanup)
        except Exception as e:
            raise Exception("Warning: Exception during cleanup : %s" % e)
        return
开发者ID:Accelerite,项目名称:cloudstack,代码行数:26,代码来源:test_deploy_vm_root_resize.py



注:本文中的marvin.lib.utils.cleanup_resources函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python utils.get_process_status函数代码示例发布时间:2022-05-27
下一篇:
Python common.matchResourceCount函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap