Darshan N has uploaded a new change for review.
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(a)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/58/38758/1
diff --git a/tests/glusterTestData.py b/tests/glusterTestData.py
index 640eb07..ca6ed23 100644
--- a/tests/glusterTestData.py
+++ b/tests/glusterTestData.py
@@ -1132,14 +1132,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 9a3e594..37a18a8 100644
--- a/vdsm/gluster/cli.py
+++ b/vdsm/gluster/cli.py
@@ -1351,9 +1351,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'}
}
}
"""
@@ -1369,9 +1367,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 2ecf8cc..c370578 100644
--- a/vdsm/rpc/vdsmapi-gluster-schema.json
+++ b/vdsm/rpc/vdsmapi-gluster-schema.json
@@ -1752,15 +1752,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/38758
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3c56c7448f6316835978577e4514568ddeb4a5ea
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Darshan N <dnarayan(a)redhat.com>