diff --git a/Hackfest_Demos/OSM-MR13/2.1-KNF/powerdns-scripts/11-scale-out.sh b/Hackfest_Demos/OSM-MR13/2.1-KNF/powerdns-scripts/11-scale-out.sh index 4946f65c86dedf6704159717756568c5872cf03e..79db1ed557740f3e6ad06d428729c5bcfd77556f 100755 --- a/Hackfest_Demos/OSM-MR13/2.1-KNF/powerdns-scripts/11-scale-out.sh +++ b/Hackfest_Demos/OSM-MR13/2.1-KNF/powerdns-scripts/11-scale-out.sh @@ -1,13 +1,17 @@ #!/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 diff --git a/Hackfest_Demos/OSM-MR13/2.1-KNF/powerdns-scripts/12-scale-in.sh b/Hackfest_Demos/OSM-MR13/2.1-KNF/powerdns-scripts/12-scale-in.sh index ccd19e87c74cdb15fd6274e79d9e99da6885c326..c4ffd84ea83acb8d9c6328e7cbd1da071c1b2024 100755 --- a/Hackfest_Demos/OSM-MR13/2.1-KNF/powerdns-scripts/12-scale-in.sh +++ b/Hackfest_Demos/OSM-MR13/2.1-KNF/powerdns-scripts/12-scale-in.sh @@ -1,5 +1,10 @@ #!/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