def _start(self): """Method starts web server Args: none Returns: void """ ip = mh.cfg['Extensions']['TestEnv']['server_ip'] port = mh.cfg['Extensions']['TestEnv']['server_port'] self._server = application(urls, globals()) httpserver.runsimple(self._server.wsgifunc(), (str(ip), port))
def run(self, port=PORT, *middleware): func = self.wsgifunc(*middleware) return httpserver.runsimple(func, ('0.0.0.0', port))
def run(self, port=int(SERVER_OPTS['port']), *middleware): func = self.wsgifunc(*middleware) return httpserver.runsimple(func, ('0.0.0.0', port))
return name # define URL processing/routes urls = ( "/cghub/data/(analysis)/download/(.+)", "Analysis", "/cghub/data/(analysis)/upload/(.+)", "Analysis", "/cghub/data/(analysis)/(.+)", "Analysis", "/cghub/data/(analysis-nossl)/(.+)", "Analysis", "/cghub/data/gtsession", "Session", "/control", "Control", "/credential/(.+)", "Credential", "/(.+)", "Tracker", ) app = web.application(urls, globals()) CherryPyWSGIServer.ssl_certificate = CA_CERT CherryPyWSGIServer.ssl_private_key = CA_KEY if __name__ == "__main__": runsimple(app.wsgifunc(), server_address=("0.0.0.0", int(TestConfig.HUB_PORT)))