Skip to content
Snippets Groups Projects
Commit 5395651a authored by debora.benedetto@hpe.com's avatar debora.benedetto@hpe.com
Browse files

Bugfix: wrong skip of infra resources fixed

parent 97c3d6c4
Branches
No related tags found
No related merge requests found
...@@ -100,11 +100,6 @@ def create_intermediate_representation(model_path, is_multiecore_metamodel, meta ...@@ -100,11 +100,6 @@ def create_intermediate_representation(model_path, is_multiecore_metamodel, meta
intermediate_representation = ModelParser.parse_model(model_path=model_path, intermediate_representation = ModelParser.parse_model(model_path=model_path,
is_multiecore_metamodel=is_multiecore_metamodel, is_multiecore_metamodel=is_multiecore_metamodel,
metamodel_directory=metamodel_directory) metamodel_directory=metamodel_directory)
## TODO remove, introduced because sg sometimes not created
if "computingGroup" in intermediate_representation["steps"][0]["data"].keys():## TODO remove
logging.debug("security group found")## TODO remove
else:
logging.debug("no security group found!")
# intermediate_representation = reorganize_info(intermediate_representation) # intermediate_representation = reorganize_info(intermediate_representation)
logging.info(f"Successfully created intermediate representation {intermediate_representation}") logging.info(f"Successfully created intermediate representation {intermediate_representation}")
intermediate_representation_path = "input_file_generated/ir.json" intermediate_representation_path = "input_file_generated/ir.json"
......
...@@ -28,8 +28,10 @@ def to_camel_case(content): ...@@ -28,8 +28,10 @@ def to_camel_case(content):
def include_missing_objects_from_infrastructure_layer(to_step): def include_missing_objects_from_infrastructure_layer(to_step):
for obj_name in DomlParserUtilities.retrieve_missing_parsed_resources(): missing_objects = dict.copy(DomlParserUtilities.retrieve_missing_parsed_resources())
obj = DomlParserUtilities.retrieve_missing_parsed_resources()[obj_name] logging.info(f"Found {len(missing_objects)} missing infra objects.")
for obj_name, obj in missing_objects.items():
logging.info(f"Adding {obj_name} infra object")
infra_object_representation = {} infra_object_representation = {}
infra_object_representation = DomlParserUtilities.save_attributes(obj["resource"], infra_object_representation, infra_object_representation = DomlParserUtilities.save_attributes(obj["resource"], infra_object_representation,
skip_component_name=True) skip_component_name=True)
...@@ -40,7 +42,7 @@ def include_missing_objects_from_infrastructure_layer(to_step): ...@@ -40,7 +42,7 @@ def include_missing_objects_from_infrastructure_layer(to_step):
## TODO fix attenzione che sovrascrive ## TODO fix attenzione che sovrascrive
ir_key_name = to_camel_case(obj["reference"].eType.name) ir_key_name = to_camel_case(obj["reference"].eType.name)
to_step["data"][ir_key_name] = [infra_object_representation] to_step["data"][ir_key_name] = [infra_object_representation]
return to_step return to_step
def include_infra_object_from_concrete_layer(provider, infra_object_step): def include_infra_object_from_concrete_layer(provider, infra_object_step):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment