Skip to content

Commit 3a666eb

Browse files
committed
add feature for network devices
Signed-off-by: Antonio Ojea <[email protected]>
1 parent 6a8be5d commit 3a666eb

File tree

4 files changed

+33
-0
lines changed

4 files changed

+33
-0
lines changed

features-linux.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,3 +228,17 @@ Irrelevant to the availability of Intel RDT on the host operating system.
228228
}
229229
}
230230
```
231+
232+
## <a name="linuxFeaturesNetDevices" />NetDevices
233+
234+
**`netDevices`** (object, OPTIONAL) represents the runtime's implementation status of Linux network devices.
235+
236+
* **`enabled`** (bool, OPTIONAL) represents whether the runtime supports the capability to move Linux network devices into the container's network namespace.
237+
238+
### Example
239+
240+
```json
241+
"netDevices": {
242+
"enabled": true
243+
}
244+
```

schema/features-linux.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,14 @@
110110
}
111111
}
112112
}
113+
},
114+
"netDevices": {
115+
"type": "object",
116+
"properties": {
117+
"enabled": {
118+
"type": "boolean"
119+
}
120+
}
113121
}
114122
}
115123
}

schema/test/features/good/runc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@
182182
},
183183
"selinux": {
184184
"enabled": true
185+
},
186+
"netDevices": {
187+
"enabled": true
185188
}
186189
},
187190
"annotations": {

specs-go/features/features.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ type Linux struct {
4848
Selinux *Selinux `json:"selinux,omitempty"`
4949
IntelRdt *IntelRdt `json:"intelRdt,omitempty"`
5050
MountExtensions *MountExtensions `json:"mountExtensions,omitempty"`
51+
NetDevices *NetDevices `json:"netDevices,omitempty"`
5152
}
5253

5354
// Cgroup represents the "cgroup" field.
@@ -143,3 +144,10 @@ type IDMap struct {
143144
// Nil value means "unknown", not "false".
144145
Enabled *bool `json:"enabled,omitempty"`
145146
}
147+
148+
// NetDevices represents the "netDevices" field.
149+
type NetDevices struct {
150+
// Enabled is true if network devices support is compiled in.
151+
// Nil value means "unknown", not "false".
152+
Enabled *bool `json:"enabled,omitempty"`
153+
}

0 commit comments

Comments
 (0)