From 8011ac8f32cc80db729b031d36046a491da9e719 Mon Sep 17 00:00:00 2001 From: ecaiyanlinux Date: Wed, 3 Feb 2021 11:10:23 +0100 Subject: [PATCH] Update scripts for ECS docker-compose deployment Support latest interface Use latest ECS image Signed-off-by: ecaiyanlinux Change-Id: I9f574f1973e0215252a6243a0b653468bb884087 Issue-ID: NONRTRIC-421 --- docker-compose/data/prepareEcsData.sh | 23 ++++++++++++++--------- docker-compose/data/testdata/ECS/EiProducer.json | 14 +++----------- docker-compose/data/testdata/ECS/EiType.json | 8 ++++++++ docker-compose/ecs/docker-compose.yaml | 2 +- 4 files changed, 26 insertions(+), 21 deletions(-) create mode 100644 docker-compose/data/testdata/ECS/EiType.json diff --git a/docker-compose/data/prepareEcsData.sh b/docker-compose/data/prepareEcsData.sh index 76b5a052..205fc8ce 100755 --- a/docker-compose/data/prepareEcsData.sh +++ b/docker-compose/data/prepareEcsData.sh @@ -37,47 +37,52 @@ echo "ECS status:" curl -skw " %{http_code}" $httpx://localhost:$ecs_port/status echo -e "\n" +# Create EiType +echo "Create EiType:" +curl -X PUT -skw %{http_code} $httpx://localhost:$ecs_port/ei-producer/v1/eitypes/type1 -H accept:application/json -H Content-Type:application/json --data-binary @testdata/ECS/EiType.json +echo -e "\n" + # Get EiTypes echo "Get EiTypes:" -curl -X GET -skw " %{http_code}" $httpx://localhost:$ecs_port/ei-producer/v1/eitypes -H Content-Type:application/json | jq +curl -X GET -skw %{http_code} $httpx://localhost:$ecs_port/ei-producer/v1/eitypes -H Content-Type:application/json | jq echo -e "\n" # Get Individual EiType echo "Get Individual EiType:" -curl -X GET -skw " %{http_code}" $httpx://localhost:$ecs_port/ei-producer/v1/eitypes/type1 -H Content-Type:application/json | jq +curl -X GET -skw %{http_code} $httpx://localhost:$ecs_port/ei-producer/v1/eitypes/type1 -H Content-Type:application/json | jq echo -e "\n" # Create EiProducer echo "Create EiProducer:" -curl -X PUT -skw " %{http_code}" $httpx://localhost:$ecs_port/ei-producer/v1/eiproducers/1 -H Content-Type:application/json --data-binary @testdata/ECS/EiProducer.json +curl -X PUT -skw %{http_code} $httpx://localhost:$ecs_port/ei-producer/v1/eiproducers/1 -H Content-Type:application/json --data-binary @testdata/ECS/EiProducer.json echo -e "\n" # Get EiProducers echo "Get EiProducers:" -curl -X GET -skw " %{http_code}" $httpx://localhost:$ecs_port/ei-producer/v1/eiproducers -H Content-Type:application/json | jq +curl -X GET -skw %{http_code} $httpx://localhost:$ecs_port/ei-producer/v1/eiproducers -H Content-Type:application/json | jq echo -e "\n" # Get Individual EiProducer echo "Get Individual EiProducer:" -curl -X GET -skw " %{http_code}" $httpx://localhost:$ecs_port/ei-producer/v1/eiproducers/1 -H Content-Type:application/json | jq +curl -X GET -skw %{http_code} $httpx://localhost:$ecs_port/ei-producer/v1/eiproducers/1 -H Content-Type:application/json | jq echo -e "\n" # Get Individual EiProducer Status echo "Get Individual EiProducer:" -curl -X GET -skw " %{http_code}" $httpx://localhost:$ecs_port/ei-producer/v1/eiproducers/1/status -H Content-Type:application/json | jq +curl -X GET -skw %{http_code} $httpx://localhost:$ecs_port/ei-producer/v1/eiproducers/1/status -H Content-Type:application/json | jq echo -e "\n" # Create EiJob echo "Create EiJob Of A Certain Type type1:" -curl -X PUT -skw " %{http_code}" $httpx://localhost:$ecs_port/A1-EI/v1/eijobs/job1 -H Content-Type:application/json --data-binary @testdata/ECS/EiJob.json +curl -X PUT -skw %{http_code} $httpx://localhost:$ecs_port/A1-EI/v1/eijobs/job1 -H Content-Type:application/json --data-binary @testdata/ECS/EiJob.json echo -e "\n" # Get EiJobs echo "Get EiJobs:" -curl -X GET -skw " %{http_code}" $httpx://localhost:$ecs_port/A1-EI/v1/eijobs -H Content-Type:application/json | jq +curl -X GET -skw %{http_code} $httpx://localhost:$ecs_port/A1-EI/v1/eijobs -H Content-Type:application/json | jq echo -e "\n" # Get Individual EiJob: echo "Get Individual EiJob:" -curl -X GET -skw " %{http_code}" $httpx://localhost:$ecs_port/A1-EI/v1/eijobs/job1 -H Content-Type:application/json | jq +curl -X GET -skw %{http_code} $httpx://localhost:$ecs_port/A1-EI/v1/eijobs/job1 -H Content-Type:application/json | jq echo -e "\n" \ No newline at end of file diff --git a/docker-compose/data/testdata/ECS/EiProducer.json b/docker-compose/data/testdata/ECS/EiProducer.json index bb9a1b3c..01d8eb5a 100644 --- a/docker-compose/data/testdata/ECS/EiProducer.json +++ b/docker-compose/data/testdata/ECS/EiProducer.json @@ -1,13 +1,5 @@ { - "supported_ei_types": [{ - "ei_type_identity": "type1", - "ei_job_data_schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "STD_Type1_1.0.0", - "description": "EI-Type 1", - "type": "object" - } - }], - "ei_job_callback_url": "http://producer:80/", - "ei_producer_supervision_callback_url": "http://producer:80/" + "supported_ei_types":["type1"], + "ei_job_callback_url": "https://producer-stub:8093/callbacks/job/prod-a", + "ei_producer_supervision_callback_url": "https://producer-stub:8093/callbacks/supervision/prod-a" } \ No newline at end of file diff --git a/docker-compose/data/testdata/ECS/EiType.json b/docker-compose/data/testdata/ECS/EiType.json new file mode 100644 index 00000000..073f0b4f --- /dev/null +++ b/docker-compose/data/testdata/ECS/EiType.json @@ -0,0 +1,8 @@ +{ + "ei_job_data_schema":{ + "$schema":"http://json-schema.org/draft-07/schema#", + "title":"STD_Type1_1.0.0", + "description":"EI-Type 1", + "type":"object" + } + } \ No newline at end of file diff --git a/docker-compose/ecs/docker-compose.yaml b/docker-compose/ecs/docker-compose.yaml index d33f3290..5cf391c5 100644 --- a/docker-compose/ecs/docker-compose.yaml +++ b/docker-compose/ecs/docker-compose.yaml @@ -22,7 +22,7 @@ networks: services: ecs: - image: nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-enrichment-coordinator-service:1.1.0 + image: nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-enrichment-coordinator-service:1.1.1 container_name: ecs networks: default: -- 2.16.6