From 41a243eeabed4aa06c29aa902e831545094e52d8 Mon Sep 17 00:00:00 2001 From: Maximilian Moehl Date: Thu, 22 Oct 2026 13:05:39 +0200 Subject: [PATCH 1/3] Remove redundant name from the NetworkInterfaceStatus Signed-off-by: Maximilian Moehl --- plugin/networkinterface.go | 1 - 1 file changed, 1 deletion(-) diff --git a/plugin/networkinterface.go b/plugin/networkinterface.go index 2267218..28bc5ea 100644 --- a/plugin/networkinterface.go +++ b/plugin/networkinterface.go @@ -39,7 +39,6 @@ type NetworkInterfaceSpec struct { } type NetworkInterfaceStatus struct { - Name string `json:"name"` Handle string `json:"handle"` State NetworkInterfaceState `json:"state"` From 35f6b0c627db0f4870c4da12b22d40c1a51420b5 Mon Sep 17 00:00:00 2001 From: Maximilian Moehl Date: Thu, 22 Oct 2026 13:05:59 +0200 Subject: [PATCH 2/3] Add IP status to NetworkInterfaceStatus Signed-off-by: Maximilian Moehl --- plugin/networkinterface.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugin/networkinterface.go b/plugin/networkinterface.go index 28bc5ea..7451aa2 100644 --- a/plugin/networkinterface.go +++ b/plugin/networkinterface.go @@ -5,6 +5,7 @@ package plugin import ( "context" + "net/netip" ) type NetworkInterfaceState string @@ -38,10 +39,18 @@ type NetworkInterfaceSpec struct { Ips []string `json:"ips"` } +// NetworkInterfaceStatus is returned by a plugin after successfully applying a +// network interface. It contains the effective configuration of the interface +// and the device type that the hypervisor can consume. A plugin must exactly +// one non-nil device type. type NetworkInterfaceStatus struct { Handle string `json:"handle"` State NetworkInterfaceState `json:"state"` + Prefixes netip.Prefix `json:"prefixes"` + Ips []netip.Addr `json:"ips"` + VirtualIp netip.Addr `json:"virtual-ip"` + PCI *PCI TAP *TAP Netdev *Netdev From a4dfefb0d2268f25613ec58257ea23ce023bc092 Mon Sep 17 00:00:00 2001 From: Maximilian Moehl Date: Thu, 22 Oct 2026 14:56:00 +0200 Subject: [PATCH 3/3] Add Hostname field to NetworkInterfaceSpec Signed-off-by: Maximilian Moehl --- plugin/networkinterface.go | 1 + 1 file changed, 1 insertion(+) diff --git a/plugin/networkinterface.go b/plugin/networkinterface.go index 7451aa2..2fd7a41 100644 --- a/plugin/networkinterface.go +++ b/plugin/networkinterface.go @@ -36,6 +36,7 @@ type NetworkInterfaceSpec struct { Metadata *NetworkInterfaceMetadata `json:"metadata"` Name string `json:"name"` NetworkId string `json:"networkId"` + Hostname string `json:"hostname"` Ips []string `json:"ips"` }