bm register find network

This commit is contained in:
wanyaoqi
2019-11-15 12:06:15 +08:00
parent d791100069
commit 239fd7e604
+1 -6
View File
@@ -50,12 +50,7 @@ func getBmAgentUrl(ctx context.Context, w http.ResponseWriter, r *http.Request)
return
}
n, _ := models.NetworkManager.GetOnPremiseNetworkOfIP(
ipAddr, compute.NETWORK_TYPE_BAREMETAL, tristate.None)
if n == nil {
n, _ = models.NetworkManager.GetOnPremiseNetworkOfIP(
ipAddr, compute.NETWORK_TYPE_IPMI, tristate.None)
}
n, _ := models.NetworkManager.GetOnPremiseNetworkOfIP(ipAddr, "", tristate.None)
if n == nil {
httperrors.NotFoundError(w, "Network not found")
return