Description of problem:
Currently, widgets are generated based on a schedule set per widget (with a minimum of 1 hour wait). I would like to be able to trigger the generation of a widget content from Automate or REST.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Create a widget (default update is every hour)
Manual generation of widget content is possible or you will have to wait for an hour before the widget gets generated.
I should be able to trigger a refresh from automate or REST API.
A workaround is to call rails command in automate with a method like:
# Description: generate widget content by calling shell command
cmd = "/var/www/miq/vmdb/bin/rails r 'MiqWidget.find_by_title(\"Migration Candidates\").queue_generate_content'"
Is there any update on this ticket?
This came up on Support Case 02171153.
Sending to PM for review/prioritizing.
Discussed with Brad and we agreed this could be a 5.10 enhancement for automate. (I believe I have the required BZ flags set correctly.)
If this is still a requirement for REST API I suggest opening another issue as the work would be performed by a different team and should be tracked separately.
Companion Bug for RestAPI:
New commit detected on ManageIQ/manageiq-automation_engine/master:
Author: Greg McCullough <email@example.com>
AuthorDate: Wed Aug 29 13:28:18 2018 -0400
Commit: Greg McCullough <firstname.lastname@example.org>
CommitDate: Wed Aug 29 13:28:18 2018 -0400
Add service model for MiqWidget with queue_generate_content method.
lib/miq_automation_engine/service_models/miq_ae_service_miq_widget.rb | 5 +
spec/service_models/miq_ae_service_miq_widget_spec.rb | 12 +
2 files changed, 17 insertions(+)
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.