provider/openstack: gophercloud migration: util
This commit is contained in:
parent
74f990ff5c
commit
e677eaac6b
|
@ -3,14 +3,14 @@ package openstack
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/gophercloud/gophercloud"
|
||||
"github.com/hashicorp/terraform/helper/schema"
|
||||
"github.com/rackspace/gophercloud"
|
||||
)
|
||||
|
||||
// CheckDeleted checks the error to see if it's a 404 (Not Found) and, if so,
|
||||
// sets the resource ID to the empty string instead of throwing an error.
|
||||
func CheckDeleted(d *schema.ResourceData, err error, msg string) error {
|
||||
errCode, ok := err.(*gophercloud.UnexpectedResponseCodeError)
|
||||
errCode, ok := err.(*gophercloud.ErrUnexpectedResponseCode)
|
||||
if !ok {
|
||||
return fmt.Errorf("%s: %s", msg, err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue