summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
Diffstat (limited to 'libpod')
-rw-r--r--libpod/options.go132
1 files changed, 0 insertions, 132 deletions
diff --git a/libpod/options.go b/libpod/options.go
index ae6b19055..e6751d68d 100644
--- a/libpod/options.go
+++ b/libpod/options.go
@@ -549,94 +549,6 @@ func WithExitCommand(exitCommand []string) CtrCreateOption {
}
}
-// WithIPCNSFromPod indicates the the container should join the IPC namespace of
-// its pod
-func WithIPCNSFromPod(p *Pod) CtrCreateOption {
- return func(ctr *Container) error {
- if ctr.valid {
- return ErrCtrFinalized
- }
-
- if err := validPodNSOption(p, ctr.config.Pod); err != nil {
- return err
- }
-
- infraContainer, err := p.InfraContainerID()
- if err != nil {
- return err
- }
- ctr.config.IPCNsCtr = infraContainer
-
- return nil
- }
-}
-
-// WithMountNSFromPod indicates the the container should join the Mount namespace of
-// its pod
-func WithMountNSFromPod(p *Pod) CtrCreateOption {
- return func(ctr *Container) error {
- if ctr.valid {
- return ErrCtrFinalized
- }
-
- if err := validPodNSOption(p, ctr.config.Pod); err != nil {
- return err
- }
-
- infraContainer, err := p.InfraContainerID()
- if err != nil {
- return err
- }
- ctr.config.MountNsCtr = infraContainer
-
- return nil
- }
-}
-
-// WithNetNSFromPod indicates the the container should join the network namespace of
-// its pod
-func WithNetNSFromPod(p *Pod) CtrCreateOption {
- return func(ctr *Container) error {
- if ctr.valid {
- return ErrCtrFinalized
- }
-
- if err := validPodNSOption(p, ctr.config.Pod); err != nil {
- return err
- }
-
- infraContainer, err := p.InfraContainerID()
- if err != nil {
- return err
- }
- ctr.config.NetNsCtr = infraContainer
-
- return nil
- }
-}
-
-// WithPIDNSFromPod indicates the the container should join the PID namespace of
-// its pod
-func WithPIDNSFromPod(p *Pod) CtrCreateOption {
- return func(ctr *Container) error {
- if ctr.valid {
- return ErrCtrFinalized
- }
-
- if err := validPodNSOption(p, ctr.config.Pod); err != nil {
- return err
- }
-
- infraContainer, err := p.InfraContainerID()
- if err != nil {
- return err
- }
- ctr.config.PIDNsCtr = infraContainer
-
- return nil
- }
-}
-
// WithUTSNSFromPod indicates the the container should join the UTS namespace of
// its pod
func WithUTSNSFromPod(p *Pod) CtrCreateOption {
@@ -659,50 +571,6 @@ func WithUTSNSFromPod(p *Pod) CtrCreateOption {
}
}
-// WithUserNSFromPod indicates the the container should join the User namespace of
-// its pod
-func WithUserNSFromPod(p *Pod) CtrCreateOption {
- return func(ctr *Container) error {
- if ctr.valid {
- return ErrCtrFinalized
- }
-
- if err := validPodNSOption(p, ctr.config.Pod); err != nil {
- return err
- }
-
- infraContainer, err := p.InfraContainerID()
- if err != nil {
- return err
- }
- ctr.config.UserNsCtr = infraContainer
-
- return nil
- }
-}
-
-// WithCgroupNSFromPod indicates the the container should join the Cgroup namespace of
-// its pod
-func WithCgroupNSFromPod(p *Pod) CtrCreateOption {
- return func(ctr *Container) error {
- if ctr.valid {
- return ErrCtrFinalized
- }
-
- if err := validPodNSOption(p, ctr.config.Pod); err != nil {
- return err
- }
-
- infraContainer, err := p.InfraContainerID()
- if err != nil {
- return err
- }
- ctr.config.CgroupNsCtr = infraContainer
-
- return nil
- }
-}
-
// WithIPCNSFrom indicates the the container should join the IPC namespace of
// the given container.
// If the container has joined a pod, it can only join the namespaces of