Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-30043

Hammer AK content-override fails on force flag

XMLWordPrintable

    • None
    • None
    • None
    • None
    • No

      Description of problem:

      This PR https://github.com/Katello/hammer-cli-katello/pull/977

      added the --force option to the hammer activation-key content-override command.

      At this moment it wants the --force flag to be present even when the override value is set to true.

       

      # hammer activation-key content-override --id="21" --content-label="GzCjmN_bMwphAtEGr_OUwuIsOGXF" --value="true"                                                                     Could not update content override:                                                                      You must use --force to set a value other than 'enabled' 

      This should not be happening as it is stated in the help:

       

      # hammer activation-key content-override --help                                Usage:                                                                                                    hammer activation-key content-override [OPTIONS]                                                                                                                                                        Options:                                                                                               ...
      --force VALUE     Force the override. Required for overrides other than 'enabled' 
      ...
       --value VALUE    Override value. Note for repo enablement you can use a boolean value
      ....

       

       

       

      How reproducible:

      100%

      Is this issue a regression from an earlier version:

      no

      Steps to Reproduce:

      1. Run the hammer activation-key content-override command with the value set to true
      2. Observe the error message that should not appear

      Actual behavior:
      The command wants --force flag to be set even though it should not need it.

      Expected behavior:
      The command should not need --force flag to be set.

      Additional info:

      Tested on snap 81

       
      satellite-6.17.0-0.7.stream.el9sat.noarch
      foreman-3.14.0-0.2.develop.20241205004230git76dcbbe.el9sat.noarch
      katello-4.16.0-0.1.master.el9sat.noarch
      Red Hat Enterprise Linux release 9.5 (Plow)

              rhn-engineering-jlenz Jeremy Lenz
              rhn-engineering-lvasina Ladislav Vasina
              Ladislav Vasina Ladislav Vasina
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: