Re: [PATCH v5 2/5] qemu: Create a common qemuGetSecretString

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

 



On 07/22/2013 10:31 PM, John Ferlan wrote:
> Make the secret fetching code common for qemuBuildRBDString() and
> qemuBuildDriveURIString() using the virDomainDiskDef.
> ---
>  src/qemu/qemu_command.c | 157 +++++++++++++++++++++++++-----------------------
>  1 file changed, 81 insertions(+), 76 deletions(-)
> 
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index 4a49d81..5bd8e87 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
> @@ -2478,47 +2531,23 @@ qemuBuildRBDString(virConnectPtr conn,
>  
>      virBufferEscape(opt, ',', ",", "rbd:%s", disk->src);
>      if (disk->auth.username) {
> +
>          virBufferEscape(opt, '\\', ":", ":id=%s", disk->auth.username);
> -        /* look up secret */
> -        switch (disk->auth.secretType) {
> -        case VIR_DOMAIN_DISK_SECRET_TYPE_UUID:
> -            sec = virSecretLookupByUUID(conn,
> -                                        disk->auth.secret.uuid);
> -            break;
> -        case VIR_DOMAIN_DISK_SECRET_TYPE_USAGE:
> -            sec = virSecretLookupByUsage(conn,
> -                                         VIR_SECRET_USAGE_TYPE_CEPH,
> -                                         disk->auth.secret.usage);
> -            break;
> -        }
> +        /* Get the secret string using the virDomainDiskDef 

trailing whitespace                                           ^

ACK

Jan

--
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]