Add producer simulator in docker-compose file 13/5213/2
authorecaiyanlinux <martin.c.yan@est.tech>
Wed, 2 Dec 2020 11:50:02 +0000 (12:50 +0100)
committerecaiyanlinux <martin.c.yan@est.tech>
Wed, 2 Dec 2020 12:01:57 +0000 (13:01 +0100)
Signed-off-by: ecaiyanlinux <martin.c.yan@est.tech>
Issue-Id: NONRTRIC-347
Change-Id: Ia26d5c9041aa3c9d300bf17e574ee38d6bab195e

docker-compose/data/prepareEcsData.sh
docker-compose/data/testdata/ECS/EiJob.json
docker-compose/data/testdata/ECS/EiProducer.json
docker-compose/ecs/docker-compose.yml

index ff149c9..76b5a05 100755 (executable)
@@ -42,16 +42,16 @@ echo "Get EiTypes:"
 curl -X GET -skw " %{http_code}" $httpx://localhost:$ecs_port/ei-producer/v1/eitypes -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
-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
 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
+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
@@ -65,4 +65,19 @@ 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
+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
+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
+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
 echo -e "\n"
\ No newline at end of file
index de23e5f..003c70f 100644 (file)
@@ -2,7 +2,7 @@
     "eiTypeId": "type1",
     "jobResultUri": "https://ricsim_g3_1:8185/datadelivery",
     "jobOwner": "ricsim_g3_1",
-    "jobStatusNotificationUri": "https://callback-receiver:8091/callbacks/job1-status",
+    "jobStatusNotificationUri": "http://producer:80/",
     "jobDefinition": {
         "jobparam1": "value1_job1",
         "jobparam2": "value2_job1",
index 8cf45d5..bb9a1b3 100644 (file)
@@ -8,6 +8,6 @@
             "type": "object"
         }
     }],
-    "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"
+    "ei_job_callback_url": "http://producer:80/",
+    "ei_producer_supervision_callback_url": "http://producer:80/"
 }
\ No newline at end of file
index bb88a5a..f7d2f77 100644 (file)
@@ -41,3 +41,11 @@ services:
       - 8080:8080
       - 8082:8082
 
+  producer:
+    image: eexit/mirror-http-server
+    container_name: producer
+    networks:
+      - default
+    ports:
+      - 8088:80
+