From 6b2cd6e843298fe24d9c753e3a8a7fec05adcce8 Mon Sep 17 00:00:00 2001 From: Victor Vieux Date: Fri, 17 Jun 2016 19:06:12 -0700 Subject: [PATCH] accept uppercase endpoint mode Signed-off-by: Victor Vieux (cherry picked from commit 8a0c5f157892efdfd5119410adedf0f04c9c16cf) --- api/client/service/opts.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/client/service/opts.go b/api/client/service/opts.go index 54b6582c13..b393e5d57b 100644 --- a/api/client/service/opts.go +++ b/api/client/service/opts.go @@ -310,7 +310,7 @@ func (e *endpointOptions) ToEndpointSpec() *swarm.EndpointSpec { } return &swarm.EndpointSpec{ - Mode: swarm.ResolutionMode(e.mode), + Mode: swarm.ResolutionMode(strings.ToLower(e.mode)), Ports: portConfigs, } } @@ -461,7 +461,7 @@ func addServiceFlags(cmd *cobra.Command, opts *serviceOptions) { flags.DurationVar(&opts.update.delay, flagUpdateDelay, time.Duration(0), "Delay between updates") flags.StringSliceVar(&opts.networks, flagNetwork, []string{}, "Network attachments") - flags.StringVar(&opts.endpoint.mode, flagEndpointMode, "", "Endpoint mode(Valid values: VIP, DNSRR)") + flags.StringVar(&opts.endpoint.mode, flagEndpointMode, "", "Endpoint mode(Valid values: vip, dnsrr)") flags.VarP(&opts.endpoint.ports, flagPublish, "p", "Publish a port as a node port") }