Support querying for single group info
Allow querying to check if a single group entry exists, which when combined with 'verbose=True' will return the UUID for a single group. Change-Id: I851ab29999c0d059c9cb71bd38a821c035ae98f7
This commit is contained in:
parent
500c8d2cc9
commit
a731676fd1
@ -309,6 +309,16 @@ class Gerrit(object):
|
||||
out, err = self._ssh(cmd)
|
||||
return filter(None, out.split('\n'))
|
||||
|
||||
def listGroup(self, group, verbose=False):
|
||||
if verbose:
|
||||
cmd = 'gerrit ls-groups -v'
|
||||
else:
|
||||
cmd = 'gerrit ls-groups'
|
||||
# ensure group names with spaces are escaped and quoted
|
||||
group = "\"%s\"" % group.replace(' ', '\ ')
|
||||
out, err = self._ssh(' '.join([cmd, '-q', group]))
|
||||
return filter(None, out.split('\n'))
|
||||
|
||||
def listPlugins(self):
|
||||
plugins = self.getPlugins()
|
||||
plugin_names = plugins.keys()
|
||||
|
Loading…
Reference in New Issue
Block a user