aboutsummaryrefslogtreecommitdiffstats
path: root/kud
diff options
context:
space:
mode:
authorRitu Sood <Ritu.Sood@intel.com>2020-08-14 22:57:11 +0000
committerGerrit Code Review <gerrit@onap.org>2020-08-14 22:57:11 +0000
commit6e5ca4741dab0de3b4d89f410f0ff9d0313d6aee (patch)
tree6f4dbbdf8c13944cf5b95d2d59fd565ebee778b9 /kud
parent6e671649f67e9bbe2ebdea18efa18e9c2c506946 (diff)
parent709d6d17a3b2f8bc9d46034295bd7c5a7fb76107 (diff)
Merge "Add appcontext state, status and resource status"
Diffstat (limited to 'kud')
-rwxr-xr-xkud/tests/gctxt.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/kud/tests/gctxt.sh b/kud/tests/gctxt.sh
new file mode 100755
index 00000000..71d8c895
--- /dev/null
+++ b/kud/tests/gctxt.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+# Simple script to view appcontext
+# with no argumnet, it will list all keys under /context/
+# with 1 argument, it will show the value of the key provided
+# note: assumes emoco services are running in namespace emco
+if [ "$#" -ne 1 ] ; then
+ kubectl -n emco exec `kubectl get pods -lapp=etcd -n emco --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}'` -it -- etcdctl get /context/ --prefix=true --keys-only=true
+else
+if [ "$1" == "del" ] ; then
+ kubectl -n emco exec `kubectl get pods -lapp=etcd -n emco --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}'` -it -- etcdctl del /context/ --prefix=true
+else
+ kubectl -n emco exec `kubectl get pods -lapp=etcd -n emco --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}'` -it -- etcdctl get $1 --prefix=true
+fi
+fi