aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorJosh Soref <jsoref@users.noreply.github.com>2020-12-21 17:48:43 -0500
committerJosh Soref <jsoref@users.noreply.github.com>2020-12-22 13:34:31 -0500
commit4fa1fce930f13d71f39b65bad3f46f61d961ab51 (patch)
tree3651ceec491317b6ab3aab81c7ab136eb0ff3c02 /pkg
parent07663f74c48d11732a3330248f837d5abf86fe9c (diff)
downloadpodman-4fa1fce930f13d71f39b65bad3f46f61d961ab51.tar.gz
podman-4fa1fce930f13d71f39b65bad3f46f61d961ab51.tar.bz2
podman-4fa1fce930f13d71f39b65bad3f46f61d961ab51.zip
Spelling
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/annotations/annotations.go2
-rw-r--r--pkg/api/handlers/compat/events.go2
-rw-r--r--pkg/api/handlers/compat/info.go2
-rw-r--r--pkg/api/handlers/compat/volumes.go4
-rw-r--r--pkg/api/server/register_archive.go2
-rw-r--r--pkg/api/server/register_images.go2
-rw-r--r--pkg/api/server/server.go2
-rw-r--r--pkg/autoupdate/autoupdate.go2
-rw-r--r--pkg/bindings/generate/types.go2
-rw-r--r--pkg/bindings/images/types.go2
-rw-r--r--pkg/bindings/network/types_create_options.go4
-rw-r--r--pkg/bindings/test/images_test.go2
-rw-r--r--pkg/bindings/test/pods_test.go2
-rw-r--r--pkg/cgroups/cgroups.go2
-rw-r--r--pkg/copy/fileinfo.go2
-rw-r--r--pkg/domain/entities/images.go2
-rw-r--r--pkg/domain/infra/abi/containers_stat.go4
-rw-r--r--pkg/domain/infra/runtime_abi.go4
-rw-r--r--pkg/domain/infra/runtime_tunnel.go4
-rw-r--r--pkg/domain/infra/tunnel/containers.go120
-rw-r--r--pkg/domain/infra/tunnel/events.go2
-rw-r--r--pkg/domain/infra/tunnel/generate.go4
-rw-r--r--pkg/domain/infra/tunnel/healthcheck.go2
-rw-r--r--pkg/domain/infra/tunnel/images.go36
-rw-r--r--pkg/domain/infra/tunnel/manifest.go10
-rw-r--r--pkg/domain/infra/tunnel/network.go12
-rw-r--r--pkg/domain/infra/tunnel/play.go2
-rw-r--r--pkg/domain/infra/tunnel/pods.go42
-rw-r--r--pkg/domain/infra/tunnel/runtime.go6
-rw-r--r--pkg/domain/infra/tunnel/system.go8
-rw-r--r--pkg/domain/infra/tunnel/volumes.go14
-rw-r--r--pkg/hooks/README.md2
-rw-r--r--pkg/hooks/exec/exec.go2
-rw-r--r--pkg/hooks/hooks.go2
-rw-r--r--pkg/netns/netns_linux.go2
-rw-r--r--pkg/rootless/rootless_linux.go2
-rw-r--r--pkg/seccomp/seccomp.go2
-rw-r--r--pkg/specgen/generate/container.go2
-rw-r--r--pkg/specgen/generate/kube/kube.go2
-rw-r--r--pkg/specgen/generate/oci.go2
-rw-r--r--pkg/specgen/generate/security.go2
-rw-r--r--pkg/specgen/generate/storage.go2
-rw-r--r--pkg/specgen/pod_validate.go2
-rw-r--r--pkg/specgen/specgen.go4
-rw-r--r--pkg/systemd/generate/containers.go4
-rw-r--r--pkg/systemd/generate/pods.go2
-rw-r--r--pkg/util/utils_supported.go2
47 files changed, 171 insertions, 171 deletions
diff --git a/pkg/annotations/annotations.go b/pkg/annotations/annotations.go
index 19b1029d1..8badab20d 100644
--- a/pkg/annotations/annotations.go
+++ b/pkg/annotations/annotations.go
@@ -94,7 +94,7 @@ const (
// StdinOnce is the stdin_once annotation
StdinOnce = "io.kubernetes.cri-o.StdinOnce"
- // Volumes is the volumes annotatoin
+ // Volumes is the volumes annotation
Volumes = "io.kubernetes.cri-o.Volumes"
// HostNetwork indicates whether the host network namespace is used or not
diff --git a/pkg/api/handlers/compat/events.go b/pkg/api/handlers/compat/events.go
index 047220906..82a74e419 100644
--- a/pkg/api/handlers/compat/events.go
+++ b/pkg/api/handlers/compat/events.go
@@ -75,7 +75,7 @@ func GetEvents(w http.ResponseWriter, r *http.Request) {
)
// NOTE: the "filters" parameter is extracted separately for backwards
- // compat via `fitlerFromRequest()`.
+ // compat via `filterFromRequest()`.
query := struct {
Since string `schema:"since"`
Until string `schema:"until"`
diff --git a/pkg/api/handlers/compat/info.go b/pkg/api/handlers/compat/info.go
index 4b3a390f1..5adbeb031 100644
--- a/pkg/api/handlers/compat/info.go
+++ b/pkg/api/handlers/compat/info.go
@@ -48,7 +48,7 @@ func GetInfo(w http.ResponseWriter, r *http.Request) {
stateInfo := getContainersState(runtime)
sysInfo := sysinfo.New(true)
- // FIXME: Need to expose if runtime supports Checkpoint'ing
+ // FIXME: Need to expose if runtime supports Checkpointing
// liveRestoreEnabled := criu.CheckForCriu() && configInfo.RuntimeSupportsCheckpoint()
info := &handlers.Info{Info: docker.Info{
diff --git a/pkg/api/handlers/compat/volumes.go b/pkg/api/handlers/compat/volumes.go
index f76e18ee3..f49f06b17 100644
--- a/pkg/api/handlers/compat/volumes.go
+++ b/pkg/api/handlers/compat/volumes.go
@@ -208,7 +208,7 @@ func RemoveVolume(w http.ResponseWriter, r *http.Request) {
* using the volume at the same time".
*
* With this in mind, we only consider the `force` query parameter when we
- * hunt for specified volume by name, using it to seletively return a 204
+ * hunt for specified volume by name, using it to selectively return a 204
* or blow up depending on `force` being truthy or falsey/unset
* respectively.
*/
@@ -231,7 +231,7 @@ func RemoveVolume(w http.ResponseWriter, r *http.Request) {
utils.VolumeNotFound(w, name, err)
} else {
// Volume does not exist and `force` is truthy - this emulates what
- // Docker would do when told to `force` removal of a nonextant
+ // Docker would do when told to `force` removal of a nonexistent
// volume
utils.WriteResponse(w, http.StatusNoContent, nil)
}
diff --git a/pkg/api/server/register_archive.go b/pkg/api/server/register_archive.go
index 9ff0ad0eb..b20d89cc2 100644
--- a/pkg/api/server/register_archive.go
+++ b/pkg/api/server/register_archive.go
@@ -7,7 +7,7 @@ import (
"github.com/gorilla/mux"
)
-func (s *APIServer) registerAchiveHandlers(r *mux.Router) error {
+func (s *APIServer) registerArchiveHandlers(r *mux.Router) error {
// swagger:operation PUT /containers/{name}/archive compat putArchive
// ---
// summary: Put files into a container
diff --git a/pkg/api/server/register_images.go b/pkg/api/server/register_images.go
index c2423218a..7e6de8783 100644
--- a/pkg/api/server/register_images.go
+++ b/pkg/api/server/register_images.go
@@ -666,7 +666,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// - in: query
// name: destination
// type: string
- // description: Allows for pushing the image to a different destintation than the image refers to.
+ // description: Allows for pushing the image to a different destination than the image refers to.
// - in: query
// name: tlsVerify
// description: Require TLS verification.
diff --git a/pkg/api/server/server.go b/pkg/api/server/server.go
index 09b6079e4..046f6561c 100644
--- a/pkg/api/server/server.go
+++ b/pkg/api/server/server.go
@@ -108,7 +108,7 @@ func newServer(runtime *libpod.Runtime, duration time.Duration, listener *net.Li
for _, fn := range []func(*mux.Router) error{
server.registerAuthHandlers,
- server.registerAchiveHandlers,
+ server.registerArchiveHandlers,
server.registerContainersHandlers,
server.registerDistributionHandlers,
server.registerEventsHandlers,
diff --git a/pkg/autoupdate/autoupdate.go b/pkg/autoupdate/autoupdate.go
index 44709f291..77851f534 100644
--- a/pkg/autoupdate/autoupdate.go
+++ b/pkg/autoupdate/autoupdate.go
@@ -44,7 +44,7 @@ var supportedPolicies = map[string]Policy{
"image": PolicyNewImage,
}
-// LookupPolicy looksup the corresponding Policy for the specified
+// LookupPolicy looks up the corresponding Policy for the specified
// string. If none is found, an errors is returned including the list of
// supported policies.
//
diff --git a/pkg/bindings/generate/types.go b/pkg/bindings/generate/types.go
index 2edf58768..4e9d7a0ff 100644
--- a/pkg/bindings/generate/types.go
+++ b/pkg/bindings/generate/types.go
@@ -8,7 +8,7 @@ type KubeOptions struct {
}
//go:generate go run ../generator/generator.go SystemdOptions
-// SystemdOptions are optional options for generating ssytemd files
+// SystemdOptions are optional options for generating systemd files
type SystemdOptions struct {
// Name - use container/pod name instead of its ID.
UseName *bool
diff --git a/pkg/bindings/images/types.go b/pkg/bindings/images/types.go
index e389ac9d6..3adb4356b 100644
--- a/pkg/bindings/images/types.go
+++ b/pkg/bindings/images/types.go
@@ -136,7 +136,7 @@ type PushOptions struct {
}
//go:generate go run ../generator/generator.go SearchOptions
-// SearchOptions are optional options for seaching images on registies
+// SearchOptions are optional options for searching images on registries
type SearchOptions struct {
// Authfile is the path to the authentication file. Ignored for remote
// calls.
diff --git a/pkg/bindings/network/types_create_options.go b/pkg/bindings/network/types_create_options.go
index e35762912..daec6a254 100644
--- a/pkg/bindings/network/types_create_options.go
+++ b/pkg/bindings/network/types_create_options.go
@@ -193,9 +193,9 @@ func (o *CreateOptions) WithIPRange(value net.IPNet) *CreateOptions {
// GetIPRange
func (o *CreateOptions) GetIPRange() net.IPNet {
- var iPRange net.IPNet
+ var ipRange net.IPNet
if o.IPRange == nil {
- return iPRange
+ return ipRange
}
return *o.IPRange
}
diff --git a/pkg/bindings/test/images_test.go b/pkg/bindings/test/images_test.go
index ae41eced9..e178f4219 100644
--- a/pkg/bindings/test/images_test.go
+++ b/pkg/bindings/test/images_test.go
@@ -70,7 +70,7 @@ var _ = Describe("Podman images", func() {
// Inspect by long name
_, err = images.GetImage(bt.conn, alpine.name, nil)
Expect(err).To(BeNil())
- // TODO it looks like the images API alwaays returns size regardless
+ // TODO it looks like the images API always returns size regardless
// of bool or not. What should we do ?
// Expect(data.Size).To(BeZero())
diff --git a/pkg/bindings/test/pods_test.go b/pkg/bindings/test/pods_test.go
index 17b142fc2..38c5997ef 100644
--- a/pkg/bindings/test/pods_test.go
+++ b/pkg/bindings/test/pods_test.go
@@ -169,7 +169,7 @@ var _ = Describe("Podman pods", func() {
// This test validates if All running containers within
// each specified pod are paused and unpaused
- It("pause upause pod", func() {
+ It("pause unpause pod", func() {
// TODO fix this
Skip("Pod behavior is jacked right now.")
// Pause invalid container
diff --git a/pkg/cgroups/cgroups.go b/pkg/cgroups/cgroups.go
index 0d7ed05b2..c200dd01a 100644
--- a/pkg/cgroups/cgroups.go
+++ b/pkg/cgroups/cgroups.go
@@ -22,7 +22,7 @@ import (
var (
// ErrCgroupDeleted means the cgroup was deleted
ErrCgroupDeleted = errors.New("cgroup deleted")
- // ErrCgroupV1Rootless means the cgroup v1 were attempted to be used in rootless environmen
+ // ErrCgroupV1Rootless means the cgroup v1 were attempted to be used in rootless environment
ErrCgroupV1Rootless = errors.New("no support for CGroups V1 in rootless environments")
)
diff --git a/pkg/copy/fileinfo.go b/pkg/copy/fileinfo.go
index 50b0ca9a1..ddb9b629c 100644
--- a/pkg/copy/fileinfo.go
+++ b/pkg/copy/fileinfo.go
@@ -16,7 +16,7 @@ import (
// base64 encoded JSON payload of stating a path in a container.
const XDockerContainerPathStatHeader = "X-Docker-Container-Path-Stat"
-// ENOENT mimics the stdlib's ENONENT and can be used to implement custom logic
+// ENOENT mimics the stdlib's ENOENT and can be used to implement custom logic
// while preserving the user-visible error message.
var ENOENT = errors.New("No such file or directory")
diff --git a/pkg/domain/entities/images.go b/pkg/domain/entities/images.go
index 1538cbb8b..67910a34c 100644
--- a/pkg/domain/entities/images.go
+++ b/pkg/domain/entities/images.go
@@ -222,7 +222,7 @@ type ImageSearchOptions struct {
type ImageSearchReport struct {
// Index is the image index (e.g., "docker.io" or "quay.io")
Index string
- // Name is the canoncical name of the image (e.g., "docker.io/library/alpine").
+ // Name is the canonical name of the image (e.g., "docker.io/library/alpine").
Name string
// Description of the image.
Description string
diff --git a/pkg/domain/infra/abi/containers_stat.go b/pkg/domain/infra/abi/containers_stat.go
index c9610d1b9..5b43ee2f4 100644
--- a/pkg/domain/infra/abi/containers_stat.go
+++ b/pkg/domain/infra/abi/containers_stat.go
@@ -40,7 +40,7 @@ func (ic *ContainerEngine) containerStat(container *libpod.Container, containerP
// Not all errors from secureStat map to ErrNotExist, so we
// have to look into the error string. Turning it into an
// ENOENT let's the API handlers return the correct status code
- // which is crucuial for the remote client.
+ // which is crucial for the remote client.
if os.IsNotExist(err) || strings.Contains(statInfoErr.Error(), "o such file or directory") {
statInfoErr = copy.ENOENT
}
@@ -70,7 +70,7 @@ func (ic *ContainerEngine) containerStat(container *libpod.Container, containerP
absContainerPath = containerPath
}
- // Now we need to make sure to preseve the base path as specified by
+ // Now we need to make sure to preserve the base path as specified by
// the user. The `filepath` packages likes to remove trailing slashes
// and dots that are crucial to the copy logic.
absContainerPath = copy.PreserveBasePath(containerPath, absContainerPath)
diff --git a/pkg/domain/infra/runtime_abi.go b/pkg/domain/infra/runtime_abi.go
index 3a64cb72a..a25d165c9 100644
--- a/pkg/domain/infra/runtime_abi.go
+++ b/pkg/domain/infra/runtime_abi.go
@@ -21,7 +21,7 @@ func NewContainerEngine(facts *entities.PodmanConfig) (entities.ContainerEngine,
return r, err
case entities.TunnelMode:
ctx, err := bindings.NewConnectionWithIdentity(context.Background(), facts.URI, facts.Identity)
- return &tunnel.ContainerEngine{ClientCxt: ctx}, err
+ return &tunnel.ContainerEngine{ClientCtx: ctx}, err
}
return nil, fmt.Errorf("runtime mode '%v' is not supported", facts.EngineMode)
}
@@ -34,7 +34,7 @@ func NewImageEngine(facts *entities.PodmanConfig) (entities.ImageEngine, error)
return r, err
case entities.TunnelMode:
ctx, err := bindings.NewConnectionWithIdentity(context.Background(), facts.URI, facts.Identity)
- return &tunnel.ImageEngine{ClientCxt: ctx}, err
+ return &tunnel.ImageEngine{ClientCtx: ctx}, err
}
return nil, fmt.Errorf("runtime mode '%v' is not supported", facts.EngineMode)
}
diff --git a/pkg/domain/infra/runtime_tunnel.go b/pkg/domain/infra/runtime_tunnel.go
index 3fddf577c..b8aefaa35 100644
--- a/pkg/domain/infra/runtime_tunnel.go
+++ b/pkg/domain/infra/runtime_tunnel.go
@@ -37,7 +37,7 @@ func NewContainerEngine(facts *entities.PodmanConfig) (entities.ContainerEngine,
return nil, fmt.Errorf("direct runtime not supported")
case entities.TunnelMode:
ctx, err := newConnection(facts.URI, facts.Identity)
- return &tunnel.ContainerEngine{ClientCxt: ctx}, err
+ return &tunnel.ContainerEngine{ClientCtx: ctx}, err
}
return nil, fmt.Errorf("runtime mode '%v' is not supported", facts.EngineMode)
}
@@ -49,7 +49,7 @@ func NewImageEngine(facts *entities.PodmanConfig) (entities.ImageEngine, error)
return nil, fmt.Errorf("direct image runtime not supported")
case entities.TunnelMode:
ctx, err := newConnection(facts.URI, facts.Identity)
- return &tunnel.ImageEngine{ClientCxt: ctx}, err
+ return &tunnel.ImageEngine{ClientCtx: ctx}, err
}
return nil, fmt.Errorf("runtime mode '%v' is not supported", facts.EngineMode)
}
diff --git a/pkg/domain/infra/tunnel/containers.go b/pkg/domain/infra/tunnel/containers.go
index ad8394675..7704de210 100644
--- a/pkg/domain/infra/tunnel/containers.go
+++ b/pkg/domain/infra/tunnel/containers.go
@@ -30,12 +30,12 @@ func (ic *ContainerEngine) ContainerRunlabel(ctx context.Context, label string,
}
func (ic *ContainerEngine) ContainerExists(ctx context.Context, nameOrID string, options entities.ContainerExistsOptions) (*entities.BoolReport, error) {
- exists, err := containers.Exists(ic.ClientCxt, nameOrID, options.External)
+ exists, err := containers.Exists(ic.ClientCtx, nameOrID, options.External)
return &entities.BoolReport{Value: exists}, err
}
func (ic *ContainerEngine) ContainerWait(ctx context.Context, namesOrIds []string, opts entities.WaitOptions) ([]entities.WaitReport, error) {
- cons, err := getContainersByContext(ic.ClientCxt, false, false, namesOrIds)
+ cons, err := getContainersByContext(ic.ClientCtx, false, false, namesOrIds)
if err != nil {
return nil, err
}
@@ -43,7 +43,7 @@ func (ic *ContainerEngine) ContainerWait(ctx context.Context, namesOrIds []strin
options := new(containers.WaitOptions).WithCondition(opts.Condition)
for _, c := range cons {
response := entities.WaitReport{Id: c.ID}
- exitCode, err := containers.Wait(ic.ClientCxt, c.ID, options)
+ exitCode, err := containers.Wait(ic.ClientCtx, c.ID, options)
if err != nil {
response.Error = err
} else {
@@ -55,26 +55,26 @@ func (ic *ContainerEngine) ContainerWait(ctx context.Context, namesOrIds []strin
}
func (ic *ContainerEngine) ContainerPause(ctx context.Context, namesOrIds []string, options entities.PauseUnPauseOptions) ([]*entities.PauseUnpauseReport, error) {
- ctrs, err := getContainersByContext(ic.ClientCxt, options.All, false, namesOrIds)
+ ctrs, err := getContainersByContext(ic.ClientCtx, options.All, false, namesOrIds)
if err != nil {
return nil, err
}
reports := make([]*entities.PauseUnpauseReport, 0, len(ctrs))
for _, c := range ctrs {
- err := containers.Pause(ic.ClientCxt, c.ID, nil)
+ err := containers.Pause(ic.ClientCtx, c.ID, nil)
reports = append(reports, &entities.PauseUnpauseReport{Id: c.ID, Err: err})
}
return reports, nil
}
func (ic *ContainerEngine) ContainerUnpause(ctx context.Context, namesOrIds []string, options entities.PauseUnPauseOptions) ([]*entities.PauseUnpauseReport, error) {
- ctrs, err := getContainersByContext(ic.ClientCxt, options.All, false, namesOrIds)
+ ctrs, err := getContainersByContext(ic.ClientCtx, options.All, false, namesOrIds)
if err != nil {
return nil, err
}
reports := make([]*entities.PauseUnpauseReport, 0, len(ctrs))
for _, c := range ctrs {
- err := containers.Unpause(ic.ClientCxt, c.ID, nil)
+ err := containers.Unpause(ic.ClientCtx, c.ID, nil)
reports = append(reports, &entities.PauseUnpauseReport{Id: c.ID, Err: err})
}
return reports, nil
@@ -90,7 +90,7 @@ func (ic *ContainerEngine) ContainerStop(ctx context.Context, namesOrIds []strin
id := strings.Split(string(content), "\n")[0]
namesOrIds = append(namesOrIds, id)
}
- ctrs, err := getContainersByContext(ic.ClientCxt, opts.All, opts.Ignore, namesOrIds)
+ ctrs, err := getContainersByContext(ic.ClientCtx, opts.All, opts.Ignore, namesOrIds)
if err != nil {
return nil, err
}
@@ -100,7 +100,7 @@ func (ic *ContainerEngine) ContainerStop(ctx context.Context, namesOrIds []strin
}
for _, c := range ctrs {
report := entities.StopReport{Id: c.ID}
- if err = containers.Stop(ic.ClientCxt, c.ID, options); err != nil {
+ if err = containers.Stop(ic.ClientCtx, c.ID, options); err != nil {
// These first two are considered non-fatal under the right conditions
if errors.Cause(err).Error() == define.ErrCtrStopped.Error() {
logrus.Debugf("Container %s is already stopped", c.ID)
@@ -125,7 +125,7 @@ func (ic *ContainerEngine) ContainerStop(ctx context.Context, namesOrIds []strin
}
func (ic *ContainerEngine) ContainerKill(ctx context.Context, namesOrIds []string, opts entities.KillOptions) ([]*entities.KillReport, error) {
- ctrs, err := getContainersByContext(ic.ClientCxt, opts.All, false, namesOrIds)
+ ctrs, err := getContainersByContext(ic.ClientCtx, opts.All, false, namesOrIds)
if err != nil {
return nil, err
}
@@ -133,7 +133,7 @@ func (ic *ContainerEngine) ContainerKill(ctx context.Context, namesOrIds []strin
for _, c := range ctrs {
reports = append(reports, &entities.KillReport{
Id: c.ID,
- Err: containers.Kill(ic.ClientCxt, c.ID, opts.Signal, nil),
+ Err: containers.Kill(ic.ClientCtx, c.ID, opts.Signal, nil),
})
}
return reports, nil
@@ -147,7 +147,7 @@ func (ic *ContainerEngine) ContainerRestart(ctx context.Context, namesOrIds []st
if to := opts.Timeout; to != nil {
options.WithTimeout(int(*to))
}
- ctrs, err := getContainersByContext(ic.ClientCxt, opts.All, false, namesOrIds)
+ ctrs, err := getContainersByContext(ic.ClientCtx, opts.All, false, namesOrIds)
if err != nil {
return nil, err
}
@@ -157,7 +157,7 @@ func (ic *ContainerEngine) ContainerRestart(ctx context.Context, namesOrIds []st
}
reports = append(reports, &entities.RestartReport{
Id: c.ID,
- Err: containers.Restart(ic.ClientCxt, c.ID, options),
+ Err: containers.Restart(ic.ClientCtx, c.ID, options),
})
}
return reports, nil
@@ -172,7 +172,7 @@ func (ic *ContainerEngine) ContainerRm(ctx context.Context, namesOrIds []string,
id := strings.Split(string(content), "\n")[0]
namesOrIds = append(namesOrIds, id)
}
- ctrs, err := getContainersByContext(ic.ClientCxt, opts.All, opts.Ignore, namesOrIds)
+ ctrs, err := getContainersByContext(ic.ClientCtx, opts.All, opts.Ignore, namesOrIds)
if err != nil {
return nil, err
}
@@ -182,7 +182,7 @@ func (ic *ContainerEngine) ContainerRm(ctx context.Context, namesOrIds []string,
for _, c := range ctrs {
reports = append(reports, &entities.RmReport{
Id: c.ID,
- Err: containers.Remove(ic.ClientCxt, c.ID, options),
+ Err: containers.Remove(ic.ClientCtx, c.ID, options),
})
}
return reports, nil
@@ -190,7 +190,7 @@ func (ic *ContainerEngine) ContainerRm(ctx context.Context, namesOrIds []string,
func (ic *ContainerEngine) ContainerPrune(ctx context.Context, opts entities.ContainerPruneOptions) (*entities.ContainerPruneReport, error) {
options := new(containers.PruneOptions).WithFilters(opts.Filters)
- return containers.Prune(ic.ClientCxt, options)
+ return containers.Prune(ic.ClientCtx, options)
}
func (ic *ContainerEngine) ContainerInspect(ctx context.Context, namesOrIds []string, opts entities.InspectOptions) ([]*entities.ContainerInspectReport, []error, error) {
@@ -200,7 +200,7 @@ func (ic *ContainerEngine) ContainerInspect(ctx context.Context, namesOrIds []st
)
options := new(containers.InspectOptions).WithSize(opts.Size)
for _, name := range namesOrIds {
- inspect, err := containers.Inspect(ic.ClientCxt, name, options)
+ inspect, err := containers.Inspect(ic.ClientCtx, name, options)
if err != nil {
errModel, ok := err.(entities.ErrorModel)
if !ok {
@@ -225,7 +225,7 @@ func (ic *ContainerEngine) ContainerTop(ctx context.Context, opts entities.TopOp
return nil, errors.New("NameOrID must be specified")
}
options := new(containers.TopOptions).WithDescriptors(opts.Descriptors)
- topOutput, err := containers.Top(ic.ClientCxt, opts.NameOrID, options)
+ topOutput, err := containers.Top(ic.ClientCtx, opts.NameOrID, options)
if err != nil {
return nil, err
}
@@ -254,7 +254,7 @@ func (ic *ContainerEngine) ContainerCommit(ctx context.Context, nameOrID string,
}
options := new(containers.CommitOptions).WithAuthor(opts.Author).WithChanges(opts.Changes).WithComment(opts.Message)
options.WithFormat(opts.Format).WithPause(opts.Pause).WithRepo(repo).WithTag(tag)
- response, err := containers.Commit(ic.ClientCxt, nameOrID, options)
+ response, err := containers.Commit(ic.ClientCtx, nameOrID, options)
if err != nil {
return nil, err
}
@@ -272,7 +272,7 @@ func (ic *ContainerEngine) ContainerExport(ctx context.Context, nameOrID string,
return err
}
}
- return containers.Export(ic.ClientCxt, nameOrID, w, nil)
+ return containers.Export(ic.ClientCtx, nameOrID, w, nil)
}
func (ic *ContainerEngine) ContainerCheckpoint(ctx context.Context, namesOrIds []string, opts entities.CheckpointOptions) ([]*entities.CheckpointReport, error) {
@@ -282,7 +282,7 @@ func (ic *ContainerEngine) ContainerCheckpoint(ctx context.Context, namesOrIds [
)
if opts.All {
- allCtrs, err := getContainersByContext(ic.ClientCxt, true, false, []string{})
+ allCtrs, err := getContainersByContext(ic.ClientCtx, true, false, []string{})
if err != nil {
return nil, err
}
@@ -294,7 +294,7 @@ func (ic *ContainerEngine) ContainerCheckpoint(ctx context.Context, namesOrIds [
}
} else {
- ctrs, err = getContainersByContext(ic.ClientCxt, false, false, namesOrIds)
+ ctrs, err = getContainersByContext(ic.ClientCtx, false, false, namesOrIds)
if err != nil {
return nil, err
}
@@ -303,7 +303,7 @@ func (ic *ContainerEngine) ContainerCheckpoint(ctx context.Context, namesOrIds [
options := new(containers.CheckpointOptions).WithExport(opts.Export).WithIgnoreRootfs(opts.IgnoreRootFS).WithKeep(opts.Keep)
options.WithLeaveRunning(opts.LeaveRunning).WithTCPEstablished(opts.TCPEstablished)
for _, c := range ctrs {
- report, err := containers.Checkpoint(ic.ClientCxt, c.ID, options)
+ report, err := containers.Checkpoint(ic.ClientCtx, c.ID, options)
if err != nil {
reports = append(reports, &entities.CheckpointReport{Id: c.ID, Err: err})
}
@@ -318,7 +318,7 @@ func (ic *ContainerEngine) ContainerRestore(ctx context.Context, namesOrIds []st
ctrs = []entities.ListContainer{}
)
if opts.All {
- allCtrs, err := getContainersByContext(ic.ClientCxt, true, false, []string{})
+ allCtrs, err := getContainersByContext(ic.ClientCtx, true, false, []string{})
if err != nil {
return nil, err
}
@@ -330,7 +330,7 @@ func (ic *ContainerEngine) ContainerRestore(ctx context.Context, namesOrIds []st
}
} else {
- ctrs, err = getContainersByContext(ic.ClientCxt, false, false, namesOrIds)
+ ctrs, err = getContainersByContext(ic.ClientCtx, false, false, namesOrIds)
if err != nil {
return nil, err
}
@@ -338,7 +338,7 @@ func (ic *ContainerEngine) ContainerRestore(ctx context.Context, namesOrIds []st
reports := make([]*entities.RestoreReport, 0, len(ctrs))
options := new(containers.RestoreOptions)
for _, c := range ctrs {
- report, err := containers.Restore(ic.ClientCxt, c.ID, options)
+ report, err := containers.Restore(ic.ClientCtx, c.ID, options)
if err != nil {
reports = append(reports, &entities.RestoreReport{Id: c.ID, Err: err})
}
@@ -348,7 +348,7 @@ func (ic *ContainerEngine) ContainerRestore(ctx context.Context, namesOrIds []st
}
func (ic *ContainerEngine) ContainerCreate(ctx context.Context, s *specgen.SpecGenerator) (*entities.ContainerCreateReport, error) {
- response, err := containers.CreateWithSpec(ic.ClientCxt, s, nil)
+ response, err := containers.CreateWithSpec(ic.ClientCtx, s, nil)
if err != nil {
return nil, err
}
@@ -371,7 +371,7 @@ func (ic *ContainerEngine) ContainerLogs(_ context.Context, nameOrIDs []string,
stderrCh := make(chan string)
ctx, cancel := context.WithCancel(context.Background())
go func() {
- err = containers.Logs(ic.ClientCxt, nameOrIDs[0], options, stdoutCh, stderrCh)
+ err = containers.Logs(ic.ClientCtx, nameOrIDs[0], options, stdoutCh, stderrCh)
cancel()
}()
@@ -392,7 +392,7 @@ func (ic *ContainerEngine) ContainerLogs(_ context.Context, nameOrIDs []string,
}
func (ic *ContainerEngine) ContainerAttach(ctx context.Context, nameOrID string, opts entities.AttachOptions) error {
- ctrs, err := getContainersByContext(ic.ClientCxt, false, false, []string{nameOrID})
+ ctrs, err := getContainersByContext(ic.ClientCtx, false, false, []string{nameOrID})
if err != nil {
return err
}
@@ -401,7 +401,7 @@ func (ic *ContainerEngine) ContainerAttach(ctx context.Context, nameOrID string,
return errors.Errorf("you can only attach to running containers")
}
options := new(containers.AttachOptions).WithStream(true).WithDetachKeys(opts.DetachKeys)
- return containers.Attach(ic.ClientCxt, nameOrID, opts.Stdin, opts.Stdout, opts.Stderr, nil, options)
+ return containers.Attach(ic.ClientCtx, nameOrID, opts.Stdin, opts.Stdout, opts.Stderr, nil, options)
}
func makeExecConfig(options entities.ExecOptions) *handlers.ExecCreateConfig {
@@ -429,7 +429,7 @@ func makeExecConfig(options entities.ExecOptions) *handlers.ExecCreateConfig {
func (ic *ContainerEngine) ContainerExec(ctx context.Context, nameOrID string, options entities.ExecOptions, streams define.AttachStreams) (int, error) {
createConfig := makeExecConfig(options)
- sessionID, err := containers.ExecCreate(ic.ClientCxt, nameOrID, createConfig)
+ sessionID, err := containers.ExecCreate(ic.ClientCtx, nameOrID, createConfig)
if err != nil {
return 125, err
}
@@ -439,11 +439,11 @@ func (ic *ContainerEngine) ContainerExec(ctx context.Context, nameOrID string, o
startAndAttachOptions.WithInputStream(*streams.InputStream)
}
startAndAttachOptions.WithAttachError(streams.AttachError).WithAttachOutput(streams.AttachOutput).WithAttachInput(streams.AttachInput)
- if err := containers.ExecStartAndAttach(ic.ClientCxt, sessionID, startAndAttachOptions); err != nil {
+ if err := containers.ExecStartAndAttach(ic.ClientCtx, sessionID, startAndAttachOptions); err != nil {
return 125, err
}
- inspectOut, err := containers.ExecInspect(ic.ClientCxt, sessionID, nil)
+ inspectOut, err := containers.ExecInspect(ic.ClientCtx, sessionID, nil)
if err != nil {
return 125, err
}
@@ -454,12 +454,12 @@ func (ic *ContainerEngine) ContainerExec(ctx context.Context, nameOrID string, o
func (ic *ContainerEngine) ContainerExecDetached(ctx context.Context, nameOrID string, options entities.ExecOptions) (string, error) {
createConfig := makeExecConfig(options)
- sessionID, err := containers.ExecCreate(ic.ClientCxt, nameOrID, createConfig)
+ sessionID, err := containers.ExecCreate(ic.ClientCtx, nameOrID, createConfig)
if err != nil {
return "", err
}
- if err := containers.ExecStart(ic.ClientCxt, sessionID, nil); err != nil {
+ if err := containers.ExecStart(ic.ClientCtx, sessionID, nil); err != nil {
return "", err
}
@@ -474,7 +474,7 @@ func startAndAttach(ic *ContainerEngine, name string, detachKeys *string, input,
options.WithDetachKeys(*dk)
}
go func() {
- err := containers.Attach(ic.ClientCxt, name, input, output, errput, attachReady, options)
+ err := containers.Attach(ic.ClientCtx, name, input, output, errput, attachReady, options)
attachErr <- err
}()
// Wait for the attach to actually happen before starting
@@ -485,7 +485,7 @@ func startAndAttach(ic *ContainerEngine, name string, detachKeys *string, input,
if dk := detachKeys; dk != nil {
startOptions.WithDetachKeys(*dk)
}
- if err := containers.Start(ic.ClientCxt, name, startOptions); err != nil {
+ if err := containers.Start(ic.ClientCtx, name, startOptions); err != nil {
return err
}
case err := <-attachErr:
@@ -498,7 +498,7 @@ func startAndAttach(ic *ContainerEngine, name string, detachKeys *string, input,
func (ic *ContainerEngine) ContainerStart(ctx context.Context, namesOrIds []string, options entities.ContainerStartOptions) ([]*entities.ContainerStartReport, error) {
reports := []*entities.ContainerStartReport{}
var exitCode = define.ExecErrorCodeGeneric
- ctrs, err := getContainersByContext(ic.ClientCxt, false, false, namesOrIds)
+ ctrs, err := getContainersByContext(ic.ClientCtx, false, false, namesOrIds)
if err != nil {
return nil, err
}
@@ -535,14 +535,14 @@ func (ic *ContainerEngine) ContainerStart(ctx context.Context, namesOrIds []stri
// Defer the removal, so we can return early if needed and
// de-spaghetti the code.
defer func() {
- shouldRestart, err := containers.ShouldRestart(ic.ClientCxt, ctr.ID, nil)
+ shouldRestart, err := containers.ShouldRestart(ic.ClientCtx, ctr.ID, nil)
if err != nil {
logrus.Errorf("Failed to check if %s should restart: %v", ctr.ID, err)
return
}
if !shouldRestart {
- if err := containers.Remove(ic.ClientCxt, ctr.ID, removeOptions); err != nil {
+ if err := containers.Remove(ic.ClientCtx, ctr.ID, removeOptions); err != nil {
if errorhandling.Contains(err, define.ErrNoSuchCtr) ||
errorhandling.Contains(err, define.ErrCtrRemoved) {
logrus.Warnf("Container %s does not exist: %v", ctr.ID, err)
@@ -554,7 +554,7 @@ func (ic *ContainerEngine) ContainerStart(ctx context.Context, namesOrIds []stri
}()
}
- exitCode, err := containers.Wait(ic.ClientCxt, name, nil)
+ exitCode, err := containers.Wait(ic.ClientCtx, name, nil)
if err == define.ErrNoSuchCtr {
// Check events
event, err := ic.GetLastContainerEvent(ctx, name, events.Exited)
@@ -573,11 +573,11 @@ func (ic *ContainerEngine) ContainerStart(ctx context.Context, namesOrIds []stri
// Start the container if it's not running already.
if !ctrRunning {
- err = containers.Start(ic.ClientCxt, name, new(containers.StartOptions).WithDetachKeys(options.DetachKeys))
+ err = containers.Start(ic.ClientCtx, name, new(containers.StartOptions).WithDetachKeys(options.DetachKeys))
if err != nil {
if ctr.AutoRemove {
rmOptions := new(containers.RemoveOptions).WithForce(false).WithVolumes(true)
- if err := containers.Remove(ic.ClientCxt, ctr.ID, rmOptions); err != nil {
+ if err := containers.Remove(ic.ClientCtx, ctr.ID, rmOptions); err != nil {
if errorhandling.Contains(err, define.ErrNoSuchCtr) ||
errorhandling.Contains(err, define.ErrCtrRemoved) {
logrus.Warnf("Container %s does not exist: %v", ctr.ID, err)
@@ -601,11 +601,11 @@ func (ic *ContainerEngine) ContainerStart(ctx context.Context, namesOrIds []stri
func (ic *ContainerEngine) ContainerList(ctx context.Context, opts entities.ContainerListOptions) ([]entities.ListContainer, error) {
options := new(containers.ListOptions).WithFilters(opts.Filters).WithAll(opts.All).WithLast(opts.Last)
options.WithNamespace(opts.Namespace).WithSize(opts.Size).WithSync(opts.Sync)
- return containers.List(ic.ClientCxt, options)
+ return containers.List(ic.ClientCtx, options)
}
func (ic *ContainerEngine) ContainerRun(ctx context.Context, opts entities.ContainerRunOptions) (*entities.ContainerRunReport, error) {
- con, err := containers.CreateWithSpec(ic.ClientCxt, opts.Spec, nil)
+ con, err := containers.CreateWithSpec(ic.ClientCtx, opts.Spec, nil)
if err != nil {
return nil, err
}
@@ -622,7 +622,7 @@ func (ic *ContainerEngine) ContainerRun(ctx context.Context, opts entities.Conta
if opts.Detach {
// Detach and return early
- err := containers.Start(ic.ClientCxt, con.ID, nil)
+ err := containers.Start(ic.ClientCtx, con.ID, nil)
if err != nil {
report.ExitCode = define.ExitCode(err)
}
@@ -637,7 +637,7 @@ func (ic *ContainerEngine) ContainerRun(ctx context.Context, opts entities.Conta
report.ExitCode = define.ExitCode(err)
if opts.Rm {
- if rmErr := containers.Remove(ic.ClientCxt, con.ID, new(containers.RemoveOptions).WithForce(false).WithVolumes(true)); rmErr != nil {
+ if rmErr := containers.Remove(ic.ClientCtx, con.ID, new(containers.RemoveOptions).WithForce(false).WithVolumes(true)); rmErr != nil {
logrus.Debugf("unable to remove container %s after failing to start and attach to it", con.ID)
}
}
@@ -648,14 +648,14 @@ func (ic *ContainerEngine) ContainerRun(ctx context.Context, opts entities.Conta
// Defer the removal, so we can return early if needed and
// de-spaghetti the code.
defer func() {
- shouldRestart, err := containers.ShouldRestart(ic.ClientCxt, con.ID, nil)
+ shouldRestart, err := containers.ShouldRestart(ic.ClientCtx, con.ID, nil)
if err != nil {
logrus.Errorf("Failed to check if %s should restart: %v", con.ID, err)
return
}
if !shouldRestart {
- if err := containers.Remove(ic.ClientCxt, con.ID, new(containers.RemoveOptions).WithForce(false).WithVolumes(true)); err != nil {
+ if err := containers.Remove(ic.ClientCtx, con.ID, new(containers.RemoveOptions).WithForce(false).WithVolumes(true)); err != nil {
if errorhandling.Contains(err, define.ErrNoSuchCtr) ||
errorhandling.Contains(err, define.ErrCtrRemoved) {
logrus.Warnf("Container %s does not exist: %v", con.ID, err)
@@ -668,7 +668,7 @@ func (ic *ContainerEngine) ContainerRun(ctx context.Context, opts entities.Conta
}
// Wait
- exitCode, waitErr := containers.Wait(ic.ClientCxt, con.ID, nil)
+ exitCode, waitErr := containers.Wait(ic.ClientCtx, con.ID, nil)
if waitErr == nil {
report.ExitCode = int(exitCode)
return &report, nil
@@ -717,7 +717,7 @@ func (ic *ContainerEngine) ContainerRun(ctx context.Context, opts entities.Conta
}
func (ic *ContainerEngine) ContainerDiff(ctx context.Context, nameOrID string, _ entities.DiffOptions) (*entities.DiffReport, error) {
- changes, err := containers.Diff(ic.ClientCxt, nameOrID, nil)
+ changes, err := containers.Diff(ic.ClientCtx, nameOrID, nil)
return &entities.DiffReport{Changes: changes}, err
}
@@ -726,13 +726,13 @@ func (ic *ContainerEngine) ContainerCleanup(ctx context.Context, namesOrIds []st
}
func (ic *ContainerEngine) ContainerInit(ctx context.Context, namesOrIds []string, options entities.ContainerInitOptions) ([]*entities.ContainerInitReport, error) {
- ctrs, err := getContainersByContext(ic.ClientCxt, options.All, false, namesOrIds)
+ ctrs, err := getContainersByContext(ic.ClientCtx, options.All, false, namesOrIds)
if err != nil {
return nil, err
}
reports := make([]*entities.ContainerInitReport, 0, len(ctrs))
for _, ctr := range ctrs {
- err := containers.ContainerInit(ic.ClientCxt, ctr.ID, nil)
+ err := containers.ContainerInit(ic.ClientCtx, ctr.ID, nil)
// When using all, it is NOT considered an error if a container
// has already been init'd.
if err != nil && options.All && strings.Contains(errors.Cause(err).Error(), define.ErrCtrStateInvalid.Error()) {
@@ -766,7 +766,7 @@ func (ic *ContainerEngine) ContainerPort(ctx context.Context, nameOrID string, o
if len(nameOrID) > 0 {
namesOrIds = append(namesOrIds, nameOrID)
}
- ctrs, err := getContainersByContext(ic.ClientCxt, options.All, false, namesOrIds)
+ ctrs, err := getContainersByContext(ic.ClientCtx, options.All, false, namesOrIds)
if err != nil {
return nil, err
}
@@ -785,15 +785,15 @@ func (ic *ContainerEngine) ContainerPort(ctx context.Context, nameOrID string, o
}
func (ic *ContainerEngine) ContainerCopyFromArchive(ctx context.Context, nameOrID string, path string, reader io.Reader) (entities.ContainerCopyFunc, error) {
- return containers.CopyFromArchive(ic.ClientCxt, nameOrID, path, reader)
+ return containers.CopyFromArchive(ic.ClientCtx, nameOrID, path, reader)
}
func (ic *ContainerEngine) ContainerCopyToArchive(ctx context.Context, nameOrID string, path string, writer io.Writer) (entities.ContainerCopyFunc, error) {
- return containers.CopyToArchive(ic.ClientCxt, nameOrID, path, writer)
+ return containers.CopyToArchive(ic.ClientCtx, nameOrID, path, writer)
}
func (ic *ContainerEngine) ContainerStat(ctx context.Context, nameOrID string, path string) (*entities.ContainerStatReport, error) {
- return containers.Stat(ic.ClientCxt, nameOrID, path)
+ return containers.Stat(ic.ClientCtx, nameOrID, path)
}
// Shutdown Libpod engine
@@ -804,10 +804,10 @@ func (ic *ContainerEngine) ContainerStats(ctx context.Context, namesOrIds []stri
if options.Latest {
return nil, errors.New("latest is not supported for the remote client")
}
- return containers.Stats(ic.ClientCxt, namesOrIds, new(containers.StatsOptions).WithStream(options.Stream))
+ return containers.Stats(ic.ClientCtx, namesOrIds, new(containers.StatsOptions).WithStream(options.Stream))
}
-// ShouldRestart reports back whether the containre will restart
+// ShouldRestart reports back whether the container will restart
func (ic *ContainerEngine) ShouldRestart(_ context.Context, id string) (bool, error) {
- return containers.ShouldRestart(ic.ClientCxt, id, nil)
+ return containers.ShouldRestart(ic.ClientCtx, id, nil)
}
diff --git a/pkg/domain/infra/tunnel/events.go b/pkg/domain/infra/tunnel/events.go
index 1254e04f3..cec6c749c 100644
--- a/pkg/domain/infra/tunnel/events.go
+++ b/pkg/domain/infra/tunnel/events.go
@@ -29,7 +29,7 @@ func (ic *ContainerEngine) Events(ctx context.Context, opts entities.EventsOptio
close(opts.EventChan)
}()
options := new(system.EventsOptions).WithFilters(filters).WithSince(opts.Since).WithStream(opts.Stream).WithUntil(opts.Until)
- return system.Events(ic.ClientCxt, binChan, nil, options)
+ return system.Events(ic.ClientCtx, binChan, nil, options)
}
// GetLastContainerEvent takes a container name or ID and an event status and returns
diff --git a/pkg/domain/infra/tunnel/generate.go b/pkg/domain/infra/tunnel/generate.go
index 30a501a48..6d68157c1 100644
--- a/pkg/domain/infra/tunnel/generate.go
+++ b/pkg/domain/infra/tunnel/generate.go
@@ -13,10 +13,10 @@ func (ic *ContainerEngine) GenerateSystemd(ctx context.Context, nameOrID string,
if to := opts.StopTimeout; to != nil {
options.WithStopTimeout(*opts.StopTimeout)
}
- return generate.Systemd(ic.ClientCxt, nameOrID, options)
+ return generate.Systemd(ic.ClientCtx, nameOrID, options)
}
func (ic *ContainerEngine) GenerateKube(ctx context.Context, nameOrIDs []string, opts entities.GenerateKubeOptions) (*entities.GenerateKubeReport, error) {
options := new(generate.KubeOptions).WithService(opts.Service)
- return generate.Kube(ic.ClientCxt, nameOrIDs, options)
+ return generate.Kube(ic.ClientCtx, nameOrIDs, options)
}
diff --git a/pkg/domain/infra/tunnel/healthcheck.go b/pkg/domain/infra/tunnel/healthcheck.go
index b3ff888d8..3daf22647 100644
--- a/pkg/domain/infra/tunnel/healthcheck.go
+++ b/pkg/domain/infra/tunnel/healthcheck.go
@@ -9,5 +9,5 @@ import (
)
func (ic *ContainerEngine) HealthCheckRun(ctx context.Context, nameOrID string, options entities.HealthCheckOptions) (*define.HealthCheckResults, error) {
- return containers.RunHealthCheck(ic.ClientCxt, nameOrID, nil)
+ return containers.RunHealthCheck(ic.ClientCtx, nameOrID, nil)
}
diff --git a/pkg/domain/infra/tunnel/images.go b/pkg/domain/infra/tunnel/images.go
index 99291962f..10bf9682c 100644
--- a/pkg/domain/infra/tunnel/images.go
+++ b/pkg/domain/infra/tunnel/images.go
@@ -22,13 +22,13 @@ import (
)
func (ir *ImageEngine) Exists(_ context.Context, nameOrID string) (*entities.BoolReport, error) {
- found, err := images.Exists(ir.ClientCxt, nameOrID)
+ found, err := images.Exists(ir.ClientCtx, nameOrID)
return &entities.BoolReport{Value: found}, err
}
func (ir *ImageEngine) Remove(ctx context.Context, imagesArg []string, opts entities.ImageRemoveOptions) (*entities.ImageRemoveReport, []error) {
options := new(images.RemoveOptions).WithForce(opts.Force).WithAll(opts.All)
- return images.Remove(ir.ClientCxt, imagesArg, options)
+ return images.Remove(ir.ClientCtx, imagesArg, options)
}
func (ir *ImageEngine) List(ctx context.Context, opts entities.ImageListOptions) ([]*entities.ImageSummary, error) {
@@ -39,7 +39,7 @@ func (ir *ImageEngine) List(ctx context.Context, opts entities.ImageListOptions)
filters[f[0]] = f[1:]
}
options := new(images.ListOptions).WithAll(opts.All).WithFilters(filters)
- psImages, err := images.List(ir.ClientCxt, options)
+ psImages, err := images.List(ir.ClientCtx, options)
if err != nil {
return nil, err
}
@@ -65,7 +65,7 @@ func (ir *ImageEngine) Unmount(ctx context.Context, images []string, options ent
func (ir *ImageEngine) History(ctx context.Context, nameOrID string, opts entities.ImageHistoryOptions) (*entities.ImageHistoryReport, error) {
options := new(images.HistoryOptions)
- results, err := images.History(ir.ClientCxt, nameOrID, options)
+ results, err := images.History(ir.ClientCtx, nameOrID, options)
if err != nil {
return nil, err
}
@@ -97,7 +97,7 @@ func (ir *ImageEngine) Prune(ctx context.Context, opts entities.ImagePruneOption
filters[f[0]] = f[1:]
}
options := new(images.PruneOptions).WithAll(opts.All).WithFilters(filters)
- results, err := images.Prune(ir.ClientCxt, options)
+ results, err := images.Prune(ir.ClientCtx, options)
if err != nil {
return nil, err
}
@@ -124,7 +124,7 @@ func (ir *ImageEngine) Pull(ctx context.Context, rawImage string, opts entities.
}
}
options.WithQuiet(opts.Quiet).WithSignaturePolicy(opts.SignaturePolicy).WithUsername(opts.Username)
- pulledImages, err := images.Pull(ir.ClientCxt, rawImage, options)
+ pulledImages, err := images.Pull(ir.ClientCtx, rawImage, options)
if err != nil {
return nil, err
}
@@ -150,7 +150,7 @@ func (ir *ImageEngine) Tag(ctx context.Context, nameOrID string, tags []string,
if len(repo) < 1 {
return errors.Errorf("invalid image name %q", nameOrID)
}
- if err := images.Tag(ir.ClientCxt, nameOrID, tag, repo, options); err != nil {
+ if err := images.Tag(ir.ClientCtx, nameOrID, tag, repo, options); err != nil {
return err
}
}
@@ -160,7 +160,7 @@ func (ir *ImageEngine) Tag(ctx context.Context, nameOrID string, tags []string,
func (ir *ImageEngine) Untag(ctx context.Context, nameOrID string, tags []string, opt entities.ImageUntagOptions) error {
options := new(images.UntagOptions)
if len(tags) == 0 {
- return images.Untag(ir.ClientCxt, nameOrID, "", "", options)
+ return images.Untag(ir.ClientCtx, nameOrID, "", "", options)
}
for _, newTag := range tags {
@@ -180,7 +180,7 @@ func (ir *ImageEngine) Untag(ctx context.Context, nameOrID string, tags []string
if len(repo) < 1 {
return errors.Errorf("invalid image name %q", nameOrID)
}
- if err := images.Untag(ir.ClientCxt, nameOrID, tag, repo, options); err != nil {
+ if err := images.Untag(ir.ClientCtx, nameOrID, tag, repo, options); err != nil {
return err
}
}
@@ -192,7 +192,7 @@ func (ir *ImageEngine) Inspect(ctx context.Context, namesOrIDs []string, opts en
reports := []*entities.ImageInspectReport{}
errs := []error{}
for _, i := range namesOrIDs {
- r, err := images.GetImage(ir.ClientCxt, i, options)
+ r, err := images.GetImage(ir.ClientCtx, i, options)
if err != nil {
errModel, ok := err.(entities.ErrorModel)
if !ok {
@@ -227,7 +227,7 @@ func (ir *ImageEngine) Load(ctx context.Context, opts entities.ImageLoadOptions)
ref += ":" + opts.Tag
}
options := new(images.LoadOptions).WithReference(ref)
- return images.Load(ir.ClientCxt, f, options)
+ return images.Load(ir.ClientCtx, f, options)
}
func (ir *ImageEngine) Import(ctx context.Context, opts entities.ImageImportOptions) (*entities.ImageImportReport, error) {
@@ -244,7 +244,7 @@ func (ir *ImageEngine) Import(ctx context.Context, opts entities.ImageImportOpti
return nil, err
}
}
- return images.Import(ir.ClientCxt, f, options)
+ return images.Import(ir.ClientCtx, f, options)
}
func (ir *ImageEngine) Push(ctx context.Context, source string, destination string, opts entities.ImagePushOptions) error {
@@ -261,7 +261,7 @@ func (ir *ImageEngine) Push(ctx context.Context, source string, destination stri
options.WithSkipTLSVerify(false)
}
}
- return images.Push(ir.ClientCxt, source, destination, options)
+ return images.Push(ir.ClientCtx, source, destination, options)
}
func (ir *ImageEngine) Save(ctx context.Context, nameOrID string, tags []string, opts entities.ImageSaveOptions) error {
@@ -284,7 +284,7 @@ func (ir *ImageEngine) Save(ctx context.Context, nameOrID string, tags []string,
return err
}
- exErr := images.Export(ir.ClientCxt, append([]string{nameOrID}, tags...), f, options)
+ exErr := images.Export(ir.ClientCtx, append([]string{nameOrID}, tags...), f, options)
if err := f.Close(); err != nil {
return err
}
@@ -319,7 +319,7 @@ func (ir *ImageEngine) Save(ctx context.Context, nameOrID string, tags []string,
// Diff reports the changes to the given image
func (ir *ImageEngine) Diff(ctx context.Context, nameOrID string, _ entities.DiffOptions) (*entities.DiffReport, error) {
options := new(images.DiffOptions)
- changes, err := images.Diff(ir.ClientCxt, nameOrID, options)
+ changes, err := images.Diff(ir.ClientCtx, nameOrID, options)
if err != nil {
return nil, err
}
@@ -354,7 +354,7 @@ func (ir *ImageEngine) Search(ctx context.Context, term string, opts entities.Im
options.WithSkipTLSVerify(false)
}
}
- return images.Search(ir.ClientCxt, term, options)
+ return images.Search(ir.ClientCtx, term, options)
}
func (ir *ImageEngine) Config(_ context.Context) (*config.Config, error) {
@@ -362,7 +362,7 @@ func (ir *ImageEngine) Config(_ context.Context) (*config.Config, error) {
}
func (ir *ImageEngine) Build(_ context.Context, containerFiles []string, opts entities.BuildOptions) (*entities.BuildReport, error) {
- report, err := images.Build(ir.ClientCxt, containerFiles, opts)
+ report, err := images.Build(ir.ClientCtx, containerFiles, opts)
if err != nil {
return nil, err
}
@@ -382,7 +382,7 @@ func (ir *ImageEngine) Build(_ context.Context, containerFiles []string, opts en
func (ir *ImageEngine) Tree(ctx context.Context, nameOrID string, opts entities.ImageTreeOptions) (*entities.ImageTreeReport, error) {
options := new(images.TreeOptions).WithWhatRequires(opts.WhatRequires)
- return images.Tree(ir.ClientCxt, nameOrID, options)
+ return images.Tree(ir.ClientCtx, nameOrID, options)
}
// Shutdown Libpod engine
diff --git a/pkg/domain/infra/tunnel/manifest.go b/pkg/domain/infra/tunnel/manifest.go
index 97f79a92b..c71349fe0 100644
--- a/pkg/domain/infra/tunnel/manifest.go
+++ b/pkg/domain/infra/tunnel/manifest.go
@@ -14,7 +14,7 @@ import (
// ManifestCreate implements manifest create via ImageEngine
func (ir *ImageEngine) ManifestCreate(ctx context.Context, names, images []string, opts entities.ManifestCreateOptions) (string, error) {
options := new(manifests.CreateOptions).WithAll(opts.All)
- imageID, err := manifests.Create(ir.ClientCxt, names, images, options)
+ imageID, err := manifests.Create(ir.ClientCtx, names, images, options)
if err != nil {
return imageID, errors.Wrapf(err, "error creating manifest")
}
@@ -23,7 +23,7 @@ func (ir *ImageEngine) ManifestCreate(ctx context.Context, names, images []strin
// ManifestInspect returns contents of manifest list with given name
func (ir *ImageEngine) ManifestInspect(ctx context.Context, name string) ([]byte, error) {
- list, err := manifests.Inspect(ir.ClientCxt, name, nil)
+ list, err := manifests.Inspect(ir.ClientCtx, name, nil)
if err != nil {
return nil, errors.Wrapf(err, "error getting content of manifest list or image %s", name)
}
@@ -51,7 +51,7 @@ func (ir *ImageEngine) ManifestAdd(ctx context.Context, opts entities.ManifestAd
options.WithAnnotation(annotations)
}
- listID, err := manifests.Add(ir.ClientCxt, opts.Images[1], options)
+ listID, err := manifests.Add(ir.ClientCtx, opts.Images[1], options)
if err != nil {
return listID, errors.Wrapf(err, "error adding to manifest list %s", opts.Images[1])
}
@@ -65,7 +65,7 @@ func (ir *ImageEngine) ManifestAnnotate(ctx context.Context, names []string, opt
// ManifestRemove removes the digest from manifest list
func (ir *ImageEngine) ManifestRemove(ctx context.Context, names []string) (string, error) {
- updatedListID, err := manifests.Remove(ir.ClientCxt, names[0], names[1], nil)
+ updatedListID, err := manifests.Remove(ir.ClientCtx, names[0], names[1], nil)
if err != nil {
return updatedListID, errors.Wrapf(err, "error removing from manifest %s", names[0])
}
@@ -75,6 +75,6 @@ func (ir *ImageEngine) ManifestRemove(ctx context.Context, names []string) (stri
// ManifestPush pushes a manifest list or image index to the destination
func (ir *ImageEngine) ManifestPush(ctx context.Context, name, destination string, opts entities.ManifestPushOptions) error {
options := new(manifests.PushOptions).WithAll(opts.All)
- _, err := manifests.Push(ir.ClientCxt, name, destination, options)
+ _, err := manifests.Push(ir.ClientCtx, name, destination, options)
return err
}
diff --git a/pkg/domain/infra/tunnel/network.go b/pkg/domain/infra/tunnel/network.go
index 6391e501f..9afb8db02 100644
--- a/pkg/domain/infra/tunnel/network.go
+++ b/pkg/domain/infra/tunnel/network.go
@@ -10,7 +10,7 @@ import (
func (ic *ContainerEngine) NetworkList(ctx context.Context, opts entities.NetworkListOptions) ([]*entities.NetworkListReport, error) {
options := new(network.ListOptions).WithFilters(opts.Filters)
- return network.List(ic.ClientCxt, options)
+ return network.List(ic.ClientCtx, options)
}
func (ic *ContainerEngine) NetworkInspect(ctx context.Context, namesOrIds []string, opts entities.InspectOptions) ([]entities.NetworkInspectReport, []error, error) {
@@ -20,7 +20,7 @@ func (ic *ContainerEngine) NetworkInspect(ctx context.Context, namesOrIds []stri
)
options := new(network.InspectOptions)
for _, name := range namesOrIds {
- report, err := network.Inspect(ic.ClientCxt, name, options)
+ report, err := network.Inspect(ic.ClientCtx, name, options)
if err != nil {
errModel, ok := err.(entities.ErrorModel)
if !ok {
@@ -45,7 +45,7 @@ func (ic *ContainerEngine) NetworkRm(ctx context.Context, namesOrIds []string, o
reports := make([]*entities.NetworkRmReport, 0, len(namesOrIds))
options := new(network.RemoveOptions).WithForce(opts.Force)
for _, name := range namesOrIds {
- response, err := network.Remove(ic.ClientCxt, name, options)
+ response, err := network.Remove(ic.ClientCtx, name, options)
if err != nil {
report := &entities.NetworkRmReport{
Name: name,
@@ -63,17 +63,17 @@ func (ic *ContainerEngine) NetworkCreate(ctx context.Context, name string, opts
options := new(network.CreateOptions).WithName(name).WithDisableDNS(opts.DisableDNS).WithDriver(opts.Driver).WithGateway(opts.Gateway)
options.WithInternal(opts.Internal).WithIPRange(opts.Range).WithIPv6(opts.IPv6).WithLabels(opts.Labels).WithIPv6(opts.IPv6)
options.WithMacVLAN(opts.MacVLAN).WithOptions(opts.Options).WithSubnet(opts.Subnet)
- return network.Create(ic.ClientCxt, options)
+ return network.Create(ic.ClientCtx, options)
}
// NetworkDisconnect removes a container from a given network
func (ic *ContainerEngine) NetworkDisconnect(ctx context.Context, networkname string, opts entities.NetworkDisconnectOptions) error {
options := new(network.DisconnectOptions).WithForce(opts.Force)
- return network.Disconnect(ic.ClientCxt, networkname, opts.Container, options)
+ return network.Disconnect(ic.ClientCtx, networkname, opts.Container, options)
}
// NetworkConnect removes a container from a given network
func (ic *ContainerEngine) NetworkConnect(ctx context.Context, networkname string, opts entities.NetworkConnectOptions) error {
options := new(network.ConnectOptions).WithAliases(opts.Aliases)
- return network.Connect(ic.ClientCxt, networkname, opts.Container, options)
+ return network.Connect(ic.ClientCtx, networkname, opts.Container, options)
}
diff --git a/pkg/domain/infra/tunnel/play.go b/pkg/domain/infra/tunnel/play.go
index 5197e0d6c..2318b9caa 100644
--- a/pkg/domain/infra/tunnel/play.go
+++ b/pkg/domain/infra/tunnel/play.go
@@ -19,5 +19,5 @@ func (ic *ContainerEngine) PlayKube(ctx context.Context, path string, opts entit
if start := opts.Start; start != types.OptionalBoolUndefined {
options.WithStart(start == types.OptionalBoolTrue)
}
- return play.Kube(ic.ClientCxt, path, options)
+ return play.Kube(ic.ClientCtx, path, options)
}
diff --git a/pkg/domain/infra/tunnel/pods.go b/pkg/domain/infra/tunnel/pods.go
index 1ceff9ca7..aa7b92fa7 100644
--- a/pkg/domain/infra/tunnel/pods.go
+++ b/pkg/domain/infra/tunnel/pods.go
@@ -12,7 +12,7 @@ import (
)
func (ic *ContainerEngine) PodExists(ctx context.Context, nameOrID string) (*entities.BoolReport, error) {
- exists, err := pods.Exists(ic.ClientCxt, nameOrID)
+ exists, err := pods.Exists(ic.ClientCtx, nameOrID)
return &entities.BoolReport{Value: exists}, err
}
@@ -22,14 +22,14 @@ func (ic *ContainerEngine) PodKill(ctx context.Context, namesOrIds []string, opt
return nil, err
}
- foundPods, err := getPodsByContext(ic.ClientCxt, opts.All, namesOrIds)
+ foundPods, err := getPodsByContext(ic.ClientCtx, opts.All, namesOrIds)
if err != nil {
return nil, err
}
reports := make([]*entities.PodKillReport, 0, len(foundPods))
options := new(pods.KillOptions).WithSignal(opts.Signal)
for _, p := range foundPods {
- response, err := pods.Kill(ic.ClientCxt, p.Id, options)
+ response, err := pods.Kill(ic.ClientCtx, p.Id, options)
if err != nil {
report := entities.PodKillReport{
Errs: []error{err},
@@ -44,13 +44,13 @@ func (ic *ContainerEngine) PodKill(ctx context.Context, namesOrIds []string, opt
}
func (ic *ContainerEngine) PodPause(ctx context.Context, namesOrIds []string, options entities.PodPauseOptions) ([]*entities.PodPauseReport, error) {
- foundPods, err := getPodsByContext(ic.ClientCxt, options.All, namesOrIds)
+ foundPods, err := getPodsByContext(ic.ClientCtx, options.All, namesOrIds)
if err != nil {
return nil, err
}
reports := make([]*entities.PodPauseReport, 0, len(foundPods))
for _, p := range foundPods {
- response, err := pods.Pause(ic.ClientCxt, p.Id, nil)
+ response, err := pods.Pause(ic.ClientCtx, p.Id, nil)
if err != nil {
report := entities.PodPauseReport{
Errs: []error{err},
@@ -65,13 +65,13 @@ func (ic *ContainerEngine) PodPause(ctx context.Context, namesOrIds []string, op
}
func (ic *ContainerEngine) PodUnpause(ctx context.Context, namesOrIds []string, options entities.PodunpauseOptions) ([]*entities.PodUnpauseReport, error) {
- foundPods, err := getPodsByContext(ic.ClientCxt, options.All, namesOrIds)
+ foundPods, err := getPodsByContext(ic.ClientCtx, options.All, namesOrIds)
if err != nil {
return nil, err
}
reports := make([]*entities.PodUnpauseReport, 0, len(foundPods))
for _, p := range foundPods {
- response, err := pods.Unpause(ic.ClientCxt, p.Id, nil)
+ response, err := pods.Unpause(ic.ClientCtx, p.Id, nil)
if err != nil {
report := entities.PodUnpauseReport{
Errs: []error{err},
@@ -87,7 +87,7 @@ func (ic *ContainerEngine) PodUnpause(ctx context.Context, namesOrIds []string,
func (ic *ContainerEngine) PodStop(ctx context.Context, namesOrIds []string, opts entities.PodStopOptions) ([]*entities.PodStopReport, error) {
timeout := -1
- foundPods, err := getPodsByContext(ic.ClientCxt, opts.All, namesOrIds)
+ foundPods, err := getPodsByContext(ic.ClientCtx, opts.All, namesOrIds)
if err != nil && !(opts.Ignore && errors.Cause(err) == define.ErrNoSuchPod) {
return nil, err
}
@@ -97,7 +97,7 @@ func (ic *ContainerEngine) PodStop(ctx context.Context, namesOrIds []string, opt
reports := make([]*entities.PodStopReport, 0, len(foundPods))
options := new(pods.StopOptions).WithTimeout(timeout)
for _, p := range foundPods {
- response, err := pods.Stop(ic.ClientCxt, p.Id, options)
+ response, err := pods.Stop(ic.ClientCtx, p.Id, options)
if err != nil {
report := entities.PodStopReport{
Errs: []error{err},
@@ -112,13 +112,13 @@ func (ic *ContainerEngine) PodStop(ctx context.Context, namesOrIds []string, opt
}
func (ic *ContainerEngine) PodRestart(ctx context.Context, namesOrIds []string, options entities.PodRestartOptions) ([]*entities.PodRestartReport, error) {
- foundPods, err := getPodsByContext(ic.ClientCxt, options.All, namesOrIds)
+ foundPods, err := getPodsByContext(ic.ClientCtx, options.All, namesOrIds)
if err != nil {
return nil, err
}
reports := make([]*entities.PodRestartReport, 0, len(foundPods))
for _, p := range foundPods {
- response, err := pods.Restart(ic.ClientCxt, p.Id, nil)
+ response, err := pods.Restart(ic.ClientCtx, p.Id, nil)
if err != nil {
report := entities.PodRestartReport{
Errs: []error{err},
@@ -133,13 +133,13 @@ func (ic *ContainerEngine) PodRestart(ctx context.Context, namesOrIds []string,
}
func (ic *ContainerEngine) PodStart(ctx context.Context, namesOrIds []string, options entities.PodStartOptions) ([]*entities.PodStartReport, error) {
- foundPods, err := getPodsByContext(ic.ClientCxt, options.All, namesOrIds)
+ foundPods, err := getPodsByContext(ic.ClientCtx, options.All, namesOrIds)
if err != nil {
return nil, err
}
reports := make([]*entities.PodStartReport, 0, len(foundPods))
for _, p := range foundPods {
- response, err := pods.Start(ic.ClientCxt, p.Id, nil)
+ response, err := pods.Start(ic.ClientCtx, p.Id, nil)
if err != nil {
report := entities.PodStartReport{
Errs: []error{err},
@@ -154,14 +154,14 @@ func (ic *ContainerEngine) PodStart(ctx context.Context, namesOrIds []string, op
}
func (ic *ContainerEngine) PodRm(ctx context.Context, namesOrIds []string, opts entities.PodRmOptions) ([]*entities.PodRmReport, error) {
- foundPods, err := getPodsByContext(ic.ClientCxt, opts.All, namesOrIds)
+ foundPods, err := getPodsByContext(ic.ClientCtx, opts.All, namesOrIds)
if err != nil && !(opts.Ignore && errors.Cause(err) == define.ErrNoSuchPod) {
return nil, err
}
reports := make([]*entities.PodRmReport, 0, len(foundPods))
options := new(pods.RemoveOptions).WithForce(opts.Force)
for _, p := range foundPods {
- response, err := pods.Remove(ic.ClientCxt, p.Id, options)
+ response, err := pods.Remove(ic.ClientCtx, p.Id, options)
if err != nil {
report := entities.PodRmReport{
Err: err,
@@ -176,13 +176,13 @@ func (ic *ContainerEngine) PodRm(ctx context.Context, namesOrIds []string, opts
}
func (ic *ContainerEngine) PodPrune(ctx context.Context, opts entities.PodPruneOptions) ([]*entities.PodPruneReport, error) {
- return pods.Prune(ic.ClientCxt, nil)
+ return pods.Prune(ic.ClientCtx, nil)
}
func (ic *ContainerEngine) PodCreate(ctx context.Context, opts entities.PodCreateOptions) (*entities.PodCreateReport, error) {
podSpec := specgen.NewPodSpecGenerator()
opts.ToPodSpecGen(podSpec)
- return pods.CreatePodFromSpec(ic.ClientCxt, podSpec, nil)
+ return pods.CreatePodFromSpec(ic.ClientCtx, podSpec, nil)
}
func (ic *ContainerEngine) PodTop(ctx context.Context, opts entities.PodTopOptions) (*entities.StringSliceReport, error) {
@@ -193,7 +193,7 @@ func (ic *ContainerEngine) PodTop(ctx context.Context, opts entities.PodTopOptio
return nil, errors.New("NameOrID must be specified")
}
options := new(pods.TopOptions).WithDescriptors(opts.Descriptors)
- topOutput, err := pods.Top(ic.ClientCxt, opts.NameOrID, options)
+ topOutput, err := pods.Top(ic.ClientCtx, opts.NameOrID, options)
if err != nil {
return nil, err
}
@@ -202,7 +202,7 @@ func (ic *ContainerEngine) PodTop(ctx context.Context, opts entities.PodTopOptio
func (ic *ContainerEngine) PodPs(ctx context.Context, opts entities.PodPSOptions) ([]*entities.ListPodsReport, error) {
options := new(pods.ListOptions).WithFilters(opts.Filters)
- return pods.List(ic.ClientCxt, options)
+ return pods.List(ic.ClientCtx, options)
}
func (ic *ContainerEngine) PodInspect(ctx context.Context, options entities.PodInspectOptions) (*entities.PodInspectReport, error) {
@@ -212,10 +212,10 @@ func (ic *ContainerEngine) PodInspect(ctx context.Context, options entities.PodI
case options.NameOrID == "":
return nil, errors.New("NameOrID must be specified")
}
- return pods.Inspect(ic.ClientCxt, options.NameOrID, nil)
+ return pods.Inspect(ic.ClientCtx, options.NameOrID, nil)
}
func (ic *ContainerEngine) PodStats(ctx context.Context, namesOrIds []string, opts entities.PodStatsOptions) ([]*entities.PodStatsReport, error) {
options := new(pods.StatsOptions).WithAll(opts.All)
- return pods.Stats(ic.ClientCxt, namesOrIds, options)
+ return pods.Stats(ic.ClientCtx, namesOrIds, options)
}
diff --git a/pkg/domain/infra/tunnel/runtime.go b/pkg/domain/infra/tunnel/runtime.go
index 357e2c390..6542ea5b7 100644
--- a/pkg/domain/infra/tunnel/runtime.go
+++ b/pkg/domain/infra/tunnel/runtime.go
@@ -6,15 +6,15 @@ import (
// Image-related runtime using an ssh-tunnel to utilize Podman service
type ImageEngine struct {
- ClientCxt context.Context
+ ClientCtx context.Context
}
// Container-related runtime using an ssh-tunnel to utilize Podman service
type ContainerEngine struct {
- ClientCxt context.Context
+ ClientCtx context.Context
}
// Container-related runtime using an ssh-tunnel to utilize Podman service
type SystemEngine struct {
- ClientCxt context.Context
+ ClientCtx context.Context
}
diff --git a/pkg/domain/infra/tunnel/system.go b/pkg/domain/infra/tunnel/system.go
index 9013d44c2..a46b164a5 100644
--- a/pkg/domain/infra/tunnel/system.go
+++ b/pkg/domain/infra/tunnel/system.go
@@ -11,7 +11,7 @@ import (
)
func (ic *ContainerEngine) Info(ctx context.Context) (*define.Info, error) {
- return system.Info(ic.ClientCxt, nil)
+ return system.Info(ic.ClientCtx, nil)
}
func (ic *ContainerEngine) SetupRootless(_ context.Context, cmd *cobra.Command) error {
@@ -21,11 +21,11 @@ func (ic *ContainerEngine) SetupRootless(_ context.Context, cmd *cobra.Command)
// SystemPrune prunes unused data from the system.
func (ic *ContainerEngine) SystemPrune(ctx context.Context, opts entities.SystemPruneOptions) (*entities.SystemPruneReport, error) {
options := new(system.PruneOptions).WithAll(opts.All).WithVolumes(opts.Volume).WithFilters(opts.Filters)
- return system.Prune(ic.ClientCxt, options)
+ return system.Prune(ic.ClientCtx, options)
}
func (ic *ContainerEngine) SystemDf(ctx context.Context, options entities.SystemDfOptions) (*entities.SystemDfReport, error) {
- return system.DiskUsage(ic.ClientCxt, nil)
+ return system.DiskUsage(ic.ClientCtx, nil)
}
func (ic *ContainerEngine) Unshare(ctx context.Context, args []string) error {
@@ -33,5 +33,5 @@ func (ic *ContainerEngine) Unshare(ctx context.Context, args []string) error {
}
func (ic ContainerEngine) Version(ctx context.Context) (*entities.SystemVersionReport, error) {
- return system.Version(ic.ClientCxt, nil)
+ return system.Version(ic.ClientCtx, nil)
}
diff --git a/pkg/domain/infra/tunnel/volumes.go b/pkg/domain/infra/tunnel/volumes.go
index 9f8aa6356..e6ad4e0c5 100644
--- a/pkg/domain/infra/tunnel/volumes.go
+++ b/pkg/domain/infra/tunnel/volumes.go
@@ -9,7 +9,7 @@ import (
)
func (ic *ContainerEngine) VolumeCreate(ctx context.Context, opts entities.VolumeCreateOptions) (*entities.IDOrNameResponse, error) {
- response, err := volumes.Create(ic.ClientCxt, opts, nil)
+ response, err := volumes.Create(ic.ClientCtx, opts, nil)
if err != nil {
return nil, err
}
@@ -18,7 +18,7 @@ func (ic *ContainerEngine) VolumeCreate(ctx context.Context, opts entities.Volum
func (ic *ContainerEngine) VolumeRm(ctx context.Context, namesOrIds []string, opts entities.VolumeRmOptions) ([]*entities.VolumeRmReport, error) {
if opts.All {
- vols, err := volumes.List(ic.ClientCxt, nil)
+ vols, err := volumes.List(ic.ClientCtx, nil)
if err != nil {
return nil, err
}
@@ -30,7 +30,7 @@ func (ic *ContainerEngine) VolumeRm(ctx context.Context, namesOrIds []string, op
for _, id := range namesOrIds {
options := new(volumes.RemoveOptions).WithForce(opts.Force)
reports = append(reports, &entities.VolumeRmReport{
- Err: volumes.Remove(ic.ClientCxt, id, options),
+ Err: volumes.Remove(ic.ClientCtx, id, options),
Id: id,
})
}
@@ -43,7 +43,7 @@ func (ic *ContainerEngine) VolumeInspect(ctx context.Context, namesOrIds []strin
errs = []error{}
)
if opts.All {
- vols, err := volumes.List(ic.ClientCxt, nil)
+ vols, err := volumes.List(ic.ClientCtx, nil)
if err != nil {
return nil, nil, err
}
@@ -52,7 +52,7 @@ func (ic *ContainerEngine) VolumeInspect(ctx context.Context, namesOrIds []strin
}
}
for _, id := range namesOrIds {
- data, err := volumes.Inspect(ic.ClientCxt, id, nil)
+ data, err := volumes.Inspect(ic.ClientCtx, id, nil)
if err != nil {
errModel, ok := err.(entities.ErrorModel)
if !ok {
@@ -71,10 +71,10 @@ func (ic *ContainerEngine) VolumeInspect(ctx context.Context, namesOrIds []strin
func (ic *ContainerEngine) VolumePrune(ctx context.Context, opts entities.VolumePruneOptions) ([]*entities.VolumePruneReport, error) {
options := new(volumes.PruneOptions).WithFilters(opts.Filters)
- return volumes.Prune(ic.ClientCxt, options)
+ return volumes.Prune(ic.ClientCtx, options)
}
func (ic *ContainerEngine) VolumeList(ctx context.Context, opts entities.VolumeListOptions) ([]*entities.VolumeListReport, error) {
options := new(volumes.ListOptions).WithFilters(opts.Filter)
- return volumes.List(ic.ClientCxt, options)
+ return volumes.List(ic.ClientCtx, options)
}
diff --git a/pkg/hooks/README.md b/pkg/hooks/README.md
index 61fbbcac6..f6a03a775 100644
--- a/pkg/hooks/README.md
+++ b/pkg/hooks/README.md
@@ -9,7 +9,7 @@ This can cause some performance issues.
Also a lot of hooks just check if certain configuration is set and then exit early, without doing anything.
For example the [oci-systemd-hook][] only executes if the command is `init` or `systemd`, otherwise it just exits.
This means if we automatically enabled all hooks, every container would have to execute `oci-systemd-hook`, even if they don't run systemd inside of the container.
-Performance would also suffer if we exectuted each hook at each stage ([pre-start][], [post-start][], and [post-stop][]).
+Performance would also suffer if we executed each hook at each stage ([pre-start][], [post-start][], and [post-stop][]).
The hooks configuration is documented in [`oci-hooks.5`](docs/oci-hooks.5.md).
diff --git a/pkg/hooks/exec/exec.go b/pkg/hooks/exec/exec.go
index 77b350573..f6b6636ad 100644
--- a/pkg/hooks/exec/exec.go
+++ b/pkg/hooks/exec/exec.go
@@ -1,4 +1,4 @@
-// Package exec provides utilities for executing Open Container Initative runtime hooks.
+// Package exec provides utilities for executing Open Container Initiative runtime hooks.
package exec
import (
diff --git a/pkg/hooks/hooks.go b/pkg/hooks/hooks.go
index 6257529ab..6cb81e573 100644
--- a/pkg/hooks/hooks.go
+++ b/pkg/hooks/hooks.go
@@ -46,7 +46,7 @@ type namedHook struct {
//
// extensionStages allows callers to add additional stages beyond
// those specified in the OCI Runtime Specification and to control
-// OCI-defined stages instead of delagating to the OCI runtime. See
+// OCI-defined stages instead of delegating to the OCI runtime. See
// Hooks() for more information.
func New(ctx context.Context, directories []string, extensionStages []string) (manager *Manager, err error) {
manager = &Manager{
diff --git a/pkg/netns/netns_linux.go b/pkg/netns/netns_linux.go
index ff5691203..ed5241632 100644
--- a/pkg/netns/netns_linux.go
+++ b/pkg/netns/netns_linux.go
@@ -162,7 +162,7 @@ func NewNS() (ns.NetNS, error) {
// bind mount the netns from the current thread (from /proc) onto the
// mount point. This causes the namespace to persist, even when there
// are no threads in the ns. Make this a shared mount; it needs to be
- // back-propogated to the host
+ // back-propagated to the host
err = unix.Mount(threadNsPath, nsPath, "none", unix.MS_BIND|unix.MS_SHARED|unix.MS_REC, "")
if err != nil {
err = fmt.Errorf("failed to bind mount ns at %s: %v", nsPath, err)
diff --git a/pkg/rootless/rootless_linux.go b/pkg/rootless/rootless_linux.go
index f029f24cb..d4b1a0dfd 100644
--- a/pkg/rootless/rootless_linux.go
+++ b/pkg/rootless/rootless_linux.go
@@ -257,7 +257,7 @@ func becomeRootInUserNS(pausePid, fileToRead string, fileOutput *os.File) (_ boo
uidsMapped = err == nil
}
if !uidsMapped {
- logrus.Warnf("using rootless single mapping into the namespace. This might break some images. Check /etc/subuid and /etc/subgid for adding subids")
+ logrus.Warnf("using rootless single mapping into the namespace. This might break some images. Check /etc/subuid and /etc/subgid for adding sub*ids")
setgroups := fmt.Sprintf("/proc/%d/setgroups", pid)
err = ioutil.WriteFile(setgroups, []byte("deny\n"), 0666)
if err != nil {
diff --git a/pkg/seccomp/seccomp.go b/pkg/seccomp/seccomp.go
index eeba46a72..4502c608f 100644
--- a/pkg/seccomp/seccomp.go
+++ b/pkg/seccomp/seccomp.go
@@ -30,7 +30,7 @@ var supportedPolicies = map[string]Policy{
"image": PolicyImage,
}
-// LookupPolicy looksup the corresponding Policy for the specified
+// LookupPolicy looks up the corresponding Policy for the specified
// string. If none is found, an errors is returned including the list of
// supported policies.
//
diff --git a/pkg/specgen/generate/container.go b/pkg/specgen/generate/container.go
index c7e62d185..42fea0277 100644
--- a/pkg/specgen/generate/container.go
+++ b/pkg/specgen/generate/container.go
@@ -163,7 +163,7 @@ func CompleteSpec(ctx context.Context, r *libpod.Runtime, s *specgen.SpecGenerat
return nil, err
}
- // labels from the image that dont exist already
+ // labels from the image that don't exist already
if len(labels) > 0 && s.Labels == nil {
s.Labels = make(map[string]string)
}
diff --git a/pkg/specgen/generate/kube/kube.go b/pkg/specgen/generate/kube/kube.go
index 5cc7891ac..3e5c5d125 100644
--- a/pkg/specgen/generate/kube/kube.go
+++ b/pkg/specgen/generate/kube/kube.go
@@ -104,7 +104,7 @@ func ToSpecGen(ctx context.Context, containerYAML v1.Container, iid string, newI
s.ResourceLimits.Memory.Reservation = &memoryRes
}
- // TODO: We dont understand why specgen does not take of this, but
+ // TODO: We don't understand why specgen does not take of this, but
// integration tests clearly pointed out that it was required.
s.Command = []string{}
imageData, err := newImage.Inspect(ctx)
diff --git a/pkg/specgen/generate/oci.go b/pkg/specgen/generate/oci.go
index c24dcf4c0..ba68de6fd 100644
--- a/pkg/specgen/generate/oci.go
+++ b/pkg/specgen/generate/oci.go
@@ -319,7 +319,7 @@ func SpecGenToOCI(ctx context.Context, s *specgen.SpecGenerator, rt *libpod.Runt
}
// BIND MOUNTS
- configSpec.Mounts = SupercedeUserMounts(mounts, configSpec.Mounts)
+ configSpec.Mounts = SupersedeUserMounts(mounts, configSpec.Mounts)
// Process mounts to ensure correct options
if err := InitFSMounts(configSpec.Mounts); err != nil {
return nil, err
diff --git a/pkg/specgen/generate/security.go b/pkg/specgen/generate/security.go
index 56947ff24..0c97dc496 100644
--- a/pkg/specgen/generate/security.go
+++ b/pkg/specgen/generate/security.go
@@ -115,7 +115,7 @@ func securityConfigureGenerator(s *specgen.SpecGenerator, g *generate.Generator,
if err != nil {
return errors.Wrapf(err, "capabilities requested by user or image are not valid: %q", strings.Join(capsRequired, ","))
} else {
- // Verify all capRequiered are in the capList
+ // Verify all capRequired are in the capList
for _, cap := range capsRequired {
if !util.StringInSlice(cap, caplist) {
privCapsRequired = append(privCapsRequired, cap)
diff --git a/pkg/specgen/generate/storage.go b/pkg/specgen/generate/storage.go
index 331a5c5bf..f523ac5bf 100644
--- a/pkg/specgen/generate/storage.go
+++ b/pkg/specgen/generate/storage.go
@@ -366,7 +366,7 @@ func addContainerInitBinary(s *specgen.SpecGenerator, path string) (spec.Mount,
// TODO: Should we unmount subtree mounts? E.g., if /tmp/ is mounted by
// one mount, and we already have /tmp/a and /tmp/b, should we remove
// the /tmp/a and /tmp/b mounts in favor of the more general /tmp?
-func SupercedeUserMounts(mounts []spec.Mount, configMount []spec.Mount) []spec.Mount {
+func SupersedeUserMounts(mounts []spec.Mount, configMount []spec.Mount) []spec.Mount {
if len(mounts) > 0 {
// If we have overlappings mounts, remove them from the spec in favor of
// the user-added volume mounts
diff --git a/pkg/specgen/pod_validate.go b/pkg/specgen/pod_validate.go
index a6c61a203..7c81f3f9f 100644
--- a/pkg/specgen/pod_validate.go
+++ b/pkg/specgen/pod_validate.go
@@ -48,7 +48,7 @@ func (p *PodSpecGenerator) Validate() error {
}
if p.NoInfra {
if p.NetNS.NSMode != Default && p.NetNS.NSMode != "" {
- return errors.New("NoInfra and network modes cannot be used toegther")
+ return errors.New("NoInfra and network modes cannot be used together")
}
if p.StaticIP != nil {
return exclusivePodOptions("NoInfra", "StaticIP")
diff --git a/pkg/specgen/specgen.go b/pkg/specgen/specgen.go
index 964b89fa4..a6cc0a730 100644
--- a/pkg/specgen/specgen.go
+++ b/pkg/specgen/specgen.go
@@ -19,7 +19,7 @@ type LogConfig struct {
// Only available if LogDriver is set to "json-file" or "k8s-file".
// Optional.
Path string `json:"path,omitempty"`
- // Size is the maximimup size of the log file
+ // Size is the maximum size of the log file
// Optional.
Size int64 `json:"size,omitempty"`
// A set of options to accompany the log driver.
@@ -302,7 +302,7 @@ type ContainerSecurityConfig struct {
IDMappings *storage.IDMappingOptions `json:"idmappings,omitempty"`
// ReadOnlyFilesystem indicates that everything will be mounted
// as read-only
- ReadOnlyFilesystem bool `json:"read_only_filesystem,omittempty"`
+ ReadOnlyFilesystem bool `json:"read_only_filesystem,omitempty"`
// Umask is the umask the init process of the container will be run with.
Umask string `json:"umask,omitempty"`
// ProcOpts are the options used for the proc mount.
diff --git a/pkg/systemd/generate/containers.go b/pkg/systemd/generate/containers.go
index 8090bcd3d..d84125fc7 100644
--- a/pkg/systemd/generate/containers.go
+++ b/pkg/systemd/generate/containers.go
@@ -191,7 +191,7 @@ func executeContainerTemplate(info *containerInfo, options entities.GenerateSyst
return "", errors.Errorf("container's create command is too short or invalid: %v", info.CreateCommand)
}
// We're hard-coding the first five arguments and append the
- // CreateCommand with a stripped command and subcomand.
+ // CreateCommand with a stripped command and subcommand.
startCommand := []string{
info.Executable,
"run",
@@ -241,7 +241,7 @@ func executeContainerTemplate(info *containerInfo, options entities.GenerateSyst
}
if hasNameParam && !hasReplaceParam {
// Enforce --replace for named containers. This will
- // make systemd units more robuts as it allows them to
+ // make systemd units more robust as it allows them to
// start after system crashes (see
// github.com/containers/podman/issues/5485).
startCommand = append(startCommand, "--replace")
diff --git a/pkg/systemd/generate/pods.go b/pkg/systemd/generate/pods.go
index 234a60380..3c57b03fb 100644
--- a/pkg/systemd/generate/pods.go
+++ b/pkg/systemd/generate/pods.go
@@ -266,7 +266,7 @@ func executePodTemplate(info *podInfo, options entities.GenerateSystemdOptions)
podCreateArgs = filterPodFlags(info.CreateCommand[podCreateIndex+1:])
}
// We're hard-coding the first five arguments and append the
- // CreateCommand with a stripped command and subcomand.
+ // CreateCommand with a stripped command and subcommand.
startCommand := []string{info.Executable}
startCommand = append(startCommand, podRootArgs...)
startCommand = append(startCommand,
diff --git a/pkg/util/utils_supported.go b/pkg/util/utils_supported.go
index a63c76415..21022eb7c 100644
--- a/pkg/util/utils_supported.go
+++ b/pkg/util/utils_supported.go
@@ -114,7 +114,7 @@ func GetRootlessPauseProcessPidPath() (string, error) {
// files.
func GetRootlessPauseProcessPidPathGivenDir(libpodTmpDir string) (string, error) {
if libpodTmpDir == "" {
- return "", errors.Errorf("must provide non-empty tmporary directory")
+ return "", errors.Errorf("must provide non-empty temporary directory")
}
return filepath.Join(libpodTmpDir, "pause.pid"), nil
}