Commit 49d71a9c authored by aticig's avatar aticig
Browse files

Adding powerdns scripts

parent ddd1ed1f
Loading
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
#!/bin/bash
echo "========================================================================"
echo "Downloading OSM packages"
echo "========================================================================"

git clone --recurse-submodules -j8 https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages.git
 No newline at end of file
+26 −0
Original line number Diff line number Diff line
#!/bin/bash

read -p "Enter ZONE:" ZONE

if [[ -z "$ZONE" ]]; then
   printf '%s\n' "No input entered"
   exit 1
else
   printf "You entered ZONE %s " "$ZONE"
   ls -l
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"
echo "========================================================================"
 No newline at end of file
+27 −0
Original line number Diff line number Diff line
#!/bin/bash

read -p "Enter replicaCount number to scale as number greater than 1:" NUM

if [[ -z "$NUM" ]]; then
   printf '%s\n' "No input entered"
   exit 1
else
   printf "You entered ZONE %s " "$NUM"
   ls -l
fi

echo "========================================================================"
echo "Scaling out"
echo "========================================================================"

SCALE_OUT_OP_ID=`osm ns-action --action_name upgrade --vnf_name $VNF_NAME  --kdu_name $KDU_NAME --params "{'replicaCount':$NUM,}" $PDNS_NS_NAME`

echo "========================================================================"
echo "Showing action status"
echo "========================================================================"
osm ns-op-show $PDNS_NS_NAME --literal | yq .operationState

echo "========================================================================"
echo "Showing replicaCount number"
echo "========================================================================"
osm vnf-show $VNF_ID --kdu $KDU_NAME | yq .config.replicaCount
+18 −0
Original line number Diff line number Diff line
#!/bin/bash

echo "========================================================================"
echo "Rolling back"
echo "========================================================================"

SCALE_IN_OP_ID=`osm ns-action --action_name rollback --vnf_name $VNF_NAME --kdu_name $KDU_NAME $PDNS_NS_NAME`

echo "========================================================================"
echo "Showing action status"
echo "========================================================================"

osm ns-op-show $SCALE_IN_OP_ID --literal | yq .operationState

echo "========================================================================"
echo "Showing replicaCount number"
echo "========================================================================"
osm vnf-show $VNF_ID --kdu $KDU_NAME | yq .config.replicaCount
 No newline at end of file
+10 −0
Original line number Diff line number Diff line
#!/bin/bash

echo "========================================================================"
echo "Adding Helm Repository"
echo "========================================================================"
osm repo-add --type helm-chart --description "Repository for Powerdns helm Chart" osm-helm https://gatici.github.io/helm-repo/
echo "========================================================================"
echo "Listing Helm Repository"
echo "========================================================================"
osm helm-repo list
 No newline at end of file
Loading