volumes.py 文件源码

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

项目:charm-glance 作者: openstack 项目源码 文件源码
def mount_volume(config):
    if os.path.exists(config['mountpoint']):
        if not os.path.isdir(config['mountpoint']):
            hookenv.log('Not a directory: {}'.format(config['mountpoint']))
            raise VolumeConfigurationError()
    else:
        host.mkdir(config['mountpoint'])
    if os.path.ismount(config['mountpoint']):
        unmount_volume(config)
    if not host.mount(config['device'], config['mountpoint'], persist=True):
        raise VolumeConfigurationError()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号