Skip to content

Commit

Permalink
minor fixes to output
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-luna-valero committed Dec 5, 2024
1 parent c2badb9 commit 05b5fab
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions fedcloud_vm_monitoring/vo_mon.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,22 @@ def launch_test_vm(self):
imclient = IMClient.init_client(IM_REST_API, auth)
click.echo(f"[+] Creating test VM...")
success, inf_id = imclient.create(tosca_template, desc_type="yaml")
click.echo(f"[+] IM: {success}, {inf_id}")
if not success:
raise VOTestException(inf_id)
click.echo(f"[+] Test VM successfully created with ID {inf_id}")
state = "pending"
while state != "configured":
click.echo(f"[+] Waiting for test VM to be ready...")
time.sleep(10)
success, state = imclient.getvminfo(inf_id, 0, prop='state')
click.echo(f"[+] Waiting for test VM to be ready...")
time.sleep(30)
# click.echo(f"[+] Waiting for test VM to be ready...")
# success, info = imclient._wait()
# click.echo(f"[+] IM: {success}, {inf_id}")
# TODO: need to ssh into VM here
success, err = imclient.destroy(inf_id)
click.echo(f"[+] IM: {success}, {err}")
if not success:
raise VOTestException(err)
click.echo(f"[+] Test VM successfully deleted with ID {inf_id}")
self.delete_auth_file(AUTH_FILE)

0 comments on commit 05b5fab

Please sign in to comment.