diff --git a/mc_openapi/doml_mc/common_reqs.py b/mc_openapi/doml_mc/common_reqs.py index c64922c9116bab3e4c441454d8a681bce3c8676f..23e4ac3298e0fb41e96e27d036c6ca1c63648d0a 100644 --- a/mc_openapi/doml_mc/common_reqs.py +++ b/mc_openapi/doml_mc/common_reqs.py @@ -554,9 +554,9 @@ def ed_vm_iface(solver: Solver, smtsorts: SMTSorts, intermediate_model: Intermed vm_name = get_user_friendly_name( intermediate_model, solver.model(), vm) if vm_name: - return f"Virtual machine {vm_name} is connected to no network interface." + return f"Virtual machine {vm_name} is not connected to any network interface." except: - return "A virtual machine is connected to no network interface." + return "A virtual machine is not connected to any network interface." def ed_software_package_iface_net(solver: Solver, smtsorts: SMTSorts, intermediate_model: IntermediateModel) -> str: diff --git a/mc_openapi/handlers.py b/mc_openapi/handlers.py index 76828fbfd438a7f188aae55218c2c8f4268c40f3..0b71b79982677e81dcbf6e24156a3c867f30f474 100644 --- a/mc_openapi/handlers.py +++ b/mc_openapi/handlers.py @@ -36,7 +36,8 @@ def post(body, version=None): user_req_str_consts = [] # Add support for Requirements in DOML - if dmc.doml_version == DOMLVersion.V2_2: + if (dmc.doml_version == DOMLVersion.V2_2 + or dmc.doml_version == DOMLVersion.V2_2_1): domlr_parser = Parser(DOMLRTransformer) model = get_pyecore_model(doml_xmi, DOMLVersion.V2_2) func_reqs = model.functionalRequirements.items diff --git a/tests/test_mc_openapi.py b/tests/test_mc_openapi.py index 506b33b37590ea0f4f0cbfff748747b41559d4c5..5f777dd1b481b5f3bd7ff1db38ed492312645706 100644 --- a/tests/test_mc_openapi.py +++ b/tests/test_mc_openapi.py @@ -28,12 +28,12 @@ def test_post_faas_unsat_V2_0(): def test_post_common_reqs_V2_0(): check_strings = [ - "is connected to no network interface.", + "is not connected to any network interface.", "but they are deployed to nodes that cannot communicate through a common network.", "share the same IP address.", "is not deployed to any abstract infrastructure node.", - "has not been mapped to any element in the active concretization.", - "is mapped to no abstract infrastructure element." + "is not mapped to any element in the active concretization.", + "is not mapped to any abstract infrastructure element." ] for req, err_desc in zip(CommonRequirements[DOMLVersion.V2_0].get_all_requirements(), check_strings):