-
Notifications
You must be signed in to change notification settings - Fork 120
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 support for MAC address in network mapping #351
Add support for MAC address in network mapping #351
Conversation
@miq-bot add-label enhancement |
@miq-bot add-label transformation |
@fdupont-redhat To avoid creating technical debt we need to ensure that these PRs include tests. Please reach out to us if you feel you need any help with testing. |
end | ||
|
||
def storage_mappings(task, vm) | ||
vm.hardware.disks.select { |d| d.device_type == 'disk' }.each do |disk| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fdupont-redhat
Either you can replace the each with collect and remove the appending into virtv2v_disks or initialize virtv2v_disks array like you do for mapping
def storage_mappings(task, vm)
vm.hardware.disks.select { |d| d.device_type == 'disk' }.collect do |disk|
source_storage = disk.storage
destination_storage = task.transformation_destination(disk.storage)
raise "[#{vm.name}] Disk #{disk.device_name} [#{source_storage.name}] has no mapping. Aborting." if destination_storage.nil?
{
:path => disk.filename,
:size => disk.size,
:percent => 0,
:weight => disk.size.to_f / vm.allocated_disk_storage.to_f * 100
}
end
end
Checked commits fabiendupont/manageiq-content@2109027~...62aea5e with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
@miq-bot add-label gaprindashvili/yes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fdupont-redhat - Specs on this would be a huge help
Adding specs for v2v methods is being tracked in #360 |
…ddress_in_network_mapping Add support for MAC address in network mapping (cherry picked from commit a740e88) https://bugzilla.redhat.com/show_bug.cgi?id=1610547
Gaprindashvili backport details:
|
This PR is the automate side to enable support for Distributed Virtual Switch (DVS) and Distributed Port Group (DPG). The solution is to allow mapping based on the MAC address rather than the source network name. Richard W.M. Jones has implemented the
--mac
option in virt-v2v [1]. I have created a PR to add the support for this option in virt-v2v-wrapper [2]. This code simply adds the MAC address of the NICs to the network mappings hash, so that it is passed to virt-v2v-wrapper.Associated RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1594515
[1] https://www.redhat.com/archives/libguestfs/2018-July/msg00004.html
[2] oVirt/v2v-conversion-host#6