Added prox test cell and enhanced install to allow customization of the hazelcast.xml for proper network interface.
diff --git a/apps/foo/src/main/java/org/onlab/onos/foo/FooComponent.java b/apps/foo/src/main/java/org/onlab/onos/foo/FooComponent.java
index b9251dd..1fafc32 100644
--- a/apps/foo/src/main/java/org/onlab/onos/foo/FooComponent.java
+++ b/apps/foo/src/main/java/org/onlab/onos/foo/FooComponent.java
@@ -8,6 +8,9 @@
import org.onlab.onos.cluster.ClusterEvent;
import org.onlab.onos.cluster.ClusterEventListener;
import org.onlab.onos.cluster.ClusterService;
+import org.onlab.onos.net.device.DeviceEvent;
+import org.onlab.onos.net.device.DeviceListener;
+import org.onlab.onos.net.device.DeviceService;
import org.slf4j.Logger;
import static org.slf4j.LoggerFactory.getLogger;
@@ -23,17 +26,23 @@
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
protected ClusterService clusterService;
- private ClusterEventListener clusterListener = new InnerClusterListener();
+ @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+ protected DeviceService deviceService;
+
+ private final ClusterEventListener clusterListener = new InnerClusterListener();
+ private final DeviceListener deviceListener = new InnerDeviceListener();
@Activate
public void activate() {
clusterService.addListener(clusterListener);
+ deviceService.addListener(deviceListener);
log.info("Started");
}
@Deactivate
public void deactivate() {
clusterService.removeListener(clusterListener);
+ deviceService.removeListener(deviceListener);
log.info("Stopped");
}
@@ -43,6 +52,13 @@
log.info("WOOOOT! {}", event);
}
}
+
+ private class InnerDeviceListener implements DeviceListener {
+ @Override
+ public void event(DeviceEvent event) {
+ log.info("YEEEEHAAAAW! {}", event);
+ }
+ }
}
diff --git a/tools/test/bin/onos-config b/tools/test/bin/onos-config
index e9f3f0a..9f1e3b0 100755
--- a/tools/test/bin/onos-config
+++ b/tools/test/bin/onos-config
@@ -8,4 +8,7 @@
remote=$ONOS_USER@${1:-$OCI}
-echo "Deprecated!"
\ No newline at end of file
+ssh $remote "
+ sudo perl -pi.bak -e \"s/ <interface>.*</ <interface>${ONOS_NIC:-192.168.56.*}</g\" \
+ $ONOS_INSTALL_DIR/$KARAF_DIST/etc/hazelcast.xml
+"
\ No newline at end of file
diff --git a/tools/test/bin/onos-install b/tools/test/bin/onos-install
index 39fbeaa9..449915d 100755
--- a/tools/test/bin/onos-install
+++ b/tools/test/bin/onos-install
@@ -9,7 +9,8 @@
# If the first option is -f attempt uninstall first.
[ "$1" = "-f" ] && shift && onos-uninstall ${1:-$OCI}
-remote=$ONOS_USER@${1:-$OCI}
+node=${1:-$OCI}
+remote=$ONOS_USER@$node
scp -q $ONOS_TAR $remote:/tmp
@@ -30,7 +31,10 @@
# Remove any previous ON.Lab bits from ~/.m2 repo
rm -fr ~/.m2/repository/org/onlab
-
- # Ignite the ONOS service.
- sudo service onos start
"
+
+# Configure the ONOS installation
+onos-config $node
+
+# Ignite the ONOS service.
+onos-service $node start
\ No newline at end of file
diff --git a/tools/test/cells/prox b/tools/test/cells/prox
new file mode 100644
index 0000000..4539117
--- /dev/null
+++ b/tools/test/cells/prox
@@ -0,0 +1,8 @@
+# ProxMox-based cell of ONOS instances 1,2 & ONOS mininet box
+
+export ONOS_NIC="10.1.9.*"
+
+export OC1="10.1.9.94"
+export OC2="10.1.9.82"
+
+export OCN="10.1.9.93"