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

Targeting host fails #171

Merged
merged 1 commit into from
Dec 7, 2017
Merged

Targeting host fails #171

merged 1 commit into from
Dec 7, 2017

Conversation

pkliczewski
Copy link
Contributor

When ever a host is targeted event parsing fail since it is not possible to
build vm_location. We make sure that it is not calculated when targeting a host.

Bug-Url:
https://bugzilla.redhat.com/1520513

@pkliczewski
Copy link
Contributor Author

@pkliczewski
Copy link
Contributor Author

@miq-bot add_labels gaprindashvili/yes

@pkliczewski
Copy link
Contributor Author

@miq-bot assign @masayag

@pkliczewski
Copy link
Contributor Author

@borod108 please review

end

def self.vm_location(dc, vm_ref)
def self.vm_location(hash, dc, vm_ref)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should either have another name or we should add the "return nil if vm_ref.nil?" without the adding the hash as a parameter and clear the vm_location key from the hash in the calling function in case its value is nil.
But to me this name does not correspond to a method that returns a hash with a lot of other attributes in addition to location, and some times does not return any location at all.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will update the name. Please note that we do not want to have nil value for this key so returning nil is not an option.

When ever a host is targeted event parsing fail since it is not possible to
build `vm_location`. We make sure that it is not calculated when targeting a host.

Bug-Url:
https://bugzilla.redhat.com/1520513
@miq-bot
Copy link
Member

miq-bot commented Dec 6, 2017

Checked commit pkliczewski@8458734 with ruby 2.3.3, rubocop 0.47.1, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 0 offenses detected
Everything looks fine. 🍪

@oourfali oourfali merged commit 66d9e37 into ManageIQ:master Dec 7, 2017
simaishi pushed a commit that referenced this pull request Dec 11, 2017
@simaishi
Copy link
Contributor

Gaprindashvili backport details:

$ git log -1
commit b9376c77948b1e8d5c5e39a7e76cd1c28810e927
Author: Oved Ourfali <oourfali@redhat.com>
Date:   Thu Dec 7 13:39:03 2017 +0200

    Merge pull request #171 from pkliczewski/master
    
    Targeting host fails
    (cherry picked from commit 66d9e37c7e34d0ecb91c79c132e897e9d4e90937)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1524731

@agrare agrare added this to the Sprint 75 Ending Dec 11, 2017 milestone Dec 13, 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.

7 participants