pyvcloud
pyvcloud copied to clipboard
Add a timeout param to _do_request_prim
_do_request_prim in client.py doesn't have a timeout parameter, as a result there is no way to test connectivity to server without waiting for the request to timeout, which can be in minutes. By adding the timeout parameter, the client can control how long they need to wait before receiving a ReadTimeoutError.
Testing done: Wrote a custom script that made a GET /api/cse/system call to vCD with no CSE server running,
- without timeout the call took 30+ seconds to fail
- With a timeout of 3.05 seconds, the call returned the expected error in ~3 seconds.