Commit Graph

24 Commits

Author SHA1 Message Date
Patrick J. McNerthney
5d39d0d5f0 Support both python 2.7 and 3.x. 2020-09-07 21:04:32 -10:00
Patrick J. McNerthney
2e86b71334 Better handling of error channel reponse, and comment typo. 2020-09-07 13:06:44 -10:00
Patrick J. McNerthney
ce3a1a298a Rework loop which collects the local python sockets for read and writing. 2020-09-07 11:56:01 -10:00
Patrick J. McNerthney
7bf04b384b Rework how the PortForward._proxy thread determines when and how to terminate. 2020-09-06 09:25:58 -10:00
Patrick J. McNerthney
72e372599d Rework the parsing of the requested ports to support both a local port and a remote port. 2020-09-01 18:33:33 -10:00
Patrick J. McNerthney
cc9ae10549 Address the following PR issues:
* Rename `_Port.error` to be `_Port.error_channel`.
* Correct comment about where setsockopt is being called.
* Add comments clarifying why the double call to the same methods to setup channel information.
* Allow for ports specified with both local and remote port numbers.
2020-08-31 15:53:59 -10:00
Patrick J. McNerthney
74d0e292b8 Implement port forwarding. 2020-08-28 13:55:00 -10:00
Patrick J. McNerthney
a00ed7f87a Put extracting the "configuration" back into the stream.py module, and use
functools.partial to orchestrate calling the websocket request hanlder.
2020-08-27 16:10:11 -10:00
Patrick J. McNerthney
fd62214e28 Refactor stream package to enable common method helpers for other streaming api classes. 2020-08-26 18:27:56 -10:00
Kubernetes Prow Robot
a25f49eb41
Merge pull request #152 from sergei-maertens/master
Refs. #151 -- detect binary payloads and send the correct opcode
2020-02-13 17:08:17 -08:00
Ulrik Mikaelsson
368d0d7b1e ws_client: Add option to disable capture-all 2019-11-27 13:45:52 +01:00
Ulrik Mikaelsson
ced17c6881 stream/ws_client: Use StringIO for WSClient._all
bytes() += bytes() copies both buffers into a new one, causing exponential
cost and gradual slow-down. Replacing with StringIO improves that
2019-11-27 13:45:52 +01:00
Kubernetes Prow Robot
6ca7a5b732
Merge pull request #157 from AyliD/patch-1
Update ws_client.py to support proxy
2019-09-23 18:39:25 -07:00
Oz Tiram
69570ac708 Add property returncode to WSClient
This will be familiar for Python users as subprocess.Popen has
the same attribute. Also, the behavior is such the returncode returns
a None value if the process was not run yet.

Other than that, when the process exists with a numerical code this will
be the value of the return code. If the command executed successfully
the return value will be 0.
2019-09-17 17:23:46 +02:00
AyliD
34f3d05c84
Update ws_client.py to support proxy 2019-08-29 07:46:40 +03:00
Oz N Tiram
c941d74b37 Remove all shebangs from Python modules and checker
As discussed, Python modules which aren't intended to be invoked
as scripts should not include a shebang line.

Update CONTRIBUTING.md and the checker script.
This script now includes a list SKIP_FILES for files that
should not be checked for boilerplate template.
The tests will now fail if a Python module has a shebang line.
Scripts which should have a shebang line and exists in the directory
`hack` can be ignored by adding them to the SKIP_FILES list.
2019-08-27 22:18:52 +02:00
Sergei Maertens
382707436f Refs. #151 -- detect binary payloads and send the correct opcode
On Python 2, strings are bytestrings either way. On Python 3, the
result of `chr(channel)` is `str`, while the data itself is
`bytes`. The channel prefix needs to be turned into a binary type,
and the websocket frame needs the correct opcode (binary vs. text).

See #151 for the bug report and related issues.
2019-08-14 11:29:03 +02:00
Kubernetes Prow Robot
474e9fb322
Merge pull request #104 from saberuster/master
decode add a replace option
2019-06-20 17:10:36 -07:00
Neha Yadav
0fc0d404ac Update pycodestyle 2019-02-08 02:46:07 +05:30
Neha Yadav
d56fdbc0cc Verify Boilerplate fix 2018-12-05 22:22:59 +05:30
saberuster
15474efbaf fix #88 2018-11-26 20:53:25 +08:00
mbohlool
67a69d4656 Fix exec command parameter expansion 2017-10-11 17:17:09 -07:00
mbohlool
b7a9f4a07e Change utility functions to new set_default Configuration model, preparing to use swagger-codegen HEAD 2017-10-09 16:44:49 -07:00
mbohlool
86361f078d Add Websocket streaming support to base 2017-09-20 11:22:04 -07:00