diff options
author | 2016-09-13 11:40:12 +0800 | |
---|---|---|
committer | 2016-09-13 11:41:53 +0800 | |
commit | b731e2f1dd0972409b136aebc7b463dd72c9cfad (patch) | |
tree | 5107d7d80c19ad8076c2c97c2b5ef8d1cf3ab903 /framework/src/onos/tools/package/bin/onos-form-cluster | |
parent | ee93993458266114c29271a481ef9ce7ce621b2a (diff) |
ONOSFW-171
O/S-SFC-ONOS scenario documentation
Change-Id: I51ae1cf736ea24ab6680f8edca1b2bf5dd598365
Signed-off-by: CNlucius <lukai1@huawei.com>
Diffstat (limited to 'framework/src/onos/tools/package/bin/onos-form-cluster')
-rwxr-xr-x | framework/src/onos/tools/package/bin/onos-form-cluster | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/framework/src/onos/tools/package/bin/onos-form-cluster b/framework/src/onos/tools/package/bin/onos-form-cluster deleted file mode 100755 index 7a0abda6..00000000 --- a/framework/src/onos/tools/package/bin/onos-form-cluster +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash -# ----------------------------------------------------------------------------- -# Forms ONOS cluster using REST API of each separate instance. -# ----------------------------------------------------------------------------- - -[ $# -lt 2 ] && echo "usage: $(basename $0) ip1 ip2..." && exit 1 - -# Scan arguments for user/password or other options... -while getopts u:p: o; do - case "$o" in - u) user=$OPTARG;; - p) password=$OPTARG;; - esac -done -user=${user:-onos} # user defaults to 'onos' -password=${password:-$user} # password defaults to user name if not specified -let OPC=$OPTIND-1 -shift $OPC - -ip=$1 -shift -nodes=$* - -ipPrefix=${ip%.*} - -aux=/tmp/${ipPrefix}.cluster.json -trap "rm -f $aux" EXIT - -echo "{ \"nodes\": [ { \"ip\": \"$ip\" }" > $aux -for node in $nodes; do - echo ", { \"ip\": \"$node\" }" >> $aux -done -echo "], \"ipPrefix\": \"$ipPrefix.*\" }" >> $aux - -for node in $ip $nodes; do - echo "Forming cluster on $node..." - curl --user $user:$password -X POST \ - http://$node:8181/onos/v1/cluster/configuration -d @$aux -done
\ No newline at end of file |