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

Unified Diff: third_party/gsutil/boto/boto/ec2/blockdevicemapping.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/blockdevicemapping.py
diff --git a/third_party/gsutil/20110627/boto/boto/ec2/blockdevicemapping.py b/third_party/gsutil/boto/boto/ec2/blockdevicemapping.py
similarity index 75%
rename from third_party/gsutil/20110627/boto/boto/ec2/blockdevicemapping.py
rename to third_party/gsutil/boto/boto/ec2/blockdevicemapping.py
index 92cf99b866e329cc67d65509e6b957c0c72a3ea3..c447d15013c2adc4a9987e5c8749530ed2e48821 100644
--- a/third_party/gsutil/20110627/boto/boto/ec2/blockdevicemapping.py
+++ b/third_party/gsutil/boto/boto/ec2/blockdevicemapping.py
@@ -21,17 +21,29 @@
#
class BlockDeviceType(object):
+ """
+ Represents parameters for a block device.
+ """
- def __init__(self, connection=None):
+ def __init__(self,
+ connection=None,
+ ephemeral_name=None,
+ no_device=False,
+ volume_id=None,
+ snapshot_id=None,
+ status=None,
+ attach_time=None,
+ delete_on_termination=False,
+ size=None):
self.connection = connection
- self.ephemeral_name = None
- self.no_device = False
- self.volume_id = None
- self.snapshot_id = None
- self.status = None
- self.attach_time = None
- self.delete_on_termination = False
- self.size = None
+ self.ephemeral_name = ephemeral_name
+ self.no_device = no_device
+ self.volume_id = volume_id
+ self.snapshot_id = snapshot_id
+ self.status = status
+ self.attach_time = attach_time
+ self.delete_on_termination = delete_on_termination
+ self.size = size
def startElement(self, name, attrs, connection):
pass
@@ -63,8 +75,22 @@ class BlockDeviceType(object):
EBSBlockDeviceType = BlockDeviceType
class BlockDeviceMapping(dict):
+ """
+ Represents a collection of BlockDeviceTypes when creating ec2 instances.
+
+ Example:
+ dev_sda1 = BlockDeviceType()
+ dev_sda1.size = 100 # change root volume to 100GB instead of default for ami
+ bdm = BlockDeviceMapping()
+ bdm['/dev/sda1'] = dev_sda1
+ reservation = image.run(..., block_device_map=bdm, ...)
+ """
def __init__(self, connection=None):
+ """
+ :type connection: :class:`boto.ec2.EC2Connection`
+ :param connection: Optional connection.
+ """
dict.__init__(self)
self.connection = connection
self.current_name = None
« no previous file with comments | « third_party/gsutil/boto/boto/ec2/autoscale/tag.py ('k') | third_party/gsutil/boto/boto/ec2/bundleinstance.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698