Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,7 @@ Plugins must output a JSON object with the following keys upon a successful `ADD
- `sandbox` (string): The isolation domain reference (e.g. path to network namespace) for the interface, or empty if on the host. For interfaces created inside the container, this should be the value passed via `CNI_NETNS`.
- `socketPath` (string, optional): An absolute path to a socket file corresponding to this interface, if applicable.
- `pciID` (string, optional): The platform-specific identifier of the PCI device corresponding to this interface, if applicable.
- `metadata`: a dictionary consisting of interface configurion information.
- `ips`: IPs assigned by this attachment. Plugins may include IPs assigned external to the container.
- `address` (string): an IP address in CIDR notation (eg "192.168.1.3/24").
- `gateway` (string): the default gateway for this subnet, if one exists.
Expand Down
1 change: 1 addition & 0 deletions pkg/types/100/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ type Interface struct {
Sandbox string `json:"sandbox,omitempty"`
SocketPath string `json:"socketPath,omitempty"`
PciID string `json:"pciID,omitempty"`
Metadata map[string]string `json:"metadata,omitempty"`
}

func (i *Interface) String() string {
Expand Down
1 change: 1 addition & 0 deletions pkg/types/100/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ func testResult() *current.Result {
Sandbox: "/proc/3553/ns/net",
PciID: "8086:9a01",
SocketPath: "/path/to/vhost/fd",
Metadata: make(map[string]string),
},
},
IPs: []*current.IPConfig{
Expand Down
1 change: 1 addition & 0 deletions pkg/types/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ var _ = Describe("Types", func() {
Sandbox: "/proc/3553/ns/net",
PciID: "8086:9a01",
SocketPath: "/path/to/vhost/fd",
Metadata: make(map[string]string),
},
},
IPs: []*current.IPConfig{
Expand Down