X-Git-Url: https://gerrit.onap.org/r/gitweb?p=demo.git;a=blobdiff_plain;f=tutorials%2FApacheCNF%2Ftemplates%2Fcba-dev%2Frun-vnf-ra.sh;fp=tutorials%2FApacheCNF%2Ftemplates%2Fcba-dev%2Frun-vnf-ra.sh;h=9cf4c2a4887e91a37ecc7474fcf839b0c67e2d0d;hp=0000000000000000000000000000000000000000;hb=a112ebd160d3acc20e6766d8550d757a0581797d;hpb=f491b9fa0e1f5481065f9071aca469180635778e diff --git a/tutorials/ApacheCNF/templates/cba-dev/run-vnf-ra.sh b/tutorials/ApacheCNF/templates/cba-dev/run-vnf-ra.sh new file mode 100644 index 00000000..9cf4c2a4 --- /dev/null +++ b/tutorials/ApacheCNF/templates/cba-dev/run-vnf-ra.sh @@ -0,0 +1,57 @@ +#!/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": "APACHE", + "blueprintVersion": "1.0.0", + "actionName": "resource-assignment", + "mode": "sync" + }, + "payload": { + "resource-assignment-request": { + "template-prefix": [ + "vnf" + ], + "resolution-key": "ra-test-resolution", + "resource-assignment-properties": { + "replica-count": 2, + "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" + } + } + } +}' | jq '.payload | .["resource-assignment-response"] | .["meshed-template"] | .vnf | fromjson | .["resource-accumulator-resolved-data"] ' +