diff --git a/api/InfrastructureTemplateController.py b/api/InfrastructureTemplateController.py index a40c56d8ebae5a907b4cfeeb7725ebf678b5a400..e944261bc0402b6b5341d8c275473da4a416a281 100644 --- a/api/InfrastructureTemplateController.py +++ b/api/InfrastructureTemplateController.py @@ -21,6 +21,5 @@ def create_iac_from_doml(data: str = Body(..., media_type="application/xml")): logging.info("Received create_iac_from_doml request") compress_folder_info = Orchestrator.create_iac_from_doml(model=data, metamodel_directory="icgparser/doml", is_multiecore_metamodel=False) - logging.info(f"file_path: {compress_folder_info.file_path}, filename: {compress_folder_info.filename}") - return FileResponse(path=compress_folder_info.filename, media_type='application/octet-stream', ## TODO change path into compress_folder_info.file_path + return FileResponse(path=compress_folder_info.file_path, media_type='application/octet-stream', filename=compress_folder_info.filename) diff --git a/controller/Orchestrator.py b/controller/Orchestrator.py index cea3b025ef989860a6fbb0c10912178c5ebc43c8..071390921bf35261b67a3789abce862dba4837b5 100644 --- a/controller/Orchestrator.py +++ b/controller/Orchestrator.py @@ -8,9 +8,10 @@ from plugin import AnsiblePlugin, TerraformPlugin class CompressFolder: def __init__(self, file_path, filename): - self.file_path = file_path, + self.file_path = file_path self.filename = filename + def create_infrastructure_files(intermediate_representation: dict): template_generated_folder = intermediate_representation["output_path"] choose_plugin(intermediate_representation, template_generated_folder) @@ -98,7 +99,6 @@ def compress_iac_folder(template_generated_folder): compress_file_folder_path = compress_file(template_generated_folder, compress_file_name) logging.info(f"Successfully created iac files, available at {compress_file_folder_path}") compress_folder_info = CompressFolder(file_path=compress_file_folder_path, filename=compress_file_name) - logging.info(f"######################### {compress_folder_info.file_path}") ## TODO fix, is tuple instead of string return compress_folder_info def create_iac_from_intermediate_representation(intermediate_representation):