summaryrefslogtreecommitdiffstats
path: root/kud
diff options
context:
space:
mode:
authorEric Multanen <eric.w.multanen@intel.com>2020-05-27 11:21:42 -0700
committerEric Multanen <eric.w.multanen@intel.com>2020-06-03 17:15:58 -0700
commit8e7a20777f2100324526a34b4b6c943b512df0fb (patch)
treeeca4847a8361da6f3f97a363f8d65d8a3c6a08b2 /kud
parent0c22bafd470e36647157b6d01221cb17841f360a (diff)
Move cluster management into its own microservice
Split out the cluster provider and cluster APIs and packages into a separate microservice to align with the architecture. Issue-ID: MULTICLOUD-1029 Signed-off-by: Eric Multanen <eric.w.multanen@intel.com> Change-Id: I08f357b5a488004a2389b72a178ae33e101d1540
Diffstat (limited to 'kud')
-rwxr-xr-xkud/tests/ncm-test.sh43
-rwxr-xr-xkud/tests/plugin_ncm_v2.sh2
2 files changed, 23 insertions, 22 deletions
diff --git a/kud/tests/ncm-test.sh b/kud/tests/ncm-test.sh
index 78069b14..7eb83dfc 100755
--- a/kud/tests/ncm-test.sh
+++ b/kud/tests/ncm-test.sh
@@ -5,7 +5,8 @@ set -o pipefail
source _functions.sh
-base_url=${base_url:-"http://localhost:9016/v2"}
+base_url_clm=${base_url:-"http://localhost:9019/v2"}
+base_url_ncm=${base_url:-"http://localhost:9016/v2"}
# ncm data samples
clusterprovidername="cluster-provider-a"
@@ -144,41 +145,41 @@ EOF
function createNcmData {
- call_api -d "${clusterproviderdata}" "${base_url}/cluster-providers"
- call_api -H "Content-Type: multipart/form-data" -F "metadata=$clusterdata" -F "file=@$kubeconfigfile" "${base_url}/cluster-providers/${clusterprovidername}/clusters"
- call_api -d "${labeldata}" "${base_url}/cluster-providers/${clusterprovidername}/clusters/${clustername}/labels"
- call_api -d "${kvdata}" "${base_url}/cluster-providers/${clusterprovidername}/clusters/${clustername}/kv-pairs"
- call_api -d "${providernetworkdata}" "${base_url}/cluster-providers/${clusterprovidername}/clusters/${clustername}/provider-networks"
- call_api -d "${networkdata}" "${base_url}/cluster-providers/${clusterprovidername}/clusters/${clustername}/networks"
+ call_api -d "${clusterproviderdata}" "${base_url_clm}/cluster-providers"
+ call_api -H "Content-Type: multipart/form-data" -F "metadata=$clusterdata" -F "file=@$kubeconfigfile" "${base_url_clm}/cluster-providers/${clusterprovidername}/clusters"
+ call_api -d "${labeldata}" "${base_url_clm}/cluster-providers/${clusterprovidername}/clusters/${clustername}/labels"
+ call_api -d "${kvdata}" "${base_url_clm}/cluster-providers/${clusterprovidername}/clusters/${clustername}/kv-pairs"
+ call_api -d "${providernetworkdata}" "${base_url_ncm}/cluster-providers/${clusterprovidername}/clusters/${clustername}/provider-networks"
+ call_api -d "${networkdata}" "${base_url_ncm}/cluster-providers/${clusterprovidername}/clusters/${clustername}/networks"
}
# apply the network and providernetwork to an appcontext and instantiate with resource synchronizer (when implemented)
function applyNcmData {
- call_api -d "{ }" "${base_url}/cluster-providers/${clusterprovidername}/clusters/${clustername}/apply"
+ call_api -d "{ }" "${base_url_ncm}/cluster-providers/${clusterprovidername}/clusters/${clustername}/apply"
}
# deletes the appcontext (eventually will terminate from resource synchronizer when that funcationality is ready)
function terminateNcmData {
- call_api -d "{ }" "${base_url}/cluster-providers/${clusterprovidername}/clusters/${clustername}/terminate"
+ call_api -d "{ }" "${base_url_ncm}/cluster-providers/${clusterprovidername}/clusters/${clustername}/terminate"
}
function getNcmData {
- call_api "${base_url}/cluster-providers/${clusterprovidername}" | jq .
- call_api -H "Accept: application/json" "${base_url}/cluster-providers/${clusterprovidername}/clusters/${clustername}" | jq .
- call_api "${base_url}/cluster-providers/${clusterprovidername}/clusters?label=${labelname}" | jq .
- call_api "${base_url}/cluster-providers/${clusterprovidername}/clusters/${clustername}/kv-pairs/${kvname}" | jq .
- call_api "${base_url}/cluster-providers/${clusterprovidername}/clusters/${clustername}/networks/${networkname}" | jq .
- call_api "${base_url}/cluster-providers/${clusterprovidername}/clusters/${clustername}/provider-networks/${providernetworkname}" | jq .
+ call_api "${base_url_clm}/cluster-providers/${clusterprovidername}" | jq .
+ call_api -H "Accept: application/json" "${base_url_clm}/cluster-providers/${clusterprovidername}/clusters/${clustername}" | jq .
+ call_api "${base_url_clm}/cluster-providers/${clusterprovidername}/clusters?label=${labelname}" | jq .
+ call_api "${base_url_clm}/cluster-providers/${clusterprovidername}/clusters/${clustername}/kv-pairs/${kvname}" | jq .
+ call_api "${base_url_ncm}/cluster-providers/${clusterprovidername}/clusters/${clustername}/networks/${networkname}" | jq .
+ call_api "${base_url_ncm}/cluster-providers/${clusterprovidername}/clusters/${clustername}/provider-networks/${providernetworkname}" | jq .
}
function deleteNcmData {
- call_api -X DELETE "${base_url}/cluster-providers/${clusterprovidername}/clusters/${clustername}/networks/${networkname}"
- call_api -X DELETE "${base_url}/cluster-providers/${clusterprovidername}/clusters/${clustername}/provider-networks/${providernetworkname}"
- call_api -X DELETE "${base_url}/cluster-providers/${clusterprovidername}/clusters/${clustername}/labels/${labelname}"
- call_api -X DELETE "${base_url}/cluster-providers/${clusterprovidername}/clusters/${clustername}/kv-pairs/${kvname}"
- call_api -X DELETE "${base_url}/cluster-providers/${clusterprovidername}/clusters/${clustername}"
- call_api -X DELETE "${base_url}/cluster-providers/${clusterprovidername}"
+ call_api -X DELETE "${base_url_ncm}/cluster-providers/${clusterprovidername}/clusters/${clustername}/networks/${networkname}"
+ call_api -X DELETE "${base_url_ncm}/cluster-providers/${clusterprovidername}/clusters/${clustername}/provider-networks/${providernetworkname}"
+ call_api -X DELETE "${base_url_clm}/cluster-providers/${clusterprovidername}/clusters/${clustername}/labels/${labelname}"
+ call_api -X DELETE "${base_url_clm}/cluster-providers/${clusterprovidername}/clusters/${clustername}/kv-pairs/${kvname}"
+ call_api -X DELETE "${base_url_clm}/cluster-providers/${clusterprovidername}/clusters/${clustername}"
+ call_api -X DELETE "${base_url_clm}/cluster-providers/${clusterprovidername}"
}
function usage {
diff --git a/kud/tests/plugin_ncm_v2.sh b/kud/tests/plugin_ncm_v2.sh
index 579fda31..92f93ad3 100755
--- a/kud/tests/plugin_ncm_v2.sh
+++ b/kud/tests/plugin_ncm_v2.sh
@@ -23,7 +23,7 @@ source _common_test.sh
source _functions.sh
source _common.sh
-base_url=${base_url:-"http://localhost:9016/v2"}
+base_url=${base_url:-"http://localhost:9019/v2"}
kubeconfig_path="$HOME/.kube/config"