provider/openstack: gophercloud migration: Account for subnets and networks still in use
This commit is contained in:
parent
394c26c6cc
commit
ea4209c61c
|
@ -244,6 +244,11 @@ func waitForNetworkDelete(networkingClient *gophercloud.ServiceClient, networkId
|
||||||
log.Printf("[DEBUG] Successfully deleted OpenStack Network %s", networkId)
|
log.Printf("[DEBUG] Successfully deleted OpenStack Network %s", networkId)
|
||||||
return n, "DELETED", nil
|
return n, "DELETED", nil
|
||||||
}
|
}
|
||||||
|
if errCode, ok := err.(gophercloud.ErrUnexpectedResponseCode); ok {
|
||||||
|
if errCode.Actual == 409 {
|
||||||
|
return n, "ACTIVE", nil
|
||||||
|
}
|
||||||
|
}
|
||||||
return n, "ACTIVE", err
|
return n, "ACTIVE", err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -385,6 +385,11 @@ func waitForSubnetDelete(networkingClient *gophercloud.ServiceClient, subnetId s
|
||||||
log.Printf("[DEBUG] Successfully deleted OpenStack Subnet %s", subnetId)
|
log.Printf("[DEBUG] Successfully deleted OpenStack Subnet %s", subnetId)
|
||||||
return s, "DELETED", nil
|
return s, "DELETED", nil
|
||||||
}
|
}
|
||||||
|
if errCode, ok := err.(gophercloud.ErrUnexpectedResponseCode); ok {
|
||||||
|
if errCode.Actual == 409 {
|
||||||
|
return s, "ACTIVE", nil
|
||||||
|
}
|
||||||
|
}
|
||||||
return s, "ACTIVE", err
|
return s, "ACTIVE", err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue