def main(): # Create drones drones.main() ###################################################### ## DOMAINS CONFIGURATION ## ###################################################### for i in xrange(0, 18): hosts.add_host('target%i' % i, 'deploy') # for i in xrange(0,6): # hosts.add_host('srv%i' % i, 'deploy') # hosts.add_host('storage0', 'deploy') # hosts.add_host('storage1', 'deploy') # hosts.add_host('monitor0', 'deploy') # hosts.add_host('monitor1', 'deploy') # hosts.add_host('load0', 'deploy') # hosts.add_host('load1', 'deploy') # hosts.add_host('test0', 'deploy') # hosts.add_host('test1', 'deploy') ###################################################### # Connect with all drone relays hosts_map = hosts.get_hosts_list() dlist = base.connect(hosts_map) # Wait for all connections wait = defer.DeferredList(dlist) wait.addCallback(deploy_phase) # Start the Twisted reactor reactor.run()
def main(): # Create drones drones.main() # Connect with all hosts step by step connect_next() # Start the Twisted reactor reactor.run()
def main(): # Create drones drones.main() # Add hosts hosts.add_host('load0', 'deploy') hosts.add_host('load1', 'deploy') # Connect with all drone relays hosts_map = hosts.get_hosts_list() dlist = base.connect(hosts_map) # Wait for all connections wait = defer.DeferredList(dlist) wait.addCallback(deploy_phase) # Start the Twisted reactor reactor.run()
def main(): # Create drones drones.main() # Add hosts hosts.add_host('192.168.96.6', 'action') hosts_map = hosts.get_hosts_list() # Connect with all drone relays deferList = base.connect(hosts_map) wait = defer.DeferredList(deferList) # Decide what to do after connection setup wait.addCallback(test0) # Start the Twisted reactor reactor.run()
def main(): # Create drones drones.main() # Add hosts for i in xrange(0, 18): hosts.add_host('target%i' % i, 'action') # Connect with all drone relays hosts_map = hosts.get_hosts_list() dlist = base.connect(hosts_map) # Wait for all connections wait = defer.DeferredList(dlist) wait.addCallback(deploy_phase) wait.addErrback(error) # Start the Twisted reactor reactor.run()