def _parse_profile(profile):
    if isinstance(profile, string_types):
        _profile = __salt__['config.option'](profile)
        if not _profile:
            msg = 'Pillar key for profile {0} not found.'.format(profile)
            raise SaltInvocationError(msg)
    else:
        _profile = profile
    hosts = _profile.get('hosts')
    index = _profile.get('index')
    return (hosts, index)
From a pillar key, or a dictionary, return index and host keys.
dataset/ETHPy150Open saltstack/salt/salt/states/grafana.py/_parse_profile