From 5a47a26d819bdb9c064a099224db5fe994c9dc44 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Thu, 15 May 2025 15:00:52 +0000 Subject: [PATCH] Corrected agg-net-ctrl end-to-end test --- .../.gitlab-ci.yml | 13 ++-- .../data/agg-net-descriptor.json | 62 +++++++++---------- 2 files changed, 36 insertions(+), 39 deletions(-) diff --git a/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml b/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml index 1e9fe2203..c9124977b 100644 --- a/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml +++ b/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml @@ -17,20 +17,17 @@ end2end_test ofc25_camara_agg_net: timeout: 40m variables: TEST_NAME: 'ofc25-camara-agg-net-controller' - IP_NAME: 'ip' - IP_PORT: '9092' stage: end2end_test # Disable to force running it after all other tasks before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - HOST_IP=$(kubectl get nodes -o json | jq -r '.items[].status.addresses[] | select(.type=="InternalIP") | .address') - sed -i "s/IP_NET_IP/${HOST_IP}/g" src/tests/${TEST_NAME}/data/agg-net-descriptor.json - - sed -i "s/IP_NET_PORT/${IP_PORT}/g" src/tests/${TEST_NAME}/data/agg-net-descriptor.json - docker buildx build -t "${TEST_NAME}:latest" -f ./src/tests/${TEST_NAME}/Dockerfile . - - docker buildx build -t "${IP_NAME}:latest" -f ./src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/Dockerfile ./src/tests/tools/mock_ietf_l3vpn_sdn_ctrl + - docker buildx build -t "mock-ip-ctrl:latest" -f ./src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/Dockerfile ./src/tests/tools/mock_ietf_l3vpn_sdn_ctrl - docker rm -f ${TEST_NAME} || true - - docker rm -f ${IP_NAME} || true - - docker run -d --name ${IP_NAME} -p ${IP_PORT}:8443 ${IP_NAME}:latest + - docker rm -f mock-ip-ctrl || true + - docker run -d --name mock-ip-ctrl -p 8443:8443 mock-ip-ctrl:latest script: # Check MicroK8s is ready @@ -70,13 +67,13 @@ end2end_test ofc25_camara_agg_net: - kubectl --namespace tfs logs deployment/serviceservice -c server - kubectl --namespace tfs logs deployment/sliceservice -c server - kubectl --namespace tfs logs deployment/nbiservice -c server - - docker logs ${IP_NAME} + - docker logs mock-ip-ctrl # Destroy Scenario - kubectl delete namespaces tfs || true - docker rm -f ${TEST_NAME} || true - - docker rm -f ${IP_NAME} || true + - docker rm -f mock-ip-ctrl || true # Clean old docker images - docker images --filter="dangling=true" --quiet | xargs -r docker rmi diff --git a/src/tests/ofc25-camara-agg-net-controller/data/agg-net-descriptor.json b/src/tests/ofc25-camara-agg-net-controller/data/agg-net-descriptor.json index 5e0e612dd..29b4123e5 100644 --- a/src/tests/ofc25-camara-agg-net-controller/data/agg-net-descriptor.json +++ b/src/tests/ofc25-camara-agg-net-controller/data/agg-net-descriptor.json @@ -31,28 +31,28 @@ }, "name": "ip-net-controller", "device_type": "ip-sdn-controller", - "device_operational_status": 1, + "device_operational_status": "DEVICEOPERATIONALSTATUS_DISABLED", "device_drivers": [ - 13 + "DEVICEDRIVER_IETF_L3VPN" ], "device_config": { "config_rules": [ { - "action": 1, + "action": "CONFIGACTION_SET", "custom": { "resource_key": "_connect/address", "resource_value": "IP_NET_IP" } }, { - "action": 1, + "action": "CONFIGACTION_SET", "custom": { "resource_key": "_connect/port", - "resource_value": "IP_NET_PORT" + "resource_value": "8443" } }, { - "action": 1, + "action": "CONFIGACTION_SET", "custom": { "resource_key": "_connect/settings", "resource_value": { @@ -89,28 +89,28 @@ "uuid": "ip-net-controller" } }, - "device_operational_status": 1, + "device_operational_status": "DEVICEOPERATIONALSTATUS_DISABLED", "device_drivers": [ - 13 + "DEVICEDRIVER_IETF_L3VPN" ], "device_config": { "config_rules": [ { - "action": 1, + "action": "CONFIGACTION_SET", "custom": { "resource_key": "_connect/address", "resource_value": "127.0.0.1" } }, { - "action": 1, + "action": "CONFIGACTION_SET", "custom": { "resource_key": "_connect/port", "resource_value": "0" } }, { - "action": 1, + "action": "CONFIGACTION_SET", "custom": { "resource_key": "_connect/settings", "resource_value": { @@ -158,28 +158,28 @@ "uuid": "ip-net-controller" } }, - "device_operational_status": 1, + "device_operational_status": "DEVICEOPERATIONALSTATUS_DISABLED", "device_drivers": [ - 13 + "DEVICEDRIVER_IETF_L3VPN" ], "device_config": { "config_rules": [ { - "action": 1, + "action": "CONFIGACTION_SET", "custom": { "resource_key": "_connect/address", "resource_value": "127.0.0.1" } }, { - "action": 1, + "action": "CONFIGACTION_SET", "custom": { "resource_key": "_connect/port", "resource_value": "0" } }, { - "action": 1, + "action": "CONFIGACTION_SET", "custom": { "resource_key": "_connect/settings", "resource_value": { @@ -219,28 +219,28 @@ "uuid": "ip-net-controller" } }, - "device_operational_status": 1, + "device_operational_status": "DEVICEOPERATIONALSTATUS_DISABLED", "device_drivers": [ - 13 + "DEVICEDRIVER_IETF_L3VPN" ], "device_config": { "config_rules": [ { - "action": 1, + "action": "CONFIGACTION_SET", "custom": { "resource_key": "_connect/address", "resource_value": "127.0.0.1" } }, { - "action": 1, + "action": "CONFIGACTION_SET", "custom": { "resource_key": "_connect/port", "resource_value": "0" } }, { - "action": 1, + "action": "CONFIGACTION_SET", "custom": { "resource_key": "_connect/settings", "resource_value": { @@ -280,28 +280,28 @@ "uuid": "ip-net-controller" } }, - "device_operational_status": 1, + "device_operational_status": "DEVICEOPERATIONALSTATUS_DISABLED", "device_drivers": [ - 13 + "DEVICEDRIVER_IETF_L3VPN" ], "device_config": { "config_rules": [ { - "action": 1, + "action": "CONFIGACTION_SET", "custom": { "resource_key": "_connect/address", "resource_value": "127.0.0.1" } }, { - "action": 1, + "action": "CONFIGACTION_SET", "custom": { "resource_key": "_connect/port", "resource_value": "0" } }, { - "action": 1, + "action": "CONFIGACTION_SET", "custom": { "resource_key": "_connect/settings", "resource_value": { @@ -344,28 +344,28 @@ }, "device_type": "emu-datacenter", "device_drivers": [ - 0 + "DEVICEDRIVER_UNDEFINED" ], "device_endpoints": [], - "device_operational_status": 1, + "device_operational_status": "DEVICEOPERATIONALSTATUS_DISABLED", "device_config": { "config_rules": [ { - "action": 1, + "action": "CONFIGACTION_SET", "custom": { "resource_key": "_connect/address", "resource_value": "127.0.0.1" } }, { - "action": 1, + "action": "CONFIGACTION_SET", "custom": { "resource_key": "_connect/port", "resource_value": "0" } }, { - "action": 1, + "action": "CONFIGACTION_SET", "custom": { "resource_key": "_connect/settings", "resource_value": { -- GitLab