Update INFO.yaml with new PTL
[demo.git] / tutorials / ApacheCNF / templates / cba-dev / run-vnf-config.sh
1 #!/bin/sh
2
3 # ============LICENSE_START=======================================================
4 # Copyright (C) 2021 Orange
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
9 #
10 #      http://www.apache.org/licenses/LICENSE-2.0
11 #
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 #
18 # ============LICENSE_END=========================================================
19
20 REQ_ID=`shuf -i 1-1000000 -n 1`
21 SUB_REQ_ID=$REQ_ID"-"`shuf -i 1-1000 -n 1`
22 ACTION=$1
23
24 curl --location --request POST 'http://localhost:8081/api/v1/execution-service/process' \
25 --header 'Authorization: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==' \
26 --header 'Content-Type: application/json' \
27 --data-raw '{
28     "commonHeader": {
29         "originatorId": "onap-me-cm-adapter",
30         "requestId": "'$REQ_ID'",
31         "subRequestId": "'$SUB_REQ_ID'"
32     },
33     "actionIdentifiers": {
34         "blueprintName": "APACHE",
35         "blueprintVersion": "1.0.0",
36         "actionName": "'config-$ACTION'",
37         "mode": "sync"
38     },
39     "payload": {
40        "'config-$ACTION-request'": {
41            "resolution-key": "VF_apache_k8s_demo_CNF",
42            "'config-$ACTION-properties'": {
43                "service-instance-id": "2a2de3ec-35a4-4e1d-b313-ac5c4c8813a8",
44                "vnf-id": "6b6ff775-a170-4ce4-bcd0-85645d738390"
45            }
46         }
47     }
48 }' | jq '.payload | .["'config-$ACTION-response'"]'
49