Re: [PATCH v2 04/14] conf: Move auth formatting to disk source

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 15, 2017 at 20:30:07 -0400, John Ferlan wrote:
> Alter the output of the formatting to be a child of the disk's source
> rather than a child of the disk.

I don't think we can do this unconditionally. Apps which use
<auth> and parse the XML will break.

NACK to this approach. You need to remember that <auth> was part of the
disk and use it that way. (only for the top level image obviously, also
the snapshot operation needs to clear that flag, since it would change
if you merge the top layer snapshot back according to whether libvirtd
was restarted or not)

> 
> Update the various test outputs for existing disk tests to conform to
> the new view.
> 
> Add tests to validate that if the <auth> was found in <source>, then
> the resulting xml2xml and xml2arg works just fine.  The two new .args
> file are exact copies of the non "-source" version of the file.
> 
> Update the virstoragetest to handle that the <auth> output will now be
> part of the <source> stanza in the rbd output.
> 
> Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
> ---
>  docs/formatdomain.html.in                          | 68 +++++++++++++---------
>  src/conf/domain_conf.c                             | 15 +++--
>  .../qemuargv2xml-disk-drive-network-iscsi-auth.xml |  6 +-
>  .../qemuargv2xml-disk-drive-network-rbd-auth.xml   |  6 +-
>  ...2argv-disk-drive-network-iscsi-source-auth.args | 31 ++++++++++
>  ...ml2argv-disk-drive-network-rbd-source-auth.args | 29 +++++++++
>  tests/qemuxml2argvtest.c                           |  2 +
>  .../qemuxml2xmlout-disk-backing-chains-active.xml  |  6 +-
>  ...qemuxml2xmlout-disk-backing-chains-inactive.xml |  6 +-
>  ...emuxml2xmlout-disk-drive-network-iscsi-auth.xml | 12 ++--
>  ...xmlout-disk-drive-network-iscsi-source-auth.xml | 47 +++++++++++++++
>  .../qemuxml2xmlout-disk-drive-network-rbd-auth.xml |  6 +-
>  ...l2xmlout-disk-drive-network-rbd-source-auth.xml | 47 +++++++++++++++
>  .../qemuxml2xmlout-disk-source-pool-mode.xml       |  3 -
>  tests/qemuxml2xmltest.c                            |  2 +
>  tests/virstoragetest.c                             |  6 ++
>  16 files changed, 235 insertions(+), 57 deletions(-)
>  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi-source-auth.args
>  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-source-auth.args
>  create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-drive-network-iscsi-source-auth.xml
>  create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-drive-network-rbd-source-auth.xml

[...]

> diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-auth.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-auth.xml
> index 3f30296c0..e1326b925 100644
> --- a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-auth.xml
> +++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-auth.xml
> @@ -22,13 +22,13 @@
>      </disk>
>      <disk type='network' device='disk'>
>        <driver name='qemu' type='raw'/>
> -      <auth username='myname'>
> -        <secret type='ceph' usage='qemuargv2xml_usage'/>
> -      </auth>
>        <source protocol='rbd' name='pool/image'>
>          <host name='mon1.example.org' port='6321'/>
>          <host name='mon2.example.org' port='6322'/>
>          <host name='mon3.example.org' port='6322'/>
> +        <auth username='myname'>
> +          <secret type='ceph' usage='qemuargv2xml_usage'/>
> +        </auth>
>        </source>
>        <target dev='vda' bus='virtio'/>
>        <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>

So the files from the previous patch I was complaining about apparently
belong here.

Attachment: signature.asc
Description: PGP signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux