@@ -71,33 +71,50 @@ def endElement(self, name, value, connection):
71
71
else :
72
72
setattr (self , name , value )
73
73
74
- def release (self ):
74
+ def release (self , dry_run = False ):
75
75
"""
76
76
Free up this Elastic IP address.
77
77
:see: :meth:`boto.ec2.connection.EC2Connection.release_address`
78
78
"""
79
79
if self .allocation_id :
80
- return self .connection .release_address (None , self .allocation_id )
80
+ return self .connection .release_address (
81
+ None ,
82
+ self .allocation_id ,
83
+ dry_run = dry_run )
81
84
else :
82
- return self .connection .release_address (self .public_ip )
85
+ return self .connection .release_address (
86
+ self .public_ip ,
87
+ dry_run = dry_run
88
+ )
83
89
84
90
delete = release
85
91
86
- def associate (self , instance_id ):
92
+ def associate (self , instance_id , dry_run = False ):
87
93
"""
88
94
Associate this Elastic IP address with a currently running instance.
89
95
:see: :meth:`boto.ec2.connection.EC2Connection.associate_address`
90
96
"""
91
- return self .connection .associate_address (instance_id , self .public_ip )
97
+ return self .connection .associate_address (
98
+ instance_id ,
99
+ self .public_ip ,
100
+ dry_run = dry_run
101
+ )
92
102
93
- def disassociate (self ):
103
+ def disassociate (self , dry_run = False ):
94
104
"""
95
105
Disassociate this Elastic IP address from a currently running instance.
96
106
:see: :meth:`boto.ec2.connection.EC2Connection.disassociate_address`
97
107
"""
98
108
if self .association_id :
99
- return self .connection .disassociate_address (None , self .association_id )
109
+ return self .connection .disassociate_address (
110
+ None ,
111
+ self .association_id ,
112
+ dry_run = dry_run
113
+ )
100
114
else :
101
- return self .connection .disassociate_address (self .public_ip )
115
+ return self .connection .disassociate_address (
116
+ self .public_ip ,
117
+ dry_run = dry_run
118
+ )
102
119
103
120
0 commit comments