From: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
When adding vm storage, volume and path cannot be specified
at the same time. Fix it.
Signed-off-by: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
---
src/kimchi/model/vmstorages.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/kimchi/model/vmstorages.py b/src/kimchi/model/vmstorages.py
index 8c51716..093b9ee 100644
--- a/src/kimchi/model/vmstorages.py
+++ b/src/kimchi/model/vmstorages.py
@@ -154,6 +154,8 @@ class VMStoragesModel(object):
# Path will never be blank due to API.json verification.
# There is no need to cover this case here.
params['format'] = 'raw'
+ if 'vol' in params and 'path' in params:
+ raise InvalidParameter("KCHVMSTOR0012E")
if params.get('vol'):
try:
pool = params['pool']
--
1.8.3.2