Commit 53b61109 authored by aticig's avatar aticig
Browse files

Fixing Powerdns scaling scripts


Signed-off-by: aticig's avatarGulsum Atici <gulsum.atici@canonical.com>
parent 60634832
Pipeline #7682 failed with stage
in 1 minute and 31 seconds
#!/bin/bash
read -p "Enter replicaCount number to scale as number greater than 1:" NUM
export PDNS_NS_NAME=powerdns_ns
export VNF_NAME=powerdns
export KDU_NAME=powerdns
export VNF_ID=`osm vnf-list --ns $PDNS_NS_NAME | grep powerdns | awk '{print $2}'`
read -p "Enter replicaCount number to scale as number:" NUM
if [[ -z "$NUM" ]]; then
printf '%s\n' "No input entered"
exit 1
else
printf "You entered ZONE %s " "$NUM"
ls -l
printf "You entered NUM %s " "$NUM"
fi
echo "========================================================================"
......@@ -17,11 +21,13 @@ 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 "Check the action status using osm ns-op-show $SCALE_OUT_OP_ID --literal | yq .operationState"
echo "Showing action status"
echo "========================================================================"
osm ns-op-show $PDNS_NS_NAME --literal | yq .operationState
osm ns-op-show $SCALE_OUT_OP_ID --literal | yq .operationState
echo "========================================================================"
echo "Check the replicaCount using osm vnf-show $VNF_ID --kdu $KDU_NAME | yq .config.replicaCount"
echo "Showing replicaCount number"
echo "========================================================================"
osm vnf-show $VNF_ID --kdu $KDU_NAME | yq .config.replicaCount
#!/bin/bash
export PDNS_NS_NAME=powerdns_ns
export VNF_NAME=powerdns
export KDU_NAME=powerdns
export VNF_ID=`osm vnf-list --ns $PDNS_NS_NAME | grep powerdns | awk '{print $2}'`
echo "========================================================================"
echo "Rolling back"
echo "========================================================================"
......@@ -7,12 +12,14 @@ echo "========================================================================"
SCALE_IN_OP_ID=`osm ns-action --action_name rollback --vnf_name $VNF_NAME --kdu_name $KDU_NAME $PDNS_NS_NAME`
echo "========================================================================"
echo "Check the action status using osm ns-op-show $SCALE_IN_OP_ID"
echo "Showing action status"
echo "========================================================================"
osm ns-op-show $SCALE_IN_OP_ID --literal | yq .operationState
echo "========================================================================"
echo "Check the replicatCount number using osm vnf-show $VNF_ID --kdu $KDU_NAME | yq .config.replicaCount"
echo "Showing replicaCount number"
echo "========================================================================"
osm vnf-show $VNF_ID --kdu $KDU_NAME | yq .config.replicaCount
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment