Lines Matching refs:config_json

45 def get_rule_ids(config_json):  argument
51 for rule in config_json.get("rules", {}):
56 def get_device_ids(config_json): argument
62 for chassis in config_json.get("chassis", {}):
68 def check_number_of_elements_in_masks(config_json): argument
75 i2c_write_bytes = get_values(config_json, "i2c_write_bytes")
76 i2c_compare_bytes = get_values(config_json, "i2c_compare_bytes")
107 def check_rule_id_exists(config_json): argument
113 rule_ids = get_values(config_json, "rule_id")
114 valid_rule_ids = get_rule_ids(config_json)
126 def check_device_id_exists(config_json): argument
132 device_ids = get_values(config_json, "device_id")
133 valid_device_ids = get_device_ids(config_json)
145 def check_set_device_value_exists(config_json): argument
151 device_ids = get_values(config_json, "set_device")
152 valid_device_ids = get_device_ids(config_json)
164 def check_run_rule_value_exists(config_json): argument
170 rule_ids = get_values(config_json, "run_rule")
171 valid_rule_ids = get_rule_ids(config_json)
183 def check_infinite_loops_in_rule(config_json, rule_json, call_stack=[]): argument
205 for rule in config_json.get("rules", {}):
208 config_json, rule, call_stack
213 def check_infinite_loops(config_json): argument
220 for rule in config_json.get("rules", {}):
221 check_infinite_loops_in_rule(config_json, rule)
224 def check_duplicate_object_id(config_json): argument
230 json_ids = get_values(config_json, "id")
245 def check_duplicate_rule_id(config_json): argument
251 for rule in config_json.get("rules", {}):
265 def check_duplicate_chassis_number(config_json): argument
272 for chassis in config_json.get("chassis", {}):
286 def check_duplicate_device_id(config_json): argument
292 for chassis in config_json.get("chassis", {}):
307 def check_duplicate_rail_id(config_json): argument
313 for chassis in config_json.get("chassis", {}):
329 def check_for_duplicates(config_json): argument
333 check_duplicate_rule_id(config_json)
335 check_duplicate_chassis_number(config_json)
337 check_duplicate_device_id(config_json)
339 check_duplicate_rail_id(config_json)
341 check_duplicate_object_id(config_json)
354 config_json = json.load(config_handle)
360 jsonschema.validate(config_json, schema_json)
365 return config_json
423 config_json = validate_schema(args.configuration_file, args.schema_file) variable
425 check_for_duplicates(config_json)
427 check_infinite_loops(config_json)
429 check_run_rule_value_exists(config_json)
431 check_set_device_value_exists(config_json)
433 check_rule_id_exists(config_json)
435 check_device_id_exists(config_json)
437 check_number_of_elements_in_masks(config_json)