Bug 1660878

Summary: syspurpose status states should be one of matched/mismatched/not specified
Product: [Community] Candlepin Reporter: Nikos Moumoulidis <nmoumoul>
Component: candlepinAssignee: Nikos Moumoulidis <nmoumoul>
Status: CLOSED CURRENTRELEASE QA Contact: Katello QA List <katello-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.5CC: jsefler, redakkan, skallesh
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: candlepin-2.6.1-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1674415 1674419 (view as bug list) Environment:
Last Closed: 2019-01-23 16:56:08 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:
Bug Depends On:    
Bug Blocks: 1652870, 1654344, 1654345, 1674415, 1674419    

Description Nikos Moumoulidis 2018-12-19 13:35:19 UTC
Description of problem:
Currently, querying the syspurpose status of a consumer, either by using the /consumers/{consumer_uuid}/purpose_compliance API, or by fetching the consumer with the /consumers/{consumer_uuid} API and then reading the systemPurposeStatus field on that, will show the status to be one of valid/partial/invalid. This does not fit with the original design, which is to return one of these states as a status: matched/mismatched/not specified.

Version-Release number of selected component (if applicable):
All current versions that support syspurpose, up to 2.5.8, 2.3.11 and master.

How reproducible:
100%

Steps to Reproduce:
1. Perform a GET request on the /consumers/{consumer_uuid}/purpose_compliance API and check the value of the 'status' field.

Actual results:
The status field has the value of either valid, invalid, or partial.

Expected results:
The status field should have the value of either matched, mismatched, or not specified.

Additional info:
An additional minor issue is that the response's 'reasons' include two reasons for each non-compliant SLA or usage, while there should be one for each.

Comment 1 Chris Snyder 2019-01-10 15:24:07 UTC
*** Bug 1652298 has been marked as a duplicate of this bug. ***

Comment 2 Nikos Moumoulidis 2019-05-30 12:08:09 UTC
*** Bug 1640531 has been marked as a duplicate of this bug. ***