vagrant_handler.py 文件源码

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

项目:messier 作者: conorsch 项目源码 文件源码
def available_vms(self, vms=None):
        """
        List all VMs regardless of state, filtering if requested via the <vms>
        parameter provider by the CLI.
        """
        try:
            possible_vms = [vm for vm in self.v.status()]
        except CalledProcessError, e:
            # TODO: Exception handling here assumes Vagrantfile is missing.
            # Vagrant seems to return 1 for many different errors, and finding
            # documentation for specific return codes has proven difficult.
            raise VagrantfileNotFound

        if vms:
            wanted_vms = [vm for vm in possible_vms if vm.name in vms]
            possible_vms = wanted_vms

        return possible_vms
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号