def set_sensor_context(sensor_id, context): """ Set the context for the sensor with sensor_id @param sensor_id: sensor id @param context: sensor context """ (success, system_ip) = get_sensor_ip_from_sensor_id(sensor_id) if not success: return (False, system_ip) # Set av_config values and apply new configuration set_values = {} set_values['sensor_sensor_ctx'] = context (success, data) = set_av_config(system_ip=system_ip, path_dict=set_values) if not success: api_log.error(data) return (False, data) (success, job_id) = job_alienvault_reconfigure(system_ip) return (success, job_id)