Merge pull request #3693 from wanyaoqi/bugfix/wyq/fix-bm-register-find-network

bugfix: bm register find network
This commit is contained in:
Zexi Li
2019-11-15 16:02:44 +08:00
committed by GitHub
+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