mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-04-28 21:01:16 -04:00
provider/openstack: gophercloud migration: Account for subnets and networks still in use
This commit is contained in:
@@ -244,6 +244,11 @@ func waitForNetworkDelete(networkingClient *gophercloud.ServiceClient, networkId
|
||||
log.Printf("[DEBUG] Successfully deleted OpenStack Network %s", networkId)
|
||||
return n, "DELETED", nil
|
||||
}
|
||||
if errCode, ok := err.(gophercloud.ErrUnexpectedResponseCode); ok {
|
||||
if errCode.Actual == 409 {
|
||||
return n, "ACTIVE", nil
|
||||
}
|
||||
}
|
||||
return n, "ACTIVE", err
|
||||
}
|
||||
|
||||
|
||||
@@ -385,6 +385,11 @@ func waitForSubnetDelete(networkingClient *gophercloud.ServiceClient, subnetId s
|
||||
log.Printf("[DEBUG] Successfully deleted OpenStack Subnet %s", subnetId)
|
||||
return s, "DELETED", nil
|
||||
}
|
||||
if errCode, ok := err.(gophercloud.ErrUnexpectedResponseCode); ok {
|
||||
if errCode.Actual == 409 {
|
||||
return s, "ACTIVE", nil
|
||||
}
|
||||
}
|
||||
return s, "ACTIVE", err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user