Skip to content

Commit 7bf455a

Browse files
bh7cwopenshift-merge-robot
authored andcommittedDec 3, 2020
mantle: clean up platform/api/azure/network
This cleans up platform/api/azure/network.go. Fixes part of #1813
1 parent d85cfea commit 7bf455a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎mantle/platform/api/azure/network.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,13 @@ func (a *API) GetIPAddresses(name, publicIPName, resourceGroup string) (string,
109109
}
110110

111111
configs := *nic.InterfacePropertiesFormat.IPConfigurations
112+
112113
for _, conf := range configs {
113114
if conf.PrivateIPAddress == nil {
114115
return "", "", fmt.Errorf("PrivateIPAddress is nil")
116+
} else {
117+
return publicIP, *conf.PrivateIPAddress, nil
115118
}
116-
return publicIP, *conf.PrivateIPAddress, nil
117119
}
118120
return "", "", fmt.Errorf("no ip configurations found")
119121
}

0 commit comments

Comments
 (0)
Please sign in to comment.