Update INFO.yaml with new PTL
[demo.git] / tutorials / ApacheCNF / templates / cba-dev / run-vnf-upgrade-config.sh
1 #!/bin/sh
2
3 # ============LICENSE_START=======================================================
4 # Copyright (C) 2022 Deutche Telekom AG
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-upgrade-$ACTION'",
37         "mode": "sync"
38     },
39     "payload": {
40        "'config-upgrade-$ACTION-request'": {
41            "resolution-key": "VF_apache_k8s_demo_CNF",
42            "'config-upgrade-$ACTION-properties'": {
43                "service-instance-id": "5e6c49cc-e569-4eb9-bc9e-f7ce0ffb798f",
44                "service-model-uuid": "0997c40e-63b7-419d-a13b-6a5ce97334bb",
45                "vnf-id": "935fe87e-9bbd-4828-add2-d90196f5f382",
46                "vnf-name": "Instance_apache-3_0",
47                "vnf-customization-uuid": "6b6ff775-a170-4ce4-bcd0-85645d738390"
48            }
49         }
50     }
51 }' | jq '.payload | .["'config-upgrade-$ACTION-response'"]'
52