diff options
author | Brent Baude <bbaude@redhat.com> | 2020-03-21 13:47:07 -0500 |
---|---|---|
committer | Brent Baude <bbaude@redhat.com> | 2020-03-22 13:24:45 -0500 |
commit | 9536560b4f3a38fbba4ac61c357dd3627fb6cf4e (patch) | |
tree | 8d8cf1471d590752357f06088044d1dcf752ee70 /cmd/podmanV2/utils | |
parent | 2ffff3c6abacad855ce7ddf8290514ebe1424d7f (diff) | |
download | podman-9536560b4f3a38fbba4ac61c357dd3627fb6cf4e.tar.gz podman-9536560b4f3a38fbba4ac61c357dd3627fb6cf4e.tar.bz2 podman-9536560b4f3a38fbba4ac61c357dd3627fb6cf4e.zip |
podmanv2 add core container commands
add core container commands for podmanv2: kill, pause, restart, rm, stop, unpause
Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'cmd/podmanV2/utils')
-rw-r--r-- | cmd/podmanV2/utils/error.go | 16 | ||||
-rw-r--r-- | cmd/podmanV2/utils/remote.go | 10 |
2 files changed, 26 insertions, 0 deletions
diff --git a/cmd/podmanV2/utils/error.go b/cmd/podmanV2/utils/error.go new file mode 100644 index 000000000..3464f0779 --- /dev/null +++ b/cmd/podmanV2/utils/error.go @@ -0,0 +1,16 @@ +package utils + +import "fmt" + +type OutputErrors []error + +func (o OutputErrors) PrintErrors() (lastError error) { + if len(o) == 0 { + return + } + lastError = o[len(o)-1] + for e := 0; e < len(o)-1; e++ { + fmt.Println(o[e]) + } + return +} diff --git a/cmd/podmanV2/utils/remote.go b/cmd/podmanV2/utils/remote.go new file mode 100644 index 000000000..d0c8a272d --- /dev/null +++ b/cmd/podmanV2/utils/remote.go @@ -0,0 +1,10 @@ +package utils + +import ( + "github.com/containers/libpod/cmd/podmanV2/registry" + "github.com/containers/libpod/pkg/domain/entities" +) + +func IsRemote() bool { + return registry.EngineOpts.EngineMode == entities.TunnelMode +} |