add omitempty to 'Device' and 'Namespace'

Signed-off-by: liangchenye <liangchenye@huawei.com>
This commit is contained in:
liangchenye 2016-03-10 19:52:56 +08:00
parent dfd71f755e
commit 28cc423977
2 changed files with 3 additions and 8 deletions

View File

@ -404,12 +404,7 @@ Here is a full example `config.json` for reference.
{
"type": "mount"
}
],
"devices": null,
"seccomp": {
"defaultAction": "",
"architectures": null
}
]
}
}
```

View File

@ -128,9 +128,9 @@ type Linux struct {
// If resources are specified, the cgroups at CgroupsPath will be updated based on resources.
CgroupsPath *string `json:"cgroupsPath,omitempty"`
// Namespaces contains the namespaces that are created and/or joined by the container
Namespaces []Namespace `json:"namespaces"`
Namespaces []Namespace `json:"namespaces,omitempty"`
// Devices are a list of device nodes that are created for the container
Devices []Device `json:"devices"`
Devices []Device `json:"devices,omitempty"`
// Seccomp specifies the seccomp security settings for the container.
Seccomp *Seccomp `json:"seccomp,omitempty"`
// RootfsPropagation is the rootfs mount propagation mode for the container.