Bug 1682739

Summary: Incorrect HREF in API for compliance result
Product: Red Hat CloudForms Management Engine Reporter: Tuan <tuado>
Component: APIAssignee: Nick LaMuro <nlamuro>
Status: CLOSED CURRENTRELEASE QA Contact: Parthvi Vala <pvala>
Severity: medium Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: high    
Version: 5.9.6CC: dmetzger, nlamuro, obarenbo, simaishi
Target Milestone: GAKeywords: ZStream
Target Release: 5.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.10.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1684196 (view as bug list) Environment:
Last Closed: 2019-03-26 21:02:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Bug
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1684196    

Comment 4 dmetzger 2019-02-28 13:44:44 UTC
The specific fix for the incorrect HREF (https://github.com/ManageIQ/manageiq-api/pull/319) is being targeted for 5.9, the potential RFE request for a new API endpoint will be left to a new RFE BZ.

Comment 7 Parthvi Vala 2019-03-06 11:01:57 UTC
FIXED. Verified on 5.10.1.2.20190219165527_7a4a22b.

Steps taken to verify the BZ:
1. Create a compliance policy, and create a policy profile and assign the newly created compliance policy to it.
2. Assign the new policy profile to a VM.
3. Query the VM.
GET /api/vms/:id?attributes=compliances

Response: {
  "href": "https://<ip_address>/api/vms/8",
  "id": "8",
  "vendor": "vmware",
  "name": "v2v-rhel8-mini",
    ...
  "compliances": [
    {
      "id": "1",
      "resource_id": "8",
      "resource_type": "VmOrTemplate",
      "compliant": true,
      "timestamp": "2019-03-06T09:48:55Z",
      "updated_on": "2019-03-06T09:48:55Z",
      "event_type": "vm_compliance_check"
    }
  ],
    ...
}