summaryrefslogtreecommitdiffstats
path: root/lava-slave/scripts/setdispatcherip.py
diff options
context:
space:
mode:
Diffstat (limited to 'lava-slave/scripts/setdispatcherip.py')
-rw-r--r--lava-slave/scripts/setdispatcherip.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/lava-slave/scripts/setdispatcherip.py b/lava-slave/scripts/setdispatcherip.py
new file mode 100644
index 0000000..a058cba
--- /dev/null
+++ b/lava-slave/scripts/setdispatcherip.py
@@ -0,0 +1,11 @@
+#!/usr/bin/env python
+
+import xmlrpclib
+import sys
+
+if len(sys.argv) < 4:
+ print("ERROR: Usage: %s URI workername dispatcherIP" % sys.argv[0])
+ sys.exit(1)
+
+server = xmlrpclib.ServerProxy("%s" % sys.argv[1])
+server.scheduler.workers.set_config("%s" % sys.argv[2], "dispatcher_ip: %s" % sys.argv[3])