Index: trunk/extensions/OpenStackManager/OpenStackNovaController.php |
— | — | @@ -269,6 +269,12 @@ |
270 | 270 | * @return |
271 | 271 | */ |
272 | 272 | function terminateInstance( $instanceId ) { |
| 273 | + $this->getAddresses(); |
| 274 | + foreach ( $this->addresses as $address ) { |
| 275 | + if ( $address->getInstanceId() == $instanceId ) { |
| 276 | + $this->disassociateAddress( $address->getPublicIP() ); |
| 277 | + } |
| 278 | + } |
273 | 279 | $response = $this->novaConnection->terminate_instances( $instanceId ); |
274 | 280 | |
275 | 281 | return $response->isOK(); |