Thomas Vachuska
Committed by Gerrit Code Review

Removed defunct cell definitions

 Moved implementation of the cell command into a script.

Change-Id: Iee307d1deca5d91fb0bdb548f67a7276bcf82f22
...@@ -106,57 +106,7 @@ function setPrimaryInstance { ...@@ -106,57 +106,7 @@ function setPrimaryInstance {
106 # ON.Lab shared test cell warden address 106 # ON.Lab shared test cell warden address
107 export CELL_WARDEN="10.254.1.19" 107 export CELL_WARDEN="10.254.1.19"
108 108
109 -# Applies the settings in the specified cell file or lists current cell definition 109 +alias cell='onos-cell'
110 -# if no cell file is given.
111 -function cell {
112 - cell=$1
113 - case "$cell" in
114 - "borrow")
115 - aux="/tmp/cell-$$"
116 - curl -sS -X POST "http://$CELL_WARDEN:4321/?duration=${2:-0}&user=${3:-$(id -un)}" \
117 - -d "$(cat ~/.ssh/id_rsa.pub)" > $aux
118 - . $aux
119 - rm -f $aux
120 - export ONOS_INSTANCES=$(env | grep 'OC[0-9]*=' | sort | cut -d= -f2)
121 - setPrimaryInstance 1 >/dev/null
122 - onos-verify-cell
123 - ;;
124 - "return")
125 - curl -sS -X DELETE "http://$CELL_WARDEN:4321/?user=${2:-$(id -un)}"
126 - unset ONOS_CELL ONOS_NIC ONOS_IP ONOS_APPS ONOS_BOOT_FEATURES
127 - unset OCI OCN OCT ONOS_INSTANCES ONOS_FEATURES
128 - unset $(env | sed -n 's:\(^OC[0-9]\{1,\}\)=.*:\1 :g p')
129 - ;;
130 -
131 - "status")
132 - curl -sS "http://$CELL_WARDEN:4321/" | sort
133 - ;;
134 -
135 - "")
136 - env | egrep "ONOS_CELL"
137 - env | egrep "OCI"
138 - env | egrep "OC[0-9]+" | sort
139 - env | egrep "OC[NT]"
140 - env | egrep "ONOS_" | egrep -v 'ONOS_ROOT|ONOS_CELL|ONOS_INSTANCES' | sort
141 - ;;
142 -
143 - *)
144 - [ ! -f $ONOS_ROOT/tools/test/cells/$1 ] && \
145 - echo "No such cell: $1" >&2 && return 1
146 - unset ONOS_CELL ONOS_NIC ONOS_IP ONOS_APPS ONOS_BOOT_FEATURES
147 - unset OCI OCN OCT ONOS_INSTANCES ONOS_FEATURES
148 - unset $(env | sed -n 's:\(^OC[0-9]\{1,\}\)=.*:\1 :g p')
149 - export ONOS_USER=${ONOS_USER:-sdn}
150 - export ONOS_GROUP=${ONOS_GROUP:-sdn}
151 - export ONOS_WEB_USER=onos
152 - export ONOS_WEB_PASS=rocks
153 - export ONOS_CELL=$1
154 - . $ONOS_ROOT/tools/test/cells/$1
155 - export ONOS_INSTANCES=$(env | grep 'OC[0-9]*=' | sort | cut -d= -f2)
156 - setPrimaryInstance 1 >/dev/null
157 - cell
158 - esac
159 -}
160 110
161 [ -n "$ONOS_CELL" -a "$ONOS_CELL" != "borrow" ] && cell $ONOS_CELL > /dev/null 111 [ -n "$ONOS_CELL" -a "$ONOS_CELL" != "borrow" ] && cell $ONOS_CELL > /dev/null
162 112
......
1 #!/bin/bash 1 #!/bin/bash
2 # ----------------------------------------------------------------------------- 2 # -----------------------------------------------------------------------------
3 -# List available ONOS cells configuration. 3 +# Applies the settings in the specified cell file or lists current cell
4 +# definition if no cell file is given.
4 # ----------------------------------------------------------------------------- 5 # -----------------------------------------------------------------------------
5 6
6 -[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 7 +cell=$1
7 -. $ONOS_ROOT/tools/dev/bash_profile 8 +case "$cell" in
9 +"borrow")
10 + aux="/tmp/cell-$$"
11 + curl -sS -X POST "http://$CELL_WARDEN:4321/?duration=${2:-0}&user=${3:-$(id -un)}" \
12 + -d "$(cat ~/.ssh/id_rsa.pub)" > $aux
13 + . $aux
14 + rm -f $aux
15 + export ONOS_INSTANCES=$(env | grep 'OC[0-9]*=' | sort | cut -d= -f2)
16 + setPrimaryInstance 1 >/dev/null
17 + onos-verify-cell
18 + ;;
19 +"return")
20 + curl -sS -X DELETE "http://$CELL_WARDEN:4321/?user=${2:-$(id -un)}"
21 + unset ONOS_CELL ONOS_NIC ONOS_IP ONOS_APPS ONOS_BOOT_FEATURES
22 + unset OCI OCN OCT ONOS_INSTANCES ONOS_FEATURES
23 + unset $(env | sed -n 's:\(^OC[0-9]\{1,\}\)=.*:\1 :g p')
24 + ;;
8 25
9 -cell "$@"
...\ No newline at end of file ...\ No newline at end of file
26 +"status")
27 + curl -sS "http://$CELL_WARDEN:4321/" | sort
28 + ;;
29 +
30 +"")
31 + env | egrep "ONOS_CELL"
32 + env | egrep "OCI"
33 + env | egrep "OC[0-9]+" | sort
34 + env | egrep "OC[NT]"
35 + env | egrep "ONOS_" | egrep -v 'ONOS_ROOT|ONOS_CELL|ONOS_INSTANCES' | sort
36 + ;;
37 +
38 +*)
39 + [ ! -f $ONOS_ROOT/tools/test/cells/$1 ] && \
40 + echo "No such cell: $1" >&2 && return 1
41 + unset ONOS_CELL ONOS_NIC ONOS_IP ONOS_APPS ONOS_BOOT_FEATURES
42 + unset OCI OCN OCT ONOS_INSTANCES ONOS_FEATURES
43 + unset $(env | sed -n 's:\(^OC[0-9]\{1,\}\)=.*:\1 :g p')
44 + export ONOS_USER=${ONOS_USER:-sdn}
45 + export ONOS_GROUP=${ONOS_GROUP:-sdn}
46 + export ONOS_WEB_USER=onos
47 + export ONOS_WEB_PASS=rocks
48 + export ONOS_CELL=$1
49 + . $ONOS_ROOT/tools/test/cells/$1
50 + export ONOS_INSTANCES=$(env | grep 'OC[0-9]*=' | sort | cut -d= -f2)
51 + setPrimaryInstance 1 >/dev/null
52 + cell
53 +esac
...\ No newline at end of file ...\ No newline at end of file
......
1 -# Andrea's ProxMox ONOS instances 1,2,3 & ONOS mininet box
2 -
3 -export ONOS_NIC="10.128.12.*"
4 -export OC1="10.128.12.11"
5 -export OC2="10.128.12.12"
6 -export OC3="10.128.12.13"
7 -export OCN="10.128.12.14"
8 -
9 -export OCT=$OC1
10 -export ONOS_USE_SSH=true
11 -export ONOS_APPS=drivers,openflow,proxyarp,ovsdb,pathpainter
...\ No newline at end of file ...\ No newline at end of file
1 -export ONOS_NIC=192.168.1.*
2 -export OC1="192.168.1.11"
3 -export OC2="192.168.1.12"
4 -export OC3="192.168.1.13"
5 -export OC4="192.168.1.14"
6 -# export OC5="192.168.1.15"
7 -export OCN="192.168.1.15"
8 -export OCI="${OC1}"
1 -# Brians's ProxMox ONOS instances 1,2,3 & ONOS mininet box
2 -
3 -export ONOS_NIC="10.128.3.*"
4 -export OC1="10.128.3.1"
5 -export OC2="10.128.3.2"
6 -export OC3="10.128.3.3"
7 -export OCN="10.128.3.4"
8 -
9 -export OCT=$OC1
10 -export ONOS_USE_SSH=true
11 -export ONOS_APPS=drivers,openflow,proxyarp,mobility,pathpainter
1 -# Jian's ProxMox ONOS instances 1,2,3 & ONOS mining box
2 -
3 -export ONOS_NIC="10.128.1.*"
4 -export OC1="10.128.1.1"
5 -export OC2="10.128.1.2"
6 -export OC3="10.128.1.3"
7 -export OCN="10.128.1.4"
8 -
9 -export OCT=$OC1
10 -export ONOS_USE_SSH=true
11 -export ONOS_APPS=drivers,openflow,proxyarp,mobility
...\ No newline at end of file ...\ No newline at end of file
1 -# Madan's ProxMox ONOS instances 1,2,3 & ONOS mininet box
2 -
3 -export ONOS_NIC="10.128.4.*"
4 -export OC1="10.128.4.2"
5 -export OC2="10.128.4.3"
6 -export OC3="10.128.4.4"
7 -export OCN="10.128.4.5"
1 -# Simon's ProxMox ONOS instances 1,2,3 & ONOS mininet box
2 -
3 -export ONOS_NIC="10.128.2.*"
4 -export OC1="10.128.2.1"
5 -export OC2="10.128.2.2"
6 -export OC3="10.128.2.3"
7 -export OCN="10.128.2.4"
8 -
9 -export OCT=$OC1
10 -export ONOS_USE_SSH=true
11 -export ONOS_APPS=drivers,openflow,proxyarp,mobility
...\ No newline at end of file ...\ No newline at end of file
1 -# Thomas' VirtualBox-based 3 ONOS instances & ONOS mininet box
2 -
3 -export ONOS_NIC=192.168.56.*
4 -export OC1="192.168.56.5"
5 -export OC2="192.168.56.6"
6 -export OC3="192.168.56.7"
7 -export OCN="192.168.56.8"
8 -#export OCN="10.128.11.4"
9 -
10 -export ONOS_USE_SSH=true
11 -export ONOS_APPS=drivers,openflow,proxyarp,mobility,pathpainter
...\ No newline at end of file ...\ No newline at end of file