Ravi Nori has uploaded a new change for review.

Change subject: cli: Add brick operation fails from ovirt-shell(#923169)
......................................................................

cli: Add brick operation fails from ovirt-shell(#923169)

Duplicate bricks are send when --brick-brick option is
specified for add brick operation.

Change-Id: Ia42557b26dbaacb0a00da461e07dae60fee4ae5e
Bug-Url: https://bugzilla.redhat.com/923169
Signed-off-by: Ravi Nori <[email protected]>
---
M src/ovirtcli/command/command.py
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine-cli refs/changes/56/13756/1

diff --git a/src/ovirtcli/command/command.py b/src/ovirtcli/command/command.py
index 76b10d3..e3735ce 100644
--- a/src/ovirtcli/command/command.py
+++ b/src/ovirtcli/command/command.py
@@ -103,10 +103,14 @@
 
             for i in range(props_len):
                 if props[i] == 'type': props[i] = 'type_'
+                print 'props[i] = ' + str(props[i])
                 if i == (props_len - 1) and hasattr(obj, props[i]) and 
type(getattr(obj, props[i])) != list:
                     self.__set_property(obj, props[i], val, fq_prop)
                     return
+                if i > 0 and props[i] == props[i-1]:
+                    continue
                 if hasattr(obj, props[i]) and type(getattr(obj, props[i])) == 
list:
+                        print 'hasattr(obj, props[i]) and type(getattr(obj, 
props[i])) == list'
                         params_set_cand = ParseHelper.getXmlType(props[i])
                         if params_set_cand:
                             obj_params_set_cand = params_set_cand.factory()
@@ -118,6 +122,7 @@
                             
self.error(Messages.Error.INVALID_COLLECTION_BASED_OPTION_SYNTAX % prop)
 
                         for param in str(val).split(','):
+                            print 'param = ' + str(param)
                             obj_params_set_cand = root_obj_params_set_cand
                             if not param.startswith(props[i] + '.'):
                                
self.error(Messages.Error.INVALID_OPTION_SEGMENT % \
@@ -125,6 +130,7 @@
                             param_data = param.replace(props[i] + '.', 
'').split('=')
                             if len(param_data) == 2:
                                 spplited_param_data = param_data[0].split('.')
+                                print 'spplited_param_data = '+ 
str(spplited_param_data)
                                 for param_period in spplited_param_data:
                                     if spplited_param_data[-1] == param_period:
                                         if hasattr(obj_params_set_cand, 
param_period):


--
To view, visit http://gerrit.ovirt.org/13756
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia42557b26dbaacb0a00da461e07dae60fee4ae5e
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine-cli
Gerrit-Branch: master
Gerrit-Owner: Ravi Nori <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to