mirror of https://github.com/docker/cli.git
bump API to 1.28
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
This commit is contained in:
parent
5ad1cebf78
commit
a972d43e48
|
@ -38,7 +38,7 @@ func newCreateCommand(dockerCli *command.DockerCli) *cobra.Command {
|
||||||
flags.Var(&opts.mounts, flagMount, "Attach a filesystem mount to the service")
|
flags.Var(&opts.mounts, flagMount, "Attach a filesystem mount to the service")
|
||||||
flags.Var(&opts.constraints, flagConstraint, "Placement constraints")
|
flags.Var(&opts.constraints, flagConstraint, "Placement constraints")
|
||||||
flags.Var(&opts.placementPrefs, flagPlacementPref, "Add a placement preference")
|
flags.Var(&opts.placementPrefs, flagPlacementPref, "Add a placement preference")
|
||||||
flags.SetAnnotation(flagPlacementPref, "version", []string{"1.27"})
|
flags.SetAnnotation(flagPlacementPref, "version", []string{"1.28"})
|
||||||
flags.Var(&opts.networks, flagNetwork, "Network attachments")
|
flags.Var(&opts.networks, flagNetwork, "Network attachments")
|
||||||
flags.Var(&opts.secrets, flagSecret, "Specify secrets to expose to the service")
|
flags.Var(&opts.secrets, flagSecret, "Specify secrets to expose to the service")
|
||||||
flags.SetAnnotation(flagSecret, "version", []string{"1.25"})
|
flags.SetAnnotation(flagSecret, "version", []string{"1.25"})
|
||||||
|
|
|
@ -498,15 +498,15 @@ func addServiceFlags(cmd *cobra.Command, opts *serviceOptions) {
|
||||||
flags.SetAnnotation(flagUpdateMaxFailureRatio, "version", []string{"1.25"})
|
flags.SetAnnotation(flagUpdateMaxFailureRatio, "version", []string{"1.25"})
|
||||||
|
|
||||||
flags.Uint64Var(&opts.rollback.parallelism, flagRollbackParallelism, 1, "Maximum number of tasks rolled back simultaneously (0 to roll back all at once)")
|
flags.Uint64Var(&opts.rollback.parallelism, flagRollbackParallelism, 1, "Maximum number of tasks rolled back simultaneously (0 to roll back all at once)")
|
||||||
flags.SetAnnotation(flagRollbackParallelism, "version", []string{"1.27"})
|
flags.SetAnnotation(flagRollbackParallelism, "version", []string{"1.28"})
|
||||||
flags.DurationVar(&opts.rollback.delay, flagRollbackDelay, time.Duration(0), "Delay between task rollbacks (ns|us|ms|s|m|h) (default 0s)")
|
flags.DurationVar(&opts.rollback.delay, flagRollbackDelay, time.Duration(0), "Delay between task rollbacks (ns|us|ms|s|m|h) (default 0s)")
|
||||||
flags.SetAnnotation(flagRollbackDelay, "version", []string{"1.27"})
|
flags.SetAnnotation(flagRollbackDelay, "version", []string{"1.28"})
|
||||||
flags.DurationVar(&opts.rollback.monitor, flagRollbackMonitor, time.Duration(0), "Duration after each task rollback to monitor for failure (ns|us|ms|s|m|h) (default 0s)")
|
flags.DurationVar(&opts.rollback.monitor, flagRollbackMonitor, time.Duration(0), "Duration after each task rollback to monitor for failure (ns|us|ms|s|m|h) (default 0s)")
|
||||||
flags.SetAnnotation(flagRollbackMonitor, "version", []string{"1.27"})
|
flags.SetAnnotation(flagRollbackMonitor, "version", []string{"1.28"})
|
||||||
flags.StringVar(&opts.rollback.onFailure, flagRollbackFailureAction, "pause", `Action on rollback failure ("pause"|"continue")`)
|
flags.StringVar(&opts.rollback.onFailure, flagRollbackFailureAction, "pause", `Action on rollback failure ("pause"|"continue")`)
|
||||||
flags.SetAnnotation(flagRollbackFailureAction, "version", []string{"1.27"})
|
flags.SetAnnotation(flagRollbackFailureAction, "version", []string{"1.28"})
|
||||||
flags.Var(&opts.rollback.maxFailureRatio, flagRollbackMaxFailureRatio, "Failure rate to tolerate during a rollback")
|
flags.Var(&opts.rollback.maxFailureRatio, flagRollbackMaxFailureRatio, "Failure rate to tolerate during a rollback")
|
||||||
flags.SetAnnotation(flagRollbackMaxFailureRatio, "version", []string{"1.27"})
|
flags.SetAnnotation(flagRollbackMaxFailureRatio, "version", []string{"1.28"})
|
||||||
|
|
||||||
flags.StringVar(&opts.endpoint.mode, flagEndpointMode, "vip", "Endpoint mode (vip or dnsrr)")
|
flags.StringVar(&opts.endpoint.mode, flagEndpointMode, "vip", "Endpoint mode (vip or dnsrr)")
|
||||||
|
|
||||||
|
@ -530,10 +530,10 @@ func addServiceFlags(cmd *cobra.Command, opts *serviceOptions) {
|
||||||
flags.SetAnnotation(flagTTY, "version", []string{"1.25"})
|
flags.SetAnnotation(flagTTY, "version", []string{"1.25"})
|
||||||
|
|
||||||
flags.BoolVar(&opts.readOnly, flagReadOnly, false, "Mount the container's root filesystem as read only")
|
flags.BoolVar(&opts.readOnly, flagReadOnly, false, "Mount the container's root filesystem as read only")
|
||||||
flags.SetAnnotation(flagReadOnly, "version", []string{"1.27"})
|
flags.SetAnnotation(flagReadOnly, "version", []string{"1.28"})
|
||||||
|
|
||||||
flags.StringVar(&opts.stopSignal, flagStopSignal, "", "Signal to stop the container")
|
flags.StringVar(&opts.stopSignal, flagStopSignal, "", "Signal to stop the container")
|
||||||
flags.SetAnnotation(flagStopSignal, "version", []string{"1.27"})
|
flags.SetAnnotation(flagStopSignal, "version", []string{"1.28"})
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -72,9 +72,9 @@ func newUpdateCommand(dockerCli *command.DockerCli) *cobra.Command {
|
||||||
flags.Var(&serviceOpts.mounts, flagMountAdd, "Add or update a mount on a service")
|
flags.Var(&serviceOpts.mounts, flagMountAdd, "Add or update a mount on a service")
|
||||||
flags.Var(&serviceOpts.constraints, flagConstraintAdd, "Add or update a placement constraint")
|
flags.Var(&serviceOpts.constraints, flagConstraintAdd, "Add or update a placement constraint")
|
||||||
flags.Var(&serviceOpts.placementPrefs, flagPlacementPrefAdd, "Add a placement preference")
|
flags.Var(&serviceOpts.placementPrefs, flagPlacementPrefAdd, "Add a placement preference")
|
||||||
flags.SetAnnotation(flagPlacementPrefAdd, "version", []string{"1.27"})
|
flags.SetAnnotation(flagPlacementPrefAdd, "version", []string{"1.28"})
|
||||||
flags.Var(&placementPrefOpts{}, flagPlacementPrefRemove, "Remove a placement preference")
|
flags.Var(&placementPrefOpts{}, flagPlacementPrefRemove, "Remove a placement preference")
|
||||||
flags.SetAnnotation(flagPlacementPrefRemove, "version", []string{"1.27"})
|
flags.SetAnnotation(flagPlacementPrefRemove, "version", []string{"1.28"})
|
||||||
flags.Var(&serviceOpts.endpoint.publishPorts, flagPublishAdd, "Add or update a published port")
|
flags.Var(&serviceOpts.endpoint.publishPorts, flagPublishAdd, "Add or update a published port")
|
||||||
flags.Var(&serviceOpts.groups, flagGroupAdd, "Add an additional supplementary user group to the container")
|
flags.Var(&serviceOpts.groups, flagGroupAdd, "Add an additional supplementary user group to the container")
|
||||||
flags.SetAnnotation(flagGroupAdd, "version", []string{"1.25"})
|
flags.SetAnnotation(flagGroupAdd, "version", []string{"1.25"})
|
||||||
|
@ -132,7 +132,7 @@ func runUpdate(dockerCli *command.DockerCli, flags *pflag.FlagSet, serviceID str
|
||||||
return errors.New("other flags may not be combined with --rollback")
|
return errors.New("other flags may not be combined with --rollback")
|
||||||
}
|
}
|
||||||
|
|
||||||
if versions.LessThan(dockerCli.Client().ClientVersion(), "1.27") {
|
if versions.LessThan(dockerCli.Client().ClientVersion(), "1.28") {
|
||||||
clientSideRollback = true
|
clientSideRollback = true
|
||||||
spec = service.PreviousSpec
|
spec = service.PreviousSpec
|
||||||
if spec == nil {
|
if spec == nil {
|
||||||
|
|
Loading…
Reference in New Issue