environment.py 文件源码

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

项目:ramdisk-func-test 作者: openstack 项目源码 文件源码
def _check_rsync(self):

        rsync_config_path = "/etc/rsyncd.conf"
        rsync_ironic_section_name = 'ironic_rsync'

        if not utils._pid_of('rsync'):
            raise exception.RsyncProcessNotFound()

        if os.path.exists(rsync_config_path):
            cfg = utils.read_config(rsync_config_path)
        else:
            raise exception.RsyncConfigNotFound(path=rsync_config_path)

        if rsync_ironic_section_name in cfg.sections():
            self.rsync_dir = cfg.get(rsync_ironic_section_name, 'path')
        else:
            raise exception.RsyncIronicSectionNotFound(
                section=rsync_ironic_section_name
            )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号