qemu: Implement VIR_MIGRATE_PARAM_TLS_DESTINATION

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
Jiri Denemark 2019-12-03 16:20:35 +01:00
parent 1b8af37213
commit c11706cc25
2 changed files with 9 additions and 1 deletions

View File

@ -83,6 +83,7 @@
VIR_MIGRATE_PARAM_AUTO_CONVERGE_INCREMENT, VIR_TYPED_PARAM_INT, \ VIR_MIGRATE_PARAM_AUTO_CONVERGE_INCREMENT, VIR_TYPED_PARAM_INT, \
VIR_MIGRATE_PARAM_BANDWIDTH_POSTCOPY, VIR_TYPED_PARAM_ULLONG, \ VIR_MIGRATE_PARAM_BANDWIDTH_POSTCOPY, VIR_TYPED_PARAM_ULLONG, \
VIR_MIGRATE_PARAM_PARALLEL_CONNECTIONS, VIR_TYPED_PARAM_INT, \ VIR_MIGRATE_PARAM_PARALLEL_CONNECTIONS, VIR_TYPED_PARAM_INT, \
VIR_MIGRATE_PARAM_TLS_DESTINATION, VIR_TYPED_PARAM_STRING, \
NULL NULL

View File

@ -197,6 +197,10 @@ static const qemuMigrationParamsTPMapItem qemuMigrationParamsTPMap[] = {
{.typedParam = VIR_MIGRATE_PARAM_PARALLEL_CONNECTIONS, {.typedParam = VIR_MIGRATE_PARAM_PARALLEL_CONNECTIONS,
.param = QEMU_MIGRATION_PARAM_MULTIFD_CHANNELS, .param = QEMU_MIGRATION_PARAM_MULTIFD_CHANNELS,
.party = QEMU_MIGRATION_SOURCE | QEMU_MIGRATION_DESTINATION}, .party = QEMU_MIGRATION_SOURCE | QEMU_MIGRATION_DESTINATION},
{.typedParam = VIR_MIGRATE_PARAM_TLS_DESTINATION,
.param = QEMU_MIGRATION_PARAM_TLS_HOSTNAME,
.party = QEMU_MIGRATION_SOURCE},
}; };
static const qemuMigrationParamType qemuMigrationParamTypes[] = { static const qemuMigrationParamType qemuMigrationParamTypes[] = {
@ -1007,7 +1011,10 @@ qemuMigrationParamsEnableTLS(virQEMUDriverPtr driver,
if (qemuMigrationParamsSetString(migParams, if (qemuMigrationParamsSetString(migParams,
QEMU_MIGRATION_PARAM_TLS_CREDS, QEMU_MIGRATION_PARAM_TLS_CREDS,
*tlsAlias) < 0 || *tlsAlias) < 0)
goto error;
if (!migParams->params[QEMU_MIGRATION_PARAM_TLS_HOSTNAME].set &&
qemuMigrationParamsSetString(migParams, qemuMigrationParamsSetString(migParams,
QEMU_MIGRATION_PARAM_TLS_HOSTNAME, QEMU_MIGRATION_PARAM_TLS_HOSTNAME,
NULLSTR_EMPTY(hostname)) < 0) NULLSTR_EMPTY(hostname)) < 0)