Add method to list Gerrit Groups.

* gerritlib/gerrit.py: Add listGroups() method that will run `gerrit
ls-groups` and return the result as a python list.

Change-Id: I2cb6b7b6a23f3efdb81f90b492c07075c4606c38
This commit is contained in:
Clark Boylan 2013-09-25 11:04:28 -07:00
parent d16c93bece
commit 6d58714528
1 changed files with 5 additions and 0 deletions

View File

@ -132,6 +132,11 @@ class Gerrit(object):
out, err = self._ssh(cmd)
return out.split('\n')
def listGroups(self):
cmd = 'gerrit ls-groups'
out, err = self._ssh(cmd)
return out.split('\n')
def review(self, project, change, message, action={}):
cmd = 'gerrit review %s --project %s' % (change, project)
if message: