Red Hat Bugzilla – Bug 499456
ipa hostgroup-find: description option unuseful and doesn't work
Last modified: 2015-01-04 18:38:21 EST
Description of problem:
The help for the ipa hostgroup-find utility is as follows:
[root@jennyv2 /]# ipa hostgroup-find --help
usage: Usage: ipa [global-options] hostgroup-find NAME
-h, --help show this help message and exit
--description=STR A description of this group
You can't find by description because it prompts for name.
I don't think it is even used, because you can enter an incorrect description for an existing hostgroup and it works.
[root@jennyv2 /]# ipa hostgroup-find --description="wrong" test
[root@jennyv2 /]# ipa hostgroup-show test
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. add a hostgroup with a description
ipa hostgroup-add --description="test" test
2. use the find utility with the description option as described above
option is ignored
no options necessary
This is going to affect all -find commands. I think they should all be rolled up into one bug.
Can't reproduce anymore. The *-find command logic has changed considerably:
The CRITERIA argument (optional on all *-find commands) is a sub-string searched in all default attributes (most significant attributes defined in the plugin). All options that refer to an attribute are optional and are required to match exactly.
# ./ipa hostgroup-find somegroup --desc="description"
Will match all entries with "somegroup" in one of the default attributes (cn, description, member, memberof) and a description attribute equal to "description".
If there's a hostgroup with cn=THIS_IS_somegroup1 and description=description it will be returned.