blob: bdd8de7758e9ab0ec8b32dbec08802dd69451931 [file] [log] [blame]
k.kedron14edec92021-04-26 12:22:08 +02001#!/bin/bash
k.kedron2d26d2a2021-08-19 10:51:05 +02002# Copyright (C) 2021 by Samsung Electronics Co., Ltd.
k.kedron14edec92021-04-26 12:22:08 +02003#
k.kedron2d26d2a2021-08-19 10:51:05 +02004# 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.kedron14edec92021-04-26 12:22:08 +020013
14#
15# Onboards CDS model into CDS runtime. CDS model package file is called CBA (CDS Model Package).
16#
17set -e
18
19# Parameters
20# $1 Path to cba zip file (Optional)
21# $2 Kubernetes node ip (Optional)
22
23
24CBA_ZIP=${1:-../examples/vnf/vnf-simulator-for-onap-me/cds/cba/onap-me-cba.zip}
25if [[ "$1" == "" ]]; then
26 echo "CBA zip not provided. Using default: ${CBA_ZIP}"
27fi
28NODE_IP=${2:-$(../common/k8s_get_node_ip.sh)}
29curl -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}