Bug 720650

Summary: --help option should be serving with info - not to check connection to server.
Product: Red Hat Satellite Reporter: Garik Khachikyan <gkhachik>
Component: katello-agentAssignee: Lukas Zapletal <lzap>
Status: CLOSED CURRENTRELEASE QA Contact: Garik Khachikyan <gkhachik>
Severity: high Docs Contact:
Priority: medium    
Version: 6.0.0CC: lzap, mkoci
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-22 17:49:45 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:
Bug Depends On:    
Bug Blocks: 747354    

Description Garik Khachikyan 2011-07-12 11:35:28 UTC
Description of problem:
Right now katello client on "--help" option (e.g.: `katello user --help`) tries to establish connection to server (and fails particularly for me)
I think the --help is providing info about the functionality and should not do any logic at all (and not connect to the katello server).

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

How reproducible:
always running `katello <cmd> --help`

Steps to Reproduce:
1.broke (or not configure) your connections settings (including kerberos) and try to fetch: katello user --help 
2.
3.
  
Actual results:
Fails connecting to kerberos and not displays the help info

Expected results:
Should not do any logic there except displaying info.

Additional info:

Comment 1 Lukas Zapletal 2011-07-20 15:10:47 UTC
I guess its somehow connected to this fix:

https://bugzilla.redhat.com/show_bug.cgi?id=707936

Comment 2 Lukas Zapletal 2011-07-21 15:29:44 UTC
720650 - --help option should be serving with info - not connect to srv

[lzap@lzapx cli]$ katello 
Usage: katello <options> <command>
Supported Commands:
	changeset      changeset specific actions in the katello server
	distribution   repo specific actions in the katello server
	environment    environment specific actions in the katello server
	errata         errata specific actions in the katello server
	org            organization specific actions in the katello server
	package        package specific actions in the katello server
	ping           get the status of the katello server
	product        product specific actions in the katello server
	provider       provider specific actions in the katello server
	repo           repo specific actions in the katello server
	shell          run the cli as a shell   
	system         system specific actions in the katello server
	template       template specific actions in the katello server
	user           user specific actions in the katello server

katello: error: No command given; please see --help
[lzap@lzapx cli]$ katello user
Usage: katello <options> user <action> <options>
Supported Actions:
	create         create user              
	info           list information about user
	list           list all known users     
	update         update an user           
	delete         delete user              

katello: error: no action given: please see --help
[lzap@lzapx cli]$ katello user --help
Usage: katello <options> user <action> <options>
Supported Actions:
	create         create user              
	info           list information about user
	list           list all known users     
	update         update an user           
	delete         delete user              

Options:
  -h, --help  show this help message and exit
[lzap@lzapx cli]$ katello user xxxxx
Usage: katello <options> user <action> <options>
Supported Actions:
	create         create user              
	info           list information about user
	list           list all known users     
	update         update an user           
	delete         delete user              

katello: error: invalid action: please see --help
[lzap@lzapx cli]$ katello user list
error: Missing credentials and unable to authenticate using Kerberos (more in the log file)
[lzap@lzapx cli]$ katello -u admin -p admin user list
... works finally ...

Comment 3 Lukas Zapletal 2011-07-21 15:30:33 UTC
82a0e6b 720650 - --help option should be serving with info - not connect to srv

^^^^^^ (Forgot to add the hash number)

Comment 4 Garik Khachikyan 2011-09-14 11:22:35 UTC
great fix: perfectly working - no errors, no tries to connect to server in case something is not well-formatted to perform there.

version checked: katello-cli-0.1.10-1.git.143.98730a7.el6.noarch