def test_start_fake_process(self): """Start provision process with fake agent.""" print '*' * 80 print "start to test provision manager with fake agent" mgr = ManagerProcess(simulator=True) mgr.dispatcher.timer_register(10, self.end_manager, arg=mgr) mgr.start()
def demoMgrProcess(): global uTMgrProcess global uTMgrApiDispatch print "demoMgrProcess thread start!" uTMgrProcess = ManagerProcess(test_flag=True) uTMgrApiDispatch = uTMgrProcess.dispatcher uTMgrProcess.start() print "demoMgrProcess thread done!"
def demoMgrProcess(): global uTMgrProcess global uTMgrApiDispatch print "demoMgrProcess thread start!" uTMgrProcess = ManagerProcess(test_flag=True) uTMgrApiDispatch = uTMgrProcess.dispatcher # Unregister interface_scan_timer to make the tearDown faster. # When unregistered we don't need to wait for the long interface scan # timeout before closing socket in tearDown. uTMgrApiDispatch.timer_unregister(uTMgrProcess.interface_scan_timer) uTMgrProcess.start() print "demoMgrProcess thread done!"