Skip to content

Commit

Permalink
Merge pull request #18143 from fdupont-redhat/v2v_fix_openstack_migra…
Browse files Browse the repository at this point in the history
…tion

Fix OpenStack virt-v2v-wrapper options hash
  • Loading branch information
agrare committed Nov 7, 2018
2 parents 2c598d7 + 84805c9 commit 69f83f0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 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 @@ -290,12 +290,12 @@ def conversion_options_destination_provider_openstack(cluster, storage)
:host => destination_ems.hostname,
:port => destination_ems.port,
:path => '/' + destination_ems.api_version
),
).to_s,
:os_identity_api_version => '3',
:os_user_domain_name => destination_ems.uid_ems,
:os_username => destination_ems.authentication_userid,
:os_password => destination_ems.authentication_password,
:os_project_name => cluster.name
:os_project_name => conversion_host.resource.cloud_tenant.name
},
:osp_server_id => conversion_host.ems_ref,
:osp_destination_project_id => cluster.ems_ref,
Expand Down
10 changes: 6 additions & 4 deletions spec/models/service_template_transformation_plan_task_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -509,11 +509,13 @@

context 'destination is openstack' do
let(:dst_ems) { FactoryGirl.create(:ems_openstack, :api_version => 'v3', :zone => FactoryGirl.create(:zone)) }
let(:dst_cloud_tenant) { FactoryGirl.create(:cloud_tenant, :ext_management_system => dst_ems) }
let(:dst_cloud_tenant) { FactoryGirl.create(:cloud_tenant, :name => 'fake tenant', :ext_management_system => dst_ems) }
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(:conversion_host_vm) { FactoryGirl.create(:vm, :ext_management_system => dst_ems) }
let(:dst_flavor) { FactoryGirl.create(:flavor) }
let(:dst_security_group) { FactoryGirl.create(:security_group) }
let(:conversion_host_vm) { FactoryGirl.create(:vm_openstack, :ext_management_system => dst_ems, :cloud_tenant => dst_cloud_tenant) }
let(:conversion_host) { FactoryGirl.create(:conversion_host, :resource => conversion_host_vm) }

let(:mapping) do
Expand Down Expand Up @@ -563,7 +565,7 @@
:host => dst_ems.hostname,
:port => dst_ems.port,
:path => '/v3'
),
).to_s,
:os_identity_api_version => '3',
:os_user_domain_name => dst_ems.uid_ems,
:os_username => dst_ems.authentication_userid,
Expand Down Expand Up @@ -597,7 +599,7 @@
:host => dst_ems.hostname,
:port => dst_ems.port,
:path => '/v3'
),
).to_s,
:os_identity_api_version => '3',
:os_user_domain_name => dst_ems.uid_ems,
:os_username => dst_ems.authentication_userid,
Expand Down

0 comments on commit 69f83f0

Please sign in to comment.