summaryrefslogtreecommitdiffstats
path: root/bin/opscp
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2016-01-29 16:23:34 -0500
committerKenny Woodson <kwoodson@redhat.com>2016-01-29 16:23:34 -0500
commitc44eafff52cf5ac862f3f3f8eee115ee991bc599 (patch)
tree7c6b918bceeaadb4dcfe4061df7d3a7936a26148 /bin/opscp
parent3d72d46b4e5447b80100464da4aa7ac0fa111a3c (diff)
parent303305a3789d65e026db01f318647a036ddfa5ef (diff)
downloadopenshift-c44eafff52cf5ac862f3f3f8eee115ee991bc599.tar.gz
openshift-c44eafff52cf5ac862f3f3f8eee115ee991bc599.tar.bz2
openshift-c44eafff52cf5ac862f3f3f8eee115ee991bc599.tar.xz
openshift-c44eafff52cf5ac862f3f3f8eee115ee991bc599.zip
Merge pull request #1313 from kwoodson/ohi_ips
ohi supports ip now.
Diffstat (limited to 'bin/opscp')
-rwxr-xr-xbin/opscp46
1 files changed, 33 insertions, 13 deletions
diff --git a/bin/opscp b/bin/opscp
index 391cb6696..4bfe166f6 100755
--- a/bin/opscp
+++ b/bin/opscp
@@ -13,7 +13,10 @@ Options:
-p PAR, --par=PAR max number of parallel threads (OPTIONAL)
--outdir=OUTDIR output directory for stdout files (OPTIONAL)
--errdir=ERRDIR output directory for stderr files (OPTIONAL)
+ -c CLUSTER, --cluster CLUSTER
+ which cluster to use
-e ENV, --env ENV which environment to use
+ --v3 When working with v3 environments. v2 by default
-t HOST_TYPE, --host-type HOST_TYPE
which host type to use
--list-host-types list all of the host types
@@ -61,12 +64,23 @@ while [ $# -gt 0 ] ; do
shift # get past the value of the option
;;
+ -c)
+ shift # get past the option
+ CLUSTER=$1
+ shift # get past the value of the option
+ ;;
+
-e)
shift # get past the option
ENV=$1
shift # get past the value of the option
;;
+ --v3)
+ OPENSHIFT_VERSION="--v3 --ip"
+ shift # get past the value of the option
+ ;;
+
--timeout)
shift # get past the option
TIMEOUT=$1
@@ -103,20 +117,26 @@ while [ $# -gt 0 ] ; do
done
# Get host list from ohi
-if [ -n "$ENV" -a -n "$HOST_TYPE" ] ; then
- HOSTS="$(ohi -t "$HOST_TYPE" -e "$ENV" 2>/dev/null)"
- OHI_ECODE=$?
-elif [ -n "$ENV" ] ; then
- HOSTS="$(ohi -e "$ENV" 2>/dev/null)"
- OHI_ECODE=$?
-elif [ -n "$HOST_TYPE" ] ; then
- HOSTS="$(ohi -t "$HOST_TYPE" 2>/dev/null)"
+CMD=""
+if [ -n "$CLUSTER" ] ; then
+ CMD="$CMD -c $CLUSTER"
+fi
+
+if [ -n "$ENV" ] ; then
+ CMD="$CMD -e $ENV"
+fi
+
+if [ -n "$HOST_TYPE" ] ; then
+ CMD="$CMD -t $HOST_TYPE"
+fi
+
+if [ -n "$OPENSHIFT_VERSION" ] ; then
+ CMD="$CMD $OPENSHIFT_VERSION"
+fi
+
+if [ -n "$CMD" ] ; then
+ HOSTS="$(ohi $CMD 2>/dev/null)"
OHI_ECODE=$?
-else
- echo
- echo "Error: either -e or -t must be specified"
- echo
- exit 10
fi
if [ $OHI_ECODE -ne 0 ] ; then