Bug 1144042

Summary: [RFE] API Missing activation key listing available service_levels
Product: Red Hat Satellite Reporter: Peter Vreman <peter.vreman>
Component: API - ContentAssignee: Christine Fouant <cfouant>
Status: CLOSED ERRATA QA Contact: Jitendra Yejare <jyejare>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.4CC: bbuckingham, bkearney, cwelton, dgoodwin, jduncan, jyejare, mmccune, peter.vreman, xdmoon
Target Milestone: UnspecifiedKeywords: FutureFeature, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/8407
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 12:28:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1122832    

Description Peter Vreman 2014-09-18 13:55:22 UTC
Description of problem:
There is a API call GET /katello/api/v2/activation_keys/:id/releases to list the available release versions. But there is not a API call to list the available service levels.

The WebUI does provide such a dropdown list.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:
Also be able to use the API and Hammer to list available service levels and releaser versions for activation keys


Additional info:

Comment 1 RHEL Program Management 2014-09-18 14:03:06 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 3 Christine Fouant 2014-11-14 19:21:00 UTC
Created redmine issue http://projects.theforeman.org/issues/8407 from this bug

Comment 4 Christine Fouant 2015-02-12 19:09:36 UTC
So, the service levels are actually tied to the organization to which an activation key is created; thus, querying an activation key for the service levels available doesn't quite make sense because the service levels are not scoped by the activation key. However, we do show the service level attached to a key within its information. 

Would an API call to show service levels for an organization be a sufficient fix for your request?

Comment 5 Peter Vreman 2015-02-13 13:51:43 UTC
It shall have the same results as shown by the WebUI in the selection list. If the WebUI is based on the service_levels at the organization level, then having a service_levels API call at organization level is good.

The documentation can have a cross reference from the activation key service_level field to the organization API call that lists the valid service_levels.

Comment 7 Devan Goodwin 2015-03-03 12:24:41 UTC
Candlepin API for this call is: GET /owners/{key}/servicelevels

Comment 8 Christine Fouant 2015-03-09 17:47:39 UTC
Switching this bug to an RFE for activation key's service level agreement choices to reflect the options in its attached subscriptions. There will be API and CLI calls for an activation key which will list only the appropriate choices for an activation key based on the subscriptions attached to the key. The UI will also only show choices based on the attached subscriptions per key.

As it currently stands, service levels are shown by the API to show an organization.

Comment 12 Bryan Kearney 2016-08-10 19:03:40 UTC
Upstream bug component is API - Content

Comment 13 Bryan Kearney 2016-08-10 20:04:44 UTC
Upstream bug component is API

Comment 14 Bryan Kearney 2016-08-10 22:04:28 UTC
Upstream bug component is API - Content

Comment 15 Christine Fouant 2017-03-10 16:34:58 UTC
This should address customer's needs: Service Levels field has been added into call for `hammer organization info`. API results for organization's info also lists service levels available.

Comment 16 Jitendra Yejare 2017-12-01 09:59:20 UTC
Verified !

@Satellite 6.3 snap 26

Steps : According to comment 15, info organization from CLI and API that will show available service levels.


Observed:

From Hammer CLI:
# hammer organization info --id 80
.
.
.
.
.
Domains:                
    rhq.lab.eng.bos.redhat.com
Environments:           

Hostgroups:             
    hg1
Parameters:             

Created at:             2017/11/21 10:53:39
Updated at:             2017/11/21 10:53:39
Label:                  Default_Organization
Description:            
Red Hat Repository URL: https://cdn.redhat.com
Service Levels:         Self-Support
-------------------------------------


From API:
Snippet -> "service_levels":["Self-Support"],"service_level":null


The organization that doesnt have subscription it shows empty list from API [] and blank from CLI.

Hence closing the bug as Verified.

Comment 19 errata-xmlrpc 2018-02-21 12:28:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:0336