Adding scheme support
Change-Id: I9f714875dbc6abf5f8eeef2542e3af0023d000db
This commit is contained in:
parent
f5192e3f71
commit
88ce4abfd3
|
@ -551,11 +551,17 @@ def run_probe(probe):
|
|||
if probe["type"] == "exec":
|
||||
run_cmd(probe["command"])
|
||||
elif probe["type"] == "httpGet":
|
||||
url = "http://{}:{}{}".format(
|
||||
VARIABLES["network_topology"]["private"]["address"],
|
||||
probe["port"],
|
||||
probe.get("path", "/"))
|
||||
resp = requests.get(url)
|
||||
scheme = probe.get("scheme", "http")
|
||||
kwargs = {
|
||||
"url": "{}://{}:{}{}".format(
|
||||
scheme,
|
||||
VARIABLES["network_topology"]["private"]["address"],
|
||||
probe["port"],
|
||||
probe.get("path", "/"))
|
||||
}
|
||||
if scheme == "https":
|
||||
kwargs['cert'] = CACERT
|
||||
resp = requests.get(**kwargs)
|
||||
resp.raise_for_status()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue