Automatically add description to snapshots

This commit is contained in:
2018-04-21 18:54:00 -05:00
parent 2822ef2c50
commit 0617eaa93b
+3
View File
@@ -121,10 +121,13 @@ class Gcloud(object):
project = self.project
if not zone:
zone = self.zone
body = {
'name': name,
'labels': {'pod-name': pod_name},
'description': 'from-pod: {0}'.format(pod_name)
}
return self.api.disks().createSnapshot(project=project, zone=zone,
disk=disk, body=body).execute()