mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix(baremetal): admin nic is reset when added secondly (#19377)
This commit is contained in:
@@ -2136,6 +2136,10 @@ func (b *SBaremetalInstance) SendNicInfo(nic *types.SNicDevInfo, idx int, nicTyp
|
||||
params.Add(jsonutils.JSONTrue, "reserve")
|
||||
}
|
||||
}
|
||||
localNic := b.GetNicByMac(nic.Mac)
|
||||
if localNic != nil {
|
||||
params.Add(jsonutils.NewString(localNic.WireId), "wire_id")
|
||||
}
|
||||
resp, err := modules.Hosts.PerformAction(
|
||||
b.GetClientSession(),
|
||||
b.GetId(),
|
||||
|
||||
Reference in New Issue
Block a user