Added the server parameter to get_changes

That allows you to specify a custom server to get the changes from

Change-Id: Ic442551df9eeec0449e60bd1d9fcc1928d185557
Signed-off-by: David Caro <dcaroest@redhat.com>
This commit is contained in:
David Caro 2013-10-03 10:57:49 +02:00
parent c928e074da
commit 6aa42ce112

View File

@ -51,7 +51,8 @@ def projects_q(project):
')')
def get_changes(projects, ssh_user, ssh_key, only_open=False):
def get_changes(projects, ssh_user, ssh_key, only_open=False,
server='review.openstack.org'):
all_changes = []
client = paramiko.SSHClient()
@ -76,7 +77,7 @@ def get_changes(projects, ssh_user, ssh_key, only_open=False):
if not changes:
while True:
client.connect('review.openstack.org', port=29418,
client.connect(server, port=29418,
key_filename=ssh_key, username=ssh_user)
cmd = ('gerrit query %s --all-approvals --patch-sets '
'--format JSON' % projects_q(project))