Bug 1066088

Summary: [RFE] expose an option to the servicelevels api to return exempt service levels
Product: [Community] Candlepin Reporter: John Sefler <jsefler>
Component: candlepinAssignee: William Poteat <wpoteat>
Status: CLOSED CURRENTRELEASE QA Contact: Katello QA List <katello-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 0.9CC: wpoteat
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-29 17:49:43 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: 1039651    

Description John Sefler 2014-02-17 16:30:18 UTC
Description of problem:
Currently there is a Candlepin API to return the servicelevels available to a given org key...

http://candlepinproject.org/apidoc/get/owners/owner_key/servicelevels/

For testing purposes, it would be helpful to accept an "exempt=true|false" parameter.


Version-Release number of selected component (if applicable):
[root@jsefler-7 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.9.3-1


How reproducible:


Steps to Reproduce:

Actual results:
With the TESTDATA deployed...
[root@jsefler-7 ~]# curl --stderr /dev/null --insecure --user testuser1:password --request GET https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/owners/admin/servicelevels | python -m simplejson/tool
[
    "Full-Service",
    "None",
    "Premium",
    "Standard",
    "Super",
]

Expected results:
[root@jsefler-7 ~]# curl --stderr /dev/null --insecure --user testuser1:password --request GET https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/owners/admin/servicelevels?exempt=true | python -m simplejson/tool
[
    "Exempt SLA",
]

^^^ This ficticious list should contain all of the "support_level" pool attribute values from pools available to the {owner_key} that have been defined with a "support_level_exempt" = "true" pool attribute value.

Comment 1 William Poteat 2014-02-17 19:43:40 UTC
Pull request 

https://github.com/candlepin/candlepin/pull/508

Comment 2 John Sefler 2014-06-03 20:44:18 UTC
Verifying Version ...
[root@jsefler-5 ~]# curl --stderr /dev/null --insecure --user testuser1:password --request GET https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/status | python -m simplejson/tool | grep version
    "version": "0.9.12"


[root@jsefler-5 ~]# curl --stderr /dev/null --insecure --user testuser1:password --request GET https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/owners/admin/servicelevels?exempt=false | python -m simplejson/tool
[
    "Full-Service", 
    "None", 
    "Premium", 
    "Standard", 
    "Super"
]

[root@jsefler-5 ~]# curl --stderr /dev/null --insecure --user testuser1:password --request GET https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/owners/admin/servicelevels?exempt=true | python -m simplejson/tool
[
    "Layered"
]

VERIFIED: /servicelevels new option exempt=true or false

Comment 3 Bryan Kearney 2014-09-29 17:49:43 UTC
Cleaning up old bugs. These were verified but never closed.