Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 1518831

Summary: [RFE] custom button action of generic objects doesn't create new task
Product: Red Hat CloudForms Management Engine Reporter: Martin Kourim <mkourim>
Component: APIAssignee: Gregg Tanzillo <gtanzill>
Status: NEW --- QA Contact: Martin Kourim <mkourim>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 5.9.0CC: cpelland, jhardy, obarenbo
Target Milestone: GAKeywords: FutureFeature
Target Release: cfme-future   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: api:generic_objects
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Martin Kourim 2017-11-29 15:51:48 UTC
Description of problem:
When custom button action of generic objects is executed no task is created, so it's not possible to check if the action was successful.
This is not consistent with execution of methods associated with the generic object.


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


How reproducible:
very


Steps to Reproduce:
1. create generic object class with method and custom button
2. create generic object instance
3. run the method:
POST /api/generic_objects/:id
{
   "action": "inspectme"
}
Response:
{
    "success": true,
    "message": "Invoked method myclass05#inspectme for Generic Object id: 4 name: go_name05",
    "task_id": "2",
    "task_href": "https://<addr>/api/tasks/2",
    "href": "https://<addr>/api/generic_objects/4"
}
<= task is created

4. run the button:
POST /api/generic_objects/:id
{
   "action": "btn01"
}
Response:
{
    "success": true,
    "message": "Invoked custom action btn01 for generic_objects id: 1",
    "href": "https://<addr>/api/generic_objects/1"
}
<= no task is created