Demo script enables waypoint now. Fixed original analytics script so that it can...
[affinity.git] / scripts / affinity_control.py
index fa7ec5d103528b940f4dc87de19d457db5cb3cb7..b3a3d5ba4ed8c922dd2b4c426302462fdf4c5ae3 100644 (file)
@@ -50,3 +50,12 @@ class AffinityControl:
             print "Waypoint %s could not be set for link %s" % (ip, link_name)
             return
         print "Waypoint %s successfully set for link %s" % (ip, link_name)
+
+    # Enable waypoint
+    def enable_waypoint(self, link_name):
+        resp, content = self.http.request(self.url_prefix + "link/%s/enable" % link_name, "PUT")
+        if (resp.status != 201):
+            print "Waypoint could not be enabled for link %s" % link_name
+            print resp.status
+            return
+        print "Waypoint enabled for link %s" % link_name