aboutsummaryrefslogtreecommitdiff
path: root/util.py
diff options
context:
space:
mode:
authorSteve McIntyre <steve.mcintyre@linaro.org>2015-01-23 17:55:43 +0000
committerSteve McIntyre <steve.mcintyre@linaro.org>2015-01-23 17:55:43 +0000
commit06fe6421e58147a2fec6b7aba8d1a6e21aecff63 (patch)
tree0067ae089a2230eb2d9eb48453b63a8457c8d8b1 /util.py
parent8a1a1ae5cfc3c741890f74e0c68387c0f04eaf92 (diff)
Add support for a shutdown call from the admin interface
Make sure we clean up properly and close connections. Change-Id: Iec3fede61615d4f9e4a5561006c182e7785c1977
Diffstat (limited to 'util.py')
-rw-r--r--util.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/util.py b/util.py
index a35d24c..1e246fc 100644
--- a/util.py
+++ b/util.py
@@ -101,6 +101,10 @@ class VlanUtil:
ret['uptime'] = time.time() - state.starttime
elif command == 'daemon.probe_switches':
ret = self.probe_switches(state)
+ elif command == 'daemon.shutdown':
+ # data ignored
+ ret['shutdown'] = 'Shutting down'
+ state.running = False
else:
raise InputError("Unknown daemon_query command \"%s\"" % command)