Description of problem: When custom button is added for Generic Object Definition the "resource_action" attribute points to https://<addr>/api/resource_action/:id There's no "resource_action" collection. Version-Release number of selected component (if applicable): 5.9.0.11 How reproducible: very Steps to Reproduce: 1. create Generic Object Definition 2. add Button Group 3. add Button 4. GET /api/custom_buttons/:id?attributes=resource_action 5. check the "resource" action: ... "resource_action": { "href": "https://<addr>/api/resource_action/44", "id": "44", "resource_id": "1", "resource_type": "CustomButton",
Even though the "resource_action" of custom button points to non-existent resource, the action is executed successfully: POST /api/generic_objects/1 { "action": "btn01" } Response: { "success": true, "message": "Invoked custom action btn01 for generic_objects id: 1", "href": "https://<addr>/api/generic_objects/1" }
https://github.com/ManageIQ/manageiq-api/pull/236
https://github.com/ManageIQ/manageiq-api/pull/251
New commit detected on ManageIQ/manageiq-api/master: https://github.com/ManageIQ/manageiq-api/commit/d1f3d947a70e3bdbb39ae260af9a59d963ac0a11 commit d1f3d947a70e3bdbb39ae260af9a59d963ac0a11 Author: Chris Arcand <chris> AuthorDate: Mon Dec 18 12:15:12 2017 -0600 Commit: Chris Arcand <chris> CommitDate: Mon Dec 18 12:17:05 2017 -0600 Don't return non-existent hrefs Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1518283 app/controllers/api/base_controller/normalizer.rb | 26 +++++++++++++++-------- lib/api/href.rb | 6 ++++++ 2 files changed, 23 insertions(+), 9 deletions(-)