def do_find_cannons(self, line): """Find all cannons deployed for microarmy""" hosts = find_deployed_cannons() if hosts: print 'Deployed cannons:', hosts answer = raw_input('Would you like to import these cannons now? (y/n) ') if answer.lower() == 'n': return self.do_config(None, hosts) else: print 'No cannons found'
def destroy_deployed_cannons(): """Find and destroy all our deployed cannons""" hosts = find_deployed_cannons() terminate_cannons([h[0] for h in hosts])