Change in vdsm[ovirt-3.5-gluster]: gluster: Corrected return value of gluster volume snapshot c...

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


Hello Shubhendu Tripathi, Dan Kenigsberg, Sahina Bose,

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

    https://gerrit.ovirt.org/39928

to review the following change.

Change subject: gluster: Corrected return value of gluster volume snapshot create
......................................................................

gluster: Corrected return value of gluster volume snapshot create

Earlier Gluster was returning only UUID of the created volume
snapshot. Recently it started returning created snapshot name
as well with appended timestamp.
Corrected the VDSM verb glusterVolumeSnapshotCreate to return
both UUID and snapshot name.

Change-Id: I22441d90291be5cb8aa0d5498021b9e9a678adfc
Signed-off-by: Shubhendu Tripathi <shtripat at redhat.com>
Reviewed-on: https://gerrit.ovirt.org/39075
Reviewed-by: Sahina Bose <sabose at redhat.com>
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
---
M vdsm.spec.in
M vdsm/gluster/cli.py
M vdsm/rpc/vdsmapi-gluster-schema.json
3 files changed, 19 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/28/39928/1

diff --git a/vdsm.spec.in b/vdsm.spec.in
index 4d7cd08..35a548f 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -265,7 +265,7 @@
 
 # GlusterFS client-side RPMs needed for Gluster SD
 %if 0%{?with_gluster}
-Requires: glusterfs >= 3.6
+Requires: glusterfs >= 3.6.999
 Requires: glusterfs-cli
 Requires: glusterfs-api
 Requires: glusterfs-fuse
diff --git a/vdsm/gluster/cli.py b/vdsm/gluster/cli.py
index e550554..4cea3a8 100644
--- a/vdsm/gluster/cli.py
+++ b/vdsm/gluster/cli.py
@@ -1270,7 +1270,8 @@
     except ge.GlusterCmdFailedException as e:
         raise ge.GlusterSnapshotCreateFailedException(rc=e.rc, err=e.err)
     try:
-        return {'uuid': xmltree.find('snapCreate/snapshot/uuid').text}
+        return {'uuid': xmltree.find('snapCreate/snapshot/uuid').text,
+                'name': xmltree.find('snapCreate/snapshot/name').text}
     except _etreeExceptions:
         raise ge.GlusterXmlErrorException(err=[etree.tostring(xmltree)])
 
diff --git a/vdsm/rpc/vdsmapi-gluster-schema.json b/vdsm/rpc/vdsmapi-gluster-schema.json
index e909a00..545d7a4 100644
--- a/vdsm/rpc/vdsmapi-gluster-schema.json
+++ b/vdsm/rpc/vdsmapi-gluster-schema.json
@@ -1638,6 +1638,20 @@
  'returns': 'bool'}
 
 ##
+# @SnapshotCreateDetail:
+#
+# Created snapshot detail
+#
+# @uuid:   UUID of the created snapshot
+#
+# @name:   Name of the created snapshot
+#
+# Since: 4.17.0
+##
+{'type': 'SnapshotCreateDetail',
+ 'data': {'uuid': 'UUID', 'name': 'str'}}
+
+##
 # @GlusterVolume.snapshotCreate:
 #
 # Create a Gluster volume snapshot
@@ -1651,14 +1665,14 @@
 # @force:           #optional Force create snapshot
 #
 # Returns:
-# uuid of the snapshot
+# uuid and name of the created snapshot
 #
 # Since: 4.17.0
 ##
 {'command': {'class': 'GlusterVolume', 'name': 'snapshotCreate'},
  'data': {'volumeName': 'str', 'snapName': 'str',
           '*snapDescription': 'str', '*force': 'bool'},
- 'returns': 'UUID'}
+ 'returns': 'SnapshotCreateDetail'}
 
 ##
 # @GlusterVolume.snapshotDeleteAll:


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I22441d90291be5cb8aa0d5498021b9e9a678adfc
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: Sahina Bose <sabose at redhat.com>
Gerrit-Reviewer: Shubhendu Tripathi <shtripat at redhat.com>


More information about the vdsm-patches mailing list