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

provision_request returns a miq_request object instead of a hash of error and miq_request #14987

Merged
merged 3 commits into from
May 5, 2017

Conversation

mkanoor
Copy link
Contributor

@mkanoor mkanoor commented May 3, 2017

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

Steps for Testing/QA

Described in BZ

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
@gmcculloug
Copy link
Member

@mkanoor Please address rubocop issues.

@mkanoor
Copy link
Contributor Author

mkanoor commented May 4, 2017

@gmcculloug Please review

@@ -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?
Copy link
Member

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(", ")

@miq-bot
Copy link
Member

miq-bot commented May 4, 2017

Checked commits mkanoor/manageiq@40fd359~...1da76a8 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
2 files checked, 0 offenses detected
Everything looks fine. 👍

@gmcculloug gmcculloug merged commit 2b2aff4 into ManageIQ:master May 5, 2017
@gmcculloug gmcculloug added this to the Sprint 60 Ending May 8, 2017 milestone May 5, 2017
simaishi pushed a commit that referenced this pull request May 5, 2017
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
@simaishi
Copy link
Contributor

simaishi commented May 5, 2017

Fine backport details:

$ git log -1
commit 19e141d971c758f848a56fd7dbca07eeae9a4be9
Author: Greg McCullough <[email protected]>
Date:   Fri May 5 08:32:50 2017 -0400

    Merge pull request #14987 from mkanoor/bz_1447793
    
    provision_request returns a miq_request object instead of a hash of error and miq_request
    (cherry picked from commit 2b2aff4815afdb80c27a81e7708c097217f291f1)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1448506

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.

4 participants