Project

General

Profile

Bug #6258

hammer activation-key update fails for all scenarios

Added by dustin tsang almost 5 years ago. Updated 10 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Hammer
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Steps to Reproduce:
1. Create Activation key
  1. hammer activation-key create --organization-id=1 --name='ak' --content-view='cv1'
    Activation key created
2. Check Activation key info
  1. hammer activation-key info --name='ak' --organization-id=1
    Name: ak
    ID: 6
    Description:
    Lifecycle Environment:
    Content View: cv1
    Host Collections:

3. Try updating Activation key:

Scenario 1:
  1. hammer activation-key update --name='ak' --organization-id=1 --new-name='ak123'
    Could not update the activation key:
    Error: Missing options to search environment
Scenario 2:
  1. hammer activation-key update --name='ak' --organization-id=1 --new-name='ak123' --environment=''
    Could not update the activation key:
    Error: environment found more than once

Actual results:
Activation key update errored

Expected results:
Activation key update works successfully

Additional info:
All hammer activation-key update scenarios are blocked with this same issue. Example:
  1. hammer activation-key update --name='ak' --organization-id=1 --environment='DEV' --content-view='cv1'
    Could not update the activation key:
    Error: environment found more than once

Associated revisions

Revision 064ab68c (diff)
Added by dustin tsang almost 5 years ago

Fixes #6258 - env_id & cv_id optional in ak update

Activation Key update should allow passing of environment_id and
content-view to be optional since creation allows the existence
of Activation Keys without a lifecycle-environment or content-view
asociated.

Revision c5bbf048
Added by Thomas McKay almost 5 years ago

Merge pull request #4290 from dustint-rh/ak_put_env_not_required

Fixes #6258 - make env_id optional in ak update

History

#1 Updated by dustin tsang almost 5 years ago

issue is that update action's apipie documentation requires 'environment_id'.
environment_id should not be required since create allow the creation of content_view without an environment.

Changing the apipie documentation so that environment_id is option should solve Scenario 1.
Scenario 2 not be able to be solved since, that cause would be searching for a environment where name == ''.

#2 Updated by dustin tsang almost 5 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Applied in changeset katello|commit:064ab68c5cd5c53298e9d9692e34c05b105d25f3.

#3 Updated by Eric Helms almost 5 years ago

  • Category set to Hammer
  • Assignee set to dustin tsang
  • Target version set to 48
  • Triaged changed from No to Yes

#4 Updated by Eric Helms over 4 years ago

  • Legacy Backlogs Release (now unused) set to 13

Also available in: Atom PDF