Esempio n. 1
0
    ## HELP
    if command == "help":
        print '  help:     This menu.'
        print '  quit:     RIP'
        print '  deploy:   Starts cannon initializations routines'
        print '  config:   Allows a user to specify existing cannons'
        print '  fire:     Asks for a url and then fires the cannons'      

    ## QUIT
    elif command == "quit":
        import sys
        sys.exit(0)

    ## INIT_CANNONS
    elif command == "deploy":
        _cannon_hosts = init_cannons()
        print 'Giving cannons 30 seconds to boot'
        time.sleep(30)
        status = setup_cannons(_cannon_hosts)
        _cannons_deployed = True

    # CONFIG
    elif command == "config":
        host_string = raw_input('  type host list: ')
        hosts = eval(host_string)
        _cannon_hosts = hosts
        _cannons_deployed = True

    # FIRE
    elif command == "fire":
        if _cannons_deployed:
Esempio n. 2
0
 def do_deploy(self, line):
     """Deploy N cannons"""
     start_time = time.time()
     self._cannon_infos = init_cannons()
     print 'Time: %s' %(time.time()-start_time)
Esempio n. 3
0
 def do_deploy(self, line):
     """Deploy N cannons"""
     start_time = time.time()
     self._cannon_infos = init_cannons()
     print 'Time: %s' %(time.time()-start_time)