Committed by
Gerrit Code Review
Use correct user/password when forming ONOS cluster
Use $ONOS_WEB_{USER,PASS} to get infomation when forming ONOS cluster
Change-Id: Id2b5bc4f66b58440eb0d7d1bd0b68f10e28d0e68
Showing
2 changed files
with
9 additions
and
5 deletions
| ... | @@ -12,8 +12,10 @@ while getopts u:p: o; do | ... | @@ -12,8 +12,10 @@ while getopts u:p: o; do |
| 12 | p) password=$OPTARG;; | 12 | p) password=$OPTARG;; |
| 13 | esac | 13 | esac |
| 14 | done | 14 | done |
| 15 | -user=${user:-onos} # user defaults to 'onos' | 15 | +ONOS_WEB_USER=${ONOS_WEB_USER:-onos} # ONOS WEB User defaults to 'onos' |
| 16 | -password=${password:-$user} # password defaults to user name if not specified | 16 | +ONOS_WEB_PASS=${ONOS_WEB_PASS:-rocks} # ONOS WEB Password defaults to 'rocks' |
| 17 | +user=${user:-$ONOS_WEB_USER} | ||
| 18 | +password=${password:-$ONOS_WEB_PASS} | ||
| 17 | let OPC=$OPTIND-1 | 19 | let OPC=$OPTIND-1 |
| 18 | shift $OPC | 20 | shift $OPC |
| 19 | 21 | ||
| ... | @@ -36,4 +38,4 @@ for node in $ip $nodes; do | ... | @@ -36,4 +38,4 @@ for node in $ip $nodes; do |
| 36 | echo "Forming cluster on $node..." | 38 | echo "Forming cluster on $node..." |
| 37 | curl --user $user:$password -X POST \ | 39 | curl --user $user:$password -X POST \ |
| 38 | http://$node:8181/onos/v1/cluster/configuration -d @$aux | 40 | http://$node:8181/onos/v1/cluster/configuration -d @$aux |
| 39 | -done | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 41 | +done | ... | ... |
| ... | @@ -13,8 +13,10 @@ while getopts u:p: o; do | ... | @@ -13,8 +13,10 @@ while getopts u:p: o; do |
| 13 | p) password=$OPTARG;; | 13 | p) password=$OPTARG;; |
| 14 | esac | 14 | esac |
| 15 | done | 15 | done |
| 16 | -user=${user:-onos} # user defaults to 'onos' | 16 | +ONOS_WEB_USER=${ONOS_WEB_USER:-onos} # ONOS WEB User defaults to 'onos' |
| 17 | -password=${password:-$user} # password defaults to user name if not specified | 17 | +ONOS_WEB_PASS=${ONOS_WEB_PASS:-rocks} # ONOS WEB Password defaults to 'rocks' |
| 18 | +user=${user:-$ONOS_WEB_USER} | ||
| 19 | +password=${password:-$ONOS_WEB_PASS} | ||
| 18 | let OPC=$OPTIND-1 | 20 | let OPC=$OPTIND-1 |
| 19 | shift $OPC | 21 | shift $OPC |
| 20 | 22 | ... | ... |
-
Please register or login to post a comment