From c592b44263ed1160fd93ba9afa8ef6c988a999e7 Mon Sep 17 00:00:00 2001 From: Boris Glimcher Date: Thu, 12 Oct 2023 23:56:21 +0300 Subject: [PATCH] fix: 7080 was used for both redirecter and bootstrap usally it's ok since they run in different containers but if somebody wants to use host network, better to have them separate Signed-off-by: Boris Glimcher --- docker-compose.yml | 2 +- scripts/tests.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 866903e4..eb22c0d2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -29,7 +29,7 @@ services: context: sztp-server environment: SZTPD_INIT_PORT: 6080 - SZTPD_NBI_PORT: 7080 + SZTPD_NBI_PORT: 7070 SZTPD_SBI_PORT: 8080 SZTPD_INIT_MODE: 1 SZTPD_ACCEPT_CONTRACT: "Yes" diff --git a/scripts/tests.sh b/scripts/tests.sh index 3f73c186..463214b1 100755 --- a/scripts/tests.sh +++ b/scripts/tests.sh @@ -29,7 +29,7 @@ docker-compose exec -T client cat /var/lib/dhclient/dhclient.leases | grep sztp- REDIRECT=$(docker-compose exec -T client cat /var/lib/dhclient/dhclient.leases | grep sztp-redirect-urls | head -n 1 | awk '{print $3}' | tr -d '";') # read back to check configuration was set -docker-compose exec -T bootstrap curl -i --user my-admin@example.com:my-secret -H "Accept:application/yang-data+json" http://redirecter:7080/restconf/ds/ietf-datastores:running +docker-compose exec -T redirecter curl -i --user my-admin@example.com:my-secret -H "Accept:application/yang-data+json" http://redirecter:7070/restconf/ds/ietf-datastores:running # request onboarding info (like a DPU or IPU device would) and see it is redirect docker-compose run -T agent curl -X POST --data @/tmp/input.json -H "Content-Type:application/yang-data+json" --user my-serial-number:my-secret --key /private_key.pem --cert /my_cert.pem --cacert /opi.pem "${REDIRECT}" | tee /tmp/post_rpc_input.json