Bug 499456 - ipa hostgroup-find: description option unuseful and doesn't work
Summary: ipa hostgroup-find: description option unuseful and doesn't work
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: freeIPA
Classification: Retired
Component: ipa-admintools
Version: 2.0
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Rob Crittenden
QA Contact: Chandrasekar Kannan
URL:
Whiteboard:
Depends On:
Blocks: 431020
TreeView+ depends on / blocked
 
Reported: 2009-05-06 18:12 UTC by Jenny Severance
Modified: 2015-01-04 23:38 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-28 09:32:04 UTC
Embargoed:


Attachments (Terms of Use)

Description Jenny Severance 2009-05-06 18:12:38 UTC
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

options:
  -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):
2.0

How reproducible:
always

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

Expected results:
no options necessary

Additional info:

Comment 1 Rob Crittenden 2009-05-06 18:23:55 UTC
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 12:28:38 UTC
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.

Example:

# ./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.