Fix : do not try to delete floatingIP if it does not exists

This commit is contained in:
Sebastien LAWNICZAK 2015-08-13 15:51:06 +02:00
parent 65c23ea0e7
commit be5f9094d0

View File

@ -776,11 +776,13 @@ func (lb *LoadBalancer) EnsureTCPLoadBalancerDeleted(name, region string) error
if err != nil && !isNotFound(err) {
return err
}
if floatingIP != nil {
error := floatingips.Delete(lb.network, floatingIP.ID).ExtractErr()
if error != nil && !isNotFound(error) {
return error
}
}
}
// We have to delete the VIP before the pool can be deleted,
// so no point continuing if this fails.