Skip to content

Commit

Permalink
Merge pull request #18147 from fdupont-redhat/v2v_fix_options_hash_fo…
Browse files Browse the repository at this point in the history
…r_openstack

Fix flavor and security group collection
  • Loading branch information
agrare authored Oct 31, 2018
2 parents 724d1e7 + cffa701 commit 478c596
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/models/service_template_transformation_plan_task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ def destination_network_ref_openstack(network)
end

def destination_flavor
Flavor.find_by(:id => miq_request.source.options[:config_info][:osp_flavor])
Flavor.find_by(:id => vm_resource.options["osp_flavor_id"])
end

def destination_security_group
SecurityGroup.find_by(:id => miq_request.source.options[:config_info][:osp_security_group])
SecurityGroup.find_by(:id => vm_resource.options["osp_security_group_id"])
end

def transformation_log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,8 @@
:transformation_mapping_id => mapping.id,
:pre_service_id => apst.id,
:post_service_id => apst.id,
:osp_flavor => dst_flavor.id,
:osp_security_group => dst_security_group.id,
:actions => [
{:vm_id => src_vm_1.id.to_s, :pre_service => true, :post_service => true},
{:vm_id => src_vm_1.id.to_s, :pre_service => true, :post_service => true, :osp_flavor_id => dst_flavor.id, :osp_security_group_id => dst_security_group.id},
{:vm_id => src_vm_2.id.to_s, :pre_service => false, :post_service => false},
],
}
Expand Down Expand Up @@ -515,8 +513,6 @@
let(:dst_cloud_volume_type) { FactoryGirl.create(:cloud_volume_type) }
let(:dst_cloud_network_1) { FactoryGirl.create(:cloud_network) }
let(:dst_cloud_network_2) { FactoryGirl.create(:cloud_network) }
let(:dst_flavor) { FactoryGirl.create(:flavor) }
let(:dst_security_group) { FactoryGirl.create(:security_group) }
let(:conversion_host_vm) { FactoryGirl.create(:vm, :ext_management_system => dst_ems) }
let(:conversion_host) { FactoryGirl.create(:conversion_host, :resource => conversion_host_vm) }

Expand Down

0 comments on commit 478c596

Please sign in to comment.