mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user