Update call-home integration tests
[integration/test.git] / csit / variables / netconf / callhome / whitelist_add.sh
diff --git a/csit/variables/netconf/callhome/whitelist_add.sh b/csit/variables/netconf/callhome/whitelist_add.sh
deleted file mode 100755 (executable)
index ef569aa..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/bash
-
-# This script is called within the docker-compose to get the public RSA key of the
-# device(callhome client) and provision the controller.
-
-set -e
-
-key3="$(cat /etc/ssh/ssh_host_rsa_key.pub)"
-parts=($key3)
-hostkey=${parts[1]}
-id=$1
-controller=ODL_SYSTEM_IP
-echo "Adding key for ${id} to ${controller}"
-echo "Found host key: ${hostkey}"
-
-port=8181
-basicauth="YWRtaW46YWRtaW4="
-
-set +e
-read -r -d '' payload << EOM
-{
-    "device": [
-        {
-            "ssh-host-key": "${hostkey}",
-            "unique-id": "${id}"
-        }
-     ]
-}
-EOM
-set -e
-
-payload=$(echo "${payload}" | tr '\n' ' ' | tr -s " ")
-
-url="http://${controller}:${port}/restconf/config/odl-netconf-callhome-server:netconf-callhome-server/allowed-devices"
-
-echo "POST to whitelist"
-res=$(curl -s -X POST -H "Authorization: Basic ${basicauth}" \
-      -H "Content-Type: application/json" \
-      -H "Cache-Control: no-cache" \
-      -H "Postman-Token: 656d7e0d-2f48-5135-3569-06b2a27a709d" \
-      --data "${payload}" \
-      ${url})
-echo $res
-if [[ $res == *"data-exists"* ]]; then
-  echo "Whitelist already has that entry."
-fi