def set_config_general(system_id): param_names = ['general_admin_dns', 'general_admin_gateway', 'general_admin_ip', 'general_admin_netmask', 'general_hostname', 'general_mailserver_relay', 'general_mailserver_relay_passwd', 'general_mailserver_relay_port', 'general_mailserver_relay_user', 'general_ntp_server', 'firewall_active'] set_values = {} for key, value in request.args.iteritems(): if key not in param_names: return make_error("Bad param %s" % key, 400) else: set_values[key] = value (success, job_id) = set_system_config(system_id, set_values) if not success: return make_error("Error setting new configuration: %s" % job_id, 500) return make_ok(job_id=job_id)
def set_config_alienvault(system_id): param_names = [ 'framework_framework_ip', 'sensor_detectors', 'sensor_interfaces', 'sensor_mservers', 'sensor_networks', 'server_server_ip' ] set_values = {} for key, value in request.args.iteritems(): if key not in param_names: return make_error("Bad param %s" % key, 400) else: set_values[key] = value (success, job_id) = set_system_config(system_id, set_values) if not success: return make_error( "Cannot set AlienVault configuration info %s" % str(job_id), 500) return make_ok(job_id=job_id)
def set_config_alienvault(system_id): param_names = ['framework_framework_ip', 'sensor_detectors', 'sensor_interfaces', 'sensor_mservers', 'sensor_networks', 'server_server_ip'] set_values = {} for key, value in request.args.iteritems(): if key not in param_names: return make_error("Bad param %s" % key, 400) else: set_values[key] = value (success, job_id) = set_system_config(system_id, set_values) if not success: return make_error("Cannot set AlienVault configuration info %s" % str(job_id), 500) return make_ok(job_id=job_id)
def set_config_general(system_id): param_names = [ 'general_admin_dns', 'general_admin_gateway', 'general_admin_ip', 'general_admin_netmask', 'general_hostname', 'general_mailserver_relay', 'general_mailserver_relay_passwd', 'general_mailserver_relay_port', 'general_mailserver_relay_user', 'general_ntp_server', 'firewall_active' ] set_values = {} for key, value in request.args.iteritems(): if key not in param_names: return make_error("Bad param %s" % key, 400) else: set_values[key] = value (success, job_id) = set_system_config(system_id, set_values) if not success: return make_error("Error setting new configuration: %s" % job_id, 500) return make_ok(job_id=job_id)