On Mon, Jul 10, 2017 at 11:15:14AM +0200, Thomas Hipp wrote:
Add support for QEMU, and add test code.
Signed-off-by: Thomas Hipp <thipp(a)suse.de>
+ Expected: []string{
+ `<domain xmlns:_xmlns="xmlns"
_xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0"
type="qemu">`,
This is very wrong - 'xmlns:_xmlns="xmlns"' is just bizarre, and
you can't have an '_' on the xmlns declaration.
+ ` <name>test</name>`,
+ ` <commandline xmlns="qemu">`,
This is wrong too - if you want to reference the name of a previously
declared namespace you need "qemu:commandline". What you're doing
here is declaring a new default namespace with a uri of 'qemu'
+ ` <arg xmlns="qemu"
value="-newarg"></arg>`,
+ ` <arg xmlns="qemu" value="-oldarg"></arg>`,
+ ` <env xmlns="qemu" name="QEMU_ENV"
value="VAL"></env>`,
+ ` <env xmlns="qemu" name="QEMU_VAR"
value="VAR"></env>`,
+ ` </commandline>`,
+ `</domain>`,
The following ought to work
<commandline
xmlns="http://libvirt.org/schemas/domain/qemu/1.0">
<arg xmlns="qemu" value="-newarg"></arg>
<env xmlns="qemu" name="QEMU_ENV"
value="VAL"></env>
</commandline>
...but libvirt rejects it for reasons I don't understand :-( It seems we
really must have
<qemu:commandline
xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0">
<qemu:arg xmlns="qemu" value="-newarg"></arg>
<qemu:env xmlns="qemu" name="QEMU_ENV"
value="VAL"></env>
</qemu:commandline>
but I don't see how to generate this in Go XML
Regards,
Daniel
--
|:
https://berrange.com -o-
https://www.flickr.com/photos/dberrange :|
|:
https://libvirt.org -o-
https://fstop138.berrange.com :|
|:
https://entangle-photo.org -o-
https://www.instagram.com/dberrange :|