Skip to content
Snippets Groups Projects
Commit c6c6dbc1 authored by Maarten de Waard's avatar Maarten de Waard :angel:
Browse files

Merge branch 'fix-ci-reuse' into 'master'

fix can_reuse_machine.py script

See merge request openappstack/openappstack!174
parents d79e509a 2dd0a9b0
No related branches found
No related tags found
No related merge requests found
......@@ -16,13 +16,13 @@ MACHINES = greenhost_cloud.get_droplets_by_name("^{}$".format(HOSTNAME))
if MACHINES == []:
print("No machines found with hostname {}".format(HOSTNAME))
exit(1)
sys.exit(1)
for machine in MACHINES:
print("Machine status is {}".format(machine['status']))
print("Comparing IP address {} with IP address {}".format(
print("Comparing IP address '{}' with IP address '{}'".format(
machine['networks']['v4'][0]['ip_address'], IP_ADDRESS))
if machine['status'] != 'running' and \
if machine['status'] == 'running' and \
machine['networks']['v4'][0]['ip_address'] == IP_ADDRESS:
exit(0)
exit(1)
sys.exit(0)
sys.exit(1)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment