1 #!/usr/local/bin/python2.7
7 conductor_url = "http://{0}:8084/MaveriQConductor/isReady"
8 check_api = "http://{0}:8084/MaveriQManager/api/Inventory/isReady"
10 check_password = "radcom"
13 PARSER = argparse.ArgumentParser()
14 PARSER.add_argument("ScribeIP", type=str,
15 help="The Stage the application is currently in")
16 ARGS = PARSER.parse_args()
18 print "Begining check availability check!"
20 while isConnected is False:
24 if requests.get(conductor_url.format(ARGS.ScribeIP),
25 headers={'Connection': 'close'}).status_code is 200 and requests.get(
26 check_api.format(ARGS.ScribeIP,
27 headers={'Connection': 'close'}),
28 auth=requests.auth.HTTPBasicAuth(check_user,
29 check_password)).status_code is 200:
31 except requests.exceptions.ConnectionError as e:
34 print 'Conductor and Scribe are ready!'