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
This new functiona argument will allow callers to set the default
project branch on repo creation. It takes a list, all branches will be
created with the first being repo HEAD.
Change-Id: Iae5a71662740678e663bcd73d6ac660559db5d9a
Newer versions of flake8 identify these valid violations.
N802 added as skip because the entire library uses camelcase.
Change-Id: Ia687b05bb8d0590eb30a970a710a2639548dbc60
- updates tox.ini, also fixing a typo
- enables new jobs, which would at least test ability to install
package under these versions.
- updates Trove metadata
- replace fake sole-survivor unittest with a bit more practical one
Change-Id: Iae224a19850489ba3563ad5a40d358002dacdb97
Now that we're running manage-projects in a python3 container,
we should switch our integration tests to use python3.
Depends-On: https://review.opendev.org/715527
Change-Id: I33a6daf92906d9087c4a31f11966e5037445cd68
We use filter to filter out entries when listing items like groups. This
returns a list in python2 but an iterable in python3. Return a
consistent list via forced coersion.
Change-Id: Iad84f6f383fb85363f3ef51c4bd1da05b8069e43
We want to call addEvent on the 'gerrit' arg passed to GerritWatcher.
For that to work it needs to be of type Gerrit not GerritConnection.
Update the location of username, port, etc data to the connection
details in the gerrit object.
Change-Id: Ic739ddc970f6761f5587ab8fcba3e619a98a4379
This adds integration testing to gerritlib with jeepyb and gerrit.
Depends-On: https://review.opendev.org/704660
Change-Id: I1815e63693656d52c10a9cb9bf60f999e036dfed
We get back bytestrings from paramiko when it talks to gerrit. Make this
a bit more user friendly for python3 and decode these bytestrings into
utf8 unicode.
Change-Id: I1866de53d0978f805faef0933ef37e68454ff5f3
Old paramiko uses pycrypto which is out of date and insecure. Switch to
new paramiko and cryptography instead.
Change-Id: I651244d549d10a848643d1e3b96438833a5954bd
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
Move connection related code to a common object to allow reuse of the
connection setup code. This helps avoiding unnecessary recreation of
the connection where it is being used multiple times within the same
process for multiple calls.
Change-Id: Idf318ce5c36100e550182e773ce55da69fe35063
This is a mechanically generated change to replace openstack.org
git:// URLs with https:// equivalents.
This is in aid of a planned future move of the git hosting
infrastructure to a self-hosted instance of gitea (https://gitea.io),
which does not support the git wire protocol at this stage.
This update should result in no functional change.
For more information see the thread at
http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003825.html
Change-Id: I194eaf19074655822776b2e533519607622738c8
Newer paramiko leaks connections if they are not explicitly closed. Add
a finally handler to always close the ssh connections when we are done
with it to avoid leaking these connections.
Change-Id: Ia2e53998d362683a42bda074d82e3a3a75f380b4
Gerrit < 2.12 used a --name argument on create-project. Newer Gerrit
simply takes the project name as an arg. Check the Gerrit version before
constructing the create-project command.
Change-Id: I59ca051627d54a11ef6524cce9b5a4414fd2193d
The create-project '--name' option was removed[1] in Gerrit 2.12.
Update gerritlib to match the command for Gerrit-2.12+. This is also
compatible with Gerrit 2.11
[1] https://gerrit-review.googlesource.com/#/c/69738/
Change-Id: Ie70d938501cbf88dbbb0e9ab22abcc921f89ccdc
Gerrit supports creating projects that contain spaces in it.
Quote the project name otherwise the command will fail when user
attempts to create a project with spaces in it.
Change-Id: Ie1db92812355b4d8f7603c3b4b8d20434ca54bb3
As of the tox 2.5.0 release, failure to specify a default commands
key in the fallback testenv section of tox.ini instantly fails with
"ERROR: Commands not specified. Please update relevant section of
.../tox.ini".
Copy the testenv.commands entry from the openstack/cookiecutter
repo's template. While at it, copy the boilerplate placeholder test
from the cookiecutter templates so that jobs don't freak out when
they discover (and then run) no tests.
Change-Id: Ifb8fcfbb6d76edd8c7dcf814a705ee7eff3a9819
Until we have a good migration plan for paramika, lets cap at <2.0.0.
Otherwise we need to install libffi-dev and other dependencies for the
version bump.
Change-Id: Iad29f93814c798fc2c4204e08e940011ad1428dc
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This change does the following:
Update docs with more info
Add an example usage of this library
Add pbr versioning to docs
Updates the requirements
Rarrange the docs to look better on pypi
Lots of the elements to do above were borrowed from
python-jenkins and jenkins-job-builder projects.
Change-Id: Idc7dfc88cc26e1147b027fd55d41229c4bf3910f
Based on cookiecutter and slightly tweaked afterward.
* conf.py has autoclass_content = 'both' to generate the __init__
documentation.
* bumped doc copyright to 2015.
* adds in tox environement 'docs' as a convenience
Change-Id: I69bb4179be343ab7c8a44f6fb80d5a428fe30e17
Replace URLs for workflow documentation to appropriate parts of the
OpenStack Project Infrastructure Manual.
Change-Id: I25f5dbee234b6d6121beb9ffcf97809dd1a41bb1
Added ability to view extended information about the groups to obtain information about the uuid.
Function listGroups will be used in jeepyb (in file manage-project.py) for checking
and creating groups in gerrit database if groups does not exist.
Change-Id: Id11e358141d3802026bc7e531146e2d84546463d
Enabled functionality into gerritlib for setting descriptions
when creating a project, or have the ability to update
existing projects to update their descriptions.
This will allow jeepyb to create projects into Gerrit
having proper descriptions.
Change-Id: Id7fdef1599e8632edbdd8af5255207c18c9da7e0
Closes-Bug: #1349372
Matches Global Requirements. In the gerritlib project pbr version
does not match the global requirements.
Change-Id: I8d598635916ce2f2659139c90ac31330e158740d
Launchpad points to https://launchpad.net/openstack-ci which I assume is
a catch all.
[setup.cfg]
* skipped files.packages section which is unneeded
* removed obsolete pbr global.setup-hooks
Change-Id: I26bddf6a1bb1ce7a10ea0f8d9f40a916dcba0c90
When creating a new project, if you pass the --empty-commit
flag, a sha is created for the master branch allowing for
cloning and other subsequent actions on the repo. If the project
has no commits and is created without the --empty-commit flag,
the repo is created with no sha for the master branch creating
problems with any subsequent actions on the repo.
Change-Id: Ic233057c2503b7fd9fc234d97d71431520ea70b8