mantle: clean up platform/api/azure/network
This cleans up platform/api/azure/network.go.
Fixes part of
@@ -109,12 +109,14 @@ func (a *API) GetIPAddresses(name, publicIPName, resourceGroup string) (string,
}
configs := *nic.InterfacePropertiesFormat.IPConfigurations
+
for _, conf := range configs {
if conf.PrivateIPAddress == nil {
return "", "", fmt.Errorf("PrivateIPAddress is nil")
- }
+ } else {
return publicIP, *conf.PrivateIPAddress, nil
}
+ }
return "", "", fmt.Errorf("no ip configurations found")
}
