From 7008edca4bf3031f49b3bf1bc57893f85a630710 Mon Sep 17 00:00:00 2001 From: Pantelis Malekas Date: Wed, 16 Sep 2026 09:43:40 +0000 Subject: [PATCH] fix: use create organization response for peering request --- scripts/peering_dev.sh | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/scripts/peering_dev.sh b/scripts/peering_dev.sh index 01c4fc2..9336c4a 100755 --- a/scripts/peering_dev.sh +++ b/scripts/peering_dev.sh @@ -27,7 +27,7 @@ fi GITLAB_TOKEN="$1" PROJECT_ID="1672" FILE_PATH="peering%2F$2.json" -REF="main" +REF="develop" API_URL="https://labs.etsi.org/rep/api/v4/projects/482/repository/files/src%2Ftest%2Fresources%2Fpayloads%2Forganization%2Fcreate-organization.json/raw?ref=$REF" @@ -38,29 +38,25 @@ echo "$response" > data.json TARGET_ENDPOINT="http://$NODE_IP:30088/tmf-api/party/v4/organization" -response=$(curl -s -X POST "$TARGET_ENDPOINT" \ +CREATE_ORG_RESPONSE=$(curl -s -X POST "$TARGET_ENDPOINT" \ -H "Authorization: Bearer $ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d @data.json ) -echo $response +echo "$CREATE_ORG_RESPONSE" echo -e "\n\n" sleep 3 -ORG_JSON=$(curl -s \ - --header "PRIVATE-TOKEN: $GITLAB_TOKEN" \ - "$API_URL") - PAYLOAD=$(jq -n \ - --argjson organization "$ORG_JSON" \ + --argjson organization "$CREATE_ORG_RESPONSE" \ '{ organization: $organization, serviceSpecs: { "c04f3d66-5350-49ea-8b31-ff325f149232": "K8aaS", - "dca55236-93ca-4ae0-b1ae-07f7a081dd17": "K8aaS-OCM", + "dca55236-93ca-4ae0-b1ae-07f7a081dd17": "K8aaS-OCM" }, peeredSpecs: {}, serviceCatalogs: [] -- GitLab