Added instructions to demo.py, and copyright notices to it and other scripts.
[affinity.git] / scripts / demo.py
index a5a8caa1a37b5e86ee4c7b5bea5e2494c32e5b0c..729229f3f2f578d5d8ea65a48f94bc8d1fc44efd 100644 (file)
@@ -1,5 +1,13 @@
 #!/usr/local/bin/python
 
+'''
+Copyright (c) 2013 Plexxi, Inc.  All rights reserved.
+
+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
+'''
+
 import httplib2
 import json
 import signal
@@ -11,6 +19,20 @@ from affinity_control import AffinityControl
 from subnet import SubnetControl
 from stats import Stats
 
+'''
+The instructions for running this demo are located at:
+https://wiki.opendaylight.org/view/Project_Proposals:Affinity_Metadata_Service#Current_Status
+
+Briefly:
+1.  In config.ini, make sure affinity jars are loaded and that of.flowStatsPollInterval = 1
+2.  Start the controller
+3.  Start mininet with a 2-level tree topology
+4.  In mininet:
+     > pingall
+     > h3 ping h1
+You will see an anomaly detected in demo.py's output, and the pings between h3 and h1 will halt.
+'''
+
 # If True, SIG_INT has been captured
 global sigint
 sigint = False