diff --git a/src/device/service/drivers/xr/README_XR.md b/src/device/service/drivers/xr/README_XR.md index f7c2316ce5fa810969d373e1fad7bc5ca83b9e49..3bfdf5b019b3c36e7ded09d58ac625a48add36a9 100644 --- a/src/device/service/drivers/xr/README_XR.md +++ b/src/device/service/drivers/xr/README_XR.md @@ -110,7 +110,7 @@ Upload descriptors_emulatex_xr.json via WEB UI to setup fake topology. Setup service by following commands in src directory. Kubernetes endpoins change on every build, so setup script is mandatory. ```bash - source tests/ofc22/setup_test_env.sh + source device/service/drivers/xr/setup_test_env.sh python -m pytest --verbose tests/ofc22/tests/test_functional_create_service_xr.py ``` diff --git a/src/device/service/drivers/xr/cm/cm_connection.py b/src/device/service/drivers/xr/cm/cm_connection.py index 7e0fc61b72e7028fae00886cea4dcb2f922bfbf4..b4aee586668e842b372c3aa7b87240c5041c8118 100644 --- a/src/device/service/drivers/xr/cm/cm_connection.py +++ b/src/device/service/drivers/xr/cm/cm_connection.py @@ -61,7 +61,14 @@ class HttpResult: def __str__(self): status_code = self.status_code if self.status_code is not None else "<not executed>" - return f"{self.method} {self.url} {self.params}, status {status_code}" + if self.text: + if len(self.text) > 1024: + body_text = self.text[:1024] + "..." + else: + body_text = self.text + else: + body_text = "NONE" + return f"{self.method} {self.url} {self.params}, status {status_code}, body {body_text}" def process_http_response(self, response: requests.Response, permit_empty_body:bool = False): LOGGER.info(f"process_http_response(): {self.method}: {self.url} qparams={self.params} ==> {response.status_code}") # FIXME: params diff --git a/src/device/service/drivers/xr/cm/connection.py b/src/device/service/drivers/xr/cm/connection.py index e88995842eb0b6266d4d8eb42e2cc3197d89bea1..088c743d50d6c04fd0688b5c6318e35eae4d7dc0 100644 --- a/src/device/service/drivers/xr/cm/connection.py +++ b/src/device/service/drivers/xr/cm/connection.py @@ -79,6 +79,9 @@ class Connection: state = from_json["state"] self.name = state["name"] if "name" in state else None #Name is optional self.serviceMode = state["serviceMode"] + # Implicit transport capacity is a string, where value "none" has special meaning. + # So "none" is correct value, not "None" for missing attribute + self.implicitTransportCapacity = config["implicitTransportCapacity"] if "implicitTransportCapacity" in config else "none" self.mc = config["mc"] if "mc" in config else None self.vlan_filter = state["outerVID"] if "outerVID" in state else None self.href = from_json["href"] @@ -100,12 +103,15 @@ class Connection: # VLANs to interface names. Correspondingly cm-cli user has to know # to use VLANs on low level test APIs when using VTI mode. self.serviceMode = self.__guess_service_mode_from_emulated_enpoints() - if self.serviceMode == "portMode": + if self.serviceMode == "XR-L1": self.vlan_filter = None self.mc = None + self.implicitTransportCapacity ="portMode" else: self.vlan_filter = str(self.__guess_vlan_id()) + " " # Needs to be in string format, can contain ranges, regexp is buggy, trailin space is needed for single VLAN self.mc = "matchOuterVID" + # String "none" has a special meaning for implicitTransportCapacity + self.implicitTransportCapacity ="none" self.cm_data = None else: @@ -120,8 +126,8 @@ class Connection: def __guess_service_mode_from_emulated_enpoints(self): for ep in self.endpoints: if ep.vlan is not None: - return "vtiP2pSymmetric" - return "portMode" + return "XR-VTI-P2P" + return "XR-L1" def __guess_vlan_id(self) -> int: vlans = [] @@ -140,6 +146,7 @@ class Connection: cfg = {} set_optional_parameter(cfg, "name", self.name) cfg["serviceMode"] = self.serviceMode + cfg["implicitTransportCapacity"] = self.implicitTransportCapacity if self.endpoints: cfg["endpoints"] = [ep.create_config() for ep in self.endpoints] set_optional_parameter(cfg, "outerVID", self.vlan_filter) diff --git a/src/device/service/drivers/xr/cm/tests/resources/connections-expanded.json b/src/device/service/drivers/xr/cm/tests/resources/connections-expanded.json index f9f064ea20c3764ad0a5e4d0d3dfb60b468c2556..f4ee31189cb0dc698d4d79420bef4a8df6874b0e 100644 --- a/src/device/service/drivers/xr/cm/tests/resources/connections-expanded.json +++ b/src/device/service/drivers/xr/cm/tests/resources/connections-expanded.json @@ -2,7 +2,8 @@ { "config": { "name": "FooBar123", - "serviceMode": "portMode" + "serviceMode": "XR-L1", + "implicitTransportCapacity": "portMode" }, "endpoints": [ { @@ -141,12 +142,14 @@ "createdBy": "host", "lifecycleState": "configured", "name": "FooBar123", - "serviceMode": "portMode" + "serviceMode": "XR-L1", + "implicitTransportCapacity": "portMode" } }, { "config": { - "serviceMode": "portMode" + "serviceMode": "XR-L1", + "implicitTransportCapacity": "portMode" }, "endpoints": [ { @@ -284,7 +287,8 @@ "state": { "createdBy": "host", "lifecycleState": "configured", - "serviceMode": "portMode" + "serviceMode": "XR-L1", + "implicitTransportCapacity": "portMode" } } ] \ No newline at end of file diff --git a/src/device/service/drivers/xr/cm/tests/resources/single-connection-2022-12.json b/src/device/service/drivers/xr/cm/tests/resources/single-connection-2022-12.json new file mode 100644 index 0000000000000000000000000000000000000000..d4c0262cdbcf68194ed831670ec3314d4b11a906 --- /dev/null +++ b/src/device/service/drivers/xr/cm/tests/resources/single-connection-2022-12.json @@ -0,0 +1,160 @@ +[ + { + "config": { + "implicitTransportCapacity": "portMode", + "name": "test2", + "serviceMode": "XR-L1" + }, + "endpoints": [ + { + "acs": [], + "config": { + "selector": { + "moduleIfSelectorByModuleName": { + "moduleClientIfAid": "XR-T2", + "moduleName": "XR HUB 1" + } + } + }, + "href": "/network-connections/38675444-3f08-4dbe-a9c4-523ef309a518/endpoints/4801ecf5-fe37-4b8e-864f-2a0409210cb0", + "id": "4801ecf5-fe37-4b8e-864f-2a0409210cb0", + "parentId": "38675444-3f08-4dbe-a9c4-523ef309a518", + "rt": [ + "cm.network-connection.endpoint" + ], + "state": { + "capacity": 100, + "hostPort": { + "chassisId": "192.168.100.1", + "chassisIdSubtype": "networkAddress", + "name": "", + "portDescr": "et-1/0/0:1", + "portId": "et-1/0/0:1", + "portIdSubtype": "interfaceName", + "portSourceMAC": "58:00:BB:00:00:12", + "sysName": "SanJose" + }, + "moduleIf": { + "clientIfAid": "XR-T2", + "clientIfColId": 2, + "clientIfPortSpeed": 100, + "currentRole": "hub", + "macAddress": "00:0B:F8:00:00:01", + "moduleId": "68c23c59-3bcf-4d35-7042-a4a2d8a73e3f", + "moduleName": "XR HUB 1", + "serialNumber": "000000009" + } + } + }, + { + "acs": [], + "config": { + "selector": { + "moduleIfSelectorByModuleName": { + "moduleClientIfAid": "XR-T1", + "moduleName": "XR LEAF 2" + } + } + }, + "href": "/network-connections/38675444-3f08-4dbe-a9c4-523ef309a518/endpoints/123fc228-59ed-423e-8537-c189f3434a38", + "id": "123fc228-59ed-423e-8537-c189f3434a38", + "parentId": "38675444-3f08-4dbe-a9c4-523ef309a518", + "rt": [ + "cm.network-connection.endpoint" + ], + "state": { + "capacity": 100, + "hostPort": { + "chassisId": "192.168.101.2", + "chassisIdSubtype": "networkAddress", + "name": "", + "portDescr": "et-0/0/0:0", + "portId": "et-0/0/0:0", + "portIdSubtype": "interfaceName", + "portSourceMAC": "58:00:BB:00:12:01", + "sysName": "Cupertino" + }, + "moduleIf": { + "clientIfAid": "XR-T1", + "clientIfColId": 1, + "clientIfPortSpeed": 100, + "currentRole": "leaf", + "macAddress": "00:0B:F8:00:01:02", + "moduleId": "095a7a6b-1f69-4d2e-5581-cdffbb85e40f", + "moduleName": "XR LEAF 2", + "serialNumber": "00000000C" + } + } + } + ], + "href": "/network-connections/38675444-3f08-4dbe-a9c4-523ef309a518", + "id": "38675444-3f08-4dbe-a9c4-523ef309a518", + "lcs": [ + { + "config": { + "clientAid": "XR-T2", + "direction": "txRx", + "dscgAid": "XRCARRIERDSCG-3", + "moduleId": "68c23c59-3bcf-4d35-7042-a4a2d8a73e3f" + }, + "href": "/lcs/0d5929d8-6498-4c54-b38b-43c6cb85a18b", + "id": "0d5929d8-6498-4c54-b38b-43c6cb85a18b", + "parentIds": [ + "38675444-3f08-4dbe-a9c4-523ef309a518" + ], + "rt": [ + "cm.network-connection.local-connection" + ], + "state": { + "clientAid": "XR-T2", + "colId": 2, + "direction": "txRx", + "dscgAid": "XRCARRIERDSCG-3", + "lcAid": "XRLC-3", + "lineAid": "", + "macAddress": "00:0B:F8:00:00:01", + "moduleId": "68c23c59-3bcf-4d35-7042-a4a2d8a73e3f", + "remoteClientId": "", + "remoteModuleId": "" + } + }, + { + "config": { + "clientAid": "XR-T1", + "direction": "txRx", + "dscgAid": "XRCARRIERDSCG-3", + "moduleId": "095a7a6b-1f69-4d2e-5581-cdffbb85e40f" + }, + "href": "/lcs/1d6cc8bf-de89-4950-a01d-4b4522c65f8c", + "id": "1d6cc8bf-de89-4950-a01d-4b4522c65f8c", + "parentIds": [ + "38675444-3f08-4dbe-a9c4-523ef309a518" + ], + "rt": [ + "cm.network-connection.local-connection" + ], + "state": { + "clientAid": "XR-T1", + "colId": 1, + "direction": "txRx", + "dscgAid": "XRCARRIERDSCG-3", + "lcAid": "XRLC-3", + "lineAid": "", + "macAddress": "00:0B:F8:00:01:02", + "moduleId": "095a7a6b-1f69-4d2e-5581-cdffbb85e40f", + "remoteClientId": "", + "remoteModuleId": "" + } + } + ], + "rt": [ + "cm.network-connection" + ], + "state": { + "createdBy": "cm", + "lifecycleState": "configured", + "name": "test2", + "serviceMode": "XR-L1" + } + } +] \ No newline at end of file diff --git a/src/device/service/drivers/xr/cm/tests/test_connection.py b/src/device/service/drivers/xr/cm/tests/test_connection.py index 0792033a34d029628a853b9383af8c8a2c6272ad..cf1f9f8744dd58a31c15fc28a7f8e893aa17fb97 100644 --- a/src/device/service/drivers/xr/cm/tests/test_connection.py +++ b/src/device/service/drivers/xr/cm/tests/test_connection.py @@ -29,21 +29,21 @@ def test_connection_json(): connection = Connection(j[0]) assert connection.name == "FooBar123" - assert "name: FooBar123, id: /network-connections/4505d5d3-b2f3-40b8-8ec2-4a5b28523c03, service-mode: portMode, end-points: [(XR LEAF 1|XR-T1, 0), (XR HUB 1|XR-T1, 0)]" == str(connection) + assert "name: FooBar123, id: /network-connections/4505d5d3-b2f3-40b8-8ec2-4a5b28523c03, service-mode: XR-L1, end-points: [(XR LEAF 1|XR-T1, 0), (XR HUB 1|XR-T1, 0)]" == str(connection) config = connection.create_config() - expected_config = {'name': 'FooBar123', 'serviceMode': 'portMode', 'endpoints': [{'selector': {'ifSelectorByModuleName': {'moduleName': 'XR LEAF 1', 'moduleClientIfAid': 'XR-T1'}}}, {'selector': {'ifSelectorByModuleName': {'moduleName': 'XR HUB 1', 'moduleClientIfAid': 'XR-T1'}}}]} + expected_config = {'name': 'FooBar123', 'serviceMode': 'XR-L1', 'implicitTransportCapacity': 'portMode', 'endpoints': [{'selector': {'moduleIfSelectorByModuleName': {'moduleName': 'XR LEAF 1', 'moduleClientIfAid': 'XR-T1'}}}, {'selector': {'moduleIfSelectorByModuleName': {'moduleName': 'XR HUB 1', 'moduleClientIfAid': 'XR-T1'}}}]} assert config == expected_config # Remove mandatory key from leaf endpoint. It will not be parsed, but hub endpoint will del j[0]["endpoints"][0]["state"]["moduleIf"]["clientIfAid"] connection = Connection(j[0]) - assert "name: FooBar123, id: /network-connections/4505d5d3-b2f3-40b8-8ec2-4a5b28523c03, service-mode: portMode, end-points: [(XR HUB 1|XR-T1, 0)]" == str(connection) + assert "name: FooBar123, id: /network-connections/4505d5d3-b2f3-40b8-8ec2-4a5b28523c03, service-mode: XR-L1, end-points: [(XR HUB 1|XR-T1, 0)]" == str(connection) # Remove Name, it is optional (although TF will always configure it) del j[0]["state"]["name"] connection = Connection(j[0]) - assert "name: <NO NAME>, id: /network-connections/4505d5d3-b2f3-40b8-8ec2-4a5b28523c03, service-mode: portMode, end-points: [(XR HUB 1|XR-T1, 0)]" == str(connection) + assert "name: <NO NAME>, id: /network-connections/4505d5d3-b2f3-40b8-8ec2-4a5b28523c03, service-mode: XR-L1, end-points: [(XR HUB 1|XR-T1, 0)]" == str(connection) # Remove mandatory key, will raise an exception del j[0]["state"] @@ -66,14 +66,14 @@ def test_connection_ep_change_compute(): new_connection = Connection(from_tf_service=TFService("FooBar123", "XR LEAF 1|XR-T1", "XR HUB 1|changed here", 0)) ep_deletes, ep_creates, ep_updates = new_connection.get_endpoint_updates(existing_connection) assert ep_deletes == ['/network-connections/4505d5d3-b2f3-40b8-8ec2-4a5b28523c03/endpoints/1d58ba8f-4d51-4213-83e1-97a0e0bdd388'] - assert ep_creates == [{'selector': {'ifSelectorByModuleName': {'moduleClientIfAid': 'changed here', 'moduleName': 'XR HUB 1'}}}] + assert ep_creates == [{'selector': {'moduleIfSelectorByModuleName': {'moduleClientIfAid': 'changed here', 'moduleName': 'XR HUB 1'}}}] assert not ep_updates # Change one of the endpoints and capacity new_connection = Connection(from_tf_service=TFService("FooBar123", "XR LEAF 1|XR-T1", "XR HUB 1|changed here", 125)) ep_deletes, ep_creates, ep_updates = new_connection.get_endpoint_updates(existing_connection) assert ep_deletes == ['/network-connections/4505d5d3-b2f3-40b8-8ec2-4a5b28523c03/endpoints/1d58ba8f-4d51-4213-83e1-97a0e0bdd388'] - assert ep_creates == [{'selector': {'ifSelectorByModuleName': {'moduleClientIfAid': 'changed here', 'moduleName': 'XR HUB 1'}}, "capacity": 125}] + assert ep_creates == [{'selector': {'moduleIfSelectorByModuleName': {'moduleClientIfAid': 'changed here', 'moduleName': 'XR HUB 1'}}, "capacity": 125}] assert ep_updates == [('/network-connections/4505d5d3-b2f3-40b8-8ec2-4a5b28523c03/endpoints/230516d0-7e38-44b1-b174-1ba7d4454ee6', {'capacity': 125})] # No change at all @@ -93,13 +93,13 @@ def test_connection_ep_change_compute(): def test_connection_from_service(): # Port mode connection = Connection(from_tf_service=TFService("FooBar123", "XR LEAF 1|XR-T1", "XR HUB 1|XR-T1", 0)) - assert connection.create_config() == {'name': 'TF:FooBar123', 'serviceMode': 'portMode', 'endpoints': [{'selector': {'ifSelectorByModuleName': {'moduleName': 'XR LEAF 1', 'moduleClientIfAid': 'XR-T1'}}}, {'selector': {'ifSelectorByModuleName': {'moduleName': 'XR HUB 1', 'moduleClientIfAid': 'XR-T1'}}}]} + assert connection.create_config() == {'name': 'TF:FooBar123', 'serviceMode': 'XR-L1', 'implicitTransportCapacity': 'portMode', 'endpoints': [{'selector': {'moduleIfSelectorByModuleName': {'moduleName': 'XR LEAF 1', 'moduleClientIfAid': 'XR-T1'}}}, {'selector': {'moduleIfSelectorByModuleName': {'moduleName': 'XR HUB 1', 'moduleClientIfAid': 'XR-T1'}}}]} # VTI mode connection = Connection(from_tf_service=TFService("FooBar123", "XR LEAF 1|XR-T1.A", "XR HUB 1|XR-T1.100", 0)) # In endpoint selectors VLANs are note present (CM does not know about them, encoding them to aids is purely internal to Teraflow) # However VLAN adds outerVID and some other fields - assert connection.create_config() == {'name': 'TF:FooBar123', 'serviceMode': 'vtiP2pSymmetric', 'endpoints': [{'selector': {'ifSelectorByModuleName': {'moduleName': 'XR LEAF 1', 'moduleClientIfAid': 'XR-T1'}}}, {'selector': {'ifSelectorByModuleName': {'moduleName': 'XR HUB 1', 'moduleClientIfAid': 'XR-T1'}}}], 'outerVID': '100 ', 'mc': 'matchOuterVID'} + assert connection.create_config() == {'name': 'TF:FooBar123', 'serviceMode': 'XR-VTI-P2P', 'implicitTransportCapacity': 'none', 'endpoints': [{'selector': {'moduleIfSelectorByModuleName': {'moduleName': 'XR LEAF 1', 'moduleClientIfAid': 'XR-T1'}}}, {'selector': {'moduleIfSelectorByModuleName': {'moduleName': 'XR HUB 1', 'moduleClientIfAid': 'XR-T1'}}}], 'outerVID': '100 ', 'mc': 'matchOuterVID'} # Invalid configuration, differring VLANs on different sides with pytest.raises(InconsistentVlanConfiguration) as _e_info: diff --git a/src/device/service/drivers/xr/cm/tests/test_transport_capacitity.py b/src/device/service/drivers/xr/cm/tests/test_transport_capacitity.py index cfdadae6a5e150e9890076dba0e657aea6fa3b1e..7ed085337ac25b1c6983f868de1374fff18633a7 100644 --- a/src/device/service/drivers/xr/cm/tests/test_transport_capacitity.py +++ b/src/device/service/drivers/xr/cm/tests/test_transport_capacitity.py @@ -34,7 +34,7 @@ def test_transport_capacity_json(): assert str(tc) == "name: Transport capacity service example, id: /transport-capacities/6ce3aa86-2685-44b0-9f86-49e6a6c991a8, capacity-mode: dedicatedDownlinkSymmetric, end-points: [(XR Device|XR T1, 100), (XR Device 2|XR T1, 100)]" config = tc.create_config() - assert config == {'config': {'name': 'Transport capacity service example'}, 'endpoints': [{'capacity': 100, 'selector': {'ifSelectorByModuleName': {'moduleName': 'XR Device', 'moduleClientIfAid': 'XR T1'}}}, {'capacity': 100, 'selector': {'ifSelectorByModuleName': {'moduleName': 'XR Device 2', 'moduleClientIfAid': 'XR T1'}}}]} + assert config == {'config': {'name': 'Transport capacity service example'}, 'endpoints': [{'capacity': 100, 'selector': {'moduleIfSelectorByModuleName': {'moduleName': 'XR Device', 'moduleClientIfAid': 'XR T1'}}}, {'capacity': 100, 'selector': {'moduleIfSelectorByModuleName': {'moduleName': 'XR Device 2', 'moduleClientIfAid': 'XR T1'}}}]} def test_transport_capacity_comparison(): # Same content must compare same diff --git a/src/device/service/drivers/xr/cm/utils.py b/src/device/service/drivers/xr/cm/utils.py index cdf9e58c348f572c1547bb392a8cddba7669d0b0..ad59dc6616f50023f923dac67025b0b5aa74cf16 100644 --- a/src/device/service/drivers/xr/cm/utils.py +++ b/src/device/service/drivers/xr/cm/utils.py @@ -43,7 +43,7 @@ def ifname_to_module_aid_vlan(ifname: str) -> Tuple[str, str, Optional[str]]: # state it has clientIfAid... def make_selector(mod, aid, _vlan) -> Dict[str, Any]: selector = { - "ifSelectorByModuleName": { + "moduleIfSelectorByModuleName": { "moduleName": mod, "moduleClientIfAid": aid, } diff --git a/src/device/service/drivers/xr/setup_test_env.sh b/src/device/service/drivers/xr/setup_test_env.sh new file mode 100755 index 0000000000000000000000000000000000000000..1f8b0a5a7a8dc986715c6f54a62151f6afa4ad80 --- /dev/null +++ b/src/device/service/drivers/xr/setup_test_env.sh @@ -0,0 +1,9 @@ +#!/bin/sh +export CONTEXTSERVICE_SERVICE_HOST=$(kubectl get service/contextservice --namespace tfs --template '{{.spec.clusterIP}}') +export CONTEXTSERVICE_SERVICE_PORT_GRPC=$(kubectl get service/contextservice --namespace tfs -o jsonpath='{.spec.ports[?(@.name=="grpc")].port}') +export COMPUTESERVICE_SERVICE_HOST=$(kubectl get service/computeservice --namespace tfs --template '{{.spec.clusterIP}}') +export COMPUTESERVICE_SERVICE_PORT_HTTP=$(kubectl get service/computeservice --namespace tfs -o jsonpath='{.spec.ports[?(@.name=="http")].port}') +echo "CONTEXTSERVICE_SERVICE_HOST=$CONTEXTSERVICE_SERVICE_HOST" +echo "CONTEXTSERVICE_SERVICE_PORT_GRPC=$CONTEXTSERVICE_SERVICE_PORT_GRPC" +echo "COMPUTESERVICE_SERVICE_HOST=$COMPUTESERVICE_SERVICE_HOST" +echo "COMPUTESERVICE_SERVICE_PORT_HTTP=$COMPUTESERVICE_SERVICE_PORT_HTTP" diff --git a/src/tests/ofc22/descriptors_emulated_xr.json b/src/tests/ofc22/descriptors_emulated_xr.json index 30bd97dddeb94f836d3fe66e51fce729c34ceced..4cb0dbfca891faebf4c812c2fbb77f4ecd91330a 100644 --- a/src/tests/ofc22/descriptors_emulated_xr.json +++ b/src/tests/ofc22/descriptors_emulated_xr.json @@ -9,8 +9,19 @@ "topologies": [ { "topology_id": {"topology_uuid": {"uuid": "admin"}, "context_id": {"context_uuid": {"uuid": "admin"}}}, - "device_ids": [], - "link_ids": [] + "device_ids": [ + {"device_uuid": {"uuid": "R1-EMU"}}, + {"device_uuid": {"uuid": "R2-EMU"}}, + {"device_uuid": {"uuid": "R3-EMU"}}, + {"device_uuid": {"uuid": "R4-EMU"}}, + {"device_uuid": {"uuid": "X1-XR-CONSTELLATION"}} + ], + "link_ids": [ + {"link_uuid": {"uuid": "R1-EMU/13/0/0==XR HUB 1|XR-T4"}}, + {"link_uuid": {"uuid": "R2-EMU/13/0/0==XR HUB 1|XR-T3"}}, + {"link_uuid": {"uuid": "R3-EMU/13/0/0==XR1-XR LEAF 1|XR-T1"}}, + {"link_uuid": {"uuid": "R4-EMU/13/0/0==XR LEAF 2|XR-T1"}} + ] } ], "devices": [ diff --git a/src/tests/ofc22/tests/test_functional_create_service_xr.py b/src/tests/ofc22/tests/test_functional_create_service_xr.py index bb78abc1efe7701308448ad4b83ef2a6e32079c4..6008eaa10702f0491742f6195a5fdf15735e5f14 100644 --- a/src/tests/ofc22/tests/test_functional_create_service_xr.py +++ b/src/tests/ofc22/tests/test_functional_create_service_xr.py @@ -20,7 +20,7 @@ from common.tools.object_factory.Connection import json_connection_id from common.tools.object_factory.Device import json_device_id from common.tools.object_factory.Service import json_service_id from common.tools.grpc.Tools import grpc_message_to_json_string -from compute.tests.mock_osm.MockOSM import MockOSM +from tests.tools.mock_osm.MockOSM import MockOSM from context.client.ContextClient import ContextClient from context.client.EventsCollector import EventsCollector from common.proto.context_pb2 import ContextId, Empty diff --git a/src/tests/ofc22/tests/test_functional_delete_service_xr.py b/src/tests/ofc22/tests/test_functional_delete_service_xr.py index f28828be056e755058a0f6b15bd8ea3e9acbbdeb..546a8781bee125dd48723c67cddd2aec26dc3ed9 100644 --- a/src/tests/ofc22/tests/test_functional_delete_service_xr.py +++ b/src/tests/ofc22/tests/test_functional_delete_service_xr.py @@ -20,7 +20,7 @@ from common.tools.object_factory.Connection import json_connection_id from common.tools.object_factory.Device import json_device_id from common.tools.object_factory.Service import json_service_id from common.tools.grpc.Tools import grpc_message_to_json_string -from compute.tests.mock_osm.MockOSM import MockOSM +from tests.tools.mock_osm.MockOSM import MockOSM from context.client.ContextClient import ContextClient from context.client.EventsCollector import EventsCollector from common.proto.context_pb2 import ContextId, Empty, ServiceTypeEnum