Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear up fragments of the old api #116

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions cmd/kpod/ps.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
"github.com/pkg/errors"
"github.com/projectatomic/libpod/cmd/kpod/formats"
"github.com/projectatomic/libpod/libpod"
"github.com/projectatomic/libpod/oci"
"github.com/urfave/cli"
"k8s.io/apimachinery/pkg/fields"
)
Expand Down Expand Up @@ -491,7 +490,7 @@ func getJSONOutput(containers []*libpod.Container, nSpace bool) ([]psJSONParams,
Names: cc.Name,
Labels: cc.Labels,
Mounts: cc.Spec.Mounts,
ContainerRunning: conState.String() == oci.ContainerStateRunning,
ContainerRunning: conState == libpod.ContainerStateRunning,
Namespaces: ns,
}
psOutput = append(psOutput, params)
Expand Down Expand Up @@ -605,7 +604,7 @@ type FilterParamsPS struct {
}

// parseFilter takes a filter string and a list of containers and filters it
func parseFilter(filter string, containers []*oci.Container) (*FilterParamsPS, error) {
func parseFilter(filter string, containers []*libpod.Container) (*FilterParamsPS, error) {
params := new(FilterParamsPS)
allFilters := strings.Split(filter, ",")

Expand All @@ -630,13 +629,13 @@ func parseFilter(filter string, containers []*oci.Container) (*FilterParamsPS, e
params.ancestor = pair[1]
case "before":
if ctr, err := findContainer(containers, pair[1]); err == nil {
params.before = ctr.CreatedAt()
params.before = ctr.Config().CreatedTime
} else {
return nil, errors.Wrapf(err, "no such container %q", pair[1])
}
case "since":
if ctr, err := findContainer(containers, pair[1]); err == nil {
params.before = ctr.CreatedAt()
params.before = ctr.Config().CreatedTime
} else {
return nil, errors.Wrapf(err, "no such container %q", pair[1])
}
Expand All @@ -650,7 +649,7 @@ func parseFilter(filter string, containers []*oci.Container) (*FilterParamsPS, e
}

// findContainer finds a container with a specific name or id from a list of containers
func findContainer(containers []*oci.Container, ref string) (*oci.Container, error) {
func findContainer(containers []*libpod.Container, ref string) (*libpod.Container, error) {
for _, ctr := range containers {
if strings.HasPrefix(ctr.ID(), ref) || ctr.Name() == ref {
return ctr, nil
Expand Down
5 changes: 2 additions & 3 deletions libkpod/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (

"github.com/BurntSushi/toml"
"github.com/opencontainers/selinux/go-selinux"
"github.com/projectatomic/libpod/oci"
)

// Default paths if none are specified
Expand All @@ -21,9 +20,9 @@ const (
apparmorProfileName = "crio-default"
cniConfigDir = "/etc/cni/net.d/"
cniBinDir = "/opt/cni/bin/"
cgroupManager = oci.CgroupfsCgroupsManager
cgroupManager = "" //oci.CgroupfsCgroupsManager
lockPath = "/run/crio.lock"
containerExitsDir = oci.ContainerExitsDir
containerExitsDir = "" //oci.ContainerExitsDir
)

// Config represents the entire set of configuration values that can be set for
Expand Down
157 changes: 0 additions & 157 deletions libkpod/container.go

This file was deleted.

Loading