blob: 9f992d56dd3c84a0d5189c287efafa2ff2d571a0 [file] [log] [blame]
Michael Lando451a3402017-02-19 10:28:42 +02001#!/bin/bash
2
3function usage {
4 echo "Usage: $0 <hostIp> <hostPort>"
5}
6
7function deleteResource() {
8
9 ELEMENT_NAME=$1
10 echo "###################### Removing Element ${ELEMENT_NAME} Start ######################"
11 curl -X "DELETE" -H "USER_ID: jh0003" ${HOST_IP}:${HOST_PORT}/sdc2/rest/v1/catalog/resources/res_${ELEMENT_NAME}".1.0"
12 echo ""
13 echo "###################### Removing Element ${ELEMENT_NAME} End ########################"
14 echo ""
15 echo ""
16 echo ""
17}
18if [ $# -lt 2 ]
19then
20 usage
21 exit 2
22fi
23
24HOST_IP=$1
25HOST_PORT=$2
26
27
28deleteResource "org.openecomp.asdc.nodes.Connector.LAN_Connector"
29deleteResource "org.openecomp.asdc.nodes.Connector.WAN_Connector"
30deleteResource "org.openecomp.asdc.nodes.Connector"
31deleteResource "org.openecomp.asdc.nodes.VNF"
32deleteResource "org.openecomp.asdc.nodes.VNF_Container"
33deleteResource "org.openecomp.asdc.nodes.Router"
34deleteResource "org.openecomp.asdc.nodes.Root"
35
36