diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2018-01-10 15:58:18 -0500 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-01-11 12:39:06 +0000 |
commit | dd0d35deb098b63f8c5be7ef9d8d63c16760221b (patch) | |
tree | 695d44a49d636e45e4121c9aecfb3d8c0e1cca06 /vendor/github.com/opencontainers/runtime-tools/generate/spec.go | |
parent | e6be800ec633342aef656e0a2ed0bdc4519796d9 (diff) | |
download | podman-dd0d35deb098b63f8c5be7ef9d8d63c16760221b.tar.gz podman-dd0d35deb098b63f8c5be7ef9d8d63c16760221b.tar.bz2 podman-dd0d35deb098b63f8c5be7ef9d8d63c16760221b.zip |
Add support for shm-size.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Closes: #206
Approved by: TomSweeneyRedHat
Diffstat (limited to 'vendor/github.com/opencontainers/runtime-tools/generate/spec.go')
-rw-r--r-- | vendor/github.com/opencontainers/runtime-tools/generate/spec.go | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/vendor/github.com/opencontainers/runtime-tools/generate/spec.go b/vendor/github.com/opencontainers/runtime-tools/generate/spec.go index 519d25448..d7a6da81d 100644 --- a/vendor/github.com/opencontainers/runtime-tools/generate/spec.go +++ b/vendor/github.com/opencontainers/runtime-tools/generate/spec.go @@ -59,6 +59,13 @@ func (g *Generator) initSpecLinux() { } } +func (g *Generator) initSpecLinuxIntelRdt() { + g.initSpecLinux() + if g.spec.Linux.IntelRdt == nil { + g.spec.Linux.IntelRdt = &rspec.LinuxIntelRdt{} + } +} + func (g *Generator) initSpecLinuxSysctl() { g.initSpecLinux() if g.spec.Linux.Sysctl == nil { @@ -80,6 +87,13 @@ func (g *Generator) initSpecLinuxResources() { } } +func (g *Generator) initSpecLinuxResourcesBlockIO() { + g.initSpecLinuxResources() + if g.spec.Linux.Resources.BlockIO == nil { + g.spec.Linux.Resources.BlockIO = &rspec.LinuxBlockIO{} + } +} + func (g *Generator) initSpecLinuxResourcesCPU() { g.initSpecLinuxResources() if g.spec.Linux.Resources.CPU == nil { @@ -107,3 +121,52 @@ func (g *Generator) initSpecLinuxResourcesPids() { g.spec.Linux.Resources.Pids = &rspec.LinuxPids{} } } + +func (g *Generator) initSpecSolaris() { + g.initSpec() + if g.spec.Solaris == nil { + g.spec.Solaris = &rspec.Solaris{} + } +} + +func (g *Generator) initSpecSolarisCappedCPU() { + g.initSpecSolaris() + if g.spec.Solaris.CappedCPU == nil { + g.spec.Solaris.CappedCPU = &rspec.SolarisCappedCPU{} + } +} + +func (g *Generator) initSpecSolarisCappedMemory() { + g.initSpecSolaris() + if g.spec.Solaris.CappedMemory == nil { + g.spec.Solaris.CappedMemory = &rspec.SolarisCappedMemory{} + } +} + +func (g *Generator) initSpecWindows() { + g.initSpec() + if g.spec.Windows == nil { + g.spec.Windows = &rspec.Windows{} + } +} + +func (g *Generator) initSpecWindowsHyperV() { + g.initSpecWindows() + if g.spec.Windows.HyperV == nil { + g.spec.Windows.HyperV = &rspec.WindowsHyperV{} + } +} + +func (g *Generator) initSpecWindowsResources() { + g.initSpecWindows() + if g.spec.Windows.Resources == nil { + g.spec.Windows.Resources = &rspec.WindowsResources{} + } +} + +func (g *Generator) initSpecWindowsResourcesMemory() { + g.initSpecWindowsResources() + if g.spec.Windows.Resources.Memory == nil { + g.spec.Windows.Resources.Memory = &rspec.WindowsMemoryResources{} + } +} |