Bug 498545

Summary: imputing vars on the cli in the listed order for delegation-add produces Traceback
Product: [Retired] freeIPA Reporter: Michael Gregg <mgregg>
Component: ipa-admintoolsAssignee: Rob Crittenden <rcritten>
Status: CLOSED DUPLICATE QA Contact: Chandrasekar Kannan <ckannan>
Severity: medium Docs Contact:
Priority: low    
Version: unspecifiedCC: benl, dpal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: jderose@redhat.com Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-05-04 20:35:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michael Gregg 2009-05-01 00:01:33 UTC
Description of problem:
I realize that it's a somewhat improper use of the tool, but imputing options in the order listed in ipa help delegation-add produces a traceback.
ipa help delegation-add lists usage as: ipa [global-options] delegation-add NAME

Version-Release number of selected component (if applicable):
ipa-server-2.0-2.20090428.el5ipa

How reproducible:
always

Steps to Reproduce:
1. ipa --attributes telephonenumber --source=2 --target=3 delegation-add namef
  
Actual results:
[root@iparhel5-vma etc]# ipa --attributes telephonenumber --source=2 --target=3 delegation-add namef
usage: ipa [options]

ipa: error: no such option: --attributes
Traceback (most recent call last):
  File "/usr/bin/ipa", line 32, in ?
    cli.run(api)
  File "/usr/lib/python2.4/site-packages/ipalib/cli.py", line 679, in run
    api.log.exception('%s: %s', e.__class__.__name__, str(e))
AttributeError: 'API' object has no attribute 'log'


Additional info:
I realize that the more proper usage would be with delegation-add first like:
ipa delegation-add --attributes telephonenumber --source=2 --target=3 namef

I think that this shouldn't throw a traceback.

Comment 1 Rob Crittenden 2009-05-01 00:26:20 UTC
Arguments passed before the command are considered "global" arguments. There is no --attributes argumement so it displayed an error. Seems like we have another place we are catching Exception and not StandardException.

Comment 2 Rob Crittenden 2009-05-04 20:35:02 UTC

*** This bug has been marked as a duplicate of bug 498088 ***