New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/850d84866f2f68a64873263e9443f4d460cebbb2 commit 850d84866f2f68a64873263e9443f4d460cebbb2 Author: Tina Fitzgerald <tfitzger> AuthorDate: Mon Nov 10 15:30:20 2014 -0500 Commit: Tina Fitzgerald <tfitzger> CommitDate: Fri Nov 14 13:42:09 2014 -0500 Add the ability to override the service request message. https://bugzilla.redhat.com/show_bug.cgi?id=1161253 Allow automate method to override the default request status message displayed as "last message". Added automate service model user_message helper methods. Changed service_template_provision_task after_ae_delivery method for reload and user_message override. vmdb/app/models/miq_request.rb | 2 +- vmdb/app/models/miq_request_task.rb | 2 +- vmdb/app/models/mixins/miq_request_mixin.rb | 9 +++++++++ vmdb/app/models/service_template_provision_task.rb | 5 +++-- .../service_models/mixins/miq_ae_service_miq_request_mixin.rb | 4 ++++ 5 files changed, 18 insertions(+), 4 deletions(-)
New commit detected on cfme/5.3.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=1d5424c381572f63236f80834fcb07fdc67d94df commit 1d5424c381572f63236f80834fcb07fdc67d94df Author: Tina Fitzgerald <tfitzger> AuthorDate: Mon Nov 10 15:30:20 2014 -0500 Commit: Tina Fitzgerald <tfitzger> CommitDate: Tue Nov 18 10:05:10 2014 -0500 Add the ability to override the service request message. https://bugzilla.redhat.com/show_bug.cgi?id=1161253 Allow automate method to override the default request status message displayed as "last message". Added automate service model user_message helper methods. Changed service_template_provision_task after_ae_delivery method for reload and user_message override. vmdb/app/models/miq_request.rb | 2 +- vmdb/app/models/miq_request_task.rb | 2 +- vmdb/app/models/mixins/miq_request_mixin.rb | 9 +++++++++ vmdb/app/models/service_template_provision_task.rb | 5 +++-- .../service_models/mixins/miq_ae_service_miq_request_mixin.rb | 4 ++++ 5 files changed, 18 insertions(+), 4 deletions(-)
Could you provide more detail about the service? This enhancement was specifically designed for services. Additional changes would be necessary to enable it for vm provisioning.
Please mention the steps to verify this bug . Thanks
Hi Shveta, Create a very simple service and provision it. Notice that the "Last Message" field contains the default messaging. Next, modify one, or more of the service state machine automate methods to set the user_message to override the default message. Note, the automate methods differ in how they define the local attribute used for $evm.root['service_template_provision_task'] Set the user_message text on whatever attribute is used for the "task" example: task = $evm.root['service_template_provision_task'] task.miq_request.user_message = "test user_message override" Provision the service again and notice that the "Last Message" field contains the last user_message you specified. Next, intentionally ABORT one of the service provision state machine automate methods by adding an abort immediately after setting the user_message. Then provision again to see the new "error" user_message. example: task = $evm.root['service_template_provision_task'] task.miq_request.user_message = "test user_message error message" exit MIQ_ABORT Let me know if you have any questions. Thanks, Tina
Verified in 5.4.0.0.19 Added task = $evm.root['service_template_provision_task'] task.miq_request.user_message = "test user_message error message" exit MIQ_ABORT And saw it in logs Added a message just before provision in the statemachine and saw two things 1) The message was set, but nothing showed in the logs 2) The message was no longer updated at all during the provision process, I presume this is desired, that if the user_message is present, it always just shows that?
There is nothing to be validated in the logs. One more test performed on related issue: https://bugzilla.redhat.com/show_bug.cgi?id=1164035 Is to set the user_message to nil so that it would revert to the default messaging. stp_task = $evm.root['service_template_provision_task'] miq_request = stp_task.miq_request miq_request.user_message = nil exit MIQ_ABORT Default message should be set in provision request since the user message is nil. Let me know if you have any questions.
Verified in 5.4.0.0.22.20150420163946_26004d1
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://rhn.redhat.com/errata/RHBA-2015-1100.html