Skip to content

Commit

Permalink
Fix handling of Neutron networking when managing instances.
Browse files Browse the repository at this point in the history
  • Loading branch information
fatmcgav committed Oct 6, 2016
1 parent c47e0d3 commit b2b5876
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 b2b5876

Please sign in to comment.