Merge remote-tracking branch 'origin/master'
diff --git a/core/api/src/main/java/org/onlab/onos/net/AbstractModel.java b/core/api/src/main/java/org/onlab/onos/net/AbstractModel.java
index 8c25cda..cbafad9 100644
--- a/core/api/src/main/java/org/onlab/onos/net/AbstractModel.java
+++ b/core/api/src/main/java/org/onlab/onos/net/AbstractModel.java
@@ -1,14 +1,22 @@
package org.onlab.onos.net;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Maps;
import org.onlab.onos.net.provider.ProviderId;
+import java.util.Map;
+import java.util.Set;
+
/**
* Base implementation of a network model entity.
*/
-public class AbstractModel implements Provided {
+public class AbstractModel implements Provided, Annotated {
private final ProviderId providerId;
+ // FIXME: figure out whether to make this concurrent or immutable
+ private final Map<String, String> annotations = Maps.newHashMap();
+
// For serialization
public AbstractModel() {
providerId = null;
@@ -28,4 +36,13 @@
return providerId;
}
+ @Override
+ public Set<String> annotationKeys() {
+ return ImmutableSet.copyOf(annotations.keySet());
+ }
+
+ @Override
+ public String annotation(String key) {
+ return annotations.get(key);
+ }
}
diff --git a/core/api/src/main/java/org/onlab/onos/net/Annotated.java b/core/api/src/main/java/org/onlab/onos/net/Annotated.java
new file mode 100644
index 0000000..f68cd46
--- /dev/null
+++ b/core/api/src/main/java/org/onlab/onos/net/Annotated.java
@@ -0,0 +1,25 @@
+package org.onlab.onos.net;
+
+import java.util.Set;
+
+/**
+ * Represents an entity that carries arbitrary annotations.
+ */
+public interface Annotated {
+
+ /**
+ * Returns the set of annotation keys currently available.
+ *
+ * @return set of annotation keys
+ */
+ Set<String> annotationKeys();
+
+ /**
+ * Returns the annotation value for the specified key.
+ *
+ * @param key annotation key
+ * @return annotation value; null if there is no annotation
+ */
+ String annotation(String key);
+
+}
diff --git a/tools/build/onos-test b/tools/build/onos-test
index 1eb8edb..ecf549b 100755
--- a/tools/build/onos-test
+++ b/tools/build/onos-test
@@ -9,5 +9,9 @@
nodes=$(env | sort | egrep "OC[0-9]+" | cut -d= -f2)
onos-package
-for node in $nodes; do (printf "%s: %s\n" "$node" "`onos-install -f $node`")& done
+for node in $nodes; do onos-install -f $node 1>/dev/null & done
+
+# Wait for shutdown before waiting for restart
+sleep 3
+
for node in $nodes; do onos-wait-for-start $node; done
diff --git a/tools/dev/bash_profile b/tools/dev/bash_profile
index 1d3097f..8332a47 100644
--- a/tools/dev/bash_profile
+++ b/tools/dev/bash_profile
@@ -57,6 +57,7 @@
if [ -n "$1" ]; then
[ ! -f $ONOS_ROOT/tools/test/cells/$1 ] && \
echo "No such cell: $1" >&2 && return 1
+ unset OC1 OC2 OC3 OC4 OC5 OC6 OC7 OC8 OC9 OCN OCI
. $ONOS_ROOT/tools/test/cells/$1
export OCI=$OC1
export ONOS_CELL=$1
@@ -74,7 +75,11 @@
# Lists available cells
function cells {
- ls -1 $ONOS_ROOT/tools/test/cells
+ for cell in $(ls -1 $ONOS_ROOT/tools/test/cells); do
+ printf "%-12s %s\n" \
+ "$([ $cell = $ONOS_CELL ] && echo $cell '*' || echo $cell)" \
+ "$(grep '^#' $ONOS_ROOT/tools/test/cells/$cell | head -n 1)"
+ done
}
# Miscellaneous
diff --git a/tools/test/cells/.reset b/tools/test/cells/.reset
deleted file mode 100644
index 5b1bc2c..0000000
--- a/tools/test/cells/.reset
+++ /dev/null
@@ -1 +0,0 @@
-unset OC1 OC2 OC3 OC4 OC5 OC6 OC7 OC8 OC9 OCN ONOS_NIC ONOS_FEATURES
diff --git a/tools/test/cells/local b/tools/test/cells/local
index 6b9fea5..b535934 100644
--- a/tools/test/cells/local
+++ b/tools/test/cells/local
@@ -1,8 +1,6 @@
-# Default virtual box ONOS instances 1,2 & ONOS mininet box
-. $ONOS_ROOT/tools/test/cells/.reset
+# Local VirtualBox-based ONOS instances 1,2 & ONOS mininet box
export ONOS_NIC=192.168.56.*
-
export OC1="192.168.56.101"
export OC2="192.168.56.102"
diff --git a/tools/test/cells/office b/tools/test/cells/office
index 6053ec8..acedac2 100644
--- a/tools/test/cells/office
+++ b/tools/test/cells/office
@@ -1,9 +1,7 @@
-# ProxMox-based cell of ONOS instances 1,2 & ONOS mininet box
-. $ONOS_ROOT/tools/test/cells/.reset
+# ProxMox-based cell of ONOS instance; no mininet-box
export ONOS_FEATURES="webconsole,onos-api,onos-core-trivial,onos-cli,onos-openflow,onos-app-fwd,onos-app-mobility,onos-app-tvue"
export ONOS_NIC="10.128.4.*"
-
export OC1="10.128.4.60"
diff --git a/tools/test/cells/prox b/tools/test/cells/prox
index 3fa1279..1731eb8 100644
--- a/tools/test/cells/prox
+++ b/tools/test/cells/prox
@@ -1,8 +1,6 @@
# ProxMox-based cell of ONOS instances 1,2 & ONOS mininet box
-. $ONOS_ROOT/tools/test/cells/.reset
export ONOS_NIC="10.1.9.*"
-
export OC1="10.1.9.94"
export OC2="10.1.9.82"
diff --git a/tools/test/cells/single b/tools/test/cells/single
new file mode 100644
index 0000000..bc969f3
--- /dev/null
+++ b/tools/test/cells/single
@@ -0,0 +1,6 @@
+# Local VirtualBox-based single ONOS instance & ONOS mininet box
+
+export ONOS_NIC=192.168.56.*
+export OC1="192.168.56.101"
+export OCN="192.168.56.103"
+
diff --git a/tools/test/cells/three b/tools/test/cells/three
deleted file mode 100644
index 38c934b..0000000
--- a/tools/test/cells/three
+++ /dev/null
@@ -1,12 +0,0 @@
-# Default virtual box ONOS instances 1,2 & ONOS mininet box
-
-export ONOS_NIC=192.168.56.*
-
-export ONOS_FEATURES="webconsole,onos-api,onos-core-trivial,onos-cli,onos-rest,onos-gui,onos-openflow,onos-app-fwd,onos-app-foo"
-
-export OC1="192.168.56.101"
-export OC2="192.168.56.102"
-export OC3="192.168.56.104"
-
-export OCN="192.168.56.103"
-
diff --git a/tools/test/cells/tom b/tools/test/cells/tom
deleted file mode 100644
index 2eb0523..0000000
--- a/tools/test/cells/tom
+++ /dev/null
@@ -1,10 +0,0 @@
-# Default virtual box ONOS instances 1,2 & ONOS mininet box
-
-export ONOS_NIC=192.168.56.*
-
-export OC1="192.168.56.11"
-export OC2="192.168.56.12"
-
-export OCN="192.168.56.7"
-
-
diff --git a/tools/test/cells/triple b/tools/test/cells/triple
new file mode 100644
index 0000000..baae31a
--- /dev/null
+++ b/tools/test/cells/triple
@@ -0,0 +1,9 @@
+# Local VirtualBox-based ONOS instances 1,2,3 & ONOS mininet box
+
+export ONOS_NIC=192.168.56.*
+export OC1="192.168.56.101"
+export OC2="192.168.56.102"
+export OC3="192.168.56.104"
+
+export OCN="192.168.56.103"
+