Aravinda VK has uploaded a new change for review.

Change subject: gluster: new vdsm verb glusterUuidGet
......................................................................

gluster: new vdsm verb glusterUuidGet

New gluster vdsm verb to get glusterd UUID of the host, which is
present in /var/lib/glusterd/glusterd.info file

Change-Id: Idf48b4c9530c48b2c46234d98c8cb4244adf22fd
Signed-off-by: Aravinda VK <[email protected]>
---
M client/vdsClientGluster.py
M vdsm/gluster/api.py
M vdsm/gluster/cli.py
3 files changed, 21 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/85/13785/1

diff --git a/client/vdsClientGluster.py b/client/vdsClientGluster.py
index bf96630..f529aea 100644
--- a/client/vdsClientGluster.py
+++ b/client/vdsClientGluster.py
@@ -310,6 +310,11 @@
         pp.pprint(status)
         return status['status']['code'], status['status']['message']
 
+    def do_glusterUuidGet(self, args):
+        status = self.s.glusterUuidGet()
+        pp.pprint(status)
+        return status['status']['code'], status['status']['message']
+
 
 def getGlusterCmdDict(serv):
     return \
@@ -520,4 +525,10 @@
              ('volumeName=<volume_name> [nfs={yes|no}]\n\t'
               '<volume_name> is existing volume name',
               'get gluster volume profile info'
-              )), }
+              )),
+         'glusterUuidGet': (
+             serv.do_glusterUuidGet,
+             ('',
+              'get gluster UUID of the host'
+              )),
+         }
diff --git a/vdsm/gluster/api.py b/vdsm/gluster/api.py
index ac93297..051bff2 100644
--- a/vdsm/gluster/api.py
+++ b/vdsm/gluster/api.py
@@ -238,6 +238,10 @@
         status = self.svdsmProxy.glusterVolumeProfileInfo(volumeName, nfs)
         return {'profileInfo': status}
 
+    @exportAsVerb
+    def uuidGet(self, options=None):
+        return {'uuid': self.svdsmProxy.glusterUuidGet()}
+
 
 def getGlusterMethods(gluster):
     l = []
diff --git a/vdsm/gluster/cli.py b/vdsm/gluster/cli.py
index b8d3f72..c27dda6 100644
--- a/vdsm/gluster/cli.py
+++ b/vdsm/gluster/cli.py
@@ -897,3 +897,8 @@
         return _parseVolumeProfileInfo(xmltree, nfs)
     except _etreeExceptions:
         raise ge.GlusterXmlErrorException(err=[etree.tostring(xmltree)])
+
+
+@exportToSuperVdsm
+def uuidGet():
+    return _getGlusterUuid()


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idf48b4c9530c48b2c46234d98c8cb4244adf22fd
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Aravinda VK <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to