def parse_web_config()

in osci/config/base.py [0:0]


def parse_web_config(web_cfg) -> WebConfig:
    log.debug(web_cfg)
    fs = web_cfg['fs']
    attrs_map = {
        FileSystemType.local: dict(base_path=web_cfg['base_path'],
                                   base_area_dir=web_cfg['container']),
        FileSystemType.blob: dict(storage_account_name=web_cfg['account_name'],
                                  storage_account_key=web_cfg['account_key'],
                                  area_container=web_cfg['container'])
    }

    if fs not in attrs_map:
        raise ValueError(f'Unsupported filesystem type `{fs}`. '
                         f'Available options: {",".join(attrs_map.keys())}')

    return WebConfig(fs=fs, attrs=attrs_map[fs])