Commit c0e1517a authored by Antoine Millet's avatar Antoine Millet

Added attachdisk and detachdisk cli handler

parent 29309860
......@@ -221,6 +221,22 @@ class CliHandler(RegisteredCCHandler):
"""
return self._vm_action(query, 'vm_set_autostart', flag)
@listed
def attachdisk(self, query, pool, volume, driver='virtio', bps=0, iops=0):
""" Attach a disk on a VM.
:param query: tql query
"""
return self._vm_action(query, 'vm_attach_disk', pool, volume, driver, bps, iops)
@listed
def detachdisk(self, query, pool, volume):
""" Detach a disk from a VM.
:param query: tql query
"""
return self._vm_action(query, 'vm_detach_disk', pool, volume)
@listed
def undefine(self, query, delete_storage=True):
""" Undefine selected virtual machines.
......
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 to comment