Bug 499456 - ipa hostgroup-find: description option unuseful and doesn't work
ipa hostgroup-find: description option unuseful and doesn't work
Product: freeIPA
Classification: Community
Component: ipa-admintools (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Rob Crittenden
Chandrasekar Kannan
Depends On:
Blocks: 431020
  Show dependency treegraph
Reported: 2009-05-06 14:12 EDT by Jenny Galipeau
Modified: 2015-01-04 18:38 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-03-28 05:32:04 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jenny Galipeau 2009-05-06 14:12:38 EDT
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
  dn: cn=test,cn=hostgroups,cn=accounts,dc=bos,dc=redhat,dc=com
  cn: test
  description: test
  objectclass: top
  objectclass: groupofnames
  objectclass: ipaHostGroup
  objectclass: nestedGroup
[root@jennyv2 /]# ipa hostgroup-show test
  dn: cn=test,cn=hostgroups,cn=accounts,dc=bos,dc=redhat,dc=com
  cn: test
  description: test

Version-Release number of selected component (if applicable):

How reproducible:

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
Actual results:
option is ignored

Expected results:
no options necessary

Additional info:
Comment 1 Rob Crittenden 2009-05-06 14:23:55 EDT
This is going to affect all -find commands. I think they should all be rolled up into one bug.
Comment 2 Pavel Zuna 2009-11-23 07:28:38 EST
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.

Note You need to log in before you can comment on or make changes to this bug.