-
Notifications
You must be signed in to change notification settings - Fork 900
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
provision_request returns a miq_request object instead of a hash of error and miq_request #14987
Conversation
https://bugzilla.redhat.com/show_bug.cgi?id=1447793 If there are no errors we return the miq_request object else we raise an exception with the errors
@mkanoor Please address rubocop issues. |
@gmcculloug Please review |
app/models/service_template.rb
Outdated
@@ -375,7 +375,9 @@ def self.create_from_options(options) | |||
private_class_method :create_from_options | |||
|
|||
def provision_request(user, options = nil, request_options = nil) | |||
provision_workflow(user, options, request_options).submit_request | |||
result = provision_workflow(user, options, request_options).submit_request | |||
raise result[:errors].join(",") if result[:errors].any? |
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.
Minor, but please add a space after the comma to separate the data a little bit. .join(", ")
Checked commits mkanoor/manageiq@40fd359~...1da76a8 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
provision_request returns a miq_request object instead of a hash of error and miq_request (cherry picked from commit 2b2aff4) https://bugzilla.redhat.com/show_bug.cgi?id=1448506
Fine backport details:
|
https://bugzilla.redhat.com/show_bug.cgi?id=1447793
The provision request returns the miq_request object if there are no errors
else we raise an exception with the errors
Links
https://bugzilla.redhat.com/show_bug.cgi?id=1447793
Create a provision request for a service template #13972
Steps for Testing/QA
Described in BZ