Add owner option to createGroup.

Add owner option to createGroup that will set the owner group of a new
group. Default to no owner (new group will be self owned).

Change-Id: I9843280756eb57c35d6301a2e6f720767a7c986f
This commit is contained in:
Clark Boylan 2012-12-02 10:04:42 -08:00
parent b6a67cb705
commit 793098f8dc
1 changed files with 3 additions and 1 deletions

View File

@ -108,10 +108,12 @@ class Gerrit(object):
def getEvent(self):
return self.event_queue.get()
def createGroup(self, group, visible_to_all=True):
def createGroup(self, group, visible_to_all=True, owner=None):
cmd = 'gerrit create-group'
if visible_to_all:
cmd = '%s --visible-to-all' % cmd
if owner:
cmd = '%s --owner %s' % (cmd, owner)
cmd = '%s %s' % (cmd, group)
out, err = self._ssh(cmd)
return err