def cxm_shutdown(cluster, vm, options): """Properly shutdown the specified VM. If options.node is not given, search for the vm over the cluster. """ node=select_node_by_vm(cluster, vm, options) if not core.cfg['QUIET'] : print "Shutting down",vm,"on",node.get_hostname(),"..." node.shutdown(vm, True)
def cxm_destroy(cluster, vm, options): """Terminate the specified VM immediately. If options.node is not given, search for the vm over the cluster. """ node=select_node_by_vm(cluster, vm, options) if not core.cfg['QUIET']: print "Destroying",vm,"on",node.get_hostname(),"..." if(raw_input("Are you really sure ? [y/N]:").upper() != "Y"): print "Aborded by user." return node.shutdown(vm, False)