## 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:
def do_deploy(self, line): """Deploy N cannons""" start_time = time.time() self._cannon_infos = init_cannons() print 'Time: %s' %(time.time()-start_time)