mdl_updater.py 文件源码

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

项目:python-ceph-cfg 作者: oms4suse 项目源码 文件源码
def retrive_osd_details(device_name):
    osd_details = {}
    if device_name is None:
        return None
    try:
        tmpd = tempfile.mkdtemp()
        log.info("Create temp directory %s" %(tmpd))
        try:
            out_mnt = utils.execute_local_command(['mount',device_name,tmpd])
            if out_mnt['retcode'] == 0:
                osd_details = _retrive_osd_details_from_dir(tmpd)
        finally:
            utils.execute_local_command(['umount',tmpd])
    finally:
        log.info("Destroy temp directory %s" %(tmpd))
        os.rmdir(tmpd)
    return osd_details
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号