Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
Merge pull request #200 from bergwolf/rename
Browse files Browse the repository at this point in the history
runtime: rename pod to sandbox
  • Loading branch information
Sebastien Boeuf authored Apr 13, 2018
2 parents ca25177 + 6107694 commit 9db9b28
Show file tree
Hide file tree
Showing 101 changed files with 3,102 additions and 3,102 deletions.
6 changes: 3 additions & 3 deletions cli/config/configuration.toml.in
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ firmware = "@FIRMWAREPATH@"
# For example, `machine_accelerators = "nosmm,nosmbus,nosata,nopit,static-prt,nofw"`
machine_accelerators="@MACHINEACCELERATORS@"

# Default number of vCPUs per POD/VM:
# Default number of vCPUs per SB/VM:
# unspecified or 0 --> will be set to @DEFVCPUS@
# < 0 --> will be set to the actual number of physical cores
# > 0 <= number of physical cores --> will be set to the specified number
Expand All @@ -47,13 +47,13 @@ default_vcpus = 1
# * Until 30 devices per bridge can be hot plugged.
# * Until 5 PCI bridges can be cold plugged per VM.
# This limitation could be a bug in qemu or in the kernel
# Default number of bridges per POD/VM:
# Default number of bridges per SB/VM:
# unspecified or 0 --> will be set to @DEFBRIDGES@
# > 1 <= 5 --> will be set to the specified number
# > 5 --> will be set to 5
default_bridges = @DEFBRIDGES@

# Default memory size in MiB for POD/VM.
# Default memory size in MiB for SB/VM.
# If unspecified then it will be set @DEFMEMSZ@ MiB.
#default_memory = @DEFMEMSZ@

Expand Down
18 changes: 9 additions & 9 deletions cli/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func create(containerID, bundlePath, console, pidFilePath string, detach bool,

switch containerType {
case vc.PodSandbox:
process, err = createPod(ociSpec, runtimeConfig, containerID, bundlePath, console, disableOutput)
process, err = createSandbox(ociSpec, runtimeConfig, containerID, bundlePath, console, disableOutput)
if err != nil {
return err
}
Expand All @@ -131,7 +131,7 @@ func create(containerID, bundlePath, console, pidFilePath string, detach bool,
// is shim's in our case. This is mandatory to make sure there is no one
// else (like Docker) trying to create those files on our behalf. We want to
// know those files location so that we can remove them when delete is called.
cgroupsPathList, err := processCgroupsPath(ociSpec, containerType.IsPod())
cgroupsPathList, err := processCgroupsPath(ociSpec, containerType.IsSandbox())
if err != nil {
return err
}
Expand Down Expand Up @@ -225,27 +225,27 @@ func setKernelParams(containerID string, runtimeConfig *oci.RuntimeConfig) error
return nil
}

func createPod(ociSpec oci.CompatOCISpec, runtimeConfig oci.RuntimeConfig,
func createSandbox(ociSpec oci.CompatOCISpec, runtimeConfig oci.RuntimeConfig,
containerID, bundlePath, console string, disableOutput bool) (vc.Process, error) {

err := setKernelParams(containerID, &runtimeConfig)
if err != nil {
return vc.Process{}, err
}

podConfig, err := oci.PodConfig(ociSpec, runtimeConfig, bundlePath, containerID, console, disableOutput)
sandboxConfig, err := oci.SandboxConfig(ociSpec, runtimeConfig, bundlePath, containerID, console, disableOutput)
if err != nil {
return vc.Process{}, err
}

pod, err := vci.CreatePod(podConfig)
sandbox, err := vci.CreateSandbox(sandboxConfig)
if err != nil {
return vc.Process{}, err
}

containers := pod.GetAllContainers()
containers := sandbox.GetAllContainers()
if len(containers) != 1 {
return vc.Process{}, fmt.Errorf("BUG: Container list from pod is wrong, expecting only one container, found %d containers", len(containers))
return vc.Process{}, fmt.Errorf("BUG: Container list from sandbox is wrong, expecting only one container, found %d containers", len(containers))
}

return containers[0].Process(), nil
Expand All @@ -259,12 +259,12 @@ func createContainer(ociSpec oci.CompatOCISpec, containerID, bundlePath,
return vc.Process{}, err
}

podID, err := ociSpec.PodID()
sandboxID, err := ociSpec.SandboxID()
if err != nil {
return vc.Process{}, err
}

_, c, err := vci.CreateContainer(podID, contConfig)
_, c, err := vci.CreateContainer(sandboxID, contConfig)
if err != nil {
return vc.Process{}, err
}
Expand Down
Loading

0 comments on commit 9db9b28

Please sign in to comment.