Comment 3 for bug 1696780

Revision history for this message
Gorka Eguileor (gorka) wrote :

The argument parser we are using only restricts to 1 instance on positional arguments, and all optional arguments can be duplicated and the result will not be the expected one, but this is not limited to just this command but to *ALL* our commands.

If you do `cinder list --fields name --fields size` you will only get the ID and size fields and not the name field.

I believe we should prevent this from happening, in this command and all other commands that are not ready to accept multiple times the optional argument, instead of adding support for it.

If I remember correctly we are using argparse below all the abstraction layers, so we could do something like this: https://stackoverflow.com/questions/23032514/argparse-disable-same-argument-occurences