Bug 1684196 - Incorrect HREF in API for compliance result
Summary: Incorrect HREF in API for compliance result
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: API
Version: 5.9.6
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: GA
: 5.9.9
Assignee: Nick LaMuro
QA Contact: Parthvi Vala
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On: 1682739
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-02-28 17:04 UTC by Satoe Imaishi
Modified: 2019-11-29 05:52 UTC (History)
4 users (show)

Fixed In Version: 5.9.9.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1682739
Environment:
Last Closed: 2019-03-19 07:22:13 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Github ManageIQ integration_tests pull 9694 'None' 'open' '[RFR] Audit qe-test-coverage for Customer BZs' 2019-11-29 05:52:07 UTC
Red Hat Product Errata RHSA-2019:0600 None None None 2019-03-19 07:22:18 UTC

Comment 2 CFME Bot 2019-02-28 17:08:24 UTC
New commit detected on ManageIQ/manageiq-api/gaprindashvili:

https://github.com/ManageIQ/manageiq-api/commit/331431992575c0a2114659d7c24baf1b7385c175
commit 331431992575c0a2114659d7c24baf1b7385c175
Author:     Chris Arcand <chrisarcand@users.noreply.github.com>
AuthorDate: Tue Feb 13 10:05:42 2018 -0500
Commit:     Chris Arcand <chrisarcand@users.noreply.github.com>
CommitDate: Tue Feb 13 10:05:42 2018 -0500

    Merge pull request #319 from jntullo/no_href

    Do not return hrefs for objects without a collection

    (cherry picked from commit 8eb4223a0184ce9aaf9cf86efedd887b7c16f812)

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1684196

 app/controllers/api/base_controller/renderer.rb | 2 +-
 spec/requests/service_templates_spec.rb | 12 +
 2 files changed, 13 insertions(+), 1 deletion(-)

Comment 4 Parthvi Vala 2019-03-06 10:52:46 UTC
FIXED. Verified on 5.9.9.1.20190304164243_28a581b.

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"
    }
  ],
    ...
}

Comment 6 errata-xmlrpc 2019-03-19 07:22:13 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-2019:0600


Note You need to log in before you can comment on or make changes to this bug.