X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=tutorials%2FApacheCNF%2Ftemplates%2Fcba-dev%2Frun-vnf-upgrade-config.sh;fp=tutorials%2FApacheCNF%2Ftemplates%2Fcba-dev%2Frun-vnf-upgrade-config.sh;h=2f35847a6bb1be6052ca7d8e9211de819b2a2698;hb=5e393641f0320a69f5fc699e38993b6d017accf8;hp=0000000000000000000000000000000000000000;hpb=a08df0177e60b85c7dd437433d716889a8d5d214;p=demo.git diff --git a/tutorials/ApacheCNF/templates/cba-dev/run-vnf-upgrade-config.sh b/tutorials/ApacheCNF/templates/cba-dev/run-vnf-upgrade-config.sh new file mode 100755 index 00000000..2f35847a --- /dev/null +++ b/tutorials/ApacheCNF/templates/cba-dev/run-vnf-upgrade-config.sh @@ -0,0 +1,52 @@ +#!/bin/sh + +# ============LICENSE_START======================================================= +# Copyright (C) 2022 Deutche Telekom AG +# ================================================================================ +# 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` +ACTION=$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": "'config-upgrade-$ACTION'", + "mode": "sync" + }, + "payload": { + "'config-upgrade-$ACTION-request'": { + "resolution-key": "VF_apache_k8s_demo_CNF", + "'config-upgrade-$ACTION-properties'": { + "service-instance-id": "5e6c49cc-e569-4eb9-bc9e-f7ce0ffb798f", + "service-model-uuid": "0997c40e-63b7-419d-a13b-6a5ce97334bb", + "vnf-id": "935fe87e-9bbd-4828-add2-d90196f5f382", + "vnf-name": "Instance_apache-3_0", + "vnf-customization-uuid": "6b6ff775-a170-4ce4-bcd0-85645d738390" + } + } + } +}' | jq '.payload | .["'config-upgrade-$ACTION-response'"]' +