Exemple #1
0
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()
Exemple #2
0
def add_host():
	if request.method=='POST':
		import hosts
		if 'logged_in' not in session or session['logged_in']!= True:
			host= request.environ['REMOTE_ADDR']
		else:
			host= request.form['host']

		group= request.form['group']
		hosts.add_host(group, host)

	return redirect(url_for('hosts'))
Exemple #3
0
def add_host():
    if request.method == 'POST':
        import hosts
        if 'logged_in' not in session or session['logged_in'] != True:
            host = request.environ['REMOTE_ADDR']
        else:
            host = request.form['host']

        group = request.form['group']
        hosts.add_host(group, host)

    return redirect(url_for('hosts'))
Exemple #4
0
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()
Exemple #6
0
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()