tom

Added prox test cell and enhanced install to allow customization of the hazelcas…

…t.xml for proper network interface.
......@@ -8,6 +8,9 @@ import org.apache.felix.scr.annotations.ReferenceCardinality;
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 @@ public class FooComponent {
@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 @@ public class FooComponent {
log.info("WOOOOT! {}", event);
}
}
private class InnerDeviceListener implements DeviceListener {
@Override
public void event(DeviceEvent event) {
log.info("YEEEEHAAAAW! {}", event);
}
}
}
......
......@@ -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
......
......@@ -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 @@ ssh $remote "
# 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
......
# 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"