Adds support for creating GCE persistent disks from snapshots

This commit is contained in:
Chris Conway 2014-04-11 15:45:56 -07:00
parent 0b45b1256d
commit d227330a55
6 changed files with 183 additions and 7 deletions

View file

@ -98,6 +98,12 @@ if __name__ == '__main__':
try:
# Delete matching instances
delete_gce_resources(gce.list_nodes, 'name', opts)
# Delete matching snapshots
def get_snapshots():
for volume in gce.list_volumes():
for snapshot in gce.list_volume_snapshots(volume):
yield snapshot
delete_gce_resources(get_snapshots, 'name', opts)
# Delete matching disks
delete_gce_resources(gce.list_volumes, 'name', opts)
except KeyboardInterrupt, e: