On 11/26/13 19:30, Michal Privoznik wrote: > On 26.11.2013 17:48, Peter Krempa wrote: >> Automatically assign secret type from the disk source definition and >> pull in adding of the comma. Then update callers to keep generated >> output the same. >> --- >> src/qemu/qemu_command.c | 34 +++++++++++++--------------------- >> 1 file changed, 13 insertions(+), 21 deletions(-) >> >> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c >> index 36bdc15..2326221 100644 >> --- a/src/qemu/qemu_command.c >> +++ b/src/qemu/qemu_command.c
...
>> @@ -3709,20 +3707,22 @@ qemuBuildDriveURIString(virConnectPtr conn,
>>
>> virBufferAddLit(opt, "file=");
>>
>> - if (disk->auth.username && secretUsageType !=
>> VIR_SECRET_USAGE_TYPE_NONE) {
>> + if (disk->protocol == VIR_DOMAIN_DISK_PROTOCOL_ISCSI &&
>> + disk->auth.username) {
>> /* Get the secret string using the virDomainDiskDef */
>> if (!(secret = qemuGetSecretString(conn,
>> -
>> virDomainDiskProtocolTypeToString(protocol),
>> +
>> virDomainDiskProtocolTypeToString(disk->protocol),
>> false,
>> disk->auth.secretType,
>> disk->auth.username,
>> disk->auth.secret.uuid,
>> disk->auth.secret.usage,
>> - secretUsageType)))
>> + VIR_SECRET_USAGE_TYPE_ISCSI)))
>
> I know we were currently using this only for _ISCSI, but when touching
> this how about making it more robust and choosing the correct
> VIR_SECRET_USAGE_TYPE_ here? The @disk is passed anyway so the decision
> can be made here.
Well it is "choosing the correct type" right now technically :). See
patch 10/27 where I move RBD stuff here too that will do exactly what
you are asking here :)
>>
....
>
> Weak ACK due to comment above.
>
> Michal
>
PEter
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/libvir-list
