[libvirt] [PATCH v2 07/14] conf: Add/Allow parsing the encryption in the disk source

Peter Krempa pkrempa at redhat.com
Thu Sep 21 14:33:54 UTC 2017


On Fri, Sep 15, 2017 at 20:30:10 -0400, John Ferlan wrote:
> Since the virStorageEncryptionPtr encryption; is a member of
>  _virStorageSource it really should be allowed to be a subelement
> of the disk <source> for various disk formats:
> 
>    Source{File|Dir|Block|Volume}
>    SourceProtocol{RBD|ISCSI|NBD|Gluster|Simple|HTTP}
> 
> NB: Simple includes sheepdog, ftp, ftps, tftp
> 
> That way we can set up to allow the <encryption> element to be
> formatted within the disk source.
> 
> For now just allow the format in the RNG and read it in domain_conf.
> 
> Modify the qemuxml2argvtest to add a parse failure when there is an
> <encryption> as a child of <disk> *and* an <encryption> as a child
> of <source>.
> 
> The virschematest will read the new test files and validate from a
> RNG viewpoint things are fine. The luks-disks-source file has various
> formats to test, but not all valid/invalid.
> 
> Signed-off-by: John Ferlan <jferlan at redhat.com>
> ---
>  docs/schemas/domaincommon.rng                      | 30 ++++++++
>  src/conf/domain_conf.c                             | 56 +++++++++++++--
>  .../qemuxml2argv-luks-disks-source-both.xml        | 40 +++++++++++
>  .../qemuxml2argv-luks-disks-source.xml             | 81 ++++++++++++++++++++++
>  tests/qemuxml2argvtest.c                           |  1 +
>  5 files changed, 202 insertions(+), 6 deletions(-)
>  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-luks-disks-source-both.xml
>  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-luks-disks-source.xml

Some comments from 2/* can be applied.

ACK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170921/644ee799/attachment-0001.sig>


More information about the libvir-list mailing list