summaryrefslogtreecommitdiff
path: root/pkg/domain/entities
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-03-26 21:36:36 +0100
committerGitHub <noreply@github.com>2020-03-26 21:36:36 +0100
commit6a46a87d08bd1e9ddda3dd3c9c30d21d2226a654 (patch)
tree6fc011ab6c7114ec215e0443e935396150c3dac1 /pkg/domain/entities
parent913426c70c37a87d425085f60af397f7b38bd65d (diff)
parentc5ce210f7d091a4fa6d69abb9b4068c811a26129 (diff)
downloadpodman-6a46a87d08bd1e9ddda3dd3c9c30d21d2226a654.tar.gz
podman-6a46a87d08bd1e9ddda3dd3c9c30d21d2226a654.tar.bz2
podman-6a46a87d08bd1e9ddda3dd3c9c30d21d2226a654.zip
Merge pull request #5625 from baude/v2pods
podmanv2 pod subcommands
Diffstat (limited to 'pkg/domain/entities')
-rw-r--r--pkg/domain/entities/engine_container.go7
-rw-r--r--pkg/domain/entities/pods.go94
2 files changed, 101 insertions, 0 deletions
diff --git a/pkg/domain/entities/engine_container.go b/pkg/domain/entities/engine_container.go
index 2efdbd602..958061437 100644
--- a/pkg/domain/entities/engine_container.go
+++ b/pkg/domain/entities/engine_container.go
@@ -14,6 +14,13 @@ type ContainerEngine interface {
ContainerStop(ctx context.Context, namesOrIds []string, options StopOptions) ([]*StopReport, error)
ContainerWait(ctx context.Context, namesOrIds []string, options WaitOptions) ([]WaitReport, error)
PodExists(ctx context.Context, nameOrId string) (*BoolReport, error)
+ PodKill(ctx context.Context, namesOrIds []string, options PodKillOptions) ([]*PodKillReport, error)
+ PodPause(ctx context.Context, namesOrIds []string, options PodPauseOptions) ([]*PodPauseReport, error)
+ PodRestart(ctx context.Context, namesOrIds []string, options PodRestartOptions) ([]*PodRestartReport, error)
+ PodStart(ctx context.Context, namesOrIds []string, options PodStartOptions) ([]*PodStartReport, error)
+ PodStop(ctx context.Context, namesOrIds []string, options PodStopOptions) ([]*PodStopReport, error)
+ PodRm(ctx context.Context, namesOrIds []string, options PodRmOptions) ([]*PodRmReport, error)
+ PodUnpause(ctx context.Context, namesOrIds []string, options PodunpauseOptions) ([]*PodUnpauseReport, error)
VolumeCreate(ctx context.Context, opts VolumeCreateOptions) (*IdOrNameResponse, error)
VolumeInspect(ctx context.Context, namesOrIds []string, opts VolumeInspectOptions) ([]*VolumeInspectReport, error)
VolumeRm(ctx context.Context, namesOrIds []string, opts VolumeRmOptions) ([]*VolumeRmReport, error)
diff --git a/pkg/domain/entities/pods.go b/pkg/domain/entities/pods.go
new file mode 100644
index 000000000..8d594620f
--- /dev/null
+++ b/pkg/domain/entities/pods.go
@@ -0,0 +1,94 @@
+package entities
+
+import "time"
+
+type PodKillOptions struct {
+ All bool
+ Latest bool
+ Signal string
+}
+
+type PodKillReport struct {
+ Errs []error
+ Id string
+}
+
+type ListPodsReport struct {
+ Cgroup string
+ Containers []*ListPodContainer
+ Created time.Time
+ Id string
+ Name string
+ Namespace string
+ Status string
+}
+
+type ListPodContainer struct {
+ Id string
+ Names string
+ Status string
+}
+
+type PodPauseOptions struct {
+ All bool
+ Latest bool
+}
+
+type PodPauseReport struct {
+ Errs []error
+ Id string
+}
+
+type PodunpauseOptions struct {
+ All bool
+ Latest bool
+}
+
+type PodUnpauseReport struct {
+ Errs []error
+ Id string
+}
+
+type PodStopOptions struct {
+ All bool
+ Ignore bool
+ Latest bool
+ Timeout int
+}
+
+type PodStopReport struct {
+ Errs []error
+ Id string
+}
+
+type PodRestartOptions struct {
+ All bool
+ Latest bool
+}
+
+type PodRestartReport struct {
+ Errs []error
+ Id string
+}
+
+type PodStartOptions struct {
+ All bool
+ Latest bool
+}
+
+type PodStartReport struct {
+ Errs []error
+ Id string
+}
+
+type PodRmOptions struct {
+ All bool
+ Force bool
+ Ignore bool
+ Latest bool
+}
+
+type PodRmReport struct {
+ Err error
+ Id string
+}