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