summaryrefslogtreecommitdiff
path: root/pkg/domain/entities/container_ps.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/domain/entities/container_ps.go')
-rw-r--r--pkg/domain/entities/container_ps.go17
1 files changed, 2 insertions, 15 deletions
diff --git a/pkg/domain/entities/container_ps.go b/pkg/domain/entities/container_ps.go
index ceafecebc..709bb58d6 100644
--- a/pkg/domain/entities/container_ps.go
+++ b/pkg/domain/entities/container_ps.go
@@ -4,8 +4,7 @@ import (
"sort"
"strings"
- "github.com/containers/libpod/cmd/podman/shared"
- "github.com/containers/libpod/libpod"
+ "github.com/containers/libpod/pkg/ps/define"
"github.com/cri-o/ocicni/pkg/ocicni"
"github.com/pkg/errors"
)
@@ -48,7 +47,7 @@ type ListContainer struct {
// Port mappings
Ports []ocicni.PortMapping
// Size of the container rootfs. Requires the size boolean to be true
- Size *shared.ContainerSize
+ Size *define.ContainerSize
// Time when container started
StartedAt int64
// State of container
@@ -73,18 +72,6 @@ type ListContainerNamespaces struct {
User string `json:"User,omitempty"`
}
-// SortContainers helps us set-up ability to sort by createTime
-type SortContainers []*libpod.Container
-
-func (a SortContainers) Len() int { return len(a) }
-func (a SortContainers) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
-
-type SortCreateTime struct{ SortContainers }
-
-func (a SortCreateTime) Less(i, j int) bool {
- return a.SortContainers[i].CreatedTime().Before(a.SortContainers[j].CreatedTime())
-}
-
type SortListContainers []ListContainer
func (a SortListContainers) Len() int { return len(a) }