Skip to content
Snippets Groups Projects
10-delete-zone.sh 1 KiB
Newer Older
aticig's avatar
aticig committed
#!/bin/bash

Ubuntu's avatar
Ubuntu committed
export PDNS_NS_NAME=powerdns_ns
export VNF_NAME=powerdns
export KDU_NAME=powerdns

aticig's avatar
aticig committed
read -p "Enter ZONE:" ZONE

if [[ -z "$ZONE" ]]; then
   printf '%s\n' "No input entered"
   exit 1
else
   printf "You entered ZONE %s " "$ZONE"
fi
echo "========================================================================"
echo "Deleting Zone"
echo "========================================================================"

DEL_ZONE_OP_ID=`osm ns-action --action_name delete-zone --vnf_name $KDU_NAME --kdu_name $KDU_NAME  --params "{'zone_name': $ZONE}" $PDNS_NS_NAME`
echo "========================================================================"
echo "Showing action status"
echo "========================================================================"

osm ns-op-show $DEL_ZONE_OP_ID


echo "========================================================================"
echo "Check the action status using osm ns-op-show $DEL_ZONE_OP_ID"
Ubuntu's avatar
Ubuntu committed
echo "========================================================================"