Loading Hackfest_Demos/OSM-MR13/2.1-KNF/powerdns-scripts/1-git-clone.sh 0 → 100644 +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 Hackfest_Demos/OSM-MR13/2.1-KNF/powerdns-scripts/10-delete-zone.sh 0 → 100644 +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 Hackfest_Demos/OSM-MR13/2.1-KNF/powerdns-scripts/11-scale-out.sh 0 → 100644 +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 Hackfest_Demos/OSM-MR13/2.1-KNF/powerdns-scripts/12-scale-in.sh 0 → 100644 +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 Hackfest_Demos/OSM-MR13/2.1-KNF/powerdns-scripts/2-add-helm-repo.sh 0 → 100644 +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
Hackfest_Demos/OSM-MR13/2.1-KNF/powerdns-scripts/1-git-clone.sh 0 → 100644 +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
Hackfest_Demos/OSM-MR13/2.1-KNF/powerdns-scripts/10-delete-zone.sh 0 → 100644 +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
Hackfest_Demos/OSM-MR13/2.1-KNF/powerdns-scripts/11-scale-out.sh 0 → 100644 +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
Hackfest_Demos/OSM-MR13/2.1-KNF/powerdns-scripts/12-scale-in.sh 0 → 100644 +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
Hackfest_Demos/OSM-MR13/2.1-KNF/powerdns-scripts/2-add-helm-repo.sh 0 → 100644 +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