def delete_datasource(datasourceid, orgname=None, profile='grafana'):
 if isinstance(profile, string_types):
  profile = __salt__['config.option'](profile)
 response = requests.delete('{0}/api/datasources/{1}'.format(profile['grafana_url'], datasourceid), auth=_get_auth(profile), headers=_get_headers(profile), timeout=profile.get('grafana_timeout', 3))
 if (response.status_code >= 400):
  response.raise_for_status()
 return response.json()

def delete_datasource ( datasourceid , orgname = None , profile = 'grafana' ) : if isinstance ( profile , string_types ) : profile = __salt__ [ 'config.option' ] ( profile ) response = requests . delete ( '{0}/api/datasources/{1}' . format ( profile [ 'grafana_url' ] , datasourceid ) , auth = _get_auth ( profile ) , headers = _get_headers ( profile ) , timeout = profile . get ( 'grafana_timeout' , 3 ) ) if ( response . status_code >= 400 ) : response . raise_for_status ( ) return response . json ( )
delete a datasource .