• J
    util: Add 'usage' for encryption · 47e88b33
    John Ferlan 提交于
    In order to use more common code and set up for a future type, modify the
    encryption secret to allow the "usage" attribute or the "uuid" attribute
    to define the secret. The "usage" in the case of a volume secret would be
    the path to the volume as dictated by the backwards compatibility brought
    on by virStorageGenerateQcowEncryption where it set up the usage field as
    the vol->target.path and didn't allow someone to provide it. This carries
    into virSecretObjListFindByUsageLocked which takes the secret usage attribute
    value from from the domain disk definition and compares it against the
    usage type from the secret definition. Since none of the code dealing
    with qcow/qcow2 encryption secrets uses usage for lookup, it's a mostly
    cosmetic change. The real usage comes in a future path where the encryption
    is expanded to be a luks volume and the secret will allow definition of
    the usage field.
    
    This code will make use of the virSecretLookup{Parse|Format}Secret common code.
    Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
    47e88b33
qemuxml2argv-encrypted-disk-usage.xml 1.3 KB