3 # ============LICENSE_START===============================================
4 # Copyright (C) 2021 Nordix Foundation. All rights reserved.
5 # ========================================================================
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17 # ============LICENSE_END=================================================
20 # This script will generate some dummy information data in the running system.
22 # one EiProducer in ICS
26 ics_host="informationservice"
31 curl -skw " %{http_code}" $httpx://$ics_host:$ics_port/status
36 curl -X PUT -skw %{http_code} $httpx://$ics_host:$ics_port/data-producer/v1/info-types/type1 -H accept:application/json -H Content-Type:application/json --data-binary @testdata/ICS/EiType.json
41 curl -X GET -skw %{http_code} $httpx://$ics_host:$ics_port/data-producer/v1/info-types -H Content-Type:application/json
44 # Get Individual EiType
45 echo "Get Individual EiType:"
46 curl -X GET -skw %{http_code} $httpx://$ics_host:$ics_port/data-producer/v1/info-types/type1 -H Content-Type:application/json
50 echo "Create EiProducer:"
51 curl -X PUT -skw %{http_code} $httpx://$ics_host:$ics_port/data-producer/v1/info-producers/1 -H Content-Type:application/json --data-binary @testdata/ICS/EiProducer.json
55 echo "Get EiProducers:"
56 curl -X GET -skw %{http_code} $httpx://$ics_host:$ics_port/data-producer/v1/info-producers -H Content-Type:application/json
59 # Get Individual EiProducer
60 echo "Get Individual EiProducer:"
61 curl -X GET -skw %{http_code} $httpx://$ics_host:$ics_port/data-producer/v1/info-producers/1 -H Content-Type:application/json
64 # Get Individual EiProducer Status
65 echo "Get Individual EiProducer:"
66 curl -X GET -skw %{http_code} $httpx://$ics_host:$ics_port/data-producer/v1/info-producers/1/status -H Content-Type:application/json
70 echo "Create EiJob Of A Certain Type type1:"
71 curl -X PUT -skw %{http_code} $httpx://$ics_host:$ics_port/data-consumer/v1/info-jobs/job1 -H Content-Type:application/json --data-binary @testdata/ICS/EiJob.json
76 curl -X GET -skw %{http_code} $httpx://$ics_host:$ics_port/data-consumer/v1/info-jobs -H Content-Type:application/json
79 # Get Individual EiJob:
80 echo "Get Individual EiJob:"
81 curl -X GET -skw %{http_code} $httpx://$ics_host:$ics_port/data-consumer/v1/info-jobs/job1 -H Content-Type:application/json