Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | function usage { |
| 4 | echo "Usage: $0 <hostIp> <hostPort>" |
| 5 | } |
| 6 | |
| 7 | function 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 | } |
| 18 | if [ $# -lt 2 ] |
| 19 | then |
| 20 | usage |
| 21 | exit 2 |
| 22 | fi |
| 23 | |
| 24 | HOST_IP=$1 |
| 25 | HOST_PORT=$2 |
| 26 | |
| 27 | |
| 28 | deleteResource "org.openecomp.asdc.nodes.Connector.LAN_Connector" |
| 29 | deleteResource "org.openecomp.asdc.nodes.Connector.WAN_Connector" |
| 30 | deleteResource "org.openecomp.asdc.nodes.Connector" |
| 31 | deleteResource "org.openecomp.asdc.nodes.VNF" |
| 32 | deleteResource "org.openecomp.asdc.nodes.VNF_Container" |
| 33 | deleteResource "org.openecomp.asdc.nodes.Router" |
| 34 | deleteResource "org.openecomp.asdc.nodes.Root" |
| 35 | |
| 36 | |