Skip to content

Commit

Permalink
Merge pull request #19787 from fdupont-redhat/v2v_rename_variable_for…
Browse files Browse the repository at this point in the history
…_tls_ca_cert

[V2V] Renaming openstack_tls_ca_cert variable
  • Loading branch information
agrare committed Jan 31, 2020
2 parents 2a8c3b8 + 19a3901 commit 25c3167
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/models/conversion_host.rb
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def check_conversion_host_role(miq_task_id = nil)
tag_resource_as('disabled')
end

def enable_conversion_host_role(vmware_vddk_package_url = nil, vmware_ssh_private_key = nil, openstack_tls_ca_certs = nil, miq_task_id = nil)
def enable_conversion_host_role(vmware_vddk_package_url = nil, vmware_ssh_private_key = nil, tls_ca_certs = nil, miq_task_id = nil)
raise "vmware_vddk_package_url is mandatory if transformation method is vddk" if vddk_transport_supported && vmware_vddk_package_url.nil?
raise "vmware_ssh_private_key is mandatory if transformation_method is ssh" if ssh_transport_supported && vmware_ssh_private_key.nil?
playbook = "/usr/share/v2v-conversion-host-ansible/playbooks/conversion_host_enable.yml"
Expand All @@ -247,7 +247,7 @@ def enable_conversion_host_role(vmware_vddk_package_url = nil, vmware_ssh_privat
:v2v_transport_method => source_transport_method,
:v2v_vddk_package_url => vmware_vddk_package_url,
:v2v_ssh_private_key => vmware_ssh_private_key,
:v2v_ca_bundle => openstack_tls_ca_certs || resource.ext_management_system.connection_configurations['default'].certificate_authority
:v2v_ca_bundle => tls_ca_certs || resource.ext_management_system.connection_configurations['default'].certificate_authority
}.compact
ansible_playbook(playbook, extra_vars, miq_task_id)
ensure
Expand Down
4 changes: 2 additions & 2 deletions app/models/conversion_host/configurations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def enable(params, auth_user = nil)

ssh_key = params.delete(:conversion_host_ssh_private_key)

openstack_tls_ca_certs = params.delete(:openstack_tls_ca_certs)
tls_ca_certs = params.delete(:tls_ca_certs)

new(params).tap do |conversion_host|
if ssh_key
Expand All @@ -87,7 +87,7 @@ def enable(params, auth_user = nil)
)
end

conversion_host.enable_conversion_host_role(vmware_vddk_package_url, vmware_ssh_private_key, openstack_tls_ca_certs, miq_task_id)
conversion_host.enable_conversion_host_role(vmware_vddk_package_url, vmware_ssh_private_key, tls_ca_certs, miq_task_id)
conversion_host.save!

if miq_task_id
Expand Down

0 comments on commit 25c3167

Please sign in to comment.