return cloudprovider.InstanceNotFound in opentack ExternalID()

pull/6/head
Seth Jennings 2016-08-29 21:23:08 -05:00
parent 8675adf138
commit bde3966699
1 changed files with 3 additions and 0 deletions

View File

@ -136,6 +136,9 @@ func (i *Instances) NodeAddresses(name string) ([]api.NodeAddress, error) {
func (i *Instances) ExternalID(name string) (string, error) {
srv, err := getServerByName(i.compute, name)
if err != nil {
if err == ErrNotFound {
return "", cloudprovider.InstanceNotFound
}
return "", err
}
return srv.ID, nil