From 169c9ee49e52ad7f0ee370afdb472c94085cc090 Mon Sep 17 00:00:00 2001 From: shegazyy Date: Tue, 7 Jul 2026 14:58:23 +0300 Subject: [PATCH 1/2] Fix FlatBuffers field names to use snake_case in lm_flatcfg.fbs Rename all camelCase/PascalCase field names in lm_flatcfg.fbs to lowercase_snake_case per FlatBuffers naming conventions. The binary format is unaffected because field identity is determined by the id:N attribute, not the field name. Update all call sites in configuration_manager.cpp to use the new generated accessor names. Issue: #288 --- .../config_schema/lm_flatcfg.fbs | 56 +++++++++---------- .../configuration/configuration_manager.cpp | 52 ++++++++--------- 2 files changed, 54 insertions(+), 54 deletions(-) diff --git a/score/launch_manager/src/daemon/src/configuration/config_schema/lm_flatcfg.fbs b/score/launch_manager/src/daemon/src/configuration/config_schema/lm_flatcfg.fbs index 23e678bbf..e7f6fad15 100644 --- a/score/launch_manager/src/daemon/src/configuration/config_schema/lm_flatcfg.fbs +++ b/score/launch_manager/src/daemon/src/configuration/config_schema/lm_flatcfg.fbs @@ -16,18 +16,18 @@ enum TerminationBehaviorEnum : byte { } table LMEcuCfg { - versionMajor: int (id:0); - versionMinor: int (id:1); - ModeGroup: [ModeGroup] (id:2); - Process: [Process] (id:3); + version_major: int (id:0); + version_minor: int (id:1); + mode_group: [ModeGroup] (id:2); + process: [Process] (id:3); } table ModeGroup { identifier: string (id:0); - initialMode_name: string (id:1); - initialMode_value: string (id:2); - recoveryMode_name: string (id:3); - modeDeclaration: [ModeDeclaration] (id:4); + initial_mode_name: string (id:1); + initial_mode_value: string (id:2); + recovery_mode_name: string (id:3); + mode_declaration: [ModeDeclaration] (id:4); } // TODO: Could be moved into ModeGroup @@ -37,41 +37,41 @@ table ModeDeclaration { table Process { identifier: string (id:0); - numberOfRestartAttempts: uint (id:1); - functionClusterAffiliation: string (id:2); + number_of_restart_attempts: uint (id:1); + function_cluster_affiliation: string (id:2); coremask: string (id:3); uid: uint (id:4); gid: uint (id:5); path: string (id:6); - securityPolicyDetails: string (id:7); - executable_reportingBehavior: ExecutionStateReportingBehaviorEnum (id:8); - startupConfig: [ProcessStartupConfig] (id:9); + security_policy_details: string (id:7); + executable_reporting_behavior: ExecutionStateReportingBehaviorEnum (id:8); + startup_config: [ProcessStartupConfig] (id:9); sgids: [ProcessSgid] (id:10); } table ProcessStartupConfig { identifier: string (id:0); - enterTimeoutValue: uint (id:1); - exitTimeoutValue: uint (id:2); - schedulingPriority: string (id:3); - schedulingPolicy: string (id:4); - executionError: string (id:5); - terminationBehavior: TerminationBehaviorEnum (id:6); - executionDependency: [ProcessExecutionDependency] (id:7); - processGroupStateDependency: [ProcessGroupStateDependency] (id:8); - environmentVariable: [EnvironmentVariable] (id:9); - processArgument: [ProcessArgument] (id:10); - memoryUsage: uint64 (id:11); + enter_timeout_value: uint (id:1); + exit_timeout_value: uint (id:2); + scheduling_priority: string (id:3); + scheduling_policy: string (id:4); + execution_error: string (id:5); + termination_behavior: TerminationBehaviorEnum (id:6); + execution_dependency: [ProcessExecutionDependency] (id:7); + process_group_state_dependency: [ProcessGroupStateDependency] (id:8); + environment_variable: [EnvironmentVariable] (id:9); + process_argument: [ProcessArgument] (id:10); + memory_usage: uint64 (id:11); } table ProcessGroupStateDependency { - stateMachine_name: string (id:0); - stateName: string (id:1); + state_machine_name: string (id:0); + state_name: string (id:1); } table ProcessExecutionDependency { - stateName: string (id:0); - targetProcess_identifier: string (id:1); + state_name: string (id:0); + target_process_identifier: string (id:1); } table EnvironmentVariable { diff --git a/score/launch_manager/src/daemon/src/configuration/configuration_manager.cpp b/score/launch_manager/src/daemon/src/configuration/configuration_manager.cpp index 28147d701..bf99f7008 100644 --- a/score/launch_manager/src/daemon/src/configuration/configuration_manager.cpp +++ b/score/launch_manager/src/daemon/src/configuration/configuration_manager.cpp @@ -38,8 +38,8 @@ bool setResourceLimits(const LMFlatBuffer::ProcessStartupConfig& startup_config_ // we don't need to check the upper limit as this is done in the tooling // 0 means not configured - if (startup_config_node.memoryUsage() > 0U) - instance.startup_config_.resource_limits_.as_ = startup_config_node.memoryUsage(); + if (startup_config_node.memory_usage() > 0U) + instance.startup_config_.resource_limits_.as_ = startup_config_node.memory_usage(); return true; @@ -275,7 +275,7 @@ bool ConfigurationManager::loadSWClusterConfiguration(uint8_t sw_cluster_index) bool ConfigurationManager::loadMachineConfigs(const LMFlatBuffer::LMEcuCfg* root_node, const IdentifierHash& cluster) { bool result = false; - const auto* mode_group = root_node ? root_node->ModeGroup() : nullptr; + const auto* mode_group = root_node ? root_node->mode_group() : nullptr; if (mode_group != nullptr) { result = true; // Assume success if we reach this point @@ -318,11 +318,11 @@ bool ConfigurationManager::parseMachineConfigurations(const ModeGroup* node, con bool ConfigurationManager::parseModeGroups(const ModeGroup* node, ProcessGroup& process_group_data) { bool result = false; - const auto* mode_declaration_list = node ? node->modeDeclaration() : nullptr; + const auto* mode_declaration_list = node ? node->mode_declaration() : nullptr; if (mode_declaration_list && (mode_declaration_list->size())) { process_group_data.off_state_ = IdentifierHash("Off"); // default value if no other path is defined - const flatbuffers::String* recovery_state_name = node->recoveryMode_name(); + const flatbuffers::String* recovery_state_name = node->recovery_mode_name(); if (recovery_state_name) { process_group_data.recovery_state_ = getStringViewFromFlatBuffer(recovery_state_name); } else { @@ -359,7 +359,7 @@ bool ConfigurationManager::parseModeGroups(const ModeGroup* node, ProcessGroup& bool ConfigurationManager::loadProcessConfigs(const LMFlatBuffer::LMEcuCfg* root_node) { bool result = false; - const auto* process = root_node ? root_node->Process() : nullptr; + const auto* process = root_node ? root_node->process() : nullptr; if (process != nullptr) { result = true; // Assume success if we reach this point @@ -382,7 +382,7 @@ static void setSchedulingParameters(const Process& node, const ProcessStartupCon instance.startup_config_.cpu_mask_ = ConfigurationManager::kDefaultProcessorAffinityMask(); instance.startup_config_.scheduling_policy_ = ConfigurationManager::kDefaultSchedulingPolicy; instance.startup_config_.scheduling_priority_ = ConfigurationManager::kDefaultNormalSchedulingPriority; - auto attribute = config.schedulingPolicy(); + auto attribute = config.scheduling_policy(); if (attribute != nullptr) { if (strcasecmp("SCHED_FIFO", attribute->c_str()) == 0) { instance.startup_config_.scheduling_policy_ = SCHED_FIFO; @@ -396,7 +396,7 @@ static void setSchedulingParameters(const Process& node, const ProcessStartupCon LM_LOG_WARN() << "scheduling policy" << std::string_view{attribute->c_str(), attribute->size()} << "is not supported, using default"; } } - attribute = config.schedulingPriority(); + attribute = config.scheduling_priority(); if (attribute != nullptr) { instance.startup_config_.scheduling_priority_ = std::stoi(attribute->c_str()); } @@ -409,7 +409,7 @@ static void setSchedulingParameters(const Process& node, const ProcessStartupCon bool ConfigurationManager::parseProcessConfigurations(const Process* node) { bool result = false; - const auto* startup_config_list = node ? node->startupConfig() : nullptr; + const auto* startup_config_list = node ? node->startup_config() : nullptr; if (startup_config_list && (startup_config_list->size())) { result = true; @@ -432,7 +432,7 @@ bool ConfigurationManager::parseProcessConfigurations(const Process* node) { instance.startup_config_.gid_ = node->gid() & 0x7FFFFFFFU; instance.startup_config_.security_policy_ = - getStringFromFlatBuffer(node->securityPolicyDetails()); // Set security policy if available + getStringFromFlatBuffer(node->security_policy_details()); // Set security policy if available // extracting supplementary group IDs from Process configuration // and assigning them to this particular startup config (aka OsProcess) @@ -453,13 +453,13 @@ bool ConfigurationManager::parseProcessConfigurations(const Process* node) { // startup configs result = setResourceLimits(*startup_config_node, instance); instance.pgm_config_.is_self_terminating_ = isSelfTerminatingProcess( - startup_config_node->terminationBehavior(), instance.startup_config_.short_name_); + startup_config_node->termination_behavior(), instance.startup_config_.short_name_); instance.pgm_config_.startup_timeout_ms_ = - std::chrono::milliseconds(startup_config_node->enterTimeoutValue()); + std::chrono::milliseconds(startup_config_node->enter_timeout_value()); instance.pgm_config_.termination_timeout_ms_ = - std::chrono::milliseconds(startup_config_node->exitTimeoutValue()); + std::chrono::milliseconds(startup_config_node->exit_timeout_value()); - auto execution_error_string = startup_config_node->executionError(); + auto execution_error_string = startup_config_node->execution_error(); if (execution_error_string) { instance.pgm_config_.execution_error_code_ = static_cast(std::stoi(execution_error_string->c_str())); @@ -467,20 +467,20 @@ bool ConfigurationManager::parseProcessConfigurations(const Process* node) { // default value instance.pgm_config_.execution_error_code_ = kDefaultProcessExecutionError; } - instance.pgm_config_.number_of_restart_attempts = node->numberOfRestartAttempts(); + instance.pgm_config_.number_of_restart_attempts = node->number_of_restart_attempts(); // Set process_id from node's identifier instance.process_id_ = getStringViewFromFlatBuffer(node->identifier()); // Parse process arguments and environment variables - parseProcessArguments(startup_config_node->processArgument(), instance); - parseProcessEnvironmentVars(startup_config_node->environmentVariable(), instance); + parseProcessArguments(startup_config_node->process_argument(), instance); + parseProcessEnvironmentVars(startup_config_node->environment_variable(), instance); // Parse Execution dependency - parseExecutionDependency(startup_config_node->executionDependency(), instance); + parseExecutionDependency(startup_config_node->execution_dependency(), instance); // Parse ProcessGroup dependency - parseProcessGroup(startup_config_node->processGroupStateDependency(), instance); + parseProcessGroup(startup_config_node->process_group_state_dependency(), instance); } } else { LM_LOG_DEBUG() << "parseProcessConfigurations: Startup configs are not available or list is null"; @@ -589,8 +589,8 @@ void ConfigurationManager::parseProcessGroup( if (process_pg_node) { // Extract information from ProcessGroupStateDependency of flatconfig binary ProcessGroupStateID pg_info; - pg_info.pg_name_ = getStringViewFromFlatBuffer(process_pg_node->stateMachine_name()); - pg_info.pg_state_name_ = getStringViewFromFlatBuffer(process_pg_node->stateName()); + pg_info.pg_name_ = getStringViewFromFlatBuffer(process_pg_node->state_machine_name()); + pg_info.pg_state_name_ = getStringViewFromFlatBuffer(process_pg_node->state_name()); LM_LOG_DEBUG() << "ParseProcessProcessGroup: id:::pg_name_:" << pg_info.pg_name_ << ", pg_state_name_:" << pg_info.pg_state_name_; @@ -611,11 +611,11 @@ void ConfigurationManager::parseExecutionDependency( for (const auto& process_dependency_node : *process_dependency_list) { if (process_dependency_node) { Dependency dep{}; - auto state_name = getStringViewFromFlatBuffer(process_dependency_node->stateName()); + auto state_name = getStringViewFromFlatBuffer(process_dependency_node->state_name()); dep.process_state_ = getProcessState(state_name); - dep.target_process_id_ = getStringViewFromFlatBuffer(process_dependency_node->targetProcess_identifier()); + dep.target_process_id_ = getStringViewFromFlatBuffer(process_dependency_node->target_process_identifier()); LM_LOG_DEBUG() << "ParseProcessExecutionDependency: target process path:" - << std::string_view{getStringFromFlatBuffer(process_dependency_node->targetProcess_identifier())} + << std::string_view{getStringFromFlatBuffer(process_dependency_node->target_process_identifier())} << "ID:" << dep.target_process_id_; process_instance.dependencies_.push_back(dep); @@ -810,11 +810,11 @@ osal::CommsType ConfigurationManager::getCommsType(const Process* node, const ch if (node != nullptr) { // Check reporting behavior - comms_type = isReportingProcess(node->executable_reportingBehavior(), short_name); + comms_type = isReportingProcess(node->executable_reporting_behavior(), short_name); // Check function cluster affiliation comms_type = - getfunctionClusterAffiliation(comms_type, getStringFromFlatBuffer(node->functionClusterAffiliation())); + getfunctionClusterAffiliation(comms_type, getStringFromFlatBuffer(node->function_cluster_affiliation())); } return comms_type; } From ba393183128a792fd6fde74e6c6c13c13a96d202 Mon Sep 17 00:00:00 2001 From: shegazyy Date: Tue, 7 Jul 2026 14:58:37 +0300 Subject: [PATCH 2/2] Update lifecycle_config.py and JSON fixtures to use snake_case fields Replace all old camelCase/PascalCase dict keys in lifecycle_config.py with the renamed snake_case field names to match the updated schema. Update the three expected-output lm_demo.json fixture files accordingly so integration tests continue to pass. Issue: #288 --- scripts/config_mapping/lifecycle_config.py | 72 ++--- .../basic_test/expected_output/lm_demo.json | 210 +++++++-------- .../expected_output/lm_demo.json | 14 +- .../expected_output/lm_demo.json | 246 +++++++++--------- 4 files changed, 272 insertions(+), 270 deletions(-) diff --git a/scripts/config_mapping/lifecycle_config.py b/scripts/config_mapping/lifecycle_config.py index 29255bb42..5a1b9e486 100644 --- a/scripts/config_mapping/lifecycle_config.py +++ b/scripts/config_mapping/lifecycle_config.py @@ -416,15 +416,15 @@ def get_terminating_behavior(component_config): return "ProcessIsNotSelfTerminating" lm_config = {} - lm_config["versionMajor"] = 7 - lm_config["versionMinor"] = 0 - lm_config["Process"] = [] - lm_config["ModeGroup"] = [ + lm_config["version_major"] = 7 + lm_config["version_minor"] = 0 + lm_config["process"] = [] + lm_config["mode_group"] = [ { "identifier": "MainPG", - "initialMode_name": "not-used", - "recoveryMode_name": get_recovery_process_group_state(config), - "modeDeclaration": [], + "initial_mode_name": "not-used", + "recovery_mode_name": get_recovery_process_group_state(config), + "mode_declaration": [], } ] @@ -433,7 +433,9 @@ def get_terminating_behavior(component_config): # For each component, store which run targets depends on it for pgstate, values in config["run_targets"].items(): state_name = "MainPG/" + pgstate - lm_config["ModeGroup"][0]["modeDeclaration"].append({"identifier": state_name}) + lm_config["mode_group"][0]["mode_declaration"].append( + {"identifier": state_name} + ) components = get_process_dependencies(values) for component in components: if component not in process_group_states: @@ -441,7 +443,7 @@ def get_terminating_behavior(component_config): process_group_states[component].append(state_name) if fallback := config.get("fallback_run_target", {}): - lm_config["ModeGroup"][0]["modeDeclaration"].append( + lm_config["mode_group"][0]["mode_declaration"].append( {"identifier": "MainPG/fallback_run_target"} ) fallback_components = get_process_dependencies(fallback) @@ -464,10 +466,10 @@ def get_terminating_behavior(component_config): "supplementary_group_ids" ] ] - process["securityPolicyDetails"] = component_config["deployment_config"][ + process["security_policy_details"] = component_config["deployment_config"][ "sandbox" ]["security_policy"] - process["numberOfRestartAttempts"] = component_config["deployment_config"][ + process["number_of_restart_attempts"] = component_config["deployment_config"][ "ready_recovery_action" ]["restart"]["number_of_attempts"] @@ -475,46 +477,46 @@ def get_terminating_behavior(component_config): "application_type" ]: case "Native": - process["executable_reportingBehavior"] = "DoesNotReportExecutionState" + process["executable_reporting_behavior"] = "DoesNotReportExecutionState" case "State_Manager": - process["executable_reportingBehavior"] = "ReportsExecutionState" - process["functionClusterAffiliation"] = "STATE_MANAGEMENT" + process["executable_reporting_behavior"] = "ReportsExecutionState" + process["function_cluster_affiliation"] = "STATE_MANAGEMENT" case "Reporting" | "Reporting_And_Supervised": - process["executable_reportingBehavior"] = "ReportsExecutionState" + process["executable_reporting_behavior"] = "ReportsExecutionState" - process["startupConfig"] = [{}] - process["startupConfig"][0]["executionError"] = "1" - process["startupConfig"][0]["identifier"] = f"{component_name}_startup_config" - process["startupConfig"][0]["enterTimeoutValue"] = sec_to_ms( + process["startup_config"] = [{}] + process["startup_config"][0]["execution_error"] = "1" + process["startup_config"][0]["identifier"] = f"{component_name}_startup_config" + process["startup_config"][0]["enter_timeout_value"] = sec_to_ms( component_config["deployment_config"]["ready_timeout"] ) - process["startupConfig"][0]["exitTimeoutValue"] = sec_to_ms( + process["startup_config"][0]["exit_timeout_value"] = sec_to_ms( component_config["deployment_config"]["shutdown_timeout"] ) - process["startupConfig"][0]["schedulingPolicy"] = component_config[ + process["startup_config"][0]["scheduling_policy"] = component_config[ "deployment_config" ]["sandbox"]["scheduling_policy"] - process["startupConfig"][0]["schedulingPriority"] = str( + process["startup_config"][0]["scheduling_priority"] = str( component_config["deployment_config"]["sandbox"]["scheduling_priority"] ) - process["startupConfig"][0]["terminationBehavior"] = get_terminating_behavior( + process["startup_config"][0]["termination_behavior"] = get_terminating_behavior( component_config ) - process["startupConfig"][0]["processGroupStateDependency"] = [] - process["startupConfig"][0]["environmentVariable"] = [] + process["startup_config"][0]["process_group_state_dependency"] = [] + process["startup_config"][0]["environment_variable"] = [] for env_var, value in ( component_config["deployment_config"] .get("environmental_variables", {}) .items() ): - process["startupConfig"][0]["environmentVariable"].append( + process["startup_config"][0]["environment_variable"].append( {"key": env_var, "value": value} ) application_type = component_config["component_properties"][ "application_profile" ]["application_type"] if is_supervised(application_type): - process["startupConfig"][0]["environmentVariable"].append( + process["startup_config"][0]["environment_variable"].append( { "key": "LCM_ALIVE_INTERFACE_PATH", "value": "lifecycle_health_" + component_name, @@ -525,19 +527,19 @@ def get_terminating_behavior(component_config): "process_arguments", [] ): arguments = [{"argument": arg} for arg in arguments] - process["startupConfig"][0]["processArgument"] = arguments + process["startup_config"][0]["process_argument"] = arguments if component_name in process_group_states: for pgstate in process_group_states[component_name]: - process["startupConfig"][0]["processGroupStateDependency"].append( - {"stateMachine_name": "MainPG", "stateName": pgstate} + process["startup_config"][0]["process_group_state_dependency"].append( + {"state_machine_name": "MainPG", "state_name": pgstate} ) - lm_config["Process"].append(process) + lm_config["process"].append(process) # Execution dependencies. Assumption: Components can never depend on run targets - for process in lm_config["Process"]: - process["startupConfig"][0]["executionDependency"] = [] + for process in lm_config["process"]: + process["startup_config"][0]["execution_dependency"] = [] for dependency in config["components"][process["identifier"]][ "component_properties" ].get("depends_on", []): @@ -545,8 +547,8 @@ def get_terminating_behavior(component_config): ready_condition = dep_entry["component_properties"]["ready_condition"][ "process_state" ] - process["startupConfig"][0]["executionDependency"].append( - {"stateName": ready_condition, "targetProcess_identifier": dependency} + process["startup_config"][0]["execution_dependency"].append( + {"state_name": ready_condition, "target_process_identifier": dependency} ) with open(f"{output_dir}/lm_demo.json", "w") as lm_file: diff --git a/scripts/config_mapping/tests/basic_test/expected_output/lm_demo.json b/scripts/config_mapping/tests/basic_test/expected_output/lm_demo.json index 71ee9209a..660a30feb 100644 --- a/scripts/config_mapping/tests/basic_test/expected_output/lm_demo.json +++ b/scripts/config_mapping/tests/basic_test/expected_output/lm_demo.json @@ -1,7 +1,7 @@ { - "versionMajor": 7, - "versionMinor": 0, - "Process": [ + "version_major": 7, + "version_minor": 0, + "process": [ { "identifier": "setup_filesystem_sh", "path": "/opt/scripts/bin/setup_filesystem.sh", @@ -18,29 +18,29 @@ "sgid": 700 } ], - "securityPolicyDetails": "policy_name", - "numberOfRestartAttempts": 1, - "executable_reportingBehavior": "DoesNotReportExecutionState", - "startupConfig": [ + "security_policy_details": "policy_name", + "number_of_restart_attempts": 1, + "executable_reporting_behavior": "DoesNotReportExecutionState", + "startup_config": [ { - "executionError": "1", + "execution_error": "1", "identifier": "setup_filesystem_sh_startup_config", - "enterTimeoutValue": 500, - "exitTimeoutValue": 500, - "schedulingPolicy": "SCHED_OTHER", - "schedulingPriority": "0", - "terminationBehavior": "ProcessIsSelfTerminating", - "processGroupStateDependency": [ - { - "stateMachine_name": "MainPG", - "stateName": "MainPG/Startup" + "enter_timeout_value": 500, + "exit_timeout_value": 500, + "scheduling_policy": "SCHED_OTHER", + "scheduling_priority": "0", + "termination_behavior": "ProcessIsSelfTerminating", + "process_group_state_dependency": [ + { + "state_machine_name": "MainPG", + "state_name": "MainPG/Startup" }, { - "stateMachine_name": "MainPG", - "stateName": "MainPG/Full" + "state_machine_name": "MainPG", + "state_name": "MainPG/Full" } ], - "environmentVariable": [ + "environment_variable": [ { "key": "LD_LIBRARY_PATH", "value": "/opt/lib" @@ -54,7 +54,7 @@ "value": "" } ], - "processArgument": [ + "process_argument": [ { "argument": "-a" }, @@ -62,7 +62,7 @@ "argument": "-b" } ], - "executionDependency": [] + "execution_dependency": [] } ] }, @@ -82,25 +82,25 @@ "sgid": 700 } ], - "securityPolicyDetails": "policy_name", - "numberOfRestartAttempts": 1, - "executable_reportingBehavior": "DoesNotReportExecutionState", - "startupConfig": [ + "security_policy_details": "policy_name", + "number_of_restart_attempts": 1, + "executable_reporting_behavior": "DoesNotReportExecutionState", + "startup_config": [ { - "executionError": "1", + "execution_error": "1", "identifier": "dlt-daemon_startup_config", - "enterTimeoutValue": 500, - "exitTimeoutValue": 500, - "schedulingPolicy": "SCHED_OTHER", - "schedulingPriority": "0", - "terminationBehavior": "ProcessIsNotSelfTerminating", - "processGroupStateDependency": [ - { - "stateMachine_name": "MainPG", - "stateName": "MainPG/Full" + "enter_timeout_value": 500, + "exit_timeout_value": 500, + "scheduling_policy": "SCHED_OTHER", + "scheduling_priority": "0", + "termination_behavior": "ProcessIsNotSelfTerminating", + "process_group_state_dependency": [ + { + "state_machine_name": "MainPG", + "state_name": "MainPG/Full" } ], - "environmentVariable": [ + "environment_variable": [ { "key": "LD_LIBRARY_PATH", "value": "/opt/lib" @@ -114,7 +114,7 @@ "value": "" } ], - "processArgument": [ + "process_argument": [ { "argument": "-a" }, @@ -125,10 +125,10 @@ "argument": "--xyz" } ], - "executionDependency": [ + "execution_dependency": [ { - "stateName": "Terminated", - "targetProcess_identifier": "setup_filesystem_sh" + "state_name": "Terminated", + "target_process_identifier": "setup_filesystem_sh" } ] } @@ -150,25 +150,25 @@ "sgid": 700 } ], - "securityPolicyDetails": "policy_name", - "numberOfRestartAttempts": 1, - "executable_reportingBehavior": "ReportsExecutionState", - "startupConfig": [ + "security_policy_details": "policy_name", + "number_of_restart_attempts": 1, + "executable_reporting_behavior": "ReportsExecutionState", + "startup_config": [ { - "executionError": "1", + "execution_error": "1", "identifier": "someip-daemon_startup_config", - "enterTimeoutValue": 500, - "exitTimeoutValue": 500, - "schedulingPolicy": "SCHED_OTHER", - "schedulingPriority": "0", - "terminationBehavior": "ProcessIsNotSelfTerminating", - "processGroupStateDependency": [ - { - "stateMachine_name": "MainPG", - "stateName": "MainPG/Full" + "enter_timeout_value": 500, + "exit_timeout_value": 500, + "scheduling_policy": "SCHED_OTHER", + "scheduling_priority": "0", + "termination_behavior": "ProcessIsNotSelfTerminating", + "process_group_state_dependency": [ + { + "state_machine_name": "MainPG", + "state_name": "MainPG/Full" } ], - "environmentVariable": [ + "environment_variable": [ { "key": "LD_LIBRARY_PATH", "value": "/opt/lib" @@ -186,7 +186,7 @@ "value": "lifecycle_health_someip-daemon" } ], - "processArgument": [ + "process_argument": [ { "argument": "-a" }, @@ -197,7 +197,7 @@ "argument": "--xyz" } ], - "executionDependency": [] + "execution_dependency": [] } ] }, @@ -217,25 +217,25 @@ "sgid": 700 } ], - "securityPolicyDetails": "policy_name", - "numberOfRestartAttempts": 1, - "executable_reportingBehavior": "ReportsExecutionState", - "startupConfig": [ + "security_policy_details": "policy_name", + "number_of_restart_attempts": 1, + "executable_reporting_behavior": "ReportsExecutionState", + "startup_config": [ { - "executionError": "1", + "execution_error": "1", "identifier": "test_app1_startup_config", - "enterTimeoutValue": 500, - "exitTimeoutValue": 500, - "schedulingPolicy": "SCHED_OTHER", - "schedulingPriority": "0", - "terminationBehavior": "ProcessIsNotSelfTerminating", - "processGroupStateDependency": [ - { - "stateMachine_name": "MainPG", - "stateName": "MainPG/Full" + "enter_timeout_value": 500, + "exit_timeout_value": 500, + "scheduling_policy": "SCHED_OTHER", + "scheduling_priority": "0", + "termination_behavior": "ProcessIsNotSelfTerminating", + "process_group_state_dependency": [ + { + "state_machine_name": "MainPG", + "state_name": "MainPG/Full" } ], - "environmentVariable": [ + "environment_variable": [ { "key": "LD_LIBRARY_PATH", "value": "/opt/lib" @@ -253,7 +253,7 @@ "value": "lifecycle_health_test_app1" } ], - "processArgument": [ + "process_argument": [ { "argument": "-a" }, @@ -264,14 +264,14 @@ "argument": "--xyz" } ], - "executionDependency": [ + "execution_dependency": [ { - "stateName": "Running", - "targetProcess_identifier": "dlt-daemon" + "state_name": "Running", + "target_process_identifier": "dlt-daemon" }, { - "stateName": "Running", - "targetProcess_identifier": "someip-daemon" + "state_name": "Running", + "target_process_identifier": "someip-daemon" } ] } @@ -293,30 +293,30 @@ "sgid": 700 } ], - "securityPolicyDetails": "policy_name", - "numberOfRestartAttempts": 1, - "executable_reportingBehavior": "ReportsExecutionState", - "functionClusterAffiliation": "STATE_MANAGEMENT", - "startupConfig": [ + "security_policy_details": "policy_name", + "number_of_restart_attempts": 1, + "executable_reporting_behavior": "ReportsExecutionState", + "function_cluster_affiliation": "STATE_MANAGEMENT", + "startup_config": [ { - "executionError": "1", + "execution_error": "1", "identifier": "state_manager_startup_config", - "enterTimeoutValue": 500, - "exitTimeoutValue": 500, - "schedulingPolicy": "SCHED_OTHER", - "schedulingPriority": "0", - "terminationBehavior": "ProcessIsNotSelfTerminating", - "processGroupStateDependency": [ - { - "stateMachine_name": "MainPG", - "stateName": "MainPG/Startup" + "enter_timeout_value": 500, + "exit_timeout_value": 500, + "scheduling_policy": "SCHED_OTHER", + "scheduling_priority": "0", + "termination_behavior": "ProcessIsNotSelfTerminating", + "process_group_state_dependency": [ + { + "state_machine_name": "MainPG", + "state_name": "MainPG/Startup" }, { - "stateMachine_name": "MainPG", - "stateName": "MainPG/Full" + "state_machine_name": "MainPG", + "state_name": "MainPG/Full" } ], - "environmentVariable": [ + "environment_variable": [ { "key": "LD_LIBRARY_PATH", "value": "/opt/lib" @@ -334,7 +334,7 @@ "value": "lifecycle_health_state_manager" } ], - "processArgument": [ + "process_argument": [ { "argument": "-a" }, @@ -345,22 +345,22 @@ "argument": "--xyz" } ], - "executionDependency": [ + "execution_dependency": [ { - "stateName": "Terminated", - "targetProcess_identifier": "setup_filesystem_sh" + "state_name": "Terminated", + "target_process_identifier": "setup_filesystem_sh" } ] } ] } ], - "ModeGroup": [ + "mode_group": [ { "identifier": "MainPG", - "initialMode_name": "not-used", - "recoveryMode_name": "MainPG/fallback_run_target", - "modeDeclaration": [ + "initial_mode_name": "not-used", + "recovery_mode_name": "MainPG/fallback_run_target", + "mode_declaration": [ { "identifier": "MainPG/Startup" }, diff --git a/scripts/config_mapping/tests/empty_lm_config_test/expected_output/lm_demo.json b/scripts/config_mapping/tests/empty_lm_config_test/expected_output/lm_demo.json index e51df1ee3..bbacba060 100644 --- a/scripts/config_mapping/tests/empty_lm_config_test/expected_output/lm_demo.json +++ b/scripts/config_mapping/tests/empty_lm_config_test/expected_output/lm_demo.json @@ -1,13 +1,13 @@ { - "versionMajor": 7, - "versionMinor": 0, - "Process": [], - "ModeGroup": [ + "version_major": 7, + "version_minor": 0, + "process": [], + "mode_group": [ { "identifier": "MainPG", - "initialMode_name": "not-used", - "recoveryMode_name": "MainPG/fallback_run_target", - "modeDeclaration": [ + "initial_mode_name": "not-used", + "recovery_mode_name": "MainPG/fallback_run_target", + "mode_declaration": [ { "identifier": "MainPG/Startup" }, diff --git a/scripts/config_mapping/tests/lm_config_test/expected_output/lm_demo.json b/scripts/config_mapping/tests/lm_config_test/expected_output/lm_demo.json index 9f3359192..c90079231 100644 --- a/scripts/config_mapping/tests/lm_config_test/expected_output/lm_demo.json +++ b/scripts/config_mapping/tests/lm_config_test/expected_output/lm_demo.json @@ -1,7 +1,7 @@ { - "versionMajor": 7, - "versionMinor": 0, - "Process": [ + "version_major": 7, + "version_minor": 0, + "process": [ { "identifier": "test_app2", "path": "/opt/apps/test_app2/test_app2", @@ -15,29 +15,29 @@ "sgid": 900 } ], - "securityPolicyDetails": "policy_name_2", - "numberOfRestartAttempts": 1, - "executable_reportingBehavior": "ReportsExecutionState", - "startupConfig": [ + "security_policy_details": "policy_name_2", + "number_of_restart_attempts": 1, + "executable_reporting_behavior": "ReportsExecutionState", + "startup_config": [ { - "executionError": "1", + "execution_error": "1", "identifier": "test_app2_startup_config", - "enterTimeoutValue": 500, - "exitTimeoutValue": 500, - "schedulingPolicy": "SCHED_FIFO", - "schedulingPriority": "99", - "terminationBehavior": "ProcessIsNotSelfTerminating", - "processGroupStateDependency": [ + "enter_timeout_value": 500, + "exit_timeout_value": 500, + "scheduling_policy": "SCHED_FIFO", + "scheduling_priority": "99", + "termination_behavior": "ProcessIsNotSelfTerminating", + "process_group_state_dependency": [ { - "stateMachine_name": "MainPG", - "stateName": "MainPG/Startup" + "state_machine_name": "MainPG", + "state_name": "MainPG/Startup" }, { - "stateMachine_name": "MainPG", - "stateName": "MainPG/Full" + "state_machine_name": "MainPG", + "state_name": "MainPG/Full" } ], - "environmentVariable": [ + "environment_variable": [ { "key": "LD_LIBRARY_PATH", "value": "/opt/lib" @@ -59,7 +59,7 @@ "value": "lifecycle_health_test_app2" } ], - "processArgument": [ + "process_argument": [ { "argument": "-a" }, @@ -70,7 +70,7 @@ "argument": "--xyz" } ], - "executionDependency": [] + "execution_dependency": [] } ] }, @@ -90,29 +90,29 @@ "sgid": 700 } ], - "securityPolicyDetails": "policy_name", - "numberOfRestartAttempts": 1, - "executable_reportingBehavior": "DoesNotReportExecutionState", - "startupConfig": [ + "security_policy_details": "policy_name", + "number_of_restart_attempts": 1, + "executable_reporting_behavior": "DoesNotReportExecutionState", + "startup_config": [ { - "executionError": "1", + "execution_error": "1", "identifier": "setup_filesystem_sh_startup_config", - "enterTimeoutValue": 500, - "exitTimeoutValue": 500, - "schedulingPolicy": "SCHED_OTHER", - "schedulingPriority": "0", - "terminationBehavior": "ProcessIsSelfTerminating", - "processGroupStateDependency": [ + "enter_timeout_value": 500, + "exit_timeout_value": 500, + "scheduling_policy": "SCHED_OTHER", + "scheduling_priority": "0", + "termination_behavior": "ProcessIsSelfTerminating", + "process_group_state_dependency": [ { - "stateMachine_name": "MainPG", - "stateName": "MainPG/Startup" + "state_machine_name": "MainPG", + "state_name": "MainPG/Startup" }, { - "stateMachine_name": "MainPG", - "stateName": "MainPG/Full" + "state_machine_name": "MainPG", + "state_name": "MainPG/Full" } ], - "environmentVariable": [ + "environment_variable": [ { "key": "LD_LIBRARY_PATH", "value": "/opt/lib" @@ -126,7 +126,7 @@ "value": "" } ], - "processArgument": [ + "process_argument": [ { "argument": "-a" }, @@ -134,10 +134,10 @@ "argument": "-b" } ], - "executionDependency": [ + "execution_dependency": [ { - "stateName": "Running", - "targetProcess_identifier": "test_app2" + "state_name": "Running", + "target_process_identifier": "test_app2" } ] } @@ -159,25 +159,25 @@ "sgid": 700 } ], - "securityPolicyDetails": "policy_name", - "numberOfRestartAttempts": 1, - "executable_reportingBehavior": "DoesNotReportExecutionState", - "startupConfig": [ + "security_policy_details": "policy_name", + "number_of_restart_attempts": 1, + "executable_reporting_behavior": "DoesNotReportExecutionState", + "startup_config": [ { - "executionError": "1", + "execution_error": "1", "identifier": "dlt-daemon_startup_config", - "enterTimeoutValue": 500, - "exitTimeoutValue": 500, - "schedulingPolicy": "SCHED_OTHER", - "schedulingPriority": "0", - "terminationBehavior": "ProcessIsNotSelfTerminating", - "processGroupStateDependency": [ - { - "stateMachine_name": "MainPG", - "stateName": "MainPG/Full" + "enter_timeout_value": 500, + "exit_timeout_value": 500, + "scheduling_policy": "SCHED_OTHER", + "scheduling_priority": "0", + "termination_behavior": "ProcessIsNotSelfTerminating", + "process_group_state_dependency": [ + { + "state_machine_name": "MainPG", + "state_name": "MainPG/Full" } ], - "environmentVariable": [ + "environment_variable": [ { "key": "LD_LIBRARY_PATH", "value": "/opt/lib" @@ -191,7 +191,7 @@ "value": "" } ], - "processArgument": [ + "process_argument": [ { "argument": "-a" }, @@ -202,10 +202,10 @@ "argument": "--xyz" } ], - "executionDependency": [ + "execution_dependency": [ { - "stateName": "Terminated", - "targetProcess_identifier": "setup_filesystem_sh" + "state_name": "Terminated", + "target_process_identifier": "setup_filesystem_sh" } ] } @@ -227,25 +227,25 @@ "sgid": 700 } ], - "securityPolicyDetails": "policy_name", - "numberOfRestartAttempts": 1, - "executable_reportingBehavior": "ReportsExecutionState", - "startupConfig": [ + "security_policy_details": "policy_name", + "number_of_restart_attempts": 1, + "executable_reporting_behavior": "ReportsExecutionState", + "startup_config": [ { - "executionError": "1", + "execution_error": "1", "identifier": "someip-daemon_startup_config", - "enterTimeoutValue": 500, - "exitTimeoutValue": 500, - "schedulingPolicy": "SCHED_OTHER", - "schedulingPriority": "0", - "terminationBehavior": "ProcessIsNotSelfTerminating", - "processGroupStateDependency": [ - { - "stateMachine_name": "MainPG", - "stateName": "MainPG/Full" + "enter_timeout_value": 500, + "exit_timeout_value": 500, + "scheduling_policy": "SCHED_OTHER", + "scheduling_priority": "0", + "termination_behavior": "ProcessIsNotSelfTerminating", + "process_group_state_dependency": [ + { + "state_machine_name": "MainPG", + "state_name": "MainPG/Full" } ], - "environmentVariable": [ + "environment_variable": [ { "key": "LD_LIBRARY_PATH", "value": "/opt/lib" @@ -263,7 +263,7 @@ "value": "lifecycle_health_someip-daemon" } ], - "processArgument": [ + "process_argument": [ { "argument": "-a" }, @@ -274,7 +274,7 @@ "argument": "--xyz" } ], - "executionDependency": [] + "execution_dependency": [] } ] }, @@ -294,25 +294,25 @@ "sgid": 700 } ], - "securityPolicyDetails": "policy_name", - "numberOfRestartAttempts": 1, - "executable_reportingBehavior": "ReportsExecutionState", - "startupConfig": [ + "security_policy_details": "policy_name", + "number_of_restart_attempts": 1, + "executable_reporting_behavior": "ReportsExecutionState", + "startup_config": [ { - "executionError": "1", + "execution_error": "1", "identifier": "test_app1_startup_config", - "enterTimeoutValue": 500, - "exitTimeoutValue": 500, - "schedulingPolicy": "SCHED_OTHER", - "schedulingPriority": "0", - "terminationBehavior": "ProcessIsNotSelfTerminating", - "processGroupStateDependency": [ - { - "stateMachine_name": "MainPG", - "stateName": "MainPG/Full" + "enter_timeout_value": 500, + "exit_timeout_value": 500, + "scheduling_policy": "SCHED_OTHER", + "scheduling_priority": "0", + "termination_behavior": "ProcessIsNotSelfTerminating", + "process_group_state_dependency": [ + { + "state_machine_name": "MainPG", + "state_name": "MainPG/Full" } ], - "environmentVariable": [ + "environment_variable": [ { "key": "LD_LIBRARY_PATH", "value": "/opt/lib" @@ -330,7 +330,7 @@ "value": "lifecycle_health_test_app1" } ], - "processArgument": [ + "process_argument": [ { "argument": "-a" }, @@ -341,14 +341,14 @@ "argument": "--xyz" } ], - "executionDependency": [ + "execution_dependency": [ { - "stateName": "Running", - "targetProcess_identifier": "dlt-daemon" + "state_name": "Running", + "target_process_identifier": "dlt-daemon" }, { - "stateName": "Running", - "targetProcess_identifier": "someip-daemon" + "state_name": "Running", + "target_process_identifier": "someip-daemon" } ] } @@ -370,30 +370,30 @@ "sgid": 700 } ], - "securityPolicyDetails": "policy_name", - "numberOfRestartAttempts": 1, - "executable_reportingBehavior": "ReportsExecutionState", - "functionClusterAffiliation": "STATE_MANAGEMENT", - "startupConfig": [ + "security_policy_details": "policy_name", + "number_of_restart_attempts": 1, + "executable_reporting_behavior": "ReportsExecutionState", + "function_cluster_affiliation": "STATE_MANAGEMENT", + "startup_config": [ { - "executionError": "1", + "execution_error": "1", "identifier": "state_manager_startup_config", - "enterTimeoutValue": 500, - "exitTimeoutValue": 500, - "schedulingPolicy": "SCHED_OTHER", - "schedulingPriority": "0", - "terminationBehavior": "ProcessIsNotSelfTerminating", - "processGroupStateDependency": [ + "enter_timeout_value": 500, + "exit_timeout_value": 500, + "scheduling_policy": "SCHED_OTHER", + "scheduling_priority": "0", + "termination_behavior": "ProcessIsNotSelfTerminating", + "process_group_state_dependency": [ { - "stateMachine_name": "MainPG", - "stateName": "MainPG/Startup" + "state_machine_name": "MainPG", + "state_name": "MainPG/Startup" }, { - "stateMachine_name": "MainPG", - "stateName": "MainPG/Full" + "state_machine_name": "MainPG", + "state_name": "MainPG/Full" } ], - "environmentVariable": [ + "environment_variable": [ { "key": "LD_LIBRARY_PATH", "value": "/opt/lib" @@ -411,7 +411,7 @@ "value": "lifecycle_health_state_manager" } ], - "processArgument": [ + "process_argument": [ { "argument": "-a" }, @@ -422,22 +422,22 @@ "argument": "--xyz" } ], - "executionDependency": [ + "execution_dependency": [ { - "stateName": "Terminated", - "targetProcess_identifier": "setup_filesystem_sh" + "state_name": "Terminated", + "target_process_identifier": "setup_filesystem_sh" } ] } ] } ], - "ModeGroup": [ + "mode_group": [ { "identifier": "MainPG", - "initialMode_name": "not-used", - "recoveryMode_name": "MainPG/fallback_run_target", - "modeDeclaration": [ + "initial_mode_name": "not-used", + "recovery_mode_name": "MainPG/fallback_run_target", + "mode_declaration": [ { "identifier": "MainPG/Startup" },