api/types/container: rename ContainerUpdateOKBody to UpdateResponse

Deprecate ContainerUpdateOKBody, but keep an alias.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-02-10 18:30:31 +01:00
parent 7adac77d6b
commit f4dc38cd36
10 changed files with 47 additions and 36 deletions

View File

@@ -11,20 +11,20 @@ import (
)
// ContainerUpdate updates configuration of the container
func (daemon *Daemon) ContainerUpdate(name string, hostConfig *container.HostConfig) (container.ContainerUpdateOKBody, error) {
func (daemon *Daemon) ContainerUpdate(name string, hostConfig *container.HostConfig) (container.UpdateResponse, error) {
var warnings []string
daemonCfg := daemon.config()
warnings, err := daemon.verifyContainerSettings(daemonCfg, hostConfig, nil, true)
if err != nil {
return container.ContainerUpdateOKBody{Warnings: warnings}, errdefs.InvalidParameter(err)
return container.UpdateResponse{Warnings: warnings}, errdefs.InvalidParameter(err)
}
if err := daemon.update(name, hostConfig); err != nil {
return container.ContainerUpdateOKBody{Warnings: warnings}, err
return container.UpdateResponse{Warnings: warnings}, err
}
return container.ContainerUpdateOKBody{Warnings: warnings}, nil
return container.UpdateResponse{Warnings: warnings}, nil
}
func (daemon *Daemon) update(name string, hostConfig *container.HostConfig) error {