Re: [PATCH 10/13] qemu: Add TLS params to _qemuMonitorMigrationParams

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 17, 2017 at 14:39:27 -0500, John Ferlan wrote:
> Add the fields to support setting tls-creds and tls-hostname during
> a migration (either source or target)
> 
> Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
> ---
>  src/qemu/qemu_monitor.c      | 12 +++++++++---
>  src/qemu/qemu_monitor.h      |  7 +++++++
>  src/qemu/qemu_monitor_json.c | 11 +++++++++++
>  3 files changed, 27 insertions(+), 3 deletions(-)
...
> diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h
> index 8811d85..d719112 100644
> --- a/src/qemu/qemu_monitor.h
> +++ b/src/qemu/qemu_monitor.h
> @@ -570,6 +570,13 @@ struct _qemuMonitorMigrationParams {
>  
>      bool cpuThrottleIncrement_set;
>      int cpuThrottleIncrement;
> +
> +    /* Input only for destination */

What do you mean by this comment? I think you can just safely drop it
:-)

> +    bool migrateTLSAlias_set;
> +    char *migrateTLSAlias;
> +
> +    bool migrateTLSHostname_set;
> +    char *migrateTLSHostname;

Both parameters are set-only, we never read them back from QEMU so
there's no need for the *_set booleans. Especially when NULL tells that
pretty clearly.

>  };
>  
>  int qemuMonitorGetMigrationParams(qemuMonitorPtr mon,
> diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
> index 7aa9e31..7a70366 100644
> --- a/src/qemu/qemu_monitor_json.c
> +++ b/src/qemu/qemu_monitor_json.c
> @@ -2637,6 +2637,17 @@ qemuMonitorJSONSetMigrationParams(qemuMonitorPtr mon,
>  
>  #undef APPEND
>  
> +    /* Set only parameters for TLS migration options */

Looks like another useless comment.

> +    if (params->migrateTLSAlias_set &&
> +        virJSONValueObjectAppendString(args, "tls-creds",
> +                                       params->migrateTLSAlias) < 0)
> +        goto cleanup;
> +
> +    if (params->migrateTLSHostname_set &&
> +        virJSONValueObjectAppendString(args, "tls-hostname",
> +                                       params->migrateTLSHostname) < 0)
> +        goto cleanup;
> +
>      if (virJSONValueObjectAppend(cmd, "arguments", args) < 0)
>          goto cleanup;
>      args = NULL;

Jirka

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux