Commit 37627d70 by Guba Sándor

implement shutdown function

parent db4e2565
...@@ -117,6 +117,15 @@ def create(vm_desc): ...@@ -117,6 +117,15 @@ def create(vm_desc):
@celery.task @celery.task
@req_connection @req_connection
def shutdown(name):
'''Shutdown virtual machine (need ACPI support).
'''
domain = lookupByName(name)
domain.shutdown()
@celery.task
@req_connection
def delete(name): def delete(name):
'''Destroy the running called 'name' virtual machine. '''Destroy the running called 'name' virtual machine.
''' '''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment