summaryrefslogtreecommitdiff
path: root/rest_example.py
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Remove support for Gerrit over ssh"David Pursehouse2014-05-291-0/+110
| | | | | | | | | | | | | | | | | | | | | 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
* Remove support for Gerrit over sshDavid Pursehouse2014-04-281-110/+0
| | | | | | | | | 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
* Fix up usage of argparse in examplesDavid Pursehouse2014-04-111-3/+5
| | | | | | | | | | | | | | | | | | | Since a76db4cfc83d4cf7a52d045e4df82ec8b1e3f562 it is broken. - Use ArgumentDefaultsHelpFormatter to automatically show default values for the options. - Remove hard-coded 'default' information from help texts. - Add a metavar for the ssh event timeout option. - Integer arguments must now be specified as `int` rather than `'int'` with quotation marks. - Fix calls to `parser.parse_args`, which now returns a single value rather than a tuple. Change-Id: If5cf4e2d1f4014a60f7a7634d43df12b788bc7b4
* Update examples to use argparse instead of optparseAndrey Devyatkin2014-04-111-25/+22
| | | | | | optparse was deprecated since 2.7 and removed in python 3 Change-Id: Ic5bccb171f45c4948dad47e8fc6fb5830d6dfcff
* Handle errors in REST API exampleDavid Pursehouse2013-11-071-4/+8
| | | | Change-Id: I0fc676f74f6e41c25d7f9f8a504e6a507a5bb43a
* Fix NameError in REST API exampleDavid Pursehouse2013-11-071-1/+1
| | | | Change-Id: Ia72639e9579e6a438b520b50a799f18184de206b
* Suppress pylint "Unable to import" errorDavid Pursehouse2013-10-211-0/+2
| | | | | | | pylint fails because it can't import requests_kerberos. This is a false positive; we already have handling of import failure. Change-Id: I1641528b8358a8916dfcf4c67e680a03118b3913
* Fix pylint error in rest_example.pyDavid Pursehouse2013-10-181-2/+3
| | | | | | pylint says: "redefinition of unused 'HTTPKerberosAuth' from line 34" Change-Id: Ie2b8cee42bf08eaa0e9bdab1ef5bf2b23ccee7f5
* Add support for Kerberos authentication in example scriptDavid Pursehouse2013-09-241-1/+15
| | | | | | | | | | Add a --kerberos-auth option that can be used to enable kerberos authentication. The option is only present if the HTTPKerberosAuth handler can be successfully imported the from requests_kerberos module. Change-Id: Id6c2beca1bf76fbe01f7a6aa8dfccc5844269454
* Add REST API exampleDavid Pursehouse2013-09-181-0/+90
Add an exmaple script to demonstrate usage of the REST API client. Change-Id: I4a181c3f10e438e0f119b86584771a422bfbd6eb