libvirtutil.py 文件源码

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

项目:lib9 作者: Jumpscale 项目源码 文件源码
def isCurrentStorageAction(self, domainid):
        domain = self._get_domain(domainid)
        if not domain:
            return False
        # at this moment we suppose the machine is following the default naming
        # of disks
        if domain.state()[0] not in [libvirt.VIR_DOMAIN_SHUTDOWN,
                                     libvirt.VIR_DOMAIN_SHUTOFF, libvirt.VIR_DOMAIN_CRASHED]:
            status = domain.blockJobInfo('vda', 0)
            if 'cur' in status:
                return True
        # check also that there is no qemu-img job running
        if self.isLocked(domainid):
            return True
        return False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号