(redata, jdata, logger)
Perform actual call
Perform actual call
Perform actual call
def callSalt(redata, jdata, logger):
    ''' Perform actual call '''
    url = redata['data']['url']
    payload = redata['data']
    try:
        req = requests.post(url, data=payload, timeout=3.0, verify=False)
    except:
        return False
    if req.status_code == 200:
        line = "saltstack-cmdrun: Reqeust to %s sent for monitor %s - Successful" % (url, jdata['cid'])
        logger.info(line)
        return True
    else:
        line = "saltstack-cmdrun: Request to %s sent for monitor %s - False" % (url, jdata['cid'])
        logger.info(line)
        return False
def callSalt ( redata , jdata , logger ) : url = redata [ 'data' ] [ 'url' ] payload = redata [ 'data' ] try : req = requests . post ( url , data = payload , timeout = 3.0 , verify = False ) except : return False if req . status_code == 200 : line = "saltstack-cmdrun: Reqeust to %s sent for monitor %s - Successful" % ( url , jdata [ 'cid' ] ) logger . info ( line ) return True else : line = "saltstack-cmdrun: Request to %s sent for monitor %s - False" % ( url , jdata [ 'cid' ] ) logger . info ( line ) return False