Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/tomerlf-snapshot-fr' into tomerl…
Browse files Browse the repository at this point in the history
…f-snapshot-fr
  • Loading branch information
tomerlf1 committed Jun 27, 2023
2 parents caf43d2 + 3913c85 commit b3b4c5f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gce_rescue/tasks/disks.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,16 +204,16 @@ def create_rescue_disk(vm) -> None:
)

def list_snapshot(vm) -> str:
lookup_filter = f"{vm.disks['disk_name']}-{vm.ts}"
snapshot_name = f"{vm.disks['disk_name']}-{vm.ts}"
try:
result = vm.compute.snapshots().get(
snapshot=lookup_filter,
snapshot=snapshot_name,
project=vm.project
).execute()
except HttpError:
_logger.info('Snapshot was not found for VM in active rescue mode')
return ''
return 'ok'
return snapshot_name

def restore_original_disk(vm) -> None:
""" Restore tasks to the original disk """
Expand Down

0 comments on commit b3b4c5f

Please sign in to comment.