vagrant_handler.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:messier 作者: conorsch 项目源码 文件源码
def destroy_vms(self):
        """
        Destroy target VMs. Operates on all available VMs if none are specified.
        """
        for vm in self.vms:
            # Vagrant will return 1 if VM to be destroyed does not exist.
            if vm.state != "not_created":
                self.v.destroy(vm_name=vm.name)
                # Destroy a second time because the vagrant-digitalocean plugin
                # doesn't clean up after itself:
                # https://github.com/smdahlen/vagrant-digitalocean/issues/194
                if vm.provider == "digital_ocean":
                    try:
                        self.v.destroy(vm_name=vm.name)
                    except CalledProcessError:
                        pass
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号