Unverified Commit aac3c70d authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #63369 from desaintmartin/automated-cherry-pick-of-#61002-upstream-release-1.10

Automatic merge from submit-queue. Automated cherry pick of #61002: IsNotFound should check ErrDefault404 and Cherry pick of #61002 on release-1.10. #61002: IsNotFound should check ErrDefault404 and
parents 18f4924f 3de57084
...@@ -608,8 +608,17 @@ func (os *OpenStack) LoadBalancer() (cloudprovider.LoadBalancer, bool) { ...@@ -608,8 +608,17 @@ func (os *OpenStack) LoadBalancer() (cloudprovider.LoadBalancer, bool) {
} }
func isNotFound(err error) bool { func isNotFound(err error) bool {
e, ok := err.(*gophercloud.ErrUnexpectedResponseCode) if _, ok := err.(gophercloud.ErrDefault404); ok {
return ok && e.Actual == http.StatusNotFound return true
}
if errCode, ok := err.(gophercloud.ErrUnexpectedResponseCode); ok {
if errCode.Actual == http.StatusNotFound {
return true
}
}
return false
} }
// Zones indicates that we support zones // Zones indicates that we support zones
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment