iro/view/cmtelecom.py
changeset 308 a891fdd0c1a9
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iro/view/cmtelecom.py	Sat Jul 27 13:36:18 2019 +0200
@@ -0,0 +1,26 @@
+
+from twisted.python import log
+from twisted.web import resource
+
+from ..controller import cmtelecom
+
+class CMTelecom(resource.Resource):
+    isLeaf = True
+    def render_GET(self, request):
+        args = request.args
+        cmtelecom.addStatus(recipient=args['GSM'][0], exID=args["REFERENCE"][0], status=args["STATUS"][0], data=args)
+
+        return "Nothing to see here."
+
+def appendResource(root):
+    """adding CMTelecom to root."""
+    root.putChild('cmtelecom', CMTelecom())
+
+if __name__ == '__main__':
+    from twisted.web import resource, server
+    from twisted.internet import reactor
+    
+    root = resource.Resource()
+    root = appendResource(root)
+    reactor.listenTCP(7080, server.Site(root))
+    reactor.run()