Kyle MacLeod d4f8e43d64 Add timeout for get_endpoint_certificate
This commit works around the lack of a proper timeout in the
ssl.get_server_certificate() call. A proper timeout is available in
python 3.8+ (see https://bugs.python.org/issue31870).

We work around the lack of timeout by first attempting a basic socket
connection to the (host, port) with a short timeout (default: 10s). If
that is successful we can continue to fetch the server certificate;
otherwise we abandon the attempt.

Test Plan / Failure Path:

PASS: Verify proper timeout when subcloud is offline/shutdown
PASS: Verify proper behaviour when subcloud is available

Regression:
PASS: Verify feature logging

Story: 2008960
Task: 43545

Change-Id: If0f7c926e136fc776dbc74ed27b767af1af2cf80
Signed-off-by: Kyle MacLeod <kyle.macleod@windriver.com>
2021-10-07 22:14:27 -04:00
2019-09-09 14:52:12 -05:00
2021-02-19 12:14:38 -06:00
2019-09-09 14:52:12 -05:00
2019-09-09 14:52:12 -05:00
2019-09-09 14:52:12 -05:00
Description
StarlingX Puppet modules and manifests
20 MiB
Languages
Puppet 58.6%
Python 21.6%
HTML 7.5%
Shell 7%
Ruby 4.7%
Other 0.6%