Change in vdsm[ovirt-3.5-gluster]: gluster: modified parsing logic in snapshot config list.

dnarayan at redhat.com dnarayan at redhat.com
Thu Apr 16 10:14:13 UTC 2015


Hello Piotr Kliczewski, Shubhendu Tripathi, Dan Kenigsberg,

I'd like you to do a code review.  Please visit

    https://gerrit.ovirt.org/39935

to review the following change.

Change subject: gluster: modified parsing logic in snapshot config list.
......................................................................

gluster: modified parsing logic in snapshot config list.

Modified snapshot config parsing logic to return only
effective-hard-limit as snapmax-hard-limit in volume
config. As the remaining two values are not relevant.

Change-Id: I3c56c7448f6316835978577e4514568ddeb4a5ea
Signed-off-by: Darshan N <dnarayan at redhat.com>
Reviewed-on: https://gerrit.ovirt.org/38758
Reviewed-by: Shubhendu Tripathi <shtripat at redhat.com>
Tested-by: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
---
M tests/glusterTestData.py
M vdsm/gluster/cli.py
M vdsm/rpc/vdsmapi-gluster-schema.json
3 files changed, 5 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/35/39935/1

diff --git a/tests/glusterTestData.py b/tests/glusterTestData.py
index 2da5611..ad92ea2 100644
--- a/tests/glusterTestData.py
+++ b/tests/glusterTestData.py
@@ -1133,14 +1133,10 @@
 GLUSTER_SNAPSHOT_CONFIG_LIST = {
     'volume': {
         'snap-vol': {
-            'snap-max-hard-limit': '256',
-            'snap-max-soft-limit': '232',
-            'effective-hard-limit': '255'
+            'snap-max-hard-limit': '255'
         },
         'snap-vol2': {
-            'snap-max-hard-limit': '254',
-            'snap-max-soft-limit': '231',
-            'effective-hard-limit': '254'
+            'snap-max-hard-limit': '254'
         }
     },
     'system': {
diff --git a/vdsm/gluster/cli.py b/vdsm/gluster/cli.py
index 392bb7c..e2462bb 100644
--- a/vdsm/gluster/cli.py
+++ b/vdsm/gluster/cli.py
@@ -1392,9 +1392,7 @@
                        'snap-max-soft-limit': 'softLimit',
                        'auto-delete': 'enable/disable'},
              'volume':{'name' :
-                          {'snap-max-hard-limit: 'hardlimit',
-                           'effective-hard-limit: 'EffectiveHardlimit',
-                           'snap-max-soft-limit': 'softLimit'}
+                          {'snap-max-hard-limit: 'hardlimit'}
                       }
             }
     """
@@ -1410,9 +1408,7 @@
     for el in tree.findall('snapConfig/volumeConfig/volume'):
         config = {}
         volumeName = el.find('name').text
-        config['snap-max-hard-limit'] = el.find('hardLimit').text
-        config['effective-hard-limit'] = el.find('effectiveHardLimit').text
-        config['snap-max-soft-limit'] = el.find('softLimit').text
+        config['snap-max-hard-limit'] = el.find('effectiveHardLimit').text
         volumeConfig[volumeName] = config
 
     return {'system': systemConfig, 'volume': volumeConfig}
diff --git a/vdsm/rpc/vdsmapi-gluster-schema.json b/vdsm/rpc/vdsmapi-gluster-schema.json
index 76184c7..75ec865 100644
--- a/vdsm/rpc/vdsmapi-gluster-schema.json
+++ b/vdsm/rpc/vdsmapi-gluster-schema.json
@@ -1874,15 +1874,10 @@
 #
 # @snap-max-hard-limit:  Snapshot max hard limit
 #
-# @effective-hard-limit: Effective snapshot Hard limit for that volume
-#
-# @snap-max-soft-limit:  Snapshot soft limit for that volume
-#
 # @Since: 4.17.0
 ##
 {'type': 'VolumeSnapConfig',
- 'data': {'snap-max-hard-limit': 'str', 'effective-hard-limit': 'str',
-          'snap-max-soft-limit': 'str'}}
+ 'data': {'snap-max-hard-limit': 'str'}}
 
 ##
 #


-- 
To view, visit https://gerrit.ovirt.org/39935
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3c56c7448f6316835978577e4514568ddeb4a5ea
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5-gluster
Gerrit-Owner: Darshan N <dnarayan at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Shubhendu Tripathi <shtripat at redhat.com>


More information about the vdsm-patches mailing list