Permalink
Browse files

Add support for additional_info param. Fixes #754.

  • Loading branch information...
garnaat committed May 16, 2012
1 parent 293287a commit 391a4307973b2ba13088cef42f3c5950d276f659
Showing with 19 additions and 5 deletions.
  1. +8 −1 boto/ec2/connection.py
  2. +11 −4 boto/ec2/image.py
View
@@ -519,7 +519,8 @@ def run_instances(self, image_id, min_count=1, max_count=1,
instance_initiated_shutdown_behavior=None,
private_ip_address=None,
placement_group=None, client_token=None,
- security_group_ids=None):
+ security_group_ids=None,
+ additional_info=None):
"""
Runs an image on EC2.
@@ -610,6 +611,10 @@ def run_instances(self, image_id, min_count=1, max_count=1,
to ensure idempotency of the request.
Maximum 64 ASCII characters
+ :type additional_info: string
+ :param additional_info: Specifies additional information to make
+ available to the instance(s)
+
:rtype: Reservation
:return: The :class:`boto.ec2.instance.Reservation` associated with
the request for machines
@@ -668,6 +673,8 @@ def run_instances(self, image_id, min_count=1, max_count=1,
params['InstanceInitiatedShutdownBehavior'] = val
if client_token:
params['ClientToken'] = client_token
+ if additional_info:
+ params['AdditionalInfo'] = additional_info
return self.get_object('RunInstances', params, Reservation, verb='POST')
def terminate_instances(self, instance_ids=None):
View
@@ -160,7 +160,8 @@ def run(self, min_count=1, max_count=1, key_name=None,
disable_api_termination=False,
instance_initiated_shutdown_behavior=None,
private_ip_address=None,
- placement_group=None, security_group_ids=None):
+ placement_group=None, security_group_ids=None,
+ additional_info=None):
"""
Runs this instance.
@@ -229,11 +230,16 @@ def run(self, min_count=1, max_count=1, key_name=None,
:param placement_group: If specified, this is the name of the placement
group in which the instance(s) will be launched.
- :rtype: Reservation
- :return: The :class:`boto.ec2.instance.Reservation` associated with the request for machines
+ :type additional_info: string
+ :param additional_info: Specifies additional information to make
+ available to the instance(s)
:type security_group_ids:
:param security_group_ids:
+
+ :rtype: Reservation
+ :return: The :class:`boto.ec2.instance.Reservation` associated with the request for machines
+
"""
return self.connection.run_instances(self.id, min_count, max_count,
@@ -245,7 +251,8 @@ def run(self, min_count=1, max_count=1, key_name=None,
block_device_map, disable_api_termination,
instance_initiated_shutdown_behavior,
private_ip_address, placement_group,
- security_group_ids=security_group_ids)
+ security_group_ids=security_group_ids,
+ additional_info=additional_info)
def deregister(self, delete_snapshot=False):
return self.connection.deregister_image(self.id, delete_snapshot)

0 comments on commit 391a430

Please sign in to comment.