Eric Blake b43432931a seclabel: allow a seclabel override on a disk src
Implement the parsing and formatting of the XML addition of
the previous commit.  The new XML doesn't affect qemu command
line, so we can now test round-trip XML->memory->XML handling.

I chose to reuse the existing structure, even though per-device
override doesn't use all of those fields, rather than create a
new structure, in order to reuse more code.

* src/conf/domain_conf.h (_virDomainDiskDef): Add seclabel member.
* src/conf/domain_conf.c (virDomainDiskDefFree): Free it.
(virSecurityLabelDefFree): New function.
(virDomainDiskDefFormat): Print it.
(virSecurityLabelDefFormat): Reduce output if model not present.
(virDomainDiskDefParseXML): Alter signature, and parse seclabel.
(virSecurityLabelDefParseXML): Split...
(virSecurityLabelDefParseXMLHelper): ...into new helper.
(virDomainDeviceDefParse, virDomainDefParseXML): Update callers.
* tests/qemuxml2argvdata/qemuxml2argv-seclabel-dynamic-override.args:
New file.
* tests/qemuxml2xmltest.c (mymain): Enhance test.
* tests/qemuxml2argvtest.c (mymain): Likewise.
2011-12-30 10:57:59 +08:00
..
2011-12-05 13:02:54 +01:00
2011-07-11 19:38:51 +02:00
2011-12-01 13:49:20 -07:00
2011-04-29 10:21:20 -06:00
2011-11-18 10:32:49 -07:00
2011-06-30 18:04:02 +01:00
2011-06-24 08:01:10 -06:00
2011-12-01 13:49:20 -07:00
2011-12-01 13:49:20 -07:00
2011-04-29 10:21:20 -06:00
2011-12-01 13:49:20 -07:00
2011-07-11 09:21:37 -06:00
2011-10-24 15:42:52 -06:00
2011-12-01 14:12:59 -07:00
2011-12-01 14:12:59 -07:00
2011-12-01 13:49:20 -07:00
2011-07-11 19:38:51 +02:00
2011-07-11 19:38:51 +02:00
2011-12-01 13:49:20 -07:00