aboutsummaryrefslogtreecommitdiffstats
path: root/heat/vFW_CNF_CDS/templates/cba-dev/run-vnf-ra.sh
blob: 2d64bac7755f22870d55317cf4efef57fdce2dad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/sh

# ============LICENSE_START=======================================================
# Copyright (C) 2020 Orange
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# ============LICENSE_END=========================================================

REQ_ID=`shuf -i 1-1000000 -n 1`
SUB_REQ_ID=$REQ_ID"-"`shuf -i 1-1000 -n 1`

curl --location --request POST 'http://localhost:8081/api/v1/execution-service/process' \
--header 'Authorization: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==' \
--header 'Content-Type: application/json' \
--data-raw '{
    "commonHeader": {
        "originatorId": "onap-me-cm-adapter",
        "requestId": "'$REQ_ID'",
        "subRequestId": "'$SUB_REQ_ID'"
    },
    "actionIdentifiers": {
        "blueprintName": "vFW_CNF_CDS",
        "blueprintVersion": "8.0.0",
        "actionName": "resource-assignment",
        "mode": "sync"
    },
    "payload": {
        "resource-assignment-request": {
            "template-prefix": [
                "vnf"
            ],
            "resolution-key": "ra-test-resolution",
            "resource-assignment-properties": {
                "vpg-management-port": 100,
                "aic-cloud-region": "RegionOne",
                "vnf-model-customization-uuid": "d73864db-1f6e-4e54-a533-a96773c926a4",
                "service-instance-id": "2afee7c4-8b16-4f2f-a567-48fb7948abcf",
                "vnf-id": "51274ece-55ca-4cbc-b7c4-0da0dcc65d38",
                "vnf_name": "sample-vnf-name",
                "k8s-rb-profile-namespace": "vfw-namespace",
                "k8s-rb-profile-k8s-version": "1.18.9",
                "int_private1_net_cidr" : "192.168.10.0/24",
                "int_private2_net_cidr" : "192.168.20.0/24",
                "onap_private_net_cidr" : "10.0.0.0/16",
                "private1-prefix-id" : 2,
                "private2-prefix-id" : 1
            }
        }
    }
}' | jq '.payload | .["resource-assignment-response"] | .["meshed-template"] | .vnf | fromjson | .["resource-accumulator-resolved-data"] '