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

Unified Diff: boto/ec2/snapshot.py

Issue 8386013: Merging in latest boto. (Closed) Base URL: svn://svn.chromium.org/boto
Patch Set: Redoing vendor drop by deleting and then merging. Created 9 years, 2 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
« no previous file with comments | « boto/ec2/securitygroup.py ('k') | boto/ec2/spotpricehistory.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: boto/ec2/snapshot.py
diff --git a/boto/ec2/snapshot.py b/boto/ec2/snapshot.py
index bbe8ad43b3e4d3e143d49c6f4ae7f7c2c823f939..d52abe44612c841cf5953578f626cea9a9945005 100644
--- a/boto/ec2/snapshot.py
+++ b/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 | « boto/ec2/securitygroup.py ('k') | boto/ec2/spotpricehistory.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698