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

v2v: Fix filtering of drivers ISO to display #143

Merged
merged 1 commit into from
Jul 18, 2017

Conversation

matobet
Copy link
Contributor

@matobet matobet commented Jul 17, 2017

Formerly the list_dirver_isos method only took under account ISOs with names of
the form of 'RHEV-toolsSetup_3.5_15.iso' or 'oVirt-toolsSetup-4.1-3.fc24.iso'
and ISOs with names like 'rhev-tools-setup.iso' were ignored.

Fixed the filtering regex to cover both cases.

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1471823

Formerly the list_dirver_isos method only took under account ISOs with names of
the form of 'RHEV-toolsSetup_3.5_15.iso' or 'oVirt-toolsSetup-4.1-3.fc24.iso'
and ISOs with names like 'rhev-tools-setup.iso' were ignored.

Fixed the filtering regex to cover both cases.

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1471823
@matobet
Copy link
Contributor Author

matobet commented Jul 17, 2017

@miq-bot assign @gmcculloug

@matobet
Copy link
Contributor Author

matobet commented Jul 17, 2017

@miq-bot add_label fine/yes

@miq-bot
Copy link
Member

miq-bot commented Jul 17, 2017

Checked commit matobet@9d77fab with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
2 files checked, 0 offenses detected
Everything looks fine. 👍

@@ -21,7 +21,7 @@ def main
values_hash[nil] = '-- no ISO datastore for provider --'
else
values_hash[nil] = '-- select drivers ISO from list --'
provider.iso_datastore.iso_images.pluck(:name).grep(/toolsSetup/).each do |iso|
provider.iso_datastore.iso_images.pluck(:name).grep(/tools.*setup/i).each do |iso|
Copy link
Member

Choose a reason for hiding this comment

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

@matobet Is this condition too loose for the lookup? Where do the iso_image names come from, does we have control over them?

Copy link
Contributor Author

@matobet matobet Jul 18, 2017

Choose a reason for hiding this comment

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

@gmcculloug The iso images come from the RHV iso domain (only RHV providers may be selected in the target infra provider dropdown) and it contains ISOs of given naming convention (among other random ISOs which we don't want to list for this purpose). This convention alas has changed between 3.6 ({RHEV,oVirt}-toolsSetup) and 4.0 (rhev-tools-setup).

We believe that this regex is the right balance between strictness and generality.

@gmcculloug gmcculloug merged commit 11d379e into ManageIQ:master Jul 18, 2017
@gmcculloug gmcculloug added this to the Sprint 65 Ending Jul 24, 2017 milestone Jul 18, 2017
@gmcculloug gmcculloug added the bug label Jul 18, 2017
simaishi pushed a commit that referenced this pull request Aug 8, 2017
v2v: Fix filtering of drivers ISO to display
(cherry picked from commit 11d379e)

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

simaishi commented Aug 8, 2017

Fine backport details:

$ git log -1
commit f4decd1b21b250814c4b4e385ca65a15a95c6750
Author: Greg McCullough <[email protected]>
Date:   Tue Jul 18 08:16:00 2017 -0400

    Merge pull request #143 from matobet/iso-grep
    
    v2v: Fix filtering of drivers ISO to display
    (cherry picked from commit 11d379ee60fa86a97fbeb64f578d8a6571bd5a3f)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1479405

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