def do_term(self, line): """Terminate cannons""" if not self._cannon_infos: print 'ERROR: No cannons defined, try "config" or "deploy"' return terminate_cannons([h[0] for h in self._cannon_infos]) self._cannon_infos = None self._cannon_hosts = None self._cannons_deployed = False print 'Deployed cannons destroyed'
def destroy_deployed_cannons(): """Find and destroy all our deployed cannons""" hosts = find_deployed_cannons() terminate_cannons([h[0] for h in hosts])