Allow vmstorage creation passing disk bus
Signed-off-by: Ramon Medeiros <ramonn(a)linux.vnet.ibm.com>
---
model/vmstorages.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/model/vmstorages.py b/model/vmstorages.py
index 007e88c..bf55300 100644
--- a/model/vmstorages.py
+++ b/model/vmstorages.py
@@ -91,7 +91,9 @@ class VMStoragesModel(object):
raise InvalidParameter("KCHVMSTOR0019E")
dom = VMModel.get_vm(vm_name, self.conn)
- params['bus'] = _get_device_bus(params['type'], dom)
+
+ if params.get('bus') is None:
+ params['bus'] = _get_device_bus(params['type'], dom)
if is_s390x() and params['type'] == 'disk' and 'dir_path'
in params:
if 'format' not in params:
--
2.9.3