Merge branch 'master' of https://github.com/OPENNETWORKINGLAB/ONOS
diff --git a/.gitignore b/.gitignore
index 2e70064..3c5748b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,4 +2,6 @@
*.class
.classpath
.project
-target
\ No newline at end of file
+target
+onos-logs
+onos.log
\ No newline at end of file
diff --git a/build.xml b/build.xml
index aa8b593..2bd1343 100644
--- a/build.xml
+++ b/build.xml
@@ -62,7 +62,7 @@
<include name="simple-4.1.21.jar"/>
<include name="netty-3.2.6.Final.jar"/>
<include name="args4j-2.0.16.jar"/>
- <include name="concurrentlinkedhashmap-lru-1.2.jar"/>
+ <include name="concurrentlinkedhashmap-lru-1.3.jar"/>
<include name="jython-2.5.2.jar"/>
<include name="libthrift-0.7.0.jar"/>
</patternset>
diff --git a/onos-embedded.sh b/onos-embedded.sh
new file mode 100755
index 0000000..b5cfed6
--- /dev/null
+++ b/onos-embedded.sh
@@ -0,0 +1,68 @@
+#!/bin/sh
+
+# Set paths
+FL_HOME=`dirname $0`
+FL_JAR="${FL_HOME}/target/floodlight.jar"
+FL_LOGBACK="${FL_HOME}/logback.xml"
+TITAN_CONFIG="/tmp/cassandra.titan"
+CASSANDRA_CONFIG="/home/`whoami`/apache-cassandra-1.1.4/conf/cassandra.yaml"
+
+# Set JVM options
+JVM_OPTS=""
+#JVM_OPTS="$JVM_OPTS -server -d64"
+#JVM_OPTS="$JVM_OPTS -Xmx2g -Xms2g -Xmn800m"
+#JVM_OPTS="$JVM_OPTS -XX:+UseParallelGC -XX:+AggressiveOpts -XX:+UseFastAccessorMethods"
+#JVM_OPTS="$JVM_OPTS -XX:MaxInlineSize=8192 -XX:FreqInlineSize=8192"
+#JVM_OPTS="$JVM_OPTS -XX:CompileThreshold=1500 -XX:PreBlockSpin=8"
+#JVM_OPTS="$JVM_OPTS -Dpython.security.respectJavaAccessibility=false"
+
+# Set classpath to include titan libs
+#CLASSPATH=`echo ${FL_HOME}/lib/*.jar ${FL_HOME}/lib/titan/*.jar | sed 's/ /:/g'`
+CLASSPATH="${FL_HOME}/lib/*.jar:${FL_HOME}/lib/titan/*.jar"
+
+CASSANDRA_OPTS="-Dcom.sun.management.jmxremote.port=7199"
+CASSANDRA_OPTS="$CASSANDRA_OPTS -Dcom.sun.management.jmxremote.ssl=false"
+CASSANDRA_OPTS="$CASSANDRA_OPTS -Dcom.sun.management.jmxremote.authenticate=false"
+
+# Create a logback file if required
+cat <<EOF_LOGBACK >${FL_LOGBACK}
+<configuration scan="true" debug="true">
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder>
+ <pattern>%level [%logger:%thread] %msg%n</pattern>
+ </encoder>
+ </appender>
+
+ <appender name="FILE" class="ch.qos.logback.core.FileAppender">
+ <file>onos.log</file>
+ <encoder>
+ <pattern>%date %level [%thread] %logger{10} [%file:%line] %msg%n</pattern>
+ </encoder>
+ </appender>
+
+ <logger name="org" level="WARN"/>
+ <logger name="LogService" level="WARN"/> <!-- Restlet access logging -->
+ <logger name="net.floodlightcontroller.logging" level="WARN"/>
+
+ <root level="DEBUG">
+ <appender-ref ref="STDOUT" />
+ <appender-ref ref="FILE" />
+ </root>
+</configuration>
+EOF_LOGBACK
+
+cat <<EOF_TITAN >${TITAN_CONFIG}
+storage.backend=embeddedcassandra
+storage.hostname=127.0.0.1
+storage.keyspace=onos
+storage.cassandra-config-dir=file://${CASSANDRA_CONFIG}
+EOF_TITAN
+
+# Clear logs
+rm onos.log
+
+# Run floodlight
+echo "Starting ONOS controller ..."
+echo
+#java ${JVM_OPTS} -Dlogback.configurationFile=${FL_LOGBACK} -Xbootclasspath/a:$CLASSPATH -jar ${FL_JAR} -cf ./onos.properties
+java ${JVM_OPTS} ${CASSANDRA_OPTS} -Dlogback.configurationFile=${FL_LOGBACK} -jar ${FL_JAR}
diff --git a/onos.sh b/onos.sh
index e7a1651..5667114 100755
--- a/onos.sh
+++ b/onos.sh
@@ -46,8 +46,8 @@
EOF_LOGBACK
# Delete and recreate /tmp/netmap
-rm -rf /tmp/cassandra.titan
-mkdir /tmp/cassandra.titan
+#rm -rf /tmp/cassandra.titan
+#mkdir /tmp/cassandra.titan
# Clear logs
rm onos.log
@@ -55,4 +55,5 @@
# Run floodlight
echo "Starting ONOS controller ..."
echo
-java ${JVM_OPTS} -Dlogback.configurationFile=${FL_LOGBACK} -Xbootclasspath/a:$CLASSPATH -jar ${FL_JAR} -cf ./onos.properties
+#java ${JVM_OPTS} -Dlogback.configurationFile=${FL_LOGBACK} -Xbootclasspath/a:$CLASSPATH -jar ${FL_JAR} -cf ./onos.properties
+java ${JVM_OPTS} -Dlogback.configurationFile=${FL_LOGBACK} -jar ${FL_JAR} -cf ./onos.properties
diff --git a/scripts/onos-nodetool.py b/scripts/onos-nodetool.py
new file mode 100644
index 0000000..51a4ca4
--- /dev/null
+++ b/scripts/onos-nodetool.py
@@ -0,0 +1,241 @@
+#!/usr/bin/python
+
+import os
+import sys
+import time
+import socket
+import argparse
+import paramiko
+import subprocess
+
+CASSANDRA_DIR = "/home/ubuntu/apache-cassandra-1.1.4"
+CASSANDRA_NODETOOL = CASSANDRA_DIR + "/bin/nodetool"
+CASSANDRA_CMD = CASSANDRA_DIR + "/bin/cassandra"
+
+class RemoteOnosNode:
+
+ def __init__(self, ip):
+ #self.hostname = hostname
+ self.ip = ip
+
+ self.ssh = paramiko.SSHClient()
+ self.ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
+ self.ssh.connect(self.ip, key_filename='/home/ubuntu/.ssh/onlabkey.pem')
+
+ def get_pids(self, process_search_string):
+ stdin, stdout, stderr = self.ssh.exec_command('pgrep -f %s' % process_search_string)
+ pid_list = stdout.readlines()
+
+ return ([x.strip() for x in pid_list])
+
+ #takes a list of pids to kill
+ def kill_all(self, pid_list):
+ for pid in pid_list:
+ stdin, stdout, stderr = self.ssh.exec_command('kill %s' % pid)
+
+ if stderr.read() != '':
+ print "Killing %s failed" % pid
+ else:
+ print "%s killed" % pid
+
+ def clean(self):
+ processes = ['floodlight.jar', 'CassandraDaemon']
+
+ for process in processes:
+ self.kill_all(self.get_pids(process))
+
+ def start_onos(self, embedded=False):
+ print "*** Starting ONOS:"
+
+ if embedded:
+ onos_script = ('nohup /home/ubuntu/ONOS/onos-embedded.sh > '
+ '/dev/null 2>&1 &')
+ else:
+ onos_script = 'nohup /home/ubuntu/ONOS/onos.sh > /dev/null 2>&1 &'
+
+ self.ssh.exec_command(onos_script)
+
+
+ def start_cassandra(self):
+
+ print "*** Starting Cassandra:"
+
+ stdin, stdout, stderr = self.ssh.exec_command(CASSANDRA_CMD)
+ if stderr.read() != '':
+ print "Error starting Casssanda"
+ return
+
+ print "*** Waiting while Cassandra bootstaps:"
+
+ node_bootstrapped = False
+ while not node_bootstrapped:
+ stdin, stdout, stderr = self.ssh.exec_command(CASSANDRA_NODETOOL + ' ring')
+ for line in stdout.readlines():
+ if (self.ip in line) and ('Up' in line):
+ node_bootstrapped = True
+
+ time.sleep(1)
+
+ def check_status(self):
+ #self.check_process('floodlight.jar')
+
+ onos_pids = self.get_pids('floodlight.jar')
+ onos_ok = len(onos_pids) == 1
+
+ cassandra_pids = self.get_pids('CassandraDaemon')
+ cassandra_ok = len(cassandra_pids) == 1
+
+ controller_port = self.check_port_listening(self.ip, '6633')
+
+ in_ring = self.check_in_ring()
+
+ if onos_ok and (not cassandra_ok) and in_ring:
+ print "ONOS and Cassandra running in EMBEDDED mode"
+ elif onos_ok and cassandra_ok and in_ring and controller_port:
+ print "ONOS and Cassandra running in SEPARATE mode"
+ elif not (onos_ok or cassandra_ok or in_ring or controller_port):
+ print "Node is DOWN"
+ else:
+ print "Node is not fully operational:"
+ print "ONOS process pid %s" % onos_pids
+ print "Cassandra process pids %s" % cassandra_pids
+ print "Controller port open: %s" % controller_port
+ print "Node in Cassandra ring: %s" % in_ring
+
+ def check_in_ring(self):
+ stdin, stdout, stderr = self.ssh.exec_command(CASSANDRA_NODETOOL + ' ring')
+
+ for line in stdout.readlines():
+ if (self.ip in line) and ('Up' in line):
+ return True
+
+ return False
+
+ def check_port_listening(self, host, port):
+ command = 'telnet -e A %s %s' % (host, port)
+ process = subprocess.Popen(command.split(), stdin=subprocess.PIPE,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT)
+ output = process.communicate(input='A quit')[0]
+
+ if 'Unable' in output:
+ return False
+
+ return True
+
+def start_mininet(mn_host):
+ ssh = paramiko.SSHClient()
+ ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
+
+ ssh.connect(mn_host, key_filename='/home/ubuntu/.ssh/onlabkey.pem')
+
+ stdin, stdout, stderr = ssh.exec_command('sudo mn -c')
+
+ #print (stdout.read())
+ #print (stderr.read())
+ if not '*** Cleanup complete.' in stderr.read():
+ print ("Mininet didn't clean up properly")
+
+ network_file = '/home/ubuntu/sdn2/onos-nw.py'
+ stdin, stdout, stderr = ssh.exec_command('sudo python %s > /dev/null 2>&1 &' % network_file)
+
+ print "OUT\n"
+ print stdout.read()
+ print "ERR\n"
+ print stderr.read()
+
+ ssh.close()
+
+def add(args):
+ (onos_ip, onos_hostname) = get_ip_hostname(args.hostname)
+
+ pr_hostname = "" if onos_ip == onos_hostname else onos_hostname
+ print "Starting up ONOS node %s with IP %s" % (pr_hostname, onos_ip)
+
+ remote_node = RemoteOnosNode(onos_ip)
+ remote_node.clean()
+
+ #wait a few seconds to let cassandra fully shutdown
+ time.sleep(2)
+
+ if args.embedded:
+ remote_node.start_onos(embedded=True)
+ else:
+ remote_node.start_cassandra()
+ remote_node.start_onos()
+
+
+def get_ip_hostname(node):
+ """ Takes in either a hostname or an IP address and returns
+ (ip, hostname).
+ Note if IP is given both values will be the same, i.e. we don't
+ actually care about finding the hostname if user specified an IP"""
+
+ if '.' in node:
+ return (node, node)
+ else:
+ return (socket.gethostbyname(node), node)
+
+
+def status(args):
+ for node in args.cluster_nodes.split(','):
+ (ip, hostname) = get_ip_hostname(node)
+
+ print "Status of %s:" % hostname
+
+ remote_node = RemoteOnosNode(ip)
+ remote_node.check_status()
+
+ print
+
+def remove(args):
+ remote_node = RemoteOnosNode(args.hostname)
+ remote_node.clean()
+
+def parse_args():
+ commands = ['add', 'remove', 'status']
+
+ parser = argparse.ArgumentParser(description='Add node to ONOS cluster')
+ ##add command
+ subparsers = parser.add_subparsers(help='command')
+ parser_add = subparsers.add_parser('add',
+ help='Add a node to ONOS cluster')
+ parser_add.add_argument('hostname',
+ help='hostname of new ONOS node')
+ parser_add.add_argument('-e', '--embedded', action='store_true',
+ help='run Cassandra in embedded mode in the same '
+ 'JVM as ONOS')
+ parser_add.set_defaults(func=add)
+
+ ##status command
+ parser_status = subparsers.add_parser('status',
+ help='Check status of ONOS nodes')
+ parser_status.add_argument('cluster_nodes',
+ help='comma-delimited list IP addresses for '
+ 'existing cluster nodes')
+ parser_status.set_defaults(func=status)
+
+ ##remove command
+ parser_remove = subparsers.add_parser('remove', help='Remove an ONOS node '
+ 'from the cluster')
+ parser_remove.add_argument('hostname', help='ONOS node to remove')
+ parser_remove.set_defaults(func=remove)
+
+
+ return parser.parse_args()
+
+
+if __name__ == '__main__':
+ args = parse_args()
+
+ args.func(args)
+ """
+ if args.mininet:
+ start_mininet(args.mininet)
+ else:
+ print('Assuming mininet host is the same as ONOS host')
+ start_mininet(args.onos)
+ """
+
+
+ sys.exit(0)
diff --git a/src/main/java/net/floodlightcontroller/core/INetMapStorage.java b/src/main/java/net/floodlightcontroller/core/INetMapStorage.java
index 642bf4d..67c6631 100644
--- a/src/main/java/net/floodlightcontroller/core/INetMapStorage.java
+++ b/src/main/java/net/floodlightcontroller/core/INetMapStorage.java
@@ -15,4 +15,5 @@
UPDATE // Update the object if exists or CREATE/INSERT if does not exist
}
public void init(String conf);
+ public void close();
}
diff --git a/src/main/java/net/floodlightcontroller/core/internal/SwitchStorageImpl.java b/src/main/java/net/floodlightcontroller/core/internal/SwitchStorageImpl.java
index 1e14b05..72c6b50 100644
--- a/src/main/java/net/floodlightcontroller/core/internal/SwitchStorageImpl.java
+++ b/src/main/java/net/floodlightcontroller/core/internal/SwitchStorageImpl.java
@@ -262,5 +262,16 @@
return inactiveSwitches;
}
+ public void finalize() {
+ close();
+ }
+
+ @Override
+ public void close() {
+ // TODO Auto-generated method stub
+ graph.shutdown();
+
+ }
+
}
diff --git a/src/main/java/net/floodlightcontroller/core/internal/TopoSwitchServiceImpl.java b/src/main/java/net/floodlightcontroller/core/internal/TopoSwitchServiceImpl.java
index 0edc35e..cb2eb46 100644
--- a/src/main/java/net/floodlightcontroller/core/internal/TopoSwitchServiceImpl.java
+++ b/src/main/java/net/floodlightcontroller/core/internal/TopoSwitchServiceImpl.java
@@ -27,7 +27,7 @@
@Override
public Iterable<ISwitchObject> GetAllSwitches() {
- // TODO Auto-generated method stub
+ // TODO Auto-generated method stub
return swStore.getAllSwitches();
}
@@ -41,6 +41,5 @@
public List<String> GetPortsOnSwitch(String dpid) {
// TODO Auto-generated method stub
return null;
- }
-
+ }
}
diff --git a/src/main/java/net/floodlightcontroller/core/web/TopoSwitchesResource.java b/src/main/java/net/floodlightcontroller/core/web/TopoSwitchesResource.java
index 11dbcb1..e75d26a 100644
--- a/src/main/java/net/floodlightcontroller/core/web/TopoSwitchesResource.java
+++ b/src/main/java/net/floodlightcontroller/core/web/TopoSwitchesResource.java
@@ -21,8 +21,9 @@
}
if (filter.equals("inactive")) {
return (Iterator<ISwitchObject>) impl.GetInactiveSwitches().iterator();
+ } else {
+ return (Iterator<ISwitchObject>) impl.GetAllSwitches().iterator();
}
- return (Iterator<ISwitchObject>) impl.GetAllSwitches().iterator();
}
}
diff --git a/src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkDiscoveryManager.java b/src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkDiscoveryManager.java
index c432987..f5ad9ac 100644
--- a/src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkDiscoveryManager.java
+++ b/src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkDiscoveryManager.java
@@ -551,7 +551,7 @@
remoteport.setConfig(0);
remoteport.setState(0);
remotesw.setPort(remoteport);
- log.debug("addRemoteSwitch(): added fake remote port {} to sw {}", remoteport, remotesw);
+ log.debug("addRemoteSwitch(): added fake remote port {} to sw {}", remoteport, remotesw.getId());
}
return remotesw;
diff --git a/src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkStorageImpl.java b/src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkStorageImpl.java
index 43c6c94..3aa1fc0 100644
--- a/src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkStorageImpl.java
+++ b/src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkStorageImpl.java
@@ -47,6 +47,7 @@
public void update(Link link, LinkInfo linkinfo, DM_OPERATION op) {
switch (op) {
case UPDATE:
+ break;
case CREATE:
case INSERT:
addOrUpdateLink(link, linkinfo, op);
@@ -191,7 +192,7 @@
@Override
public void init(String conf) {
- //TODO extract the DB location from conf
+ //TODO extract the DB location from properties
graph = TitanFactory.open(conf);
@@ -232,10 +233,9 @@
pipe.start(sw.asVertex());
pipe.enablePath(true);
- pipe.out("on").out("link").in("on").path().getCurrentPath();
- pipe.step(extractor);
+ pipe.out("on").out("link").in("on").path().step(extractor);
- if (pipe.hasNext() ) {
+ while (pipe.hasNext() ) {
Link l = pipe.next();
links.add(l);
}
@@ -246,7 +246,6 @@
static class ExtractLink implements PipeFunction<PathPipe<Vertex>, Link> {
-
@Override
public Link compute(PathPipe<Vertex> pipe ) {
// TODO Auto-generated method stub
@@ -270,6 +269,16 @@
return l;
}
}
+
+ public void finalize() {
+ close();
+ }
+
+ @Override
+ public void close() {
+ // TODO Auto-generated method stub
+ graph.shutdown();
+ }
}
diff --git a/src/main/java/net/floodlightcontroller/linkdiscovery/internal/TopoLinkServiceImpl.java b/src/main/java/net/floodlightcontroller/linkdiscovery/internal/TopoLinkServiceImpl.java
index b73224e..2dbb338 100644
--- a/src/main/java/net/floodlightcontroller/linkdiscovery/internal/TopoLinkServiceImpl.java
+++ b/src/main/java/net/floodlightcontroller/linkdiscovery/internal/TopoLinkServiceImpl.java
@@ -21,7 +21,8 @@
@Override
public List<Link> GetActiveLinks() {
// TODO Auto-generated method stub
- return linkStore.getActiveLinks();
+ List<Link> retval = linkStore.getActiveLinks();
+ return retval;
}
@Override
@@ -29,5 +30,4 @@
// TODO Auto-generated method stub
return linkStore.getLinks(dpid);
}
-
}
diff --git a/src/main/java/net/floodlightcontroller/linkdiscovery/web/TopoLinksResource.java b/src/main/java/net/floodlightcontroller/linkdiscovery/web/TopoLinksResource.java
index 323708e..a0770cb 100644
--- a/src/main/java/net/floodlightcontroller/linkdiscovery/web/TopoLinksResource.java
+++ b/src/main/java/net/floodlightcontroller/linkdiscovery/web/TopoLinksResource.java
@@ -13,8 +13,8 @@
public List<Link> retrieve() {
TopoLinkServiceImpl impl = new TopoLinkServiceImpl();
- return impl.GetActiveLinks();
-
+ List<Link> retval = impl.GetActiveLinks();
+ return retval;
}
}
diff --git a/start-cassandra.sh b/start-cassandra.sh
new file mode 100755
index 0000000..3f92779
--- /dev/null
+++ b/start-cassandra.sh
@@ -0,0 +1,73 @@
+#!/bin/bash
+
+CASSANDRA_DIR=${HOME}/apache-cassandra-1.1.4
+LOGDIR=${HOME}/ONOS/onos-logs
+CASSANDRA_LOG=$LOGDIR/cassandara.onos1vpc.log
+
+function lotate {
+logfile=$1
+nr_max=$2
+if [ -f $logfile ]; then
+ for i in `seq $(expr 10 - 1) -1 1`; do
+ if [ -f ${logfile}.${i} ]; then
+ mv -f ${logfile}.${i} ${logfile}.`expr $i + 1`
+ fi
+ done
+ mv $logfile $logfile.1
+fi
+}
+
+function start {
+ if [ ! -d ${LOGDIR} ]; then
+ mkdir -p ${LOGDIR}
+ fi
+ echo "rotate log: $log"
+ if [ -f $CASSANDRA_LOG ]; then
+ lotate $CASSANDRA_LOG
+ fi
+
+ # Run cassandra
+ echo "Starting cassandra"
+ $CASSANDRA_DIR/bin/cassandra > $CASSANDRA_LOG 2>&1
+}
+
+function stop {
+ # Kill the existing processes
+ capid=`ps -edalf |grep java |grep apache-cassandra | awk '{print $4}'`
+ pids="$capid"
+ for p in ${pids}; do
+ if [ x$p != "x" ]; then
+ sudo kill -KILL $p
+ echo "Killed existing prosess (pid: $p)"
+ fi
+ done
+}
+
+#function deldb {
+# # Delete the berkeley db database
+# if [ -d "/tmp/cassandra.titan" ]; then
+# rm -rf /tmp/cassandra.titan
+# mkdir /tmp/cassandra.titan
+# fi
+#}
+
+case "$1" in
+ start)
+ stop
+ start
+ ;;
+ stop)
+ stop
+ ;;
+# deldb)
+# deldb
+# ;;
+ status)
+ n=`ps -edalf |grep java |grep apache-cassandra | wc -l`
+ echo "$n instance of cassandra running"
+ $CASSANDRA_DIR/bin/nodetool ring
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|status}"
+ exit 1
+esac
diff --git a/start-onos.sh b/start-onos.sh
index 9c1cf77..9f70527 100755
--- a/start-onos.sh
+++ b/start-onos.sh
@@ -40,7 +40,6 @@
<logger name="org" level="WARN"/>
<logger name="LogService" level="WARN"/> <!-- Restlet access logging -->
<logger name="net.floodlightcontroller.logging" level="WARN"/>
-<logger name="net.floodlightcontroller.linkdiscovery.internal" level="TRACE"/>
<root level="DEBUG">
<appender-ref ref="FILE" />
@@ -48,6 +47,7 @@
</configuration>
EOF_LOGBACK
+#<logger name="net.floodlightcontroller.linkdiscovery.internal" level="TRACE"/>
#<appender-ref ref="STDOUT" />
function lotate {
@@ -78,7 +78,7 @@
# Run floodlight
echo "Starting ONOS controller ..."
echo
- java ${JVM_OPTS} -Dlogback.configurationFile=${FL_LOGBACK} -Xbootclasspath/a:$CLASSPATH -jar ${FL_JAR} -cf ./onos.properties > /dev/null 2>&1 &
+ java ${JVM_OPTS} -Dlogback.configurationFile=${FL_LOGBACK} -jar ${FL_JAR} -cf ./onos.properties > /dev/null 2>&1 &
sudo tcpdump -n -i eth0 'tcp port 6633' -s0 -w ${PCAP_LOG} &
}
@@ -95,6 +95,14 @@
done
}
+function deldb {
+ # Delete the berkeley db database
+ if [ -d "/tmp/cassandra.titan" ]; then
+ rm -rf /tmp/cassandra.titan
+ mkdir /tmp/cassandra.titan
+ fi
+}
+
case "$1" in
start)
stop
@@ -103,6 +111,9 @@
stop)
stop
;;
+ deldb)
+ deldb
+ ;;
status)
n=`ps -edalf |grep java |grep logback.xml | wc -l`
echo "$n instance of onos running"