Bug 1753682 - [RFE] Automating the generation of widget content Via RESTAPI
Summary: [RFE] Automating the generation of widget content Via RESTAPI
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: API
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: GA
: 5.10.12
Assignee: drew uhlmann
QA Contact: Parthvi Vala
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On: 1623607
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-09-19 15:00 UTC by Satoe Imaishi
Modified: 2020-05-19 17:13 UTC (History)
12 users (show)

Fixed In Version: 5.10.12.0
Doc Type: Enhancement
Doc Text:
Clone Of: 1623607
Environment:
Last Closed: 2019-11-06 08:58:33 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 Bugzilla 1445932 0 medium CLOSED [RFE] Automating the generation of widget content 2021-02-22 00:41:40 UTC

Comment 2 CFME Bot 2019-09-19 15:07:21 UTC
New commit detected on ManageIQ/manageiq-api/hammer:

https://github.com/ManageIQ/manageiq-api/commit/d442245656c13931df7fa3ad8041daf4bd5d8993
commit d442245656c13931df7fa3ad8041daf4bd5d8993
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Thu Aug 29 09:58:59 2019 -0400
Commit:     Gregg Tanzillo <gtanzill>
CommitDate: Thu Aug 29 09:58:59 2019 -0400

    Merge pull request #660 from d-m-u/adding_widget_endpoint

    Add endpoints for widget content generation

    (cherry picked from commit 40f597d1aa35693cd2b258b284989aa8f833f01b)

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

 app/controllers/api/widgets_controller.rb | 25 +
 config/api.yml | 24 +
 spec/requests/widgets_spec.rb | 100 +
 3 files changed, 149 insertions(+)

Comment 3 Parthvi Vala 2019-09-25 06:45:00 UTC
Hi Drew,

Can you tell me what parameters must be passed while performing action `generate_content`?
It looks like it needs some 3-4 parameters and I am passing none, so it is not generating content successfully.

Thanks,
Parthvi

Comment 4 drew uhlmann 2019-09-25 10:20:44 UTC
May I please have a reproducer?

Comment 6 drew uhlmann 2019-09-30 14:13:59 UTC
also needs https://github.com/ManageIQ/manageiq-api/pull/679
mea maxima culpa

Comment 8 drew uhlmann 2019-10-03 13:12:01 UTC
Hey Satoe, this needs in before Monday and I'm on vacation tomorrow. Is there anything you need from me?

Comment 9 Satoe Imaishi 2019-10-03 13:14:54 UTC
No, you're all set on this one. When "devel whiteboard" contains "waiting_for_backport", it means nothing developer need to do and it's just waiting for the right time for the PR to be backported.

Comment 10 CFME Bot 2019-10-04 17:12:26 UTC
New commit detected on ManageIQ/manageiq-api/hammer:

https://github.com/ManageIQ/manageiq-api/commit/7d7a00c76541045b496b177ad8d31d9f230ceb4d
commit 7d7a00c76541045b496b177ad8d31d9f230ceb4d
Author:     Libor Pichler <lpichler>
AuthorDate: Tue Oct  1 12:18:40 2019 -0400
Commit:     Libor Pichler <lpichler>
CommitDate: Tue Oct  1 12:18:40 2019 -0400

    Merge pull request #679 from d-m-u/fixing_widget_args

    Include user info in widget generation

    (cherry picked from commit 2382951d2e10a6f6e53d9c7f0e594d3b0f0de593)

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

 app/controllers/api/widgets_controller.rb | 2 +-
 spec/requests/widgets_spec.rb | 5 +
 2 files changed, 6 insertions(+), 1 deletion(-)

Comment 11 Parthvi Vala 2019-10-09 07:38:36 UTC
Tested on 5.10.12 and it seems to be working fine.

Query: POST /api/widgets/:id
{
	"action": "generate_content"
}

Task runs successfully and the date is updated on UI, but when I perform a GET query on the widget, it doesn't seem to update "last_generated_content_on". "last_generated_content_on" is same as it was earlier.

Putting this back to Assigned.

Comment 12 Parthvi Vala 2019-10-11 14:13:14 UTC
Marking this BZ as Verified since the bug is not exactly related to the code changes. Will raise a separate BZ for the rest bug after investigating it some more.

Comment 13 drew uhlmann 2019-10-11 14:18:24 UTC
sounds great, thanks! please go ahead and assign the new one to me

Comment 14 Parthvi Vala 2019-10-15 13:14:33 UTC
BZ for the `last_generated_content_on` attribute - https://bugzilla.redhat.com/show_bug.cgi?id=1761836

Comment 16 errata-xmlrpc 2019-11-06 08:58:33 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/RHBA-2019:3268


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