Example #1
0
 def __init__(self,n,w,t):
     self.queue = []
     self.deployed = []
     self.results = []
     self.name = n
     self.set_work(w)
     self.protocols = {
         'dispatch'  :   'dispatch',
         'grunt'     :   'grunt'}
     self.tree = ct.ctree(n,w,protocols = self.protocols)
     for x in range(len(t)):
         self.tree.grow(t[x])
Example #2
0
 def init(self,state):
     state['activestage'] = self.active_stage
     cinit = cn.controller.init(self,state)
     abv = state['radio'].above
     g = ct.ctree('monitor')
     state['graph'] = g
     state['stagemap'] = sg.stages(state)
     for sgn in state['stagemap']:
         g.avert(g.root,sgn,state['stagemap'][sgn])
     abv.acmd('testw',test_work,'order test work')
     abv.acmd('report',report,'report work results')
     abv.acmd('stage',set_stage,'set work stage')
     abv.acmd('sinfo',stage_info,'list running stages')
     abv.acmd('work',real_work,'order work to stage')
     abv.acmd('order',order_stage,'order new stage')
     return cinit
Example #3
0
 def init(self,state):
     g = ct.ctree('monitor')
     state['graph'] = g
     state['results'] = []
     state['tearwait'] = True
     state['stagemap'] = sg.stages(state)
     for sgn in state['stagemap']:
         g.avert(g.root,sgn,state['stagemap'][sgn])
     s = state['pinfo']
     cinit = cn.controller.init(self,state)
     abv = state['radio'].above
     abv.schm = 'passive'
     abv.acmd('build',build_network,'')
     abv.acmd('tear',tear_network,'')
     abv.acmd('serverconnect',connect_to_server,'')
     abv.acmd('serverdisconnect',disconnect_from_server,'')
     abv.acmd('order',order_stage,'')
     abv.acmd('sinfo',stage_info,'')
     abv.acmd('enqueue',enqueue,'')
     abv.acmd('report',report,'')
     return cinit