From: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
We just check cdrom path previously,
change the naming to be compatible with disks.
Signed-off-by: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
---
src/kimchi/model/vmstorages.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/kimchi/model/vmstorages.py b/src/kimchi/model/vmstorages.py
index 6fdf580..4ef8ab0 100644
--- a/src/kimchi/model/vmstorages.py
+++ b/src/kimchi/model/vmstorages.py
@@ -87,7 +87,7 @@ def _get_storage_xml(params):
return ET.tostring(disk)
-def _check_cdrom_path(path):
+def _check_path(path):
if check_url_path(path):
src_type = 'network'
# Check if path is a valid local path
@@ -158,7 +158,7 @@ class VMStoragesModel(object):
# Path will never be blank due to API.json verification.
# There is no need to cover this case here.
path = params['path']
- params['src_type'] = _check_cdrom_path(path)
+ params['src_type'] = _check_path(path)
params.setdefault(
'bus', _get_device_bus(params['type'], dom, self.objstore))
@@ -256,7 +256,7 @@ class VMStorageModel(object):
raise OperationFailed("KCHVMSTOR0010E", {'error':
e.message})
def update(self, vm_name, dev_name, params):
- params['src_type'] = _check_cdrom_path(params['path'])
+ params['src_type'] = _check_path(params['path'])
dom = VMModel.get_vm(vm_name, self.conn)
dev_info = self.lookup(vm_name, dev_name)
--
1.8.3.2