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 resource ems_ref and ip addresses to virt-v2v options hash #18101

Merged
merged 7 commits into from
Oct 18, 2018

Conversation

ghost
Copy link

@ghost ghost commented Oct 16, 2018

When build the virt-v2v options hash for OpenStack, the ServiceTemplateTransformationPlanTask needs the ems_ref of the conversion host to expose it as osp_server_id in the options hash. This PR exposes the resource ems_ref in ConversionHost and enrich the options hash.

This PR also adds the IP address to the network mappings in options hash, as it is required to generate the network ports that will be attached to the instance.

Associated RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1634029

@ghost
Copy link
Author

ghost commented Oct 16, 2018

@miq-bot add-label transformation, enhancement, hammer/yes
@miq-bot add-reviewer agrare

@miq-bot miq-bot requested a review from agrare October 16, 2018 12:36
@ghost ghost changed the title Add ems_ref method to ConversionHost Add resource ems_ref to virt-v2v options hash Oct 16, 2018
@agrare agrare self-assigned this Oct 16, 2018
@ghost ghost force-pushed the conversion_host_ems_ref branch from 36a8531 to dbb9fc9 Compare October 17, 2018 20:19
@ghost ghost changed the title Add resource ems_ref to virt-v2v options hash Add resource ems_ref and ip addresses to virt-v2v options hash Oct 17, 2018
@miq-bot
Copy link
Member

miq-bot commented Oct 17, 2018

This pull request is not mergeable. Please rebase and repush.

@ghost ghost force-pushed the conversion_host_ems_ref branch from dbb9fc9 to e338897 Compare October 17, 2018 21:45
@@ -8,6 +8,7 @@ class ConversionHost < ApplicationRecord
has_many :active_tasks, -> { where(:state => 'active') }, :class_name => ServiceTemplateTransformationPlanTask, :inverse_of => :conversion_host
delegate :ext_management_system, :to => :resource, :allow_nil => true
delegate :hostname, :to => :resource, :allow_nil => true
delegate :ems_ref, :to => :resource, :allow_nil => true
Copy link
Member

Choose a reason for hiding this comment

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

You can put these on the same line e.g. delegate :hostname, :ems_ref, :to => .....

Copy link
Author

Choose a reason for hiding this comment

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

Done.

@miq-bot
Copy link
Member

miq-bot commented Oct 18, 2018

Checked commits fabiendupont/manageiq@262935b~...4340b78 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
3 files checked, 0 offenses detected
Everything looks fine. 👍

@agrare agrare merged commit 88f7d2f into ManageIQ:master Oct 18, 2018
@agrare agrare added this to the Sprint 97 Ending Oct 22, 2018 milestone Oct 18, 2018
simaishi pushed a commit that referenced this pull request Oct 18, 2018
Add resource ems_ref and ip addresses to virt-v2v options hash

(cherry picked from commit 88f7d2f)

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

Hammer backport details:

$ git log -1
commit 6cadbd875be7859255b1f33f1458c6500265b767
Author: Adam Grare <agrare@redhat.com>
Date:   Thu Oct 18 13:05:28 2018 -0400

    Merge pull request #18101 from fdupont-redhat/conversion_host_ems_ref
    
    Add resource ems_ref and ip addresses to virt-v2v options hash
    
    (cherry picked from commit 88f7d2fa570422b657c7f6aa2fcb0c41a527f378)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1634029

@ghost ghost deleted the conversion_host_ems_ref branch October 19, 2018 07:07
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