1.1 --- a/OpenSecurity/bin/opensecurity_client_restful_server.py Fri Sep 05 12:28:30 2014 +0100
1.2 +++ b/OpenSecurity/bin/opensecurity_client_restful_server.py Mon Sep 29 12:46:51 2014 +0200
1.3 @@ -83,6 +83,7 @@
1.4 '/netmount', 'os_netmount',
1.5 '/netumount', 'os_netumount',
1.6 '/netcleanup', 'os_netcleanup',
1.7 + '/quit', 'os_quit',
1.8 '/', 'os_root'
1.9 )
1.10
1.11 @@ -527,6 +528,20 @@
1.12 return res
1.13
1.14
1.15 +class os_quit:
1.16 +
1.17 + """OpenSecurity '/quit' handler.
1.18 +
1.19 + Terminate the client REST server
1.20 + """
1.21 +
1.22 + def GET(self):
1.23 +
1.24 + stop()
1.25 + return 'done'
1.26 +
1.27 +
1.28 +
1.29 class ProcessResultBouncer(threading.Thread):
1.30
1.31 """A class to post the result of a given process - assuming it to be in JSON - to a REST Api."""