Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx> --- Changes | 1 + lib/Sys/Virt.xs | 13 +++++++++++-- lib/Sys/Virt/Domain.pm | 9 +++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/Changes b/Changes index ba33d40..09d1dca 100644 --- a/Changes +++ b/Changes @@ -8,6 +8,7 @@ Revision history for perl module Sys::Virt autoconvert increment parameter handling - Add handling for VIR_MIGRATE_PARAM_PARALLEL_CONNECTIONS constant when invoking migrate + - Add VIR_MIGRATE_PARAM_TLS_DESTINATION constant 5.10.0 2019-12-03 diff --git a/lib/Sys/Virt.xs b/lib/Sys/Virt.xs index b52ae7d..3245adf 100644 --- a/lib/Sys/Virt.xs +++ b/lib/Sys/Virt.xs @@ -5413,7 +5413,7 @@ _migrate(dom, destcon, newparams, flags=0) virTypedParameterPtr params; int nparams; CODE: - nparams = 17; + nparams = 18; Newx(params, nparams, virTypedParameter); strncpy(params[0].field, VIR_MIGRATE_PARAM_URI, @@ -5484,6 +5484,10 @@ _migrate(dom, destcon, newparams, flags=0) VIR_TYPED_PARAM_FIELD_LENGTH); params[16].type = VIR_TYPED_PARAM_INT; + strncpy(params[17].field, VIR_MIGRATE_PARAM_TLS_DESTINATION, + VIR_TYPED_PARAM_FIELD_LENGTH); + params[17].type = VIR_TYPED_PARAM_STRING; + nparams = vir_typed_param_from_hv(newparams, params, nparams); vir_typed_param_add_string_list_from_hv(newparams, ¶ms, &nparams, @@ -5512,7 +5516,7 @@ _migrate_to_uri(dom, desturi, newparams, flags=0) virTypedParameterPtr params; int nparams; PPCODE: - nparams = 17; + nparams = 18; Newx(params, nparams, virTypedParameter); strncpy(params[0].field, VIR_MIGRATE_PARAM_URI, @@ -5583,6 +5587,10 @@ _migrate_to_uri(dom, desturi, newparams, flags=0) VIR_TYPED_PARAM_FIELD_LENGTH); params[16].type = VIR_TYPED_PARAM_INT; + strncpy(params[17].field, VIR_MIGRATE_PARAM_TLS_DESTINATION, + VIR_TYPED_PARAM_FIELD_LENGTH); + params[17].type = VIR_TYPED_PARAM_STRING; + nparams = vir_typed_param_from_hv(newparams, params, nparams); vir_typed_param_add_string_list_from_hv(newparams, ¶ms, &nparams, @@ -9254,6 +9262,7 @@ BOOT: REGISTER_CONSTANT_STR(VIR_MIGRATE_PARAM_AUTO_CONVERGE_INCREMENT, MIGRATE_PARAM_AUTO_CONVERGE_INCREMENT); REGISTER_CONSTANT_STR(VIR_MIGRATE_PARAM_BANDWIDTH_POSTCOPY, MIGRATE_PARAM_BANDWIDTH_POSTCOPY); REGISTER_CONSTANT_STR(VIR_MIGRATE_PARAM_PARALLEL_CONNECTIONS, MIGRATE_PARAM_PARALLEL_CONNECTIONS); + REGISTER_CONSTANT_STR(VIR_MIGRATE_PARAM_TLS_DESTINATION, MIGRATE_PARAM_TLS_DESTINATION); REGISTER_CONSTANT(VIR_DOMAIN_MIGRATE_MAX_SPEED_POSTCOPY, MIGRATE_MAX_SPEED_POSTCOPY); diff --git a/lib/Sys/Virt/Domain.pm b/lib/Sys/Virt/Domain.pm index 2caec51..ae909de 100644 --- a/lib/Sys/Virt/Domain.pm +++ b/lib/Sys/Virt/Domain.pm @@ -1141,6 +1141,15 @@ progress is not made The number of connections used during parallel migration. +=item C<Sys::Virt::Domain::MIGRATE_PARAM_TLS_DESTINATION> + +Override the destination host name used for TLS verification. +Normally the TLS certificate from the destination host must match +the host's name for TLS verification to succeed. When the +certificate does not match the destination hostname and the +expected cetificate's hostname is known, this parameter can be +used to pass this expected hostname when starting the migration. + =back =item $ddom = $dom->migrate(destcon, flags=0, dname=undef, uri=undef, bandwidth=0) -- 2.23.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list