cinder_api.py 文件源码

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

项目:zun 作者: openstack 项目源码 文件源码
def search_volume(self, volume):
        if uuidutils.is_uuid_like(volume):
            volume = self.cinder.volumes.get(volume)
        else:
            try:
                volume = self.cinder.volumes.find(name=volume)
            except cinder_exception.NotFound:
                raise exception.VolumeNotFound(volume=volume)
            except cinder_exception.NoUniqueMatch:
                raise exception.Conflict(_(
                    'Multiple cinder volumes exist with same name. '
                    'Please use the uuid instead.'))

        return volume
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号