base_url="http://localhost:9015"
#Will resolve to file $KUBE_CONFIG_DIR/kud
cloud_region_id="kud"
+cloud_region_owner="test_owner"
namespace="testns"
csar_id="94e414f6-9ca4-11e8-bb6a-52540067263b"
rb_name="test-rbdef"
exit 1
fi
+print_msg "Setup cloud data"
+payload="$(cat <<EOF
+{
+ "cloud-region": "$cloud_region_id",
+ "cloud-owner": "$cloud_region_owner"
+}
+EOF
+)"
+if ! curl -sf -F "metadata=$payload" \
+ -F "file=@$HOME/.kube/config" \
+ "${base_url}/v1/connectivity-info"; then
+ echo "Unsuccessful register of cloud region"
+ exit 1
+fi
+
print_msg "Instantiate Profile"
payload_raw="
{
exit 1
fi
+print_msg "Deleting ${cloud_region_id} cloud region connection"
+if ! curl -w "%{http_code}" -X DELETE -sf \
+ "${base_url}/v1/connectivity-info/${cloud_region_id}"; then
+ echo "Failed to delete cloud region connection"
+ #DELETE on /v1/connectivity-info/{region} currently doesn't return non 2**
+ #https code no matter if region has been deleted, or there was no entry
+ exit 1
+fi
+
# Teardown
teardown $plugin_deployment_name