k.kedron | 14edec9 | 2021-04-26 12:22:08 +0200 | [diff] [blame] | 1 | #!/bin/bash |
k.kedron | 2d26d2a | 2021-08-19 10:51:05 +0200 | [diff] [blame] | 2 | # Copyright (C) 2021 by Samsung Electronics Co., Ltd. |
k.kedron | 14edec9 | 2021-04-26 12:22:08 +0200 | [diff] [blame] | 3 | # |
k.kedron | 2d26d2a | 2021-08-19 10:51:05 +0200 | [diff] [blame] | 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # Unless required by applicable law or agreed to in writing, software |
| 9 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 10 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 11 | # See the License for the specific language governing permissions and |
| 12 | # limitations under the License |
k.kedron | 14edec9 | 2021-04-26 12:22:08 +0200 | [diff] [blame] | 13 | |
| 14 | # |
| 15 | # Onboards CDS model into CDS runtime. CDS model package file is called CBA (CDS Model Package). |
| 16 | # |
| 17 | set -e |
| 18 | |
| 19 | # Parameters |
| 20 | # $1 Path to cba zip file (Optional) |
| 21 | # $2 Kubernetes node ip (Optional) |
| 22 | |
| 23 | |
| 24 | CBA_ZIP=${1:-../examples/vnf/vnf-simulator-for-onap-me/cds/cba/onap-me-cba.zip} |
| 25 | if [[ "$1" == "" ]]; then |
| 26 | echo "CBA zip not provided. Using default: ${CBA_ZIP}" |
| 27 | fi |
| 28 | NODE_IP=${2:-$(../common/k8s_get_node_ip.sh)} |
| 29 | curl -X POST http://${NODE_IP}:30499/api/v1/blueprint-model/publish -H 'content-type: multipart/form-data' -H 'Authorization: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==' -F file=@${CBA_ZIP} |