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

Refresh operating system and fix normalized guest os #376

Conversation

Ladas
Copy link
Contributor

@Ladas Ladas commented Dec 6, 2017

Depends on:

Refresh operating system and fix normalized guest os, so it shows up correctly in the landing page reports.

Partially fixes BZ:
https://bugzilla.redhat.com/show_bug.cgi?id=1521018

Before:
screenshot from 2017-12-06 16-34-52

After this PR, refresh and regeneration of the dashboard widget (the uknown guest of is shown only for archived Vms, since refresh doesn't touch those):
screenshot from 2017-12-06 16-39-32

Ladas added 7 commits December 6, 2017 16:23
Test we refresh correct operating system
Fix targeted refresh specs
Add FIXME to remember the guest_os duplicated information
Add OperatingSystem to old refresh and fix normalized guest_os
Fix old specs after adding OperatingSystem
Fix stubbed specs to have also disconnected OperatingSystem
@@ -171,10 +171,10 @@ def self.key_pair_type
def parse_image(image, is_public)
uid = image.image_id
location = image.image_location
guest_os = (image.platform == "windows") ? "windows" : "linux"
if guest_os == "linux"
guest_os = (image.platform == "windows") ? "windows_generic" : "linux_generic"
Copy link
Contributor Author

@Ladas Ladas Dec 6, 2017

Choose a reason for hiding this comment

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

@blomquisg any idea why we've used linux&windows as guest os? The allowed normalized names are only windows_generic and linux_generic, from https://github.com/Ladas/manageiq/blob/6eeec01542e27442e0d6515c39417abc0470b42b/app/models/operating_system.rb#L13

Fix rubocop issues
@miq-bot
Copy link
Member

miq-bot commented Dec 6, 2017

Checked commits Ladas/manageiq-providers-amazon@ad7ec90~...467a85e with ruby 2.3.3, rubocop 0.47.1, haml-lint 0.20.0, and yamllint 1.10.0
11 files checked, 0 offenses detected
Everything looks fine. 👍

@Ladas Ladas closed this Dec 7, 2017
@Ladas Ladas reopened this Dec 7, 2017
@agrare agrare merged commit e8eb2a7 into ManageIQ:master Dec 7, 2017
@agrare agrare added this to the Sprint 75 Ending Dec 11, 2017 milestone Dec 7, 2017
simaishi pushed a commit that referenced this pull request Dec 11, 2017
…ormalized_guest_os

Refresh operating system and fix normalized guest os
(cherry picked from commit e8eb2a7)

https://bugzilla.redhat.com/show_bug.cgi?id=1524572
@simaishi
Copy link
Contributor

Gaprindashvili backport details:

$ git log -1
commit 7d172583d8052889e9972db4382c6d59cdd17213
Author: Adam Grare <[email protected]>
Date:   Thu Dec 7 11:27:40 2017 -0500

    Merge pull request #376 from Ladas/refresh_operating_system_and_fix_normalized_guest_os
    
    Refresh operating system and fix normalized guest os
    (cherry picked from commit e8eb2a77e9d4856c54f720f55528080d0e4beb59)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1524572

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