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

Add conversion_host option to the SupportsFeatureMixin module #18232

Merged
merged 3 commits into from
Nov 26, 2018
Merged

Add conversion_host option to the SupportsFeatureMixin module #18232

merged 3 commits into from
Nov 26, 2018

Conversation

djberg96
Copy link
Contributor

@djberg96 djberg96 commented Nov 26, 2018

This PR adds the conversion_host option to the SupportsFeature mixin for conversion host support (or not).

The idea here is that we can then use this for V2V, where individual resources (VM or possibly Host) within each provider repo can put this within their respective vm.rb or host.rb file(s). This will help us govern behavior elsewhere within the codebase via supports :conversion_host or supports_not :conversion_host.

With this in place, the ManageIQ REST API can also take advantage of it in order to check for support. See here for an example of where this is already used:

https://github.com/ManageIQ/manageiq-api/blob/master/app/controllers/api/subcollections/security_groups.rb#L12

https://bugzilla.redhat.com/show_bug.cgi?id=1622728
https://bugzilla.redhat.com/show_bug.cgi?id=1695810

@djberg96
Copy link
Contributor Author

@miq-bot add_reviewer @jameswnl

@djberg96
Copy link
Contributor Author

@miq-bot add_reviewer @agrare

@miq-bot miq-bot requested a review from agrare November 26, 2018 17:59
@agrare agrare self-assigned this Nov 26, 2018
@agrare
Copy link
Member

agrare commented Nov 26, 2018

@djberg96 is the idea to check if it is possible to enable a resource to be a conversion host, or to check if one is a conversion host?

@djberg96
Copy link
Contributor Author

@agrare The idea is to check if it's possible to enable a resource to be a conversion host.

To see if a resource is a conversion host we can check to see if there's an existing relationship to the conversion_host table. That, or perhaps there's some other attribute on the v2v side, can't remember right now.

@agrare
Copy link
Member

agrare commented Nov 26, 2018

@djberg96 yeah okay good, since we already have has_one conversion_host on vms and hosts 👍

@djberg96 djberg96 changed the title Add conversion option to the SupportsFeatureMixin module Add conversion_host option to the SupportsFeatureMixin module Nov 26, 2018
@miq-bot
Copy link
Member

miq-bot commented Nov 26, 2018

Checked commits https://github.com/djberg96/manageiq/compare/9e069e08bd582cbc5885f226bb2e63c4ac4b3d81~...3e2a6fbf9ebb9fb09083b1a6d25d71e275e9c464 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 0 offenses detected
Everything looks fine. ⭐

@agrare agrare merged commit c9d1e4d into ManageIQ:master Nov 26, 2018
@agrare agrare added this to the Sprint 100 Ending Dec 3, 2018 milestone Nov 26, 2018
@djberg96
Copy link
Contributor Author

@miq-bot add_label hammer/yes

simaishi pushed a commit that referenced this pull request Mar 29, 2019
Add conversion_host option to the SupportsFeatureMixin module

(cherry picked from commit c9d1e4d)

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

Hammer backport details:

$ git log -1
commit 48dbd21a87b5af4caf6a9ce43a9892d614228384
Author: Adam Grare <agrare@redhat.com>
Date:   Mon Nov 26 14:26:22 2018 -0500

    Merge pull request #18232 from djberg96/supports_conversion_host
    
    Add conversion_host option to the SupportsFeatureMixin module
    
    (cherry picked from commit c9d1e4d6d7e1b52a8bf19687918e844d924909ec)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1694229

simaishi added a commit that referenced this pull request Apr 1, 2019
@simaishi
Copy link
Contributor

simaishi commented Apr 1, 2019

Reverted the backport:

commit 8aa6215951a438d4fbf3f84f2e3fd9b3f1dea9b7
Author: Satoe Imaishi <simaishi@redhat.com>
Date:   Mon Apr 1 11:31:18 2019 -0400

    Revert "Merge pull request #18232 from djberg96/supports_conversion_host"
    
    This reverts commit 48dbd21a87b5af4caf6a9ce43a9892d614228384.

simaishi pushed a commit that referenced this pull request Apr 22, 2019
Add conversion_host option to the SupportsFeatureMixin module

(cherry picked from commit c9d1e4d)

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

Hammer backport details:

$ git log -1
commit 958ec645785de184730c21a209f2f68cd1fd6981
Author: Adam Grare <agrare@redhat.com>
Date:   Mon Nov 26 14:26:22 2018 -0500

    Merge pull request #18232 from djberg96/supports_conversion_host
    
    Add conversion_host option to the SupportsFeatureMixin module
    
    (cherry picked from commit c9d1e4d6d7e1b52a8bf19687918e844d924909ec)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1702019

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.

5 participants