Fixed onos-push-update-bundle tool.
Fixed wipe-out command confirmation.
diff --git a/cli/src/main/java/org/onlab/onos/cli/net/WipeOutCommand.java b/cli/src/main/java/org/onlab/onos/cli/net/WipeOutCommand.java
index e62f850..fe18ba0 100644
--- a/cli/src/main/java/org/onlab/onos/cli/net/WipeOutCommand.java
+++ b/cli/src/main/java/org/onlab/onos/cli/net/WipeOutCommand.java
@@ -13,40 +13,41 @@
import org.onlab.onos.net.intent.IntentState;
/**
- * Wipes-out the entire network information base, i.e. devices, links, hosts.
+ * Wipes-out the entire network information base, i.e. devices, links, hosts, intents.
*/
@Command(scope = "onos", name = "wipe-out",
description = "Wipes-out the entire network information base, i.e. devices, links, hosts")
public class WipeOutCommand extends ClustersListCommand {
-
- private static final String DISCLAIMER = "Yes, I know it will delete everything!";
+ private static final String DISCLAIMER = "Delete everything please.";
@Argument(index = 0, name = "disclaimer", description = "Device ID",
- required = true, multiValued = false)
+ required = false, multiValued = false)
String disclaimer = null;
@Override
protected void execute() {
- if (!disclaimer.equals(DISCLAIMER)) {
- print("I'm afraid I can't do that...");
- print("You have to acknowledge by: " + DISCLAIMER);
+ if (disclaimer == null || !disclaimer.equals(DISCLAIMER)) {
+ print("I'm afraid I can't do that!\nPlease acknowledge with phrase: '%s'",
+ DISCLAIMER);
return;
}
- print("Good bye...");
+ print("Wiping devices");
DeviceAdminService deviceAdminService = get(DeviceAdminService.class);
DeviceService deviceService = get(DeviceService.class);
for (Device device : deviceService.getDevices()) {
deviceAdminService.removeDevice(device.id());
}
+ print("Wiping hosts");
HostAdminService hostAdminService = get(HostAdminService.class);
HostService hostService = get(HostService.class);
for (Host host : hostService.getHosts()) {
hostAdminService.removeHost(host.id());
}
+ print("Wiping intents");
IntentService intentService = get(IntentService.class);
for (Intent intent : intentService.getIntents()) {
if (intentService.getIntentState(intent.id()) == IntentState.INSTALLED) {
diff --git a/features/old-features.xml b/features/old-features.xml
deleted file mode 100644
index 46e68ca..0000000
--- a/features/old-features.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<!--
- ~ Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
- ~
- ~ This program and the accompanying materials are made available under the
- ~ terms of the Eclipse Public License v1.0 which accompanies this distribution,
- ~ and is available at http://www.eclipse.org/legal/epl-v10.html
- -->
-
-<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0"
- name="net.onrc.onos-1.0.0">
- <repository>mvn:net.onrc.onos/onos-features/1.0.0-SNAPSHOT/xml/features</repository>
-
- <feature name="thirdparty" version="1.0.0"
- description="ONOS 3rd party dependencies">
- <bundle>mvn:com.google.code.findbugs/annotations/2.0.2</bundle>
- <bundle>mvn:io.netty/netty/3.9.2.Final</bundle>
- <bundle>mvn:com.google.guava/guava/17.0</bundle>
- <bundle>mvn:com.google.guava/guava/15.0</bundle>
-
- </feature>
-
- <feature name="base" version="1.0.0"
- description="ONOS Base">
- <feature>scr</feature>
- <feature>thirdparty</feature>
- <bundle>mvn:net.onrc.onos.sb/onos-sb/0.0.1</bundle>
- <bundle>mvn:org.projectfloodlight/openflowj/0.3.6-SNAPSHOT</bundle>
- </feature>
-
-</features>
diff --git a/tools/dev/bash_profile b/tools/dev/bash_profile
index f4ed3c3..6c1444f 100644
--- a/tools/dev/bash_profile
+++ b/tools/dev/bash_profile
@@ -33,6 +33,7 @@
alias op='onos-package'
alias ot='onos-test'
alias ol='onos-log'
+alias go='ob && ot && onos -w'
alias pub='onos-push-update-bundle'
# Short-hand for tailing the ONOS (karaf) log
diff --git a/tools/test/bin/onos-push-update-bundle b/tools/test/bin/onos-push-update-bundle
index 6073bac..4f8ca7d 100755
--- a/tools/test/bin/onos-push-update-bundle
+++ b/tools/test/bin/onos-push-update-bundle
@@ -15,7 +15,7 @@
nodes=$(env | sort | egrep "OC[0-9]+" | cut -d= -f2)
for node in $nodes; do
+ scp -q $jar $ONOS_USER@$node:.m2/repository/$jar
scp -q $jar $ONOS_USER@$node:$ONOS_INSTALL_DIR/$KARAF_DIST/system/$jar
- ssh $ONOS_USER@$node "ls -l $ONOS_INSTALL_DIR/$KARAF_DIST/system/$jar"
ssh $ONOS_USER@$node "$ONOS_INSTALL_DIR/bin/onos \"bundle:update -f $bundle\"" 2>/dev/null
done