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

Fix flavor and security group collection #18147

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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