Use correct user/password when forming ONOS cluster
Use $ONOS_WEB_{USER,PASS} to get infomation when forming ONOS cluster
Change-Id: Id2b5bc4f66b58440eb0d7d1bd0b68f10e28d0e68
diff --git a/tools/package/bin/onos-form-cluster b/tools/package/bin/onos-form-cluster
index 7a0abda..578a443 100755
--- a/tools/package/bin/onos-form-cluster
+++ b/tools/package/bin/onos-form-cluster
@@ -12,8 +12,10 @@
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 @@
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
diff --git a/tools/test/bin/onos-form-cluster b/tools/test/bin/onos-form-cluster
index daca34c..d0672db 100755
--- a/tools/test/bin/onos-form-cluster
+++ b/tools/test/bin/onos-form-cluster
@@ -13,8 +13,10 @@
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