Skip to content

Commit

Permalink
Merge pull request hashicorp#3 from fatmcgav/gophercloud-migration-fi…
Browse files Browse the repository at this point in the history
…x_neutron_instance

Fix handling of Neutron networking when managing instances.
  • Loading branch information
jtopjian authored Oct 6, 2016
2 parents c47e0d3 + b2b5876 commit cc87bc9
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -965,18 +965,19 @@ func getInstanceNetworks(computeClient *gophercloud.ServiceClient, d *schema.Res
allPages, err := tenantnetworks.List(computeClient).AllPages()
if err != nil {
if _, ok := err.(gophercloud.ErrDefault404); ok {
log.Println("[DEBUG] os-tenant-networks disabled")
tenantNetworkExt = false
}

log.Println("[DEBUG] Err looks like: %+v", err)
if errCode, ok := err.(gophercloud.ErrUnexpectedResponseCode); ok {
if errCode.Actual == 403 {
log.Println("[DEBUG] os-tenant-networks disabled.")
tenantNetworkExt = false
} else {
return nil, err
}

return nil, err
}

return nil, err
}

networkID := ""
Expand Down

0 comments on commit cc87bc9

Please sign in to comment.