Description of problem:
Hammer command for generating registration command does not validate if the activation key exists.
Version-Release number of selected component (if applicable):
satellite-6.18.1-1.el9sat.noarch
How reproducible:
Always
Steps to Reproduce:
Execute the following command on the Satellite with a non-existent activation key.
hammer host-registration generate-command --activation-key <>
Actual results:
The registration command is generated even when the activation key is not present.
hammer> host-registration generate-command --activation-key CAP-M-1
set -o pipefail && curl --silent --show-error 'https://satellite.example.com/register?activation_keys=CAP-M-1' --header 'Authorization: Bearer' | bash
This will result in 404 error when client is registered using the above command.
Couldn't find activation key 'CAP-M-1' (HTTP error code 404: Not Found)
Expected results:
Ideally, there should be some kind of validation for value provided for the activation key.