| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, if a server is not in the known_hosts file then
the client will fail with an error like:
paramiko.SSHException: Server '[<host>]:<port>' not found in known_hosts
This change allows users to configure paramiko with the AutoAddPolicy().
It should be noted that using this policy opens users to
man-in-the-middle attacks, which is why it is an optional setting and
defaults to False.
|
|
|
|
|
|
|
| |
This will allow keeping the SSH sessions alive for a duration of time
longer than the timeout configured for the server.
Change-Id: I9d86c0fc304783fab944ebae7bd0da8f3b1edd6c
|
|
|
|
|
|
|
|
|
| |
Trying to use pygerrit to submit reviews fails if there
is a unicode character in the review comment. This change
sees if the message is valid ascii, and if it's not,
encodes as utf-8.
Change-Id: Ia14d59d28b11a78bee9d89fd84fb09976015787f
|
|
|
|
|
|
| |
And fix a couple of newly discovered warnings.
Change-Id: I835d16ed94f2e20f003a2aa0b0370483d02e7926
|
|
|
|
| |
Change-Id: I776a58b2cdac17e3eafc985ee727cd88e8294ccc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ssh interface is still being used and patches are being
contributed [1].
It's easier to revert the removal on master than attempt to keep
the support in a separate branch.
This reverts commit f0b77968389966cd7bad0cac1fe7f04526eafde1.
[1] https://github.com/sonyxperiadev/pygerrit/pull/21
Conflicts:
README.rst
example.py
requirements.txt
setup.py
unittests.py
Change-Id: I9e02208c57cb2022ff39cff6650101ed40c0519d
|
|
|
|
|
|
|
|
|
| |
From now only the REST API is supported.
This makes installation of the package a bit lighter as we no
longer depend on paramiko and pycrypto
Change-Id: Ieda773d596fd43047c05895f3304690ddf709094
|
|
|
|
|
|
|
|
|
|
| |
If the username is not given in the constructor, it is detected
from the ssh config.
Add a method that allows the client to get the detected username
that was used to connect to Gerrit.
Change-Id: I15747d1446b07ce6b250f294fe72842a1be50a6c
|
|
|
|
|
|
|
|
|
|
|
| |
If the username and port are specified when constructing the client,
they will be used instead of attempting to fetch from the ssh config
file.
In this case the full hostname of the server is required, rather
than only the name as listed in the ssh config.
Change-Id: I82b8638d99922c9b40a54a8275ffc085f505696f
|
|
|
|
|
|
|
|
| |
The `identityfile` element of the result returned by SSHConfig.lookup()
is a list, not a string, therefore calling `expanduser` on it results
in a crash.
Change-Id: I8673295d66cac9ca3b522867735b1211f0556d21
|
|
|
|
|
|
|
|
|
|
| |
The `exec_command` overrides the method of the same name from the
parent class unnecessarily.
Remove it and call the parent `exec_command` method directly from the
`run_gerrit_command` method.
Change-Id: I977000a372c9b6e9143ca0e740b971a606a83146
|
|
|
|
|
|
|
|
|
| |
Use an Event(), rather than a boolean, to determine whether or not
the remote is connected.
Protect the connection logic with a Lock().
Change-Id: Ifc5888894a90b7e3a11e21ec3f9bf69f0a7608a8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the copyright and license headers are in module docstrings, they
appear in the generated API documentation pages and it looks crappy.
Instead, put the headers in regular Python comments. Thus each file
still has the required copyright and license notice, but it is not
included everywhere in the generated documentation.
The documentation still includes an automatically generated copyright
notice at the bottom of each page.
Change-Id: Ibc5f4ca221c0a6de26f04f3b4511d8991e28b663
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add missing docstrings that the PEP-257 checker did not report.
- Add explicit parameters on `GerritSSHClient.exec_command` method
overridden from `paramiko.SSHClient.exec_command`.
- Disable warning that the `GerritEvent` class does not have a member
named `name`. This member is initialised by the event factory when
a derived class is instantiated.
- Capitalise constant `REQUIRES`.
Change-Id: I8880e061b51e12145ee55e0cd86dab930970cde5
|
|
|
|
| |
Change-Id: I6bc8d92ed1055959f1c24128b8beace814eaf998
|
|
|
|
| |
Change-Id: I850978039ca10162a5ae2ab0a4f79374183107ba
|
|
|
|
|
|
|
| |
Include the name of the command that was run in the result
object.
Change-Id: I93c27ed937d27942428f561dc50d84b5ea25591a
|
|
|
|
|
|
|
|
|
|
| |
Instead of opening the ssh connection in the constructor, only
connect when actually needed.
This improves performance of the unit tests. Running the test
suite now takes less than 1 second rather than 22 seconds.
Change-Id: I03a49d74db8c045740a85201c02c492d175e0d6c
|
|
|
|
| |
Change-Id: If06f1ea17740a796142db63e7086f80445f4c6e1
|
|
|
|
|
|
|
| |
Catch socket error raised when connecting to the server over SSH
and raise a GerritError.
Change-Id: I140a26be4bc04ec229d95faaa80b94477cf96645
|
|
|
|
|
|
|
|
|
|
|
|
| |
Handle exceptions with the syntax:
except Exception as e
rather than:
except Exception, e
Change-Id: I883fdc1db541b9d2699712bfd2bd328261635005
|
|
|
|
|
|
| |
This reverts commit 42272ffdb1541cf96f13466446e07c24d8e7febb.
Change-Id: Ie00d75579231873db98bc3a84caef408152f3d81
|
|
|
|
|
|
|
|
| |
Add a new class GerritSSHCommandResult to encapsulate the stdin,
stdout, and stderr streams that are returned from running a
command over SSH.
Change-Id: Ic851c195ac63e530e62198eb7e0af62c2fbd73d5
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move the functionality to get the Gerrit version from the main
client into the SSH client and reimplement it.
First attempt to get the version from the underlying Paramiko SSH
client. If that fails, fall back to using the `gerrit version`
command as before.
Get and print the version in the example script.
Change-Id: Ia79853f80f898b43c301fcecee61fdfdb75e9811
|
|
|
|
|
|
|
| |
Also make sure the lock is released when an exception
occurs.
Change-Id: Id4af1d4950f604f47b11fdd7d84f94f769aecd4d
|
|
|
|
|
|
| |
Add a lock around calls to the run_gerrit_command method.
Change-Id: I9429ed880e14a4248b08937969f8faebc2240f79
|
|
|
|
| |
Change-Id: I25ce3fafe7a51d0221f66fe30b2fb7cc8115c4aa
|
|
|
|
|
|
|
| |
Raise an exception if the ssh config specifies an invalid ssh
port number.
Change-Id: I64fae04c91838a0f9c478ac9de19973e1499ed7e
|
|
Add initial version of GerritSSHClient, which is a wrapper for
paramiko's SSHClient.
The class derives from SSHClient and configures the ssh
connection from the user's ssh config file.
Change-Id: I54a193e41356de272c95c5288ed2c9e50a776cdf
|