summaryrefslogtreecommitdiff
path: root/pkg/api/handlers/types.go
diff options
context:
space:
mode:
authorCharlie Doern <cdoern@redhat.com>2022-08-09 09:25:03 -0400
committerCharlie Doern <cdoern@redhat.com>2022-09-01 13:02:01 -0400
commit050f3291b9ef8788510b78c543055638275eb20f (patch)
tree327a081bd2243ffcbdf786a940b1dc82d041bea5 /pkg/api/handlers/types.go
parent0085fbb488eec30e71e6cced6a06dbdb134e32a6 (diff)
downloadpodman-050f3291b9ef8788510b78c543055638275eb20f.tar.gz
podman-050f3291b9ef8788510b78c543055638275eb20f.tar.bz2
podman-050f3291b9ef8788510b78c543055638275eb20f.zip
implement podman update
podman update allows users to change the cgroup configuration of an existing container using the already defined resource limits flags from podman create/run. The supported flags in crun are: this command is also now supported in the libpod api via the /libpod/containers/<CID>/update endpoint where the resource limits are passed inthe request body and follow the OCI resource spec format –memory –cpus –cpuset-cpus –cpuset-mems –memory-swap –memory-reservation –cpu-shares –cpu-quota –cpu-period –blkio-weight –cpu-rt-period –cpu-rt-runtime -device-read-bps -device-write-bps -device-read-iops -device-write-iops -memory-swappiness -blkio-weight-device resolves #15067 Signed-off-by: Charlie Doern <cdoern@redhat.com>
Diffstat (limited to 'pkg/api/handlers/types.go')
-rw-r--r--pkg/api/handlers/types.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/api/handlers/types.go b/pkg/api/handlers/types.go
index aab905878..bb416d9f4 100644
--- a/pkg/api/handlers/types.go
+++ b/pkg/api/handlers/types.go
@@ -11,6 +11,7 @@ import (
dockerContainer "github.com/docker/docker/api/types/container"
dockerNetwork "github.com/docker/docker/api/types/network"
"github.com/docker/go-connections/nat"
+ "github.com/opencontainers/runtime-spec/specs-go"
)
type AuthConfig struct {
@@ -64,6 +65,12 @@ type LibpodContainersRmReport struct {
RmError string `json:"Err,omitempty"`
}
+// UpdateEntities used to wrap the oci resource spec in a swagger model
+// swagger:model
+type UpdateEntities struct {
+ Resources *specs.LinuxResources
+}
+
type Info struct {
docker.Info
BuildahVersion string