Description of problem: - API can be used to generate global registration curl with unlimited parameter but hammer with the same parameter reports error. Version-Release number of selected component (if applicable): How reproducible: - Always Steps to Reproduce: 1. Generate a registration command with API with jwt_expiration parameter set to unlimited. ~~~ curl --insecure --user test:test --header 'Content-Type: application/json' --request POST 'https://localhost/api/registration_commands/' --data-raw '{"force": 1,"organization_id": 1,"setup_insights": 0,"setup_remote_execution": 1,"setup_remote_execution_pull": 0,"activation_key": "GENERAL","insecure": 1,"jwt_expiration": "unlimited"}' ~~~ The API call generates the registration command successfully. ~~~ 2023-08-01T10:39:10 [I|app|01930a94] Parameters: {"force"=>1, "organization_id"=>1, "setup_insights"=>0, "setup_remote_execution"=>1, "setup_remote_execution_pull"=>0, "activation_key"=>"GENERAL", "insecure"=>1, "jwt_expiration"=>"unlimited", "apiv"=>"v2", "registration_command"=>{"force"=>1, "organization_id"=>1, "setup_insights"=>0, "setup_remote_execution"=>1, "setup_remote_execution_pull"=>0, "activation_key"=>"GENERAL", "insecure"=>1, "jwt_expiration"=>"unlimited"}} ~~~ 2. Run registration command generation using hammer. ~~~ hammer host-registration generate-command --organization RedHat --location Pune --insecure true --activation-key GENERAL --jwt-expiration "unlimited" ~~~ Hammer command reports the following message. ~~~ Failed to generate registration command: Error: Option '--jwt-expiration': Numeric value is required.. ~~~ Additional info: - In both the cases, the accepted value is a number APIDOC: ~~~ registration_command[jwt_expiration] optional , nil allowed Expiration of the authorization token (in hours) Validations: Must be a number. ~~~ With the API , it works after passing `unlimited` as well. The validation is not performed here unlike in hammer.
Thanks for reporting the issue, this one we know about, reported in https://bugzilla.redhat.com/show_bug.cgi?id=2180568 *** This bug has been marked as a duplicate of bug 2180568 ***