1.1 --- a/OpenSecurity/bin/opensecurityd.py Tue Dec 10 14:04:11 2013 +0100
1.2 +++ b/OpenSecurity/bin/opensecurityd.py Tue Dec 10 14:50:14 2013 +0100
1.3 @@ -53,6 +53,7 @@
1.4 """All the URLs we know mapping to class handler"""
1.5 opensecurity_urls = (
1.6 '/device_change', 'os_device_change', # http://localhost:8080/device_change GET
1.7 + '/sdvm_started', 'os_sdvm_started', # http://localhost:8080/sdvm_started GET
1.8 '/browsing', 'os_browsing', # http://localhost:8080/browsing GET
1.9 '/sdvms', 'os_sdvms', # http://localhost:8080/sdvms GET, PUT
1.10 '/sdvms/(.*)/application/(.*)', 'os_sdvm_application', # http://localhost:8080/sdvms/[VMNAME]/application/[COMMAND] GET
1.11 @@ -70,7 +71,7 @@
1.12 # vars
1.13
1.14 # Global VMManager instance
1.15 -gvm_mgr = VMManager()
1.16 +gvm_mgr = VMManager.getInstance()
1.17
1.18
1.19 # ------------------------------------------------------------
1.20 @@ -99,6 +100,13 @@
1.21 except:
1.22 raise web.internalerror()
1.23
1.24 +class os_sdvm_started:
1.25 + """OpenSecurity '/sdvm_started' handler"""
1.26 +
1.27 + def GET(self):
1.28 + remote_ip = web.ctx.environ['REMOTE_ADDR']
1.29 + gvm_mgr.putStartNotification(remote_ip)
1.30 + return "os_sdvm_started"
1.31
1.32 class os_sdvm:
1.33 """OpenSecurity '/sdvms/[VM]' handler