Phil Huang
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
......@@ -12,8 +12,10 @@ while getopts u:p: o; do
p) password=$OPTARG;;
esac
done
user=${user:-onos} # user defaults to 'onos'
password=${password:-$user} # password defaults to user name if not specified
ONOS_WEB_USER=${ONOS_WEB_USER:-onos} # ONOS WEB User defaults to 'onos'
ONOS_WEB_PASS=${ONOS_WEB_PASS:-rocks} # ONOS WEB Password defaults to 'rocks'
user=${user:-$ONOS_WEB_USER}
password=${password:-$ONOS_WEB_PASS}
let OPC=$OPTIND-1
shift $OPC
......@@ -36,4 +38,4 @@ 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
done
......
......@@ -13,8 +13,10 @@ while getopts u:p: o; do
p) password=$OPTARG;;
esac
done
user=${user:-onos} # user defaults to 'onos'
password=${password:-$user} # password defaults to user name if not specified
ONOS_WEB_USER=${ONOS_WEB_USER:-onos} # ONOS WEB User defaults to 'onos'
ONOS_WEB_PASS=${ONOS_WEB_PASS:-rocks} # ONOS WEB Password defaults to 'rocks'
user=${user:-$ONOS_WEB_USER}
password=${password:-$ONOS_WEB_PASS}
let OPC=$OPTIND-1
shift $OPC
......