From 30ed71e8aeb1180a11b20ddfa95ec676a8864d79 Mon Sep 17 00:00:00 2001 From: catborise Date: Wed, 8 Jan 2020 11:24:22 +0300 Subject: [PATCH] add disk options choices --- vrtManager/connection.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/vrtManager/connection.py b/vrtManager/connection.py index a1105a8..0d35d51 100644 --- a/vrtManager/connection.py +++ b/vrtManager/connection.py @@ -494,6 +494,31 @@ class wvmConnect(object): 'unsafe': 'Unsafe', # since libvirt 0.9.7 } + def get_io_modes(self): + """Get io threads available modes""" + return { + 'default': 'Default', + 'native': 'Native', + 'threads': 'Threads', + } + + def get_discard_modes(self): + """Get discard available modes""" + return { + 'default': 'Default', + 'ignore': 'Ignore', + 'unmap': 'Unmap', + } + + def get_detect_zeroes_modes(self): + """Get detect zeroes available modes""" + return { + 'default': 'Default', + 'on': 'On', + 'off': 'Off', + 'unmap': 'Unmap', + } + def get_hypervisors_domain_types(self): """Return hypervisor type""" def hypervisors(ctx):