cmtelecom status inbound provider added.
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()