From c563c53d0a808c842fd8952bd1acd7a8be07dcd2 Mon Sep 17 00:00:00 2001 From: Ravi Pendurty Date: Tue, 14 Oct 2025 13:28:04 +0530 Subject: [PATCH] Include docker IPs Reference to Host IPs removed Issue-ID: OAM-522 Change-Id: I9f4a94b54d5309be3e55af9e2317e1076baa92b8 Signed-off-by: Ravi Pendurty --- .github/workflows/gerrit-verify.yaml | 4 +-- CICD/bin/setup.sh | 36 +++++++++++++-------------- CICD/src/TestPlanModel.py | 4 +-- CICD/testplans/001/CREATE-MOUNTPOINT-TLS.json | 4 +-- CICD/testplans/002/CREATE-MOUNTPOINT-SSH.json | 4 +-- 5 files changed, 26 insertions(+), 26 deletions(-) diff --git a/.github/workflows/gerrit-verify.yaml b/.github/workflows/gerrit-verify.yaml index 15bf4cc..bbe8182 100644 --- a/.github/workflows/gerrit-verify.yaml +++ b/.github/workflows/gerrit-verify.yaml @@ -98,7 +98,7 @@ jobs: DOCKER_ARTIFACTS_TO_SAVE: "o-ran-sc/oam-oam-controller/sdnr-image:latest o-ran-sc/oam-oam-controller/sdnr-web-image:latest" deploy-test: - needs: [maven-verify, sanitize] + needs: [prepare, sanitize, maven-verify] runs-on: ubuntu-latest steps: - name: Download docker artifacts @@ -138,7 +138,7 @@ jobs: vote: if: ${{ always() }} # yamllint enable rule:line-length - needs: [prepare, maven-verify] + needs: [prepare, maven-verify, deploy-test] runs-on: ubuntu-latest steps: - name: Get conclusion diff --git a/CICD/bin/setup.sh b/CICD/bin/setup.sh index 47db5c9..1b0a6ef 100755 --- a/CICD/bin/setup.sh +++ b/CICD/bin/setup.sh @@ -43,16 +43,16 @@ log() { } cleanup() { - log "## Deleting any running/stopped docker containers ##\n" + log "## Deleting any running/stopped docker containers ##" container_names=$(docker ps --format {{.Names}}) if [[ "$container_names" != "" ]]; then docker rm -f $(docker ps -aq) fi - log "## Checking if docker network with name - ${DOCKER_NETWORK_NAME} - exists ##\n" + log "## Checking if docker network with name - ${DOCKER_NETWORK_NAME} - exists ##" docker_nw=$(docker network ls --filter name=^${DOCKER_NETWORK_NAME}$ --format {{.Name}}) if [[ "$docker_nw" != "" ]]; then - log "## Docker network with name ${DOCKER_NETWORK_NAME} exists. Deleting it ...##\n" + log "## Docker network with name ${DOCKER_NETWORK_NAME} exists. Deleting it ...##" docker network rm ${DOCKER_NETWORK_NAME} else log "## Docker network with name ${DOCKER_NETWORK_NAME} DOES NOT exist ##" @@ -69,48 +69,48 @@ cleanup() { } build_pynts_images() { - log "## Start Building PyNTS ... ##\n" - log "## Cloning PyNTS simulator from https://github.com/o-ran-sc/sim-o1-ofhmp-interfaces ##\n" + log "## Start Building PyNTS ... ##" + log "## Cloning PyNTS simulator from https://github.com/o-ran-sc/sim-o1-ofhmp-interfaces ##" git clone https://github.com/o-ran-sc/sim-o1-ofhmp-interfaces.git ${TMPDIR}/sim-o1-ofhmp-interfaces cd ${TMPDIR}/sim-o1-ofhmp-interfaces make if [ $? = 0 ]; then - log "\n## Build of PyNTS Successful ##\n" - log "## Following docker images were built ##\n" + log "## Build of PyNTS Successful ##" + log "## Following docker images were built ##" docker images | grep pynts else - log "\n### Build failed ###\n" + log "### Build failed ###" exit 1 fi } create_docker_network() { - log "\n## Creating docker network - ${DOCKER_NETWORK_NAME} ##\n" + log "## Creating docker network - ${DOCKER_NETWORK_NAME} ##" docker network create --subnet ${DOCKER_NETWORK_SUB} --gateway ${DOCKER_NETWORK_GW} ${DOCKER_NETWORK_NAME} } start_pynts() { - log "## Overwriting file - docker-compose-o-ru-mplane.yaml - with custom file ##\n" + log "## Overwriting file - docker-compose-o-ru-mplane.yaml - with custom file ##" cp ${CONFIGDIR}/${CUSTOM_O_RU_MPLANE_DC_FILE} ${TMPDIR}/sim-o1-ofhmp-interfaces cp ${CONFIGDIR}/${CUSTOM_O_RU_MPLANE_SSH_CALLHOME} ${TMPDIR}/sim-o1-ofhmp-interfaces/o-ru-mplane/data cp ${CONFIGDIR}/${CUSTOM_O_RU_MPLANE_TLS_CALLHOME} ${TMPDIR}/sim-o1-ofhmp-interfaces/o-ru-mplane/data cp ${CONFIGDIR}/${CUSTOM_O_RU_MPLANE_TLS_NON_CALLHOME} ${TMPDIR}/sim-o1-ofhmp-interfaces/o-ru-mplane/data - log "## Starting PyNTS simulator ##\n" + log "## Starting PyNTS simulator ##" docker compose -f ${TMPDIR}/sim-o1-ofhmp-interfaces/${CUSTOM_O_RU_MPLANE_DC_FILE} up -d } start_sdnr_components() { - log "## Starting SDNR Components (MARIADB, SDNR, SDNC-WEB) ##\n" - log "## Copying certs directory to $TMPDIR ##\n" + log "## Starting SDNR Components (MARIADB, SDNR, SDNC-WEB) ##" + log "## Copying certs directory to $TMPDIR ##" cp -r ${CONFIGDIR}/certs ${TMPDIR} - log "## Copying sdnr directory to $TMPDIR ##\n" + log "## Copying sdnr directory to $TMPDIR ##" cp -r ${CONFIGDIR}/sdnr ${TMPDIR} - log "## Copying sdnc-web directory to $TMPDIR ##\n" + log "## Copying sdnc-web directory to $TMPDIR ##" cp -r ${CONFIGDIR}/sdnc-web ${TMPDIR} - log "## Copying docker compose file to $TMPDIR ##\n" + log "## Copying docker compose file to $TMPDIR ##" cp ${CONFIGDIR}/${SDNR_COMPONENTS_DC_FILE} ${TMPDIR} cd ${TMPDIR} - docker-compose -f ${TMPDIR}/${SDNR_COMPONENTS_DC_FILE} --env-file ${CONFIGDIR}/.env up -d + docker compose -f ${TMPDIR}/${SDNR_COMPONENTS_DC_FILE} --env-file ${CONFIGDIR}/.env up -d cd ${ROOTDIR} } @@ -119,7 +119,7 @@ start_test_suite() { } #Main -log "## Starting CI/CD ##\n" +log "## Starting CI/CD ##" cleanup mkdir $TMPDIR build_pynts_images diff --git a/CICD/src/TestPlanModel.py b/CICD/src/TestPlanModel.py index 83cb796..9882768 100644 --- a/CICD/src/TestPlanModel.py +++ b/CICD/src/TestPlanModel.py @@ -53,10 +53,10 @@ class TestPlan(BaseModel): return self.cleanup.req_type def get_input_url(self): - return self.cleanup.req_endpoint + return self.input.req_endpoint def get_input_req_type(self): - return self.cleanup.req_type + return self.input.req_type def get_input_payload_file(self): return self.input.req_payload_file diff --git a/CICD/testplans/001/CREATE-MOUNTPOINT-TLS.json b/CICD/testplans/001/CREATE-MOUNTPOINT-TLS.json index d97ee22..846d5d0 100644 --- a/CICD/testplans/001/CREATE-MOUNTPOINT-TLS.json +++ b/CICD/testplans/001/CREATE-MOUNTPOINT-TLS.json @@ -3,8 +3,8 @@ { "node-id": "CICD-NON-CALLHOME-TLS-NODE", "netconf-node-topology:netconf-node": { - "port": 65131, - "host": "10.20.11.161", + "port": 6513, + "host": "172.18.0.11", "key-based": { "username": "netconf", "key-id": "ODL_private_key_1" diff --git a/CICD/testplans/002/CREATE-MOUNTPOINT-SSH.json b/CICD/testplans/002/CREATE-MOUNTPOINT-SSH.json index 142f564..3131da5 100644 --- a/CICD/testplans/002/CREATE-MOUNTPOINT-SSH.json +++ b/CICD/testplans/002/CREATE-MOUNTPOINT-SSH.json @@ -3,8 +3,8 @@ { "node-id": "CICD-NON-CALLHOME-SSH-NODE", "netconf-node-topology:netconf-node": { - "port": 8300, - "host": "10.20.11.161", + "port": 830, + "host": "172.18.0.10", "login-password-unencrypted": { "username": "netconf", "password": "netconf!" -- 2.16.6