diff --git a/kraken/application_outage/actions.py b/kraken/application_outage/actions.py index f3b344c8..81136970 100644 --- a/kraken/application_outage/actions.py +++ b/kraken/application_outage/actions.py @@ -19,7 +19,7 @@ def run(scenarios_list, config, wait_duration,kubecli: KrknKubernetes, telemetry for app_outage_config in scenarios_list: scenario_telemetry = ScenarioTelemetry() scenario_telemetry.scenario = app_outage_config - scenario_telemetry.startTimeStamp = time.time() + scenario_telemetry.start_timestamp = time.time() telemetry.set_parameters_base64(scenario_telemetry, app_outage_config) if len(app_outage_config) > 1: try: @@ -73,12 +73,12 @@ def run(scenarios_list, config, wait_duration,kubecli: KrknKubernetes, telemetry end_time = int(time.time()) cerberus.publish_kraken_status(config, failed_post_scenarios, start_time, end_time) except Exception as e : - scenario_telemetry.exitStatus = 1 + scenario_telemetry.exit_status = 1 failed_scenarios.append(app_outage_config) log_exception(app_outage_config) else: - scenario_telemetry.exitStatus = 0 - scenario_telemetry.endTimeStamp = time.time() + scenario_telemetry.exit_status = 0 + scenario_telemetry.end_timestamp = time.time() scenario_telemetries.append(scenario_telemetry) return failed_scenarios, scenario_telemetries diff --git a/kraken/arcaflow_plugin/arcaflow_plugin.py b/kraken/arcaflow_plugin/arcaflow_plugin.py index 97794591..15fa7f5d 100644 --- a/kraken/arcaflow_plugin/arcaflow_plugin.py +++ b/kraken/arcaflow_plugin/arcaflow_plugin.py @@ -16,12 +16,12 @@ def run(scenarios_list: List[str], kubeconfig_path: str, telemetry: KrknTelemetr for scenario in scenarios_list: scenario_telemetry = ScenarioTelemetry() scenario_telemetry.scenario = scenario - scenario_telemetry.startTimeStamp = time.time() + scenario_telemetry.start_timestamp = time.time() telemetry.set_parameters_base64(scenario_telemetry,scenario) engine_args = build_args(scenario) status_code = run_workflow(engine_args, kubeconfig_path) - scenario_telemetry.endTimeStamp = time.time() - scenario_telemetry.exitStatus = status_code + scenario_telemetry.end_timestamp = time.time() + scenario_telemetry.exit_status = status_code scenario_telemetries.append(scenario_telemetry) if status_code != 0: failed_post_scenarios.append(scenario) diff --git a/kraken/network_chaos/actions.py b/kraken/network_chaos/actions.py index 080be67c..58f1bb05 100644 --- a/kraken/network_chaos/actions.py +++ b/kraken/network_chaos/actions.py @@ -23,7 +23,7 @@ def run(scenarios_list, config, wait_duration, kubecli: KrknKubernetes, telemetr for net_config in scenarios_list: scenario_telemetry = ScenarioTelemetry() scenario_telemetry.scenario = net_config - scenario_telemetry.startTimeStamp = time.time() + scenario_telemetry.start_timestamp = time.time() telemetry.set_parameters_base64(scenario_telemetry, net_config) try: with open(net_config, "r") as file: @@ -114,11 +114,11 @@ def run(scenarios_list, config, wait_duration, kubecli: KrknKubernetes, telemetr logging.info("Deleting jobs") delete_job(joblst[:], kubecli) except (RuntimeError, Exception): - scenario_telemetry.exitStatus = 1 + scenario_telemetry.exit_status = 1 failed_scenarios.append(net_config) log_exception(net_config) else: - scenario_telemetry.exitStatus = 0 + scenario_telemetry.exit_status = 0 scenario_telemetries.append(scenario_telemetry) return failed_scenarios, scenario_telemetries diff --git a/kraken/node_actions/run.py b/kraken/node_actions/run.py index 7b01a7f6..a1323d00 100644 --- a/kraken/node_actions/run.py +++ b/kraken/node_actions/run.py @@ -61,7 +61,7 @@ def run(scenarios_list, config, wait_duration, kubecli: KrknKubernetes, telemetr for node_scenario_config in scenarios_list: scenario_telemetry = ScenarioTelemetry() scenario_telemetry.scenario = node_scenario_config - scenario_telemetry.startTimeStamp = time.time() + scenario_telemetry.start_timestamp = time.time() telemetry.set_parameters_base64(scenario_telemetry, node_scenario_config) with open(node_scenario_config, "r") as f: node_scenario_config = yaml.full_load(f) @@ -78,13 +78,13 @@ def run(scenarios_list, config, wait_duration, kubecli: KrknKubernetes, telemetr cerberus.get_status(config, start_time, end_time) logging.info("") except (RuntimeError, Exception) as e: - scenario_telemetry.exitStatus = 1 + scenario_telemetry.exit_status = 1 failed_scenarios.append(node_scenario_config) log_exception(node_scenario_config) else: - scenario_telemetry.exitStatus = 0 + scenario_telemetry.exit_status = 0 - scenario_telemetry.endTimeStamp = time.time() + scenario_telemetry.end_timestamp = time.time() scenario_telemetries.append(scenario_telemetry) return failed_scenarios, scenario_telemetries diff --git a/kraken/plugins/__init__.py b/kraken/plugins/__init__.py index 8718180e..85b39d1f 100644 --- a/kraken/plugins/__init__.py +++ b/kraken/plugins/__init__.py @@ -260,7 +260,7 @@ def run(scenarios: List[str], for scenario in scenarios: scenario_telemetry = ScenarioTelemetry() scenario_telemetry.scenario = scenario - scenario_telemetry.startTimeStamp = time.time() + scenario_telemetry.start_timestamp = time.time() telemetry.set_parameters_base64(scenario_telemetry, scenario) logging.info('scenario ' + str(scenario)) pool = PodsMonitorPool(kubecli) @@ -276,16 +276,16 @@ def run(scenarios: List[str], except Exception as e: logging.error(f"scenario exception: {str(e)}") - scenario_telemetry.exitStatus = 1 + scenario_telemetry.exit_status = 1 pool.cancel() failed_post_scenarios.append(scenario) log_exception(scenario) else: - scenario_telemetry.exitStatus = 0 + scenario_telemetry.exit_status = 0 logging.info("Waiting for the specified duration: %s" % (wait_duration)) time.sleep(wait_duration) scenario_telemetries.append(scenario_telemetry) - scenario_telemetry.endTimeStamp = time.time() + scenario_telemetry.end_timestamp = time.time() return failed_post_scenarios, scenario_telemetries diff --git a/kraken/pod_scenarios/setup.py b/kraken/pod_scenarios/setup.py index 8280ca18..e23e0e5a 100644 --- a/kraken/pod_scenarios/setup.py +++ b/kraken/pod_scenarios/setup.py @@ -88,7 +88,7 @@ def container_run(kubeconfig_path, for container_scenario_config in scenarios_list: scenario_telemetry = ScenarioTelemetry() scenario_telemetry.scenario = container_scenario_config[0] - scenario_telemetry.startTimeStamp = time.time() + scenario_telemetry.start_timestamp = time.time() telemetry.set_parameters_base64(scenario_telemetry, container_scenario_config[0]) if len(container_scenario_config) > 1: pre_action_output = post_actions.run(kubeconfig_path, container_scenario_config[1]) @@ -119,12 +119,12 @@ def container_run(kubeconfig_path, pool.cancel() failed_scenarios.append(container_scenario_config[0]) log_exception(container_scenario_config[0]) - scenario_telemetry.exitStatus = 1 + scenario_telemetry.exit_status = 1 # removed_exit # sys.exit(1) else: - scenario_telemetry.exitStatus = 0 - scenario_telemetry.endTimeStamp = time.time() + scenario_telemetry.exit_status = 0 + scenario_telemetry.end_timestamp = time.time() scenario_telemetries.append(scenario_telemetry) return failed_scenarios, scenario_telemetries diff --git a/kraken/pvc/pvc_scenario.py b/kraken/pvc/pvc_scenario.py index 4031f4d1..cdaf8a8b 100644 --- a/kraken/pvc/pvc_scenario.py +++ b/kraken/pvc/pvc_scenario.py @@ -21,7 +21,7 @@ def run(scenarios_list, config, kubecli: KrknKubernetes, telemetry: KrknTelemetr for app_config in scenarios_list: scenario_telemetry = ScenarioTelemetry() scenario_telemetry.scenario = app_config - scenario_telemetry.startTimeStamp = time.time() + scenario_telemetry.start_timestamp = time.time() telemetry.set_parameters_base64(scenario_telemetry, app_config) try: if len(app_config) > 1: @@ -314,11 +314,11 @@ def run(scenarios_list, config, kubecli: KrknKubernetes, telemetry: KrknTelemetr end_time ) except (RuntimeError, Exception): - scenario_telemetry.exitStatus = 1 + scenario_telemetry.exit_status = 1 failed_scenarios.append(app_config) log_exception(app_config) else: - scenario_telemetry.exitStatus = 0 + scenario_telemetry.exit_status = 0 scenario_telemetries.append(scenario_telemetry) return failed_scenarios, scenario_telemetries diff --git a/kraken/service_disruption/common_service_disruption_functions.py b/kraken/service_disruption/common_service_disruption_functions.py index 23436d2c..6ca98592 100644 --- a/kraken/service_disruption/common_service_disruption_functions.py +++ b/kraken/service_disruption/common_service_disruption_functions.py @@ -165,7 +165,7 @@ def run( for scenario_config in scenarios_list: scenario_telemetry = ScenarioTelemetry() scenario_telemetry.scenario = scenario_config[0] - scenario_telemetry.startTimeStamp = time.time() + scenario_telemetry.start_timestamp = time.time() telemetry.set_parameters_base64(scenario_telemetry, scenario_config[0]) try: if len(scenario_config) > 1: @@ -249,12 +249,12 @@ def run( end_time = int(time.time()) cerberus.publish_kraken_status(config, failed_post_scenarios, start_time, end_time) except (Exception, RuntimeError): - scenario_telemetry.exitStatus = 1 + scenario_telemetry.exit_status = 1 failed_scenarios.append(scenario_config[0]) log_exception(scenario_config[0]) else: - scenario_telemetry.exitStatus = 0 - scenario_telemetry.endTimeStamp = time.time() + scenario_telemetry.exit_status = 0 + scenario_telemetry.end_timestamp = time.time() scenario_telemetries.append(scenario_telemetry) return failed_scenarios, scenario_telemetries diff --git a/kraken/shut_down/common_shut_down_func.py b/kraken/shut_down/common_shut_down_func.py index 8eed6e89..8c7c330f 100644 --- a/kraken/shut_down/common_shut_down_func.py +++ b/kraken/shut_down/common_shut_down_func.py @@ -147,7 +147,7 @@ def run(scenarios_list, config, wait_duration, kubecli: KrknKubernetes, telemetr scenario_telemetry = ScenarioTelemetry() scenario_telemetry.scenario = config_path - scenario_telemetry.startTimeStamp = time.time() + scenario_telemetry.start_timestamp = time.time() telemetry.set_parameters_base64(scenario_telemetry, config_path) with open(config_path, "r") as f: @@ -175,11 +175,11 @@ def run(scenarios_list, config, wait_duration, kubecli: KrknKubernetes, telemetr except (RuntimeError, Exception): log_exception(config_path) failed_scenarios.append(config_path) - scenario_telemetry.exitStatus = 1 + scenario_telemetry.exit_status = 1 else: - scenario_telemetry.exitStatus = 0 + scenario_telemetry.exit_status = 0 - scenario_telemetry.endTimeStamp = time.time() + scenario_telemetry.end_timestamp = time.time() scenario_telemetries.append(scenario_telemetry) return failed_scenarios, scenario_telemetries diff --git a/kraken/time_actions/common_time_functions.py b/kraken/time_actions/common_time_functions.py index ef4ac6d9..9b2b7cef 100644 --- a/kraken/time_actions/common_time_functions.py +++ b/kraken/time_actions/common_time_functions.py @@ -354,7 +354,7 @@ def run(scenarios_list, config, wait_duration, kubecli:KrknKubernetes, telemetry for time_scenario_config in scenarios_list: scenario_telemetry = ScenarioTelemetry() scenario_telemetry.scenario = time_scenario_config - scenario_telemetry.startTimeStamp = time.time() + scenario_telemetry.start_timestamp = time.time() telemetry.set_parameters_base64(scenario_telemetry, time_scenario_config) try: with open(time_scenario_config, "r") as f: @@ -377,12 +377,12 @@ def run(scenarios_list, config, wait_duration, kubecli:KrknKubernetes, telemetry end_time ) except (RuntimeError, Exception): - scenario_telemetry.exitStatus = 1 + scenario_telemetry.exit_status = 1 log_exception(time_scenario_config) failed_scenarios.append(time_scenario_config) else: - scenario_telemetry.exitStatus = 0 - scenario_telemetry.endTimeStamp = time.time() + scenario_telemetry.exit_status = 0 + scenario_telemetry.end_timestamp = time.time() scenario_telemetries.append(scenario_telemetry) return failed_scenarios, scenario_telemetries diff --git a/kraken/zone_outage/actions.py b/kraken/zone_outage/actions.py index aea9077e..13cd3a34 100644 --- a/kraken/zone_outage/actions.py +++ b/kraken/zone_outage/actions.py @@ -19,7 +19,7 @@ def run(scenarios_list, config, wait_duration, telemetry: KrknTelemetryKubernete for zone_outage_config in scenarios_list: scenario_telemetry = ScenarioTelemetry() scenario_telemetry.scenario = zone_outage_config - scenario_telemetry.startTimeStamp = time.time() + scenario_telemetry.start_timestamp = time.time() telemetry.set_parameters_base64(scenario_telemetry, zone_outage_config) try: if len(zone_outage_config) > 1: @@ -110,12 +110,12 @@ def run(scenarios_list, config, wait_duration, telemetry: KrknTelemetryKubernete end_time ) except (RuntimeError, Exception): - scenario_telemetry.exitStatus = 1 + scenario_telemetry.exit_status = 1 failed_scenarios.append(zone_outage_config) log_exception(zone_outage_config) else: - scenario_telemetry.exitStatus = 0 - scenario_telemetry.endTimeStamp = time.time() + scenario_telemetry.exit_status = 0 + scenario_telemetry.end_timestamp = time.time() scenario_telemetries.append(scenario_telemetry) return failed_scenarios, scenario_telemetries