We have two actions to make here: 1 - Removing OpenURL check box where it does not apply 2 - Add support for new entity: Provider, Service, User, Cloud Tenant, Generic Object 3- Document it
I'm blocked on this until Greg decides how he wants it implemented.
*** This bug has been marked as a duplicate of bug 1643331 ***
Clearing needinfo flag.
https://github.com/ManageIQ/manageiq-automation_engine/pull/328 https://github.com/ManageIQ/manageiq/pull/18849 https://github.com/ManageIQ/manageiq-ui-classic/pull/5688 https://github.com/ManageIQ/manageiq-schema/pull/380
some documentation: https://github.com/ManageIQ/guides/blob/master/automate_url_open.md
> 1. "Provider" object open_url checkbox still disabled That part I understand. Let me fix it. > 2. Ruby method for Objects like Service, Tenant able to simulate but not able to open "external_url" What in particular does not work? Do you have some logs? Do you get an error message? > In current RFE we provided support for VM, Provider, Service, User, Group, Tenant, Cloud Tenant and Generic Object. Some objects working fine but some not. "some..." that is not a very exact bug report. Can you be more precise?
Created attachment 1603855 [details] generic object with open_url
Thx for the screenshot! That is helpful.
https://github.com/ManageIQ/manageiq/pull/19157
https://github.com/ManageIQ/manageiq-ui-classic/pull/6040
https://github.com/ManageIQ/manageiq-automation_engine/pull/350
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/f1a0eda819e21795d3cafa02fb57b1386fb51c34 commit f1a0eda819e21795d3cafa02fb57b1386fb51c34 Author: Martin Povolny <mpovolny> AuthorDate: Thu Aug 15 16:09:54 2019 -0400 Commit: Martin Povolny <mpovolny> CommitDate: Thu Aug 15 16:09:54 2019 -0400 Open URL: expand to "Provider" To make "Provider" work one needs to modify "ExtManagementSystem". Partial fix for: https://bugzilla.redhat.com/show_bug.cgi?id=1550002 app/models/ext_management_system.rb | 1 + app/models/provider.rb | 1 - 2 files changed, 1 insertion(+), 1 deletion(-)
Nikhil, all the fixes I did are now merged. However there's still one issu (see last comments in https://github.com/ManageIQ/manageiq-ui-classic/pull/6040) whil prevents GO usecase from working. Seems to me that the remaining issue in not directly related to the topic of this BZ and I will try to get in touch with someone who knows Automate who can take it from here or help me.
This automate fix is needed to resolve the last of the issues found in this BZ: https://github.com/ManageIQ/manageiq-automation_engine/pull/352
Martin o/, As per pull request; we are facing problem for generic object. I would like to verify this BZ for other objects as issue not directly related with topic.
https://github.com/ManageIQ/manageiq-automation_engine/pull/354
https://github.com/ManageIQ/manageiq/pull/19195
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/05e308dedede3c52e5f93cf934865da990227c10 commit 05e308dedede3c52e5f93cf934865da990227c10 Author: Lucy Fu <lufu> AuthorDate: Thu Aug 22 17:05:43 2019 -0400 Commit: Lucy Fu <lufu> CommitDate: Thu Aug 22 17:05:43 2019 -0400 Set result_format to ignore for enabled open_url. Automate won't return back workspace object if result_format is ignore. Custom button calls MiqTask.generic_action_with_callback which sets up a queue callback. MiqAeEngine.deliver always returns a workspace handle which references the custom button target object after processing the automate method. The workspace handle is returned as the result to the queue callback and got saved into miq_task.task_results by calling YAML.dump. When custom button's target is a generic object, YMAL.dump would fail as method encode_with is not exposed to generic object. Since open_url really does not care about return value from the automate method, result_format = ignore is sent to automate to not sending back the workspace as the return value. https://bugzilla.redhat.com/show_bug.cgi?id=1550002 app/models/resource_action.rb | 6 +- spec/models/resource_action_spec.rb | 16 + 2 files changed, 21 insertions(+), 1 deletion(-)
New commit detected on ManageIQ/manageiq-automation_engine/master: https://github.com/ManageIQ/manageiq-automation_engine/commit/76c3c8f0f7f2883a4d16354abcf6ba809319bd17 commit 76c3c8f0f7f2883a4d16354abcf6ba809319bd17 Author: Lucy Fu <lufu> AuthorDate: Tue Aug 20 14:36:49 2019 -0400 Commit: Lucy Fu <lufu> CommitDate: Tue Aug 20 14:36:49 2019 -0400 Add MiqAeEngine.return_result. Returning back workspace breaks the custom button for generic objects. Reported by https://github.com/ManageIQ/manageiq-ui-classic/pull/6040#issuecomment-522771465. https://bugzilla.redhat.com/show_bug.cgi?id=1550002 lib/miq_automation_engine/engine/miq_ae_engine.rb | 9 +- spec/miq_ae_engine_spec.rb | 14 + 2 files changed, 22 insertions(+), 1 deletion(-)
I retested the GO usecase with Lucy's fixes. All is merged and all works for me now --> POST.
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/33295f3b35a976294c995c50f8d49fae61e233ad commit 33295f3b35a976294c995c50f8d49fae61e233ad Author: Lucy Fu <lufu> AuthorDate: Wed Sep 4 09:59:39 2019 -0400 Commit: Lucy Fu <lufu> CommitDate: Wed Sep 4 09:59:39 2019 -0400 Set result_format to ignore for all custom buttons. Followup of https://github.com/ManageIQ/manageiq/pull/19195 https://bugzilla.redhat.com/show_bug.cgi?id=1550002 app/models/resource_action.rb | 2 +- spec/models/resource_action_spec.rb | 11 +- 2 files changed, 4 insertions(+), 9 deletions(-)