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

Hammer creates AK without expected error message

XMLWordPrintable

    • None
    • None
    • None
    • None

      Description of problem:

      When you try to create AK using hammer CLI and you provide just CV to the creation command the AK is created without the error.

      hammer activation-key create --name="testAK_1" --organization="testORG" --content-view="testCV"
      Activation key created.

      AK that is created by this does not have CV assigned which is correct behavior but the command should fail.

      The same error should come up as when you try to create AK with just LCE provided to the command.

      hammer activation-key create --name="testAK_1" --organization="testORG" --lifecycle-environment="testLCE"
      Could not create the activation key: Environment ID and content view ID must be provided together

      How reproducible:

      100 % of time

      Is this issue a regression from an earlier version:

      No, as this is related to the 6.17 multiCV feature

      Steps to Reproduce:

      1. Create ORG and CV

      2. Try to create AK with just CV provided 

      hammer activation-key create --name="testAK_1" --organization="testORG" --content-view="testCV"

       

      Actual behavior:
      Users can create AK with just CV specified.

      hammer activation-key create --name="testAK_1" --organization="testORG" --content-view="testCV"
      Activation key created.

      Expected behavior:
      The error message should come up

      hammer activation-key create --name="testAK_1" --organization="testORG" --content-view="testCV"
      Could not create the activation key: Environment ID and content view ID must be provided together

      Business Impact / Additional info:

      Users are being misled by thinking that the AK was created according to the entered CLI parameters.

      Tested with:

      SNAP 86

      satellite-6.17.0-0.7.stream.el9sat.noarch
      foreman-3.14.0-0.4.develop.20250120004015git0ea2685.el9sat.noarch
      katello-4.16.0-0.2.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
              Samir Jha Samir Jha
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: