From 1e940120769683b51244699fdd91a9bea5cb5f2c Mon Sep 17 00:00:00 2001 From: Karel van Klink <karel.vanklink@geant.org> Date: Tue, 8 Oct 2024 15:11:07 +0200 Subject: [PATCH] Add missing translation keys, update unit tests --- gso/translations/en-GB.json | 2 ++ gso/workflows/geant_ip/import_geant_ip.py | 2 +- test/workflows/edge_port/test_create_edge_port.py | 2 +- test/workflows/edge_port/test_modify_edge_port.py | 4 ++-- test/workflows/edge_port/test_terminate_edge_port.py | 2 +- test/workflows/edge_port/test_validate_edge_port.py | 2 +- 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/gso/translations/en-GB.json b/gso/translations/en-GB.json index 22e58fe6..2ace1604 100644 --- a/gso/translations/en-GB.json +++ b/gso/translations/en-GB.json @@ -69,6 +69,7 @@ "create_imported_office_router": "NOT FOR HUMANS -- Import existing office router", "create_imported_opengear": "NOT FOR HUMANS -- Import existing OpenGear", "create_imported_edge_port": "NOT FOR HUMANS -- Import existing Edge Port", + "create_imported_geant_ip": "NOT FOR HUMANS -- Import existing GÉANT IP", "import_site": "NOT FOR HUMANS -- Finalize import into a Site product", "import_router": "NOT FOR HUMANS -- Finalize import into a Router product", "import_iptrunk": "NOT FOR HUMANS -- Finalize import into an IP trunk product", @@ -76,6 +77,7 @@ "import_super_pop_switch": "NOT FOR HUMANS -- Finalize import into a Super PoP switch", "import_opengear": "NOT FOR HUMANS -- Finalize import into an OpenGear", "import_edge_port": "NOT FOR HUMANS -- Finalize import into an Edge Port", + "import_geant_ip": "NOT FOR HUMANS -- Finalize import into a GÉANT IP", "validate_iptrunk": "Validate IP Trunk configuration", "validate_router": "Validate Router configuration", "validate_switch": "Validate Switch configuration", diff --git a/gso/workflows/geant_ip/import_geant_ip.py b/gso/workflows/geant_ip/import_geant_ip.py index a543d897..37be5a75 100644 --- a/gso/workflows/geant_ip/import_geant_ip.py +++ b/gso/workflows/geant_ip/import_geant_ip.py @@ -21,7 +21,7 @@ def import_geant_ip_subscription(subscription_id: UUIDstr) -> State: return {"subscription": new_subscription} -@workflow("Import GeantIP", target=Target.MODIFY, initial_input_form=wrap_modify_initial_input_form(None)) +@workflow("Import GÉANT IP", target=Target.MODIFY, initial_input_form=wrap_modify_initial_input_form(None)) def import_geant_ip() -> StepList: """Modify an ImportedGeantIP subscription into an GeantIP subscription to complete the import.""" return init >> store_process_subscription(Target.MODIFY) >> unsync >> import_geant_ip_subscription >> resync >> done diff --git a/test/workflows/edge_port/test_create_edge_port.py b/test/workflows/edge_port/test_create_edge_port.py index 7b3fc8bc..f6a13146 100644 --- a/test/workflows/edge_port/test_create_edge_port.py +++ b/test/workflows/edge_port/test_create_edge_port.py @@ -73,7 +73,7 @@ def input_form_wizard_data(request, nokia_router_subscription_factory, partner_f @pytest.mark.workflow() -@patch("gso.workflows.edge_port.create_edge_port.lso_client.execute_playbook") +@patch("gso.services.lso_client._send_request") def test_successful_edge_port_creation( mock_execute_playbook, responses, diff --git a/test/workflows/edge_port/test_modify_edge_port.py b/test/workflows/edge_port/test_modify_edge_port.py index 18d12a05..6b57c4c9 100644 --- a/test/workflows/edge_port/test_modify_edge_port.py +++ b/test/workflows/edge_port/test_modify_edge_port.py @@ -38,7 +38,7 @@ def input_form_wizard_data(request, faker, edge_port_subscription_factory, partn @pytest.mark.workflow() -@patch("gso.workflows.edge_port.modify_edge_port.execute_playbook") +@patch("gso.services.lso_client._send_request") @patch("gso.services.netbox_client.NetboxClient.get_available_interfaces") @patch("gso.services.netbox_client.NetboxClient.attach_interface_to_lag") @patch("gso.services.netbox_client.NetboxClient.reserve_interface") @@ -115,7 +115,7 @@ def input_form_wizard_without_changing_capacity(request, faker, edge_port_subscr @pytest.mark.workflow() -@patch("gso.workflows.edge_port.modify_edge_port.execute_playbook") +@patch("gso.services.lso_client._send_request") @patch("gso.services.netbox_client.NetboxClient.get_available_interfaces") @patch("gso.services.netbox_client.NetboxClient.attach_interface_to_lag") @patch("gso.services.netbox_client.NetboxClient.reserve_interface") diff --git a/test/workflows/edge_port/test_terminate_edge_port.py b/test/workflows/edge_port/test_terminate_edge_port.py index cc7610c3..ac26fa3e 100644 --- a/test/workflows/edge_port/test_terminate_edge_port.py +++ b/test/workflows/edge_port/test_terminate_edge_port.py @@ -13,7 +13,7 @@ from test.workflows import ( @pytest.mark.workflow() -@patch("gso.workflows.edge_port.terminate_edge_port.execute_playbook") +@patch("gso.services.lso_client._send_request") @patch("gso.services.netbox_client.NetboxClient.delete_interface") @patch("gso.services.netbox_client.NetboxClient.free_interface") def test_successful_edge_port_termination( diff --git a/test/workflows/edge_port/test_validate_edge_port.py b/test/workflows/edge_port/test_validate_edge_port.py index cda43407..9559f7f4 100644 --- a/test/workflows/edge_port/test_validate_edge_port.py +++ b/test/workflows/edge_port/test_validate_edge_port.py @@ -13,7 +13,7 @@ from test.workflows import ( @pytest.mark.workflow() -@patch("gso.workflows.edge_port.validate_edge_port.execute_playbook") +@patch("gso.services.lso_client._send_request") @patch("gso.services.netbox_client.NetboxClient.get_interface_by_name_and_device") def test_validate_edge_port_success( mock_get_interface_by_name_and_device, -- GitLab