diff options
author | Steve McIntyre <steve.mcintyre@linaro.org> | 2015-01-23 17:55:43 +0000 |
---|---|---|
committer | Steve McIntyre <steve.mcintyre@linaro.org> | 2015-01-23 17:55:43 +0000 |
commit | 06fe6421e58147a2fec6b7aba8d1a6e21aecff63 (patch) | |
tree | 0067ae089a2230eb2d9eb48453b63a8457c8d8b1 /util.py | |
parent | 8a1a1ae5cfc3c741890f74e0c68387c0f04eaf92 (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.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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) |