Update listGroups function in gerrit.py

Added ability to view extended information about the groups to obtain information about the uuid.
Function listGroups will be used in jeepyb (in file manage-project.py) for checking
and creating groups in gerrit database if groups does not exist.

Change-Id: Id11e358141d3802026bc7e531146e2d84546463d
This commit is contained in:
Andrey Nikitin 2014-09-11 15:28:18 +04:00
parent a515657196
commit 7125e80a08
1 changed files with 5 additions and 2 deletions

View File

@ -221,8 +221,11 @@ class Gerrit(object):
out, err = self._ssh(cmd)
return filter(None, out.split('\n'))
def listGroups(self):
cmd = 'gerrit ls-groups'
def listGroups(self, verbose=False):
if verbose:
cmd = 'gerrit ls-groups -v'
else:
cmd = 'gerrit ls-groups'
out, err = self._ssh(cmd)
return filter(None, out.split('\n'))