[libvirt] [PATCH v2 08/15] encryption: Add luks parsing for storageencryption

Peter Krempa pkrempa at redhat.com
Fri Jun 24 13:45:15 UTC 2016


On Thu, Jun 23, 2016 at 13:29:04 -0400, John Ferlan wrote:
> Add parse and format of the luks/passphrase secret including tests for
> volume XML parsing.
> 
> Signed-off-by: John Ferlan <jferlan at redhat.com>
> ---
>  docs/formatsecret.html.in                          |  7 +++-
>  docs/formatstorageencryption.html.in               | 26 ++++++++++++-
>  docs/schemas/storagecommon.rng                     |  2 +
>  src/qemu/qemu_process.c                            |  6 +++
>  src/storage/storage_backend.c                      |  3 +-
>  src/storage/storage_backend_fs.c                   |  7 +++-
>  src/storage/storage_backend_gluster.c              |  2 +
>  src/util/virstorageencryption.c                    |  2 +-
>  src/util/virstorageencryption.h                    |  1 +
>  tests/qemuxml2argvdata/qemuxml2argv-luks-disks.xml | 41 ++++++++++++++++++++
>  .../qemuxml2xmlout-luks-disks.xml                  | 45 ++++++++++++++++++++++
>  tests/qemuxml2xmltest.c                            |  1 +
>  tests/storagevolxml2xmlin/vol-luks.xml             | 21 ++++++++++
>  tests/storagevolxml2xmlout/vol-luks.xml            | 21 ++++++++++
>  tests/storagevolxml2xmltest.c                      |  1 +
>  15 files changed, 180 insertions(+), 6 deletions(-)
>  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-luks-disks.xml
>  create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-luks-disks.xml
>  create mode 100644 tests/storagevolxml2xmlin/vol-luks.xml
>  create mode 100644 tests/storagevolxml2xmlout/vol-luks.xml

[...]

> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-luks-disks.xml b/tests/qemuxml2argvdata/qemuxml2argv-luks-disks.xml
> new file mode 100644
> index 0000000..00399cf
> --- /dev/null
> +++ b/tests/qemuxml2argvdata/qemuxml2argv-luks-disks.xml
> @@ -0,0 +1,41 @@

[...]

> diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-luks-disks.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-luks-disks.xml
> new file mode 100644
> index 0000000..9ce15c0
> --- /dev/null
> +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-luks-disks.xml

This is the diff of the above files.

$ diff -u tests/qemuxml2xmloutdata/qemuxml2xmlout-luks-disks.xml tests/qemuxml2argvdata/qemuxml2argv-luks-disks.xml
--- tests/qemuxml2xmloutdata/qemuxml2xmlout-luks-disks.xml	2016-06-24 15:37:13.215501639 +0200
+++ tests/qemuxml2argvdata/qemuxml2argv-luks-disks.xml	2016-06-24 15:37:13.215501639 +0200
@@ -32,14 +32,10 @@
       </encryption>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
     </disk>
-    <controller type='usb' index='0'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
-    </controller>
+    <controller type='usb' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
-    <memballoon model='virtio'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
-    </memballoon>
+    <memballoon model='virtio'/>
   </devices>
 </domain>

Use of a separate output file doesn't make any sense.

ACK if you get rid of tests/qemuxml2xmloutdata/qemuxml2xmlout-luks-disks.xml




More information about the libvir-list mailing list