Bug 1445932 - [RFE] Automating the generation of widget content
Summary: [RFE] Automating the generation of widget content
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: GA
: 5.10.0
Assignee: Greg McCullough
QA Contact: Ganesh Hubale
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-26 20:12 UTC by Jerome Marc
Modified: 2019-02-07 23:02 UTC (History)
9 users (show)

Fixed In Version: 5.10.0.15
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-02-07 23:02:34 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:0212 0 None None None 2019-02-07 23:02:39 UTC

Internal Links: 1623607 1753682 1767837

Description Jerome Marc 2017-04-26 20:12:27 UTC
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):
5.7.2.1.20170406142927_0a1ad0e 

How reproducible:
Always

Steps to Reproduce:
1. Create a widget (default update is every hour)

Actual results:
Manual generation of widget content is possible or you will have to wait for an hour before the widget gets generated.

Expected results:
I should be able to trigger a refresh from automate or REST API.

Additional info:
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'"
system(cmd)

exit MIQ_OK

Comment 2 Joe Wood 2018-08-29 14:22:34 UTC
Is there any update on this ticket? 

This came up on Support Case 02171153.

Comment 3 Greg McCullough 2018-08-29 14:29:21 UTC
Sending to PM for review/prioritizing.

Comment 4 Greg McCullough 2018-08-29 17:27:25 UTC
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.

Comment 6 Joe Wood 2018-08-29 17:54:38 UTC
Companion Bug for RestAPI:

https://bugzilla.redhat.com/show_bug.cgi?id=1623607

Comment 8 CFME Bot 2018-09-05 18:45:00 UTC
New commit detected on ManageIQ/manageiq-automation_engine/master:

https://github.com/ManageIQ/manageiq-automation_engine/commit/29e8df916be18559cdb7b09ee0b08404bd15722c
commit 29e8df916be18559cdb7b09ee0b08404bd15722c
Author:     Greg McCullough <gmccullo>
AuthorDate: Wed Aug 29 13:28:18 2018 -0400
Commit:     Greg McCullough <gmccullo>
CommitDate: Wed Aug 29 13:28:18 2018 -0400

    Add service model for MiqWidget with queue_generate_content method.

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1445932

 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(+)

Comment 10 errata-xmlrpc 2019-02-07 23:02:34 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-2019:0212


Note You need to log in before you can comment on or make changes to this bug.