def wait_for_opsman_ready(inst, timeout):
addr = get_addr(inst)
def should_wait():
try:
resp = requests.head(
"https://{}/".format(addr),
verify=False, timeout=1)
return resp.status_code >= 400
except requests.exceptions.RequestException as ex:
pass
except requests.HTTPError as ex:
print ex
return True
waitFor = wait_util.wait_while(should_wait)
waitFor(timeout)
#
# Main deploy driver function
#
评论列表
文章目录