Repository: libcloud Updated Branches: refs/heads/trunk b136a86d3 -> 146060946
GCE: Add missing snapshot attributes Signed-off-by: Sebastien Goasguen <[email protected]> This closes #401 Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/868e5024 Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/868e5024 Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/868e5024 Branch: refs/heads/trunk Commit: 868e5024cfb85f1f79a623da5647786abfcaa0b1 Parents: ec4ac70 Author: Eric Johnson <[email protected]> Authored: Tue Nov 25 21:22:28 2014 +0000 Committer: Sebastien Goasguen <[email protected]> Committed: Thu Nov 27 06:00:56 2014 -0500 ---------------------------------------------------------------------- CHANGES.rst | 4 ++++ libcloud/compute/drivers/gce.py | 10 ++++++++++ 2 files changed, 14 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/868e5024/CHANGES.rst ---------------------------------------------------------------------- diff --git a/CHANGES.rst b/CHANGES.rst index aa565fc..f55ebea 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -57,6 +57,10 @@ Compute (GITHUB-390, GITHUB-394) [Eric Johnson] +- GCE: Add missing snapshot attributes. + (GITHUB-401) + [Eric Johnson] + Changes with Apache Libcloud 0.16.0 ----------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/868e5024/libcloud/compute/drivers/gce.py ---------------------------------------------------------------------- diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py index a6ba961..a7912aa 100644 --- a/libcloud/compute/drivers/gce.py +++ b/libcloud/compute/drivers/gce.py @@ -3669,6 +3669,16 @@ class GCENodeDriver(NodeDriver): extra['selfLink'] = snapshot.get('selfLink') extra['creationTimestamp'] = snapshot.get('creationTimestamp') extra['sourceDisk'] = snapshot.get('sourceDisk') + if 'description' in snapshot: + extra['description'] = snapshot['description'] + if 'sourceDiskId' in snapshot: + extra['sourceDiskId'] = snapshot['sourceDiskId'] + if 'storageBytes' in snapshot: + extra['storageBytes'] = snapshot['storageBytes'] + if 'storageBytesStatus' in snapshot: + extra['storageBytesStatus'] = snapshot['storageBytesStatus'] + if 'licenses' in snapshot: + extra['licenses'] = snapshot['licenses'] return GCESnapshot(id=snapshot['id'], name=snapshot['name'], size=snapshot['diskSizeGb'],
