-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generic Service State Machine methods modified to use Service object. #58
Conversation
object and pass service_action to retirement.
ed8ed61
to
b394af0
Compare
@mkanoor Please review. |
@@ -20,33 +20,45 @@ def main | |||
|
|||
private | |||
|
|||
def task | |||
def update_task(message) | |||
return unless service_action == 'Provision' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tinaafitz
Can we not check service_action but rather check if we have a task we update the message else skip over
@@ -20,33 +20,45 @@ def main | |||
|
|||
private | |||
|
|||
def task | |||
def update_task(message) | |||
return unless service_action == 'Provision' | |||
@handle.root["service_template_provision_task"].tap do |task| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tinaafitz Since task is optional could we use try
@handle.root['service_template_provision_task'].try { |task| task.miq_request.user_message = message }
task.miq_request.user_message = err.message | ||
@handle.log("info", "Error in execute") | ||
@handle.log("info", "Error in execute: #{err.message}") | ||
update_task(err.message) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tinaafitz
Should update_task take a second parameter to indicate if its info or error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mkanoor - update_task is called only for errors.
@mkanoor Changes made. |
d5cfe34
to
1a0f33f
Compare
Checked commits tinaafitz/manageiq-content@7051178~...1a0f33f with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
👍 |
Service object changes