def testGetVM(self): p = Puck(transport=MockTransport) self.assertTrue(isinstance(p.getVM(), VM))
(pid, ezjl_socket) = start_jail_launcher() if args.daemonize: daemonizer = cherrypy.process.plugins.Daemonizer(cherrypy.engine) daemonizer.subscribe() cherrypy.config.update(args.config) lookup = TemplateLookup( directories=[os.path.join(args.templatedir, reldir) for reldir in ["html"]] ) puck = Puck() puck.getVM().jails.setSocket(ezjl_socket) root = RootController(lookup, puck) root.configure = ConfigurationController(lookup, puck) root.setup = SetupController(lookup, puck) cherrypy.engine.vmsetup = SetupPlugin(puck, cherrypy.engine) cherrypy.engine.vmsetup.subscribe() cherrypy.process.plugins.SignalHandler.handlers['SIGINT'] = cherrypy.engine.exit cherrypy.engine.signal_handler.subscribe() if hasattr(cherrypy.engine, "console_control_handler"): cherrypy.engine.console_control_handler.subscribe() app = cherrypy.tree.mount(root, '/', CONF)