def absent(name, profile='grafana'):
    if isinstance(profile, string_types):
        profile = __salt__['config.option'](profile)

    ret = {'result': None, 'comment': None, 'changes': None}
    datasource = _get_datasource(profile, name)

    if not datasource:
        ret['result'] = True
        ret['comment'] = 'Data source {0} already absent'.format(name)
        return ret

    requests.delete(
        _get_url(profile, datasource['id']),
        headers=_get_headers(profile),
        timeout=profile.get('grafana_timeout', 3),
    )

    ret['result'] = True
    ret['comment'] = 'Data source {0} was deleted'.format(name)

    return ret
Ensure that a data source is present.
dataset/ETHPy150Open saltstack/salt/salt/states/grafana_datasource.py/absent