#9078 automountkey-mod has overlapping option parameters.
Opened by rjeffman. Modified

ipa automountkey-mod has both --info and --newinfo parameters with similar behavior.

[root@fedora35 ~]# ipa automountkey-mod --help
Usage: ipa [global-options] automountkey-mod AUTOMOUNTLOCATION AUTOMOUNTMAP [options]
Modify an automount key.
Options:
  -h, --help     show this help message and exit
  --key=STR      Automount key name.
  --info=STR     Mount information
  --setattr=STR  Set an attribute to a name/value pair. Format is attr=value.
                 For multi-valued attributes, the command replaces the values
                 already present.
  --addattr=STR  Add an attribute/value pair. Format is attr=value. The
                 attribute must be part of the schema.
  --delattr=STR  Delete an attribute/value pair. The option will be evaluated
                 last, after all sets and adds.
  --rights       Display the access rights of this entry (requires --all). See
                 ipa man page for details.
  --newinfo=STR  New mount information
  --all          Retrieve and print all attributes from the server. Affects
                 command output.
  --raw          Print entries as stored on the server. Only affects output
                 format.
  --rename=STR   Rename the automount key object

The only difference is that if both are used, --newinfo takes precedence and --info is ignored:

[root@fedora35 ~]# ipa automountkey-mod TEST TEST --key=TEST --newinfo="NEWINFO" --info="INFO" 
------------------------------
Modified automount key "TEST"
------------------------------
  Key: TEST
  Mount information: NEWINFO

As both options ensure the same behavior, it would be better if only one is available.


I can't tell the motivation for this option based on the original ticket andcommit. I'm sorry I missed it during the review.

I'm not sure we can easily remove it as it changes the API. We generally try not to remove options.

Metadata