mirror of
https://github.com/containers/podman.git
synced 2025-07-08 21:51:44 +08:00
.copr
.github
.tool
cmd
cni
completions
contrib
docs
hack
libpod
common
driver
image
layers
testdata
boltdb_state.go
boltdb_state_internal.go
boltdb_state_linux.go
boltdb_state_unsupported.go
common_test.go
container.go
container_api.go
container_attach.go
container_commit.go
container_easyjson.go
container_graph.go
container_graph_test.go
container_inspect.go
container_internal.go
container_internal_linux.go
container_internal_test.go
container_internal_unsupported.go
container_linux.go
container_top_linux.go
container_top_unsupported.go
container_unsupported.go
diff.go
errors.go
in_memory_state.go
info.go
networking_linux.go
networking_unsupported.go
oci.go
oci_linux.go
oci_unsupported.go
options.go
pod.go
pod_api.go
pod_easyjson.go
pod_internal.go
pod_top_linux.go
pod_top_unsupported.go
runtime.go
runtime_ctr.go
runtime_img.go
runtime_img_test.go
runtime_pod.go
runtime_pod_infra_linux.go
runtime_pod_linux.go
runtime_pod_unsupported.go
state.go
state_test.go
stats.go
stats_config.go
stats_unsupported.go
storage.go
util.go
util_linux.go
util_test.go
util_unsupported.go
version.go
logo
pkg
test
utils
vendor
version
.gitignore
.papr.sh
.papr.yml
.papr_prepare.sh
.travis.yml
API.md
CONTRIBUTING.md
Dockerfile
Dockerfile.CentOS
Dockerfile.Fedora
LICENSE
Makefile
OWNERS
README.md
RELEASE_NOTES.md
Vagrantfile
changelog.txt
code-of-conduct.md
commands.md
crio-umount.conf
docker
install.md
libpod.conf
seccomp.json
transfer.md
troubleshooting.md
vendor.conf

Add basic awareness of namespaces to the database. As part of this, add constraints so containers can only be added to pods in the same namespace. Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
78 lines
3.3 KiB
Go
78 lines
3.3 KiB
Go
package libpod
|
|
|
|
import (
|
|
"errors"
|
|
)
|
|
|
|
var (
|
|
// ErrNoSuchCtr indicates the requested container does not exist
|
|
ErrNoSuchCtr = errors.New("no such container")
|
|
// ErrNoSuchPod indicates the requested pod does not exist
|
|
ErrNoSuchPod = errors.New("no such pod")
|
|
// ErrNoSuchImage indicates the requested image does not exist
|
|
ErrNoSuchImage = errors.New("no such image")
|
|
|
|
// ErrCtrExists indicates a container with the same name or ID already
|
|
// exists
|
|
ErrCtrExists = errors.New("container already exists")
|
|
// ErrPodExists indicates a pod with the same name or ID already exists
|
|
ErrPodExists = errors.New("pod already exists")
|
|
// ErrImageExists indicated an image with the same ID already exists
|
|
ErrImageExists = errors.New("image already exists")
|
|
|
|
// ErrCtrStateInvalid indicates a container is in an improper state for
|
|
// the requested operation
|
|
ErrCtrStateInvalid = errors.New("container state improper")
|
|
|
|
// ErrRuntimeFinalized indicates that the runtime has already been
|
|
// created and cannot be modified
|
|
ErrRuntimeFinalized = errors.New("runtime has been finalized")
|
|
// ErrCtrFinalized indicates that the container has already been created
|
|
// and cannot be modified
|
|
ErrCtrFinalized = errors.New("container has been finalized")
|
|
// ErrPodFinalized indicates that the pod has already been created and
|
|
// cannot be modified
|
|
ErrPodFinalized = errors.New("pod has been finalized")
|
|
|
|
// ErrInvalidArg indicates that an invalid argument was passed
|
|
ErrInvalidArg = errors.New("invalid argument")
|
|
// ErrEmptyID indicates that an empty ID was passed
|
|
ErrEmptyID = errors.New("name or ID cannot be empty")
|
|
|
|
// ErrInternal indicates an internal library error
|
|
ErrInternal = errors.New("internal libpod error")
|
|
|
|
// ErrRuntimeStopped indicates that the runtime has already been shut
|
|
// down and no further operations can be performed on it
|
|
ErrRuntimeStopped = errors.New("runtime has already been stopped")
|
|
// ErrCtrStopped indicates that the requested container is not running
|
|
// and the requested operation cannot be performed until it is started
|
|
ErrCtrStopped = errors.New("container is stopped")
|
|
|
|
// ErrCtrRemoved indicates that the container has already been removed
|
|
// and no further operations can be performed on it
|
|
ErrCtrRemoved = errors.New("container has already been removed")
|
|
// ErrPodRemoved indicates that the pod has already been removed and no
|
|
// further operations can be performed on it
|
|
ErrPodRemoved = errors.New("pod has already been removed")
|
|
|
|
// ErrDBClosed indicates that the connection to the state database has
|
|
// already been closed
|
|
ErrDBClosed = errors.New("database connection already closed")
|
|
// ErrDBBadConfig indicates that the database has a different schema or
|
|
// was created by a libpod with a different config
|
|
ErrDBBadConfig = errors.New("database configuration mismatch")
|
|
|
|
// ErrNSMismatch indicates that the requested pod or container is in a
|
|
// different namespace and cannot be accessed or modified.
|
|
ErrNSMismatch = errors.New("target is in a different namespace")
|
|
|
|
// ErrNotImplemented indicates that the requested functionality is not
|
|
// yet present
|
|
ErrNotImplemented = errors.New("not yet implemented")
|
|
|
|
// ErrOSNotSupported indicates the function is not available on the particular
|
|
// OS.
|
|
ErrOSNotSupported = errors.New("No support for this OS yet")
|
|
)
|