enaml-ops / omg-cli

it's kind of like an (o)ps (m)anager in (g)olang
Apache License 2.0
15 stars 11 forks source link

String slice arguments are not parsed corectly #49

Closed s-matyukevich closed 7 years ago

s-matyukevich commented 7 years ago

I try to execute the following command

omg-cli photon \
  --dns 10.148.20.5,10.148.20.6

on the deployed vm I see in /etc/resolv.conf

nameserver 10.148.20.5,10.148.20.6

Passing coma separated list of values also don't work for '--network-dns-1' flag when deploying cloud-config, though help message says that this parameter expects comma separated list.

zmb3 commented 7 years ago

Slice flags should be specified by duplicating the flag name. For example:

--dns 10.148.20.5 --dns 10.158.20.6

The exception to this is when the flags are stored in Vault. In this case, we store a comma separated string in Vault and handle the splitting internally.

You're correct that the help message incorrectly mentions a comma separated list. We'll fix that.