Bug 807659 - Error message should be changed for ipa cert-revoke
Error message should be changed for ipa cert-revoke
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ipa (Show other bugs)
6.3
x86_64 Linux
unspecified Severity low
: rc
: ---
Assigned To: Rob Crittenden
IDM QE LIST
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-28 08:27 EDT by Kaleem
Modified: 2012-03-28 09:38 EDT (History)
2 users (show)

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


Attachments (Terms of Use)

  None (edit)
Description Kaleem 2012-03-28 08:27:42 EDT
Description of problem:

[root@ipa63server ~]# ipa cert-revoke 5 3 --revocation-reason=6
ipa: ERROR: command 'cert_revoke' takes at most 1 argument

Here error message looks not correct as cert_revoke takes 2 arguments which are as follows.
 1. SERIAL-NUMER
 2. --revocation-reason

if --revocation-reason not provided , default value "0" is picked.

[root@ipa63server ~]# ipa help cert-revoke
Purpose: Revoke a certificate.
Usage: ipa [global-options] cert-revoke SERIAL-NUMBER [options]

Positional arguments:
  SERIAL-NUMBER         Serial number in decimal or if prefixed with 0x in
                        hexadecimal

Options:
  -h, --help            show this help message and exit
  --revocation-reason=INT
                        Reason for revoking the certificate (0-10)
[root@ipa63server ~]#

Version-Release number of selected component (if applicable):
[root@ipa63server ~]# rpm -q ipa-server
ipa-server-2.2.0-5.el6.x86_64
[root@ipa63server ~]#

How reproducible:
Always

Steps to Reproduce:
1.Run following command after ipa-server-install and observe

[root@ipa63server ~]# ipa cert-revoke 5 3 --revocation-reason=6
  
Actual results:
[root@ipa63server ~]# ipa cert-revoke 5 3 --revocation-reason=6
ipa: ERROR: command 'cert_revoke' takes at most 1 argument

Expected results:
Error message should be like 
"ipa: ERROR: command 'cert_revoke' takes at most 2 argument"
Comment 2 Rob Crittenden 2012-03-28 09:14:31 EDT
The two arguments are 5 and 3. You can only revoke one certificate at a time.
Comment 4 Rob Crittenden 2012-03-28 09:31:02 EDT
It isn't complaining about the revocation reason, two separate arguments were passed and it is correctly complaining about it.

This distinguishes options (dashed) and positional arguments.
Comment 5 Jenny Galipeau 2012-03-28 09:38:40 EDT
Got it, okay - let's close not a bug

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