def _get_deploy_data(context, image_source):
    glance = image_service.GlanceImageService(version=2, context=context)
    image_props = glance.show(image_source).get('properties', {})
    LOG.debug('Image %s properties are: %s', image_source, image_props)
    try:
        disk_data = json.loads(image_props['mos_disk_info'])
    except KeyError:
        raise exception.MissingParameterValue(_('Image %s does not contain '
                                              'disk layout data.') %
                                              image_source)
    except __HOLE__:
        raise exception.InvalidParameterValue(_('Invalid disk layout data for '
                                                'image %s') % image_source)
    data = FUEL_AGENT_PROVISION_TEMPLATE.copy()
    data['ks_meta']['pm_data']['ks_spaces'] = disk_data
    return data
dataset/ETHPy150Open openstack/bareon/contrib/ironic/ironic-fa-deploy/ironic_fa_deploy/modules/fuel_agent.py/_get_deploy_data