aboutsummaryrefslogtreecommitdiffstats
path: root/tutorials/vFWDT/playbooks/configure_ansible.sh
diff options
context:
space:
mode:
authorLukasz Rajewski <lukasz.rajewski@orange.com>2020-02-19 15:14:25 +0100
committerLukasz Rajewski <lukasz.rajewski@orange.com>2020-02-20 10:10:06 +0100
commit42ecc70c1f5a05c4de5dda414a7964398552b47d (patch)
tree5ad135e7775c72b09de6a57ccef8cc623f82a52a /tutorials/vFWDT/playbooks/configure_ansible.sh
parent7e52797291d42161a2e43e18040616fe1f7b31bd (diff)
APPC CDT Automation
The patch modifies vFWDT configuration scripts in order to automate the configuration of APPC artifacts instead of CDT. As a result it makes use case closer for CSIT automation Change-Id: I5ab2785093515ee0b224c8f3e8a5d9eb600e52f9 Issue-ID: APPC-1731 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com>
Diffstat (limited to 'tutorials/vFWDT/playbooks/configure_ansible.sh')
-rwxr-xr-xtutorials/vFWDT/playbooks/configure_ansible.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/tutorials/vFWDT/playbooks/configure_ansible.sh b/tutorials/vFWDT/playbooks/configure_ansible.sh
index 5c197963..c49153f8 100755
--- a/tutorials/vFWDT/playbooks/configure_ansible.sh
+++ b/tutorials/vFWDT/playbooks/configure_ansible.sh
@@ -17,6 +17,32 @@
#
# ============LICENSE_END=========================================================
+if [ ! -f playbooks/onap.pem ]; then
+ echo "onap.pem file does not exist"
+ exit
+fi
+
+K8S_NODE_IP=`kubectl get nodes -o=wide | grep 01 | awk {'print $6'}`
+
+CDT_REQ_DIR="workflow/templates/cdt-requests"
+
+echo "APPC Artifacts configuration"
+
+for f in $CDT_REQ_DIR/*.json; do
+ echo ""
+ echo "Uploading $f"
+ RES=`curl -k -s -X POST -H "Content-Type: application/json" -d @$f https://$K8S_NODE_IP:30211/cdtService/getDesigns`
+ echo "$RES"
+
+ if [[ $RES != *'"code":"400","message":"success"'* ]]; then
+ echo "CDT Artifact Upload failed"
+ exit
+ fi
+done
+
+echo "APPC Artifacts configuration completed"
+
+echo "APPC Ansible configuration"
ANSIBLE=`kubectl get pods -o go-template --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}' | grep appc-ansible`
echo $ANSIBLE