
Clients using gerritlib behind NAT/firewall can be stuck when the NAT/firewall discard packets belong to the TCP connection after extended silent periods thinking the connection is dead. This change allows clients using gerritlib to set keep alive interval to a non zero value. This will enable TCP keep alive packets to be sent in configured intervals keeping the TCP connections alive. Change-Id: I588706bb51ce41810cd2243f4969763d193d1d55
461 B
461 B
Usage
Example usage:
import gerritlib.gerrit as gerrit
g = gerrit.Gerrit('gerrit_host', 'username', keyfile='/home/username/.ssh/id_rsa.pub', keep_alive_interval=60)
# manage projects
g.createProject('test', description='a test project')
projects = g.listProjects()
print(projects)
# manage groups
g.createGroup('testers')
groups = g.listGroups()
print(groups)
Look at the api
for
more details.