Skip to content

Instantly share code, notes, and snippets.

@antoviaque
Last active July 1, 2016 12:25
Show Gist options
  • Save antoviaque/43a3a52fd9e5532615f341537bd40cdb to your computer and use it in GitHub Desktop.
Save antoviaque/43a3a52fd9e5532615f341537bd40cdb to your computer and use it in GitHub Desktop.
Terminate all VMs of a given instance
def terminate_all_instance_vms(domain):
inst = OpenEdXInstance.objects.get(internal_lms_domain=domain)
for appserver in inst.appserver_set.all():
appserver.terminate_vm()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment