Description of problem: Custom buttons on instances & VMs are used more and more, especially since the integration of Ansible Tower into CloudForms. They allow operators to define actions that users can perform on the hosts. Today, all actions defined as custom buttons or groups are presented to all instances/VMs. We need to be able to limit on which type of instances/VMs these buttons/groups are displayed. For example, I have Ansible playbooks for Linux and Windows, I want to make Linux playbooks available to Linux VMs as a button, and Windows playbooks available to Windows VMs, but Linux VMs should not see Windows playbooks, and vice versa. Today it is impossible to implement this basic use case. Version-Release number of selected component (if applicable): 5.7 How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
A solution could be to add the MIQ expression editor on the button definition screen (same than reporting and control), so that ops can add conditions around displaying buttons & button groups in the UI.
This is not limited to VMs/instances. All custom buttons should have a scope.
So custom actions returned should only ever represent those things which can be done on the item of concern. For documentation on custom actions for services see http://manageiq.org/docs/reference/latest/api/reference/service_custom_actions Moving forward, I would imagine this would true for custom actions on vms, only those actions that are valid for the item of concern would be returned by the api given an appropriate request.
Already verified Custom Button Expression Editor in https://bugzilla.redhat.com/show_bug.cgi?id=1389660
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