Skip to content

Commit 8a84d87

Browse files
committed
Update libcni to add metadata to interface
1 parent d9b15e5 commit 8a84d87

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

pkg/types/100/types.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,10 @@ func (r *Result) PrintTo(writer io.Writer) error {
245245

246246
// Interface contains values about the created interfaces
247247
type Interface struct {
248-
Name string `json:"name"`
249-
Mac string `json:"mac,omitempty"`
250-
Sandbox string `json:"sandbox,omitempty"`
248+
Name string `json:"name"`
249+
Mac string `json:"mac,omitempty"`
250+
Sandbox string `json:"sandbox,omitempty"`
251+
Metadata map[string]string `json:"metadata,omitempty"`
251252
}
252253

253254
func (i *Interface) String() string {

pkg/types/100/types_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ func testResult() *current.Result {
5454
Name: "eth0",
5555
Mac: "00:11:22:33:44:55",
5656
Sandbox: "/proc/3553/ns/net",
57+
Metadata: make(map[string]string),
5758
},
5859
},
5960
IPs: []*current.IPConfig{

pkg/types/types_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ var _ = Describe("Types", func() {
162162
Name: "eth0",
163163
Mac: "00:11:22:33:44:55",
164164
Sandbox: "/proc/3553/ns/net",
165+
Metadata: make(map[string]string),
165166
},
166167
},
167168
IPs: []*current.IPConfig{

0 commit comments

Comments
 (0)