Bug 1493785

Summary: cannot create Service Orders with multiple service requests
Product: Red Hat CloudForms Management Engine Reporter: Martin Kourim <mkourim>
Component: APIAssignee: Jillian Tullo <jtullo>
Status: CLOSED ERRATA QA Contact: Martin Kourim <mkourim>
Severity: high Docs Contact:
Priority: medium    
Version: 5.8.0CC: jhardy, jtullo, obarenbo, simaishi, smallamp
Target Milestone: GA   
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:18:06 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-09-20 23:39:25 UTC
Description of problem:
The way of creating Service Orders with multiple service requests described in documentation [1] fails with "no implicit conversion of Symbol into Integer" error.
[1] http://manageiq.org/docs/reference/latest/api/reference/service_orders#creating-service-orders

That's the only way of creating a shopping cart described in the documentation.

This problem can be workarounded by creating and empty cart:
POST /api/service_orders
{ "action": "create", "name": "cart" }
and then adding service requests using the "add" action.


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


How reproducible:
very


Steps to Reproduce:

POST /api/service_orders
{
  "service_requests" : [
    {
      "service_template_href" : "https://<address>/api/service_templates/:id"
    }
  ]
}

response:
{
    "error": {
        "kind": "internal_server_error",
        "message": "no implicit conversion of Symbol into Integer",
        "klass": "TypeError"
    }
}

Comment 2 Jillian Tullo 2017-10-09 17:13:51 UTC
PR: https://github.com/ManageIQ/manageiq-api/pull/115

Comment 3 Martin Kourim 2017-10-17 20:45:22 UTC
Verified using
POST /api/service_orders
{
  "service_requests" : [
    {
      "service_template_href" : "https://<address>/api/service_templates/:id"
    }
  ]
}

Comment 6 errata-xmlrpc 2018-03-01 13:18:06 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