diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-03-15 14:25:30 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-15 14:25:30 -0400 |
commit | e7dc59252bd722377938ac3e6b4fd7e077f05293 (patch) | |
tree | 6a51b88aa97db1ff7dfa0313876b28844764aab1 /pkg/domain | |
parent | fc02d16e728dfdd5a5f2e3bc622bbceb7f8c0d24 (diff) | |
parent | 8de56070393ad449dc54ae622d9b82f28a6a5c52 (diff) | |
download | podman-e7dc59252bd722377938ac3e6b4fd7e077f05293.tar.gz podman-e7dc59252bd722377938ac3e6b4fd7e077f05293.tar.bz2 podman-e7dc59252bd722377938ac3e6b4fd7e077f05293.zip |
Merge pull request #9716 from Luap99/remote-libpod
Do not leak libpod package into the remote client
Diffstat (limited to 'pkg/domain')
-rw-r--r-- | pkg/domain/filters/containers.go | 2 | ||||
-rw-r--r-- | pkg/domain/filters/helpers.go | 20 | ||||
-rw-r--r-- | pkg/domain/filters/pods.go | 2 | ||||
-rw-r--r-- | pkg/domain/infra/abi/play.go | 8 |
4 files changed, 6 insertions, 26 deletions
diff --git a/pkg/domain/filters/containers.go b/pkg/domain/filters/containers.go index 6f4b4e8a0..98b8f7e88 100644 --- a/pkg/domain/filters/containers.go +++ b/pkg/domain/filters/containers.go @@ -7,7 +7,7 @@ import ( "github.com/containers/podman/v3/libpod" "github.com/containers/podman/v3/libpod/define" - "github.com/containers/podman/v3/libpod/network" + "github.com/containers/podman/v3/pkg/network" "github.com/containers/podman/v3/pkg/timetype" "github.com/containers/podman/v3/pkg/util" "github.com/pkg/errors" diff --git a/pkg/domain/filters/helpers.go b/pkg/domain/filters/helpers.go deleted file mode 100644 index 6a5fb68b1..000000000 --- a/pkg/domain/filters/helpers.go +++ /dev/null @@ -1,20 +0,0 @@ -package filters - -import ( - "net/url" - "strings" - - "github.com/pkg/errors" -) - -func ParseFilterArgumentsIntoFilters(filters []string) (url.Values, error) { - parsedFilters := make(url.Values) - for _, f := range filters { - t := strings.SplitN(f, "=", 2) - if len(t) < 2 { - return parsedFilters, errors.Errorf("filter input must be in the form of filter=value: %s is invalid", f) - } - parsedFilters.Add(t[0], t[1]) - } - return parsedFilters, nil -} diff --git a/pkg/domain/filters/pods.go b/pkg/domain/filters/pods.go index 53d10213a..0490a4848 100644 --- a/pkg/domain/filters/pods.go +++ b/pkg/domain/filters/pods.go @@ -6,7 +6,7 @@ import ( "github.com/containers/podman/v3/libpod" "github.com/containers/podman/v3/libpod/define" - "github.com/containers/podman/v3/libpod/network" + "github.com/containers/podman/v3/pkg/network" "github.com/containers/podman/v3/pkg/util" "github.com/pkg/errors" ) diff --git a/pkg/domain/infra/abi/play.go b/pkg/domain/infra/abi/play.go index b7ca69281..efc7c86e3 100644 --- a/pkg/domain/infra/abi/play.go +++ b/pkg/domain/infra/abi/play.go @@ -173,13 +173,13 @@ func (ic *ContainerEngine) playKubePod(ctx context.Context, podName string, podY var ctrRestartPolicy string switch podYAML.Spec.RestartPolicy { case v1.RestartPolicyAlways: - ctrRestartPolicy = libpod.RestartPolicyAlways + ctrRestartPolicy = define.RestartPolicyAlways case v1.RestartPolicyOnFailure: - ctrRestartPolicy = libpod.RestartPolicyOnFailure + ctrRestartPolicy = define.RestartPolicyOnFailure case v1.RestartPolicyNever: - ctrRestartPolicy = libpod.RestartPolicyNo + ctrRestartPolicy = define.RestartPolicyNo default: // Default to Always - ctrRestartPolicy = libpod.RestartPolicyAlways + ctrRestartPolicy = define.RestartPolicyAlways } configMaps := []v1.ConfigMap{} |