diff options
Diffstat (limited to 'boto/ec2/address.py')
-rw-r--r-- | boto/ec2/address.py | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/boto/ec2/address.py b/boto/ec2/address.py index ce1189ed..807406f7 100644 --- a/boto/ec2/address.py +++ b/boto/ec2/address.py @@ -22,6 +22,7 @@ from boto.ec2.ec2object import EC2Object + class Address(EC2Object): """ Represents an EC2 Elastic IP Address @@ -78,33 +79,36 @@ class Address(EC2Object): """ if self.allocation_id: return self.connection.release_address( - None, - self.allocation_id, + allocation_id=self.allocation_id, dry_run=dry_run) else: return self.connection.release_address( - self.public_ip, + public_ip=self.public_ip, dry_run=dry_run ) delete = release - def associate(self, instance_id, allow_reassociation=False, dry_run=False): + def associate(self, instance_id=None, network_interface_id=None, private_ip_address=None, allow_reassociation=False, dry_run=False): """ Associate this Elastic IP address with a currently running instance. :see: :meth:`boto.ec2.connection.EC2Connection.associate_address` """ if self.allocation_id: return self.connection.associate_address( - instance_id, - self.public_ip, + instance_id=instance_id, + public_ip=self.public_ip, allocation_id=self.allocation_id, + network_interface_id=network_interface_id, + private_ip_address=private_ip_address, allow_reassociation=allow_reassociation, dry_run=dry_run ) return self.connection.associate_address( - instance_id, - self.public_ip, + instance_id=instance_id, + public_ip=self.public_ip, + network_interface_id=network_interface_id, + private_ip_address=private_ip_address, allow_reassociation=allow_reassociation, dry_run=dry_run ) @@ -116,14 +120,11 @@ class Address(EC2Object): """ if self.association_id: return self.connection.disassociate_address( - None, - self.association_id, + association_id=self.association_id, dry_run=dry_run ) else: return self.connection.disassociate_address( - self.public_ip, + public_ip=self.public_ip, dry_run=dry_run ) - - |