Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2401)

Unified Diff: third_party/gsutil/boto/boto/ec2/snapshot.py

Issue 10199002: Upgrade gsutil to 3.4 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comments Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/gsutil/boto/boto/ec2/snapshot.py
diff --git a/third_party/gsutil/20110627/boto/boto/ec2/snapshot.py b/third_party/gsutil/boto/boto/ec2/snapshot.py
similarity index 92%
rename from third_party/gsutil/20110627/boto/boto/ec2/snapshot.py
rename to third_party/gsutil/boto/boto/ec2/snapshot.py
index bbe8ad43b3e4d3e143d49c6f4ae7f7c2c823f939..d52abe44612c841cf5953578f626cea9a9945005 100644
--- a/third_party/gsutil/20110627/boto/boto/ec2/snapshot.py
+++ b/third_party/gsutil/boto/boto/ec2/snapshot.py
@@ -21,12 +21,14 @@
# IN THE SOFTWARE.
"""
-Represents an EC2 Elastic IP Snapshot
+Represents an EC2 Elastic Block Store Snapshot
"""
from boto.ec2.ec2object import TaggedEC2Object
class Snapshot(TaggedEC2Object):
+ AttrName = 'createVolumePermission'
+
def __init__(self, connection=None):
TaggedEC2Object.__init__(self, connection)
self.id = None
@@ -88,26 +90,26 @@ class Snapshot(TaggedEC2Object):
return self.connection.delete_snapshot(self.id)
def get_permissions(self):
- attrs = self.connection.get_snapshot_attribute(self.id,
- attribute='createVolumePermission')
+ attrs = self.connection.get_snapshot_attribute(self.id, self.AttrName)
return attrs.attrs
def share(self, user_ids=None, groups=None):
return self.connection.modify_snapshot_attribute(self.id,
- 'createVolumePermission',
+ self.AttrName,
'add',
user_ids,
groups)
def unshare(self, user_ids=None, groups=None):
return self.connection.modify_snapshot_attribute(self.id,
- 'createVolumePermission',
+ self.AttrName,
'remove',
user_ids,
groups)
def reset_permissions(self):
- return self.connection.reset_snapshot_attribute(self.id, 'createVolumePermission')
+ return self.connection.reset_snapshot_attribute(self.id,
+ self.AttrName)
class SnapshotAttribute:
« no previous file with comments | « third_party/gsutil/boto/boto/ec2/securitygroup.py ('k') | third_party/gsutil/boto/boto/ec2/spotdatafeedsubscription.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698