(data *agent.Interface)
| 550 | } |
| 551 | |
| 552 | func AformatString(data *agent.Interface) string { |
| 553 | buffer := bytes.Buffer{} |
| 554 | format := "Id: %d Mac: %s EpcId: %d DeviceType: %d IfType: %d" + |
| 555 | " RegionId: %d " + |
| 556 | " PodClusterId: %d, IsVipInterface: %t " |
| 557 | buffer.WriteString(fmt.Sprintf(format, data.GetId(), Uint64ToMac(data.GetMac()), |
| 558 | data.GetEpcId(), data.GetDeviceType(), data.GetIfType(), data.GetRegionId(), |
| 559 | data.GetPodClusterId(), |
| 560 | data.GetIsVipInterface())) |
| 561 | if data.GetPodNodeId() > 0 { |
| 562 | buffer.WriteString(fmt.Sprintf("PodNodeId: %d ", data.GetPodNodeId())) |
| 563 | } |
| 564 | if len(data.GetIpResources()) > 0 { |
| 565 | buffer.WriteString(fmt.Sprintf("IpResources: %s", data.GetIpResources())) |
| 566 | } |
| 567 | return buffer.String() |
| 568 | } |
| 569 | |
| 570 | func AplatformData(response *agent.SyncResponse) { |
| 571 | platform := agent.PlatformData{} |
no test coverage detected