mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
provider/openstack: gophercloud migration: router interface error response
This commit is contained in:
parent
8f21117fb7
commit
8371d20cf0
@ -146,7 +146,7 @@ func waitForRouterInterfaceDelete(networkingClient *gophercloud.ServiceClient, d
|
||||
routerId := d.Get("router_id").(string)
|
||||
routerInterfaceId := d.Id()
|
||||
|
||||
log.Printf("[DEBUG] Attempting to delete OpenStack Router Interface %s.\n", routerInterfaceId)
|
||||
log.Printf("[DEBUG] Attempting to delete OpenStack Router Interface %s.", routerInterfaceId)
|
||||
|
||||
removeOpts := routers.RemoveInterfaceOpts{
|
||||
SubnetID: d.Get("subnet_id").(string),
|
||||
@ -168,10 +168,18 @@ func waitForRouterInterfaceDelete(networkingClient *gophercloud.ServiceClient, d
|
||||
log.Printf("[DEBUG] Successfully deleted OpenStack Router Interface %s", routerInterfaceId)
|
||||
return r, "DELETED", nil
|
||||
}
|
||||
|
||||
if errCode, ok := err.(gophercloud.ErrUnexpectedResponseCode); ok {
|
||||
if errCode.Actual == 409 {
|
||||
log.Printf("[DEBUG] Received a 409 response. Interface still in use.")
|
||||
return r, "ACTIVE", nil
|
||||
}
|
||||
}
|
||||
|
||||
return r, "ACTIVE", err
|
||||
}
|
||||
|
||||
log.Printf("[DEBUG] OpenStack Router Interface %s still active.\n", routerInterfaceId)
|
||||
log.Printf("[DEBUG] OpenStack Router Interface %s still active.", routerInterfaceId)
|
||||
return r, "ACTIVE", nil
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user