Last active
July 1, 2016 12:25
-
-
Save antoviaque/43a3a52fd9e5532615f341537bd40cdb to your computer and use it in GitHub Desktop.
Terminate all VMs of a given instance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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