1461475e2d3e23986ddc08eedaa290fa7e37f9f6
[demo.git] / heat / vFW_CNF_CDS / 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": "vFW_CNF_CDS",
35         "blueprintVersion": "7.0.0",
36         "actionName": "'config-$ACTION'",
37         "mode": "sync"
38     },
39     "payload": {
40        "'config-$ACTION-request'": {
41            "resolution-key": "VF_vfw_k8s_demo_CNF_KUD-6",
42            "'config-$ACTION-properties'": {
43                "service-instance-id": "889670f7-ed49-41b0-a251-b43e9a035811",
44                "service-model-uuid": "bea61c93-1a90-426b-9fbe-6024bde48419",
45                "vnf-id": "317f28f3-37b4-40c8-8062-e93fda15db99",
46                "vnf-name": "VF_vfw_k8s_demo_CNF_KUD",
47                "vnf-customization-uuid": "2793ba6f-332d-4694-8f8e-0b1f2ec3a732"
48            }
49         }
50     }
51 }' | jq '.payload | .["'config-$ACTION-response'"]'
52