(data *trident.Interface)
| 265 | } |
| 266 | |
| 267 | func formatString(data *trident.Interface) string { |
| 268 | buffer := bytes.Buffer{} |
| 269 | format := "Id: %d Mac: %s EpcId: %d DeviceType: %d DeviceId: %d IfType: %d" + |
| 270 | " LaunchServer: %s LaunchServerId: %d RegionId: %d AzId: %d, PodGroupId: %d, " + |
| 271 | "PodNsId: %d, PodId: %d, PodClusterId: %d, PodGroupType: %d, NetnsId: %d, AgentId: %d, IsVipInterface: %t " |
| 272 | buffer.WriteString(fmt.Sprintf(format, data.GetId(), Uint64ToMac(data.GetMac()), |
| 273 | data.GetEpcId(), data.GetDeviceType(), data.GetDeviceId(), data.GetIfType(), |
| 274 | data.GetLaunchServer(), data.GetLaunchServerId(), data.GetRegionId(), |
| 275 | data.GetAzId(), data.GetPodGroupId(), data.GetPodNsId(), data.GetPodId(), |
| 276 | data.GetPodClusterId(), data.GetPodGroupType(), data.GetNetnsId(), |
| 277 | data.GetVtapId(), data.GetIsVipInterface())) |
| 278 | if data.GetPodNodeId() > 0 { |
| 279 | buffer.WriteString(fmt.Sprintf("PodNodeId: %d ", data.GetPodNodeId())) |
| 280 | } |
| 281 | if len(data.GetIpResources()) > 0 { |
| 282 | buffer.WriteString(fmt.Sprintf("IpResources: %s", data.GetIpResources())) |
| 283 | } |
| 284 | return buffer.String() |
| 285 | } |
| 286 | |
| 287 | func platformData(response *trident.SyncResponse) { |
| 288 | platform := trident.PlatformData{} |
no test coverage detected