Merge pull request #26988 from thaJeztah/remove-service-update-name-flag

Remove service update name flag
This commit is contained in:
Sebastiaan van Stijn 2016-10-27 16:55:47 -07:00 committed by GitHub
commit 881831531a
3 changed files with 2 additions and 2 deletions

View File

@ -27,6 +27,8 @@ func newCreateCommand(dockerCli *command.DockerCli) *cobra.Command {
}
flags := cmd.Flags()
flags.StringVar(&opts.mode, flagMode, "replicated", "Service mode (replicated or global)")
flags.StringVar(&opts.name, flagName, "", "Service name")
addServiceFlags(cmd, opts)
flags.VarP(&opts.labels, flagLabel, "l", "Service labels")

View File

@ -511,7 +511,6 @@ func (opts *serviceOptions) ToService() (swarm.ServiceSpec, error) {
// Any flags that are not common are added separately in the individual command
func addServiceFlags(cmd *cobra.Command, opts *serviceOptions) {
flags := cmd.Flags()
flags.StringVar(&opts.name, flagName, "", "Service name")
flags.StringVarP(&opts.workdir, flagWorkdir, "w", "", "Working directory inside the container")
flags.StringVarP(&opts.user, flagUser, "u", "", "Username or UID (format: <name|uid>[:<group|gid>])")

View File

@ -172,7 +172,6 @@ func updateService(flags *pflag.FlagSet, spec *swarm.ServiceSpec) error {
return task.Resources
}
updateString(flagName, &spec.Name)
updateLabels(flags, &spec.Labels)
updateContainerLabels(flags, &cspec.Labels)
updateString("image", &cspec.Image)