Skip to content
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

Merged
merged 5 commits into from
Feb 23, 2017

Conversation

tinaafitz
Copy link
Member

Service object changes

@miq-bot miq-bot added the wip label Feb 22, 2017
@tinaafitz tinaafitz changed the title [WIP] Generic Service State Machine methods modified to use Service object. Generic Service State Machine methods modified to use Service object. Feb 23, 2017
@miq-bot miq-bot removed the wip label Feb 23, 2017
@tinaafitz
Copy link
Member Author

@mkanoor Please review.

@@ -20,33 +20,45 @@ def main

private

def task
def update_task(message)
return unless service_action == 'Provision'
Copy link
Contributor

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|
Copy link
Contributor

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)
Copy link
Contributor

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?

Copy link
Member Author

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.

@tinaafitz
Copy link
Member Author

@mkanoor Changes made.

@miq-bot
Copy link
Member

miq-bot commented Feb 23, 2017

Checked commits tinaafitz/manageiq-content@7051178~...1a0f33f with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
15 files checked, 0 offenses detected
Everything looks good. 🍪

@mkanoor
Copy link
Contributor

mkanoor commented Feb 23, 2017

👍

@mkanoor mkanoor merged commit d27abcb into ManageIQ:master Feb 23, 2017
@mkanoor mkanoor added this to the Sprint 55 Ending Feb 27, 2017 milestone Feb 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants