Bug 1480281

Summary: [RFE] href not returned when ordering service from the service_templates subcollection
Product: Red Hat CloudForms Management Engine Reporter: Martin Kourim <mkourim>
Component: APIAssignee: Jillian Tullo <jtullo>
Status: CLOSED ERRATA QA Contact: Martin Kourim <mkourim>
Severity: medium Docs Contact:
Priority: high    
Version: 5.8.0CC: dajohnso, jhardy, jtullo, obarenbo, simaishi
Target Milestone: GAKeywords: FutureFeature, RFE
Target Release: 5.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: api:rest:services
Fixed In Version: 5.9.0.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-01 13:15:53 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:

Description Martin Kourim 2017-08-10 15:10:34 UTC
Description of problem:
When service is ordered from service catalog using the request on the service_templates subcollection, the data returned in response corresponds to the service_requests collection. However since no "href" is returned, it's hard to figure out that the response doesn't correspond to the originating subcollection (i.e. service_templates).

When the request is made on a resource under the service_templates subcollection, the correct "href" is returned.


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


How reproducible:
very


Steps to Reproduce:
Order catalog item from the service_templates subcollection:

POST /api/service_catalogs/62/service_templates
{
  "action": "order",
  "resources": [{
    "href": "https://<address>/api/service_catalogs/:catalog_id/service_templates/:template_id"
  }]
}

Response:
{
    "results": [
        {
            "id": 27,
            "description": "Provisioning Service [item_4D2Nq] from [item_4D2Nq]",
...
<= no "href" is present - it should point to "https://<address>/api/service_requests/27", otherwise it's difficult to find out what resource does the id belongs to.

Compared to:
POST /api/service_catalogs/62/service_templates/:template_id
{ "action": "order" }

Response:
{
    "href": "https://<address>/api/service_requests/28",
    "id": 28,
    "description": "Provisioning Service [item_4D2Nq] from [item_4D2Nq]",
...
<= here the "href" is present

Comment 2 Jillian Tullo 2017-10-04 19:16:46 UTC
https://github.com/ManageIQ/manageiq-api/pull/104

Comment 3 Martin Kourim 2017-10-19 14:20:40 UTC
Verified that href is returned when ordering service from the service_templates subcollection.

Comment 6 errata-xmlrpc 2018-03-01 13:15:53 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:0380