(item *metadbmodel.WANIP)
| 542 | } |
| 543 | |
| 544 | func (t *DataSet) AddWANIP(item *metadbmodel.WANIP) { |
| 545 | t.wanIPLcuuidToVInterfaceID[item.Lcuuid] = item.VInterfaceID |
| 546 | t.wanIPLcuuidToIP[item.Lcuuid] = item.IP |
| 547 | if vifLcuuid, _ := t.GetVInterfaceLcuuidByID(item.VInterfaceID); vifLcuuid != "" { |
| 548 | deviceType, _ := t.GetDeviceTypeByVInterfaceLcuuid(vifLcuuid) |
| 549 | deviceID, _ := t.GetDeviceIDByVInterfaceLcuuid(vifLcuuid) |
| 550 | mac, _ := t.GetMacByVInterfaceLcuuid(vifLcuuid) |
| 551 | networkID, _ := t.GetNetworkIDByVInterfaceLcuuid(vifLcuuid) |
| 552 | t.setDeviceToIPNetworkMap(deviceType, deviceID, networkID, IPKey{IP: item.IP, Mac: mac, Lcuuid: item.Lcuuid}) |
| 553 | } |
| 554 | t.GetLogFunc()(addToToolMap(ctrlrcommon.RESOURCE_TYPE_WAN_IP_EN, item.Lcuuid), t.metadata.LogPrefixes) |
| 555 | } |
| 556 | |
| 557 | func (t *DataSet) DeleteWANIP(lcuuid string) { |
| 558 | if vifID, ok := t.GetVInterfaceIDByWANIPLcuuid(lcuuid); ok { |
no test coverage detected