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

Unified Diff: boto/ec2/image.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/elb/securitygroup.py ('k') | boto/ec2/instance.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: boto/ec2/image.py
diff --git a/boto/ec2/image.py b/boto/ec2/image.py
index a85fba0b0627a738d84c4068057a6832bcf87102..de1b5d2656569169ee47c83e5ebcd70383bedc82 100644
--- a/boto/ec2/image.py
+++ b/boto/ec2/image.py
@@ -151,7 +151,7 @@ class Image(TaggedEC2Object):
raise ValueError('%s is not a valid Image ID' % self.id)
return self.state
- def run(self, min_count=1, max_count=1, key_name=None,
+ def run(self, min_count=1, max_count=1, key_name=None,
security_groups=None, user_data=None,
addressing_type=None, instance_type='m1.small', placement=None,
kernel_id=None, ramdisk_id=None,
@@ -160,7 +160,7 @@ class Image(TaggedEC2Object):
disable_api_termination=False,
instance_initiated_shutdown_behavior=None,
private_ip_address=None,
- placement_group=None):
+ placement_group=None, security_group_ids=None):
"""
Runs this instance.
@@ -220,11 +220,9 @@ class Image(TaggedEC2Object):
via the API.
:type instance_initiated_shutdown_behavior: string
- :param instance_initiated_shutdown_behavior: Specifies whether the instance's
- EBS volumes are stopped (i.e. detached)
- or terminated (i.e. deleted) when
- the instance is shutdown by the
- owner. Valid values are:
+ :param instance_initiated_shutdown_behavior: Specifies whether the instance
+ stops or terminates on instance-initiated
+ shutdown. Valid values are:
stop | terminate
:type placement_group: string
@@ -233,7 +231,11 @@ class Image(TaggedEC2Object):
:rtype: Reservation
:return: The :class:`boto.ec2.instance.Reservation` associated with the request for machines
+
+ :type security_group_ids:
+ :param security_group_ids:
"""
+
return self.connection.run_instances(self.id, min_count, max_count,
key_name, security_groups,
user_data, addressing_type,
@@ -242,11 +244,11 @@ class Image(TaggedEC2Object):
monitoring_enabled, subnet_id,
block_device_map, disable_api_termination,
instance_initiated_shutdown_behavior,
- private_ip_address,
- placement_group)
+ private_ip_address, placement_group,
+ security_group_ids=security_group_ids)
- def deregister(self):
- return self.connection.deregister_image(self.id)
+ def deregister(self, delete_snapshot=False):
+ return self.connection.deregister_image(self.id, delete_snapshot)
def get_launch_permissions(self):
img_attrs = self.connection.get_image_attribute(self.id,
« no previous file with comments | « boto/ec2/elb/securitygroup.py ('k') | boto/ec2/instance.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698