Change in vdsm[master]: Add remoteServer parameter into gluster volumes list

tjeyasin at redhat.com tjeyasin at redhat.com
Mon Jan 12 07:16:07 UTC 2015


Timothy Asir has uploaded a new change for review.

Change subject: Add remoteServer parameter into gluster volumes list
......................................................................

Add remoteServer parameter into gluster volumes list

Currently glusterVolumesList does not accept remoteServer parameter.
This adds remoteServer parameter to get the list volumes from
a remote host.

Change-Id: Ic0039cc0de9fbef6a7125df7b2c1dac14aa12de1
Signed-off-by: Timothy Asir <tjeyasin at redhat.com>
---
M client/vdsClientGluster.py
M vdsm/gluster/api.py
M vdsm/gluster/apiwrapper.py
M vdsm/rpc/vdsmapi-gluster-schema.json
4 files changed, 12 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/83/36783/1

diff --git a/client/vdsClientGluster.py b/client/vdsClientGluster.py
index 421c853..444c98d 100644
--- a/client/vdsClientGluster.py
+++ b/client/vdsClientGluster.py
@@ -47,8 +47,9 @@
     def do_glusterVolumesList(self, args):
         params = self._eqSplit(args)
         volumeName = params.get('volumeName', '')
+        remoteServer = params.get('remoteServer', '')
 
-        status = self.s.glusterVolumesList(volumeName)
+        status = self.s.glusterVolumesList(volumeName, remoteServer)
         pp.pprint(status)
         return status['status']['code'], status['status']['message']
 
@@ -446,7 +447,9 @@
          'glusterVolumesList': (
              serv.do_glusterVolumesList,
              ('[volumeName=<volume_name>]\n\t'
-              '<volume_name> is existing volume name',
+              '[remoteServer=<remote_server]\n\t'
+              '<volume_name> is existing volume name '
+              '<remote_server> is a remote host name ',
               'list all or given gluster volume details'
               )),
          'glusterVolumeStart': (
diff --git a/vdsm/gluster/api.py b/vdsm/gluster/api.py
index b9a08e5..acfc809 100644
--- a/vdsm/gluster/api.py
+++ b/vdsm/gluster/api.py
@@ -74,8 +74,9 @@
         self.svdsmProxy = svdsm.getProxy()
 
     @exportAsVerb
-    def volumesList(self, volumeName=None, options=None):
-        return {'volumes': self.svdsmProxy.glusterVolumeInfo(volumeName)}
+    def volumesList(self, volumeName=None, remoteServer=None, options=None):
+        return {'volumes': self.svdsmProxy.glusterVolumeInfo(volumeName,
+                                                             remoteServer)}
 
     @exportAsVerb
     def volumeCreate(self, volumeName, brickList, replicaCount=0,
diff --git a/vdsm/gluster/apiwrapper.py b/vdsm/gluster/apiwrapper.py
index c45fc57..63c05f5 100644
--- a/vdsm/gluster/apiwrapper.py
+++ b/vdsm/gluster/apiwrapper.py
@@ -105,8 +105,8 @@
     def status(self, volumeName, brick=None, statusOption=None):
         return self._gluster.volumeStatus(volumeName, brick, statusOption)
 
-    def list(self, volumeName=None):
-        return self._gluster.volumesList(volumeName)
+    def list(self, volumeName=None, remoteServer=None):
+        return self._gluster.volumesList(volumeName, remoteServer)
 
     def create(self, volumeName, brickList, replicaCount=0, stripeCount=0,
                transportList=[], force=False):
diff --git a/vdsm/rpc/vdsmapi-gluster-schema.json b/vdsm/rpc/vdsmapi-gluster-schema.json
index 4ddd182..238ec21 100644
--- a/vdsm/rpc/vdsmapi-gluster-schema.json
+++ b/vdsm/rpc/vdsmapi-gluster-schema.json
@@ -641,6 +641,8 @@
 #
 # @volumeName: Gluster volume name
 #
+# @remoteServer: Remote server name
+#
 # Returns:
 # List of Gluster volumes
 #


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic0039cc0de9fbef6a7125df7b2c1dac14aa12de1
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Timothy Asir <tjeyasin at redhat.com>


More information about the vdsm-patches mailing list