[libvirt] [PATCH 0/2] a couple of schema fixes

Nikolay Shirokovskiy (2): schema: add missed alias element to memory device schema: fix resolved interfaces of network type docs/schemas/domaincommon.rng | 43 +++++++++++++++++++++++++++++++++--------- docs/schemas/network.rng | 5 +---- docs/schemas/networkcommon.rng | 6 ++++++ 3 files changed, 41 insertions(+), 13 deletions(-) -- 1.8.3.1

--- docs/schemas/domaincommon.rng | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 741f268..eb78187 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -4681,6 +4681,9 @@ <optional> <ref name="address"/> </optional> + <optional> + <ref name="alias"/> + </optional> </interleave> </element> </define> -- 1.8.3.1

On Wed, Jul 20, 2016 at 03:11:45PM +0300, Nikolay Shirokovskiy wrote:
--- docs/schemas/domaincommon.rng | 3 +++ 1 file changed, 3 insertions(+)
ACK Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

This patch reflects cases when <interface> element and its <source> subelement for network type are formated based on actual type resolved from referenced network instead of original one. networkAllocateActualDevice and virDomainActualNetDefContentsFormat are taken as reference. --- docs/schemas/domaincommon.rng | 40 +++++++++++++++++++++++++++++++--------- docs/schemas/network.rng | 5 +---- docs/schemas/networkcommon.rng | 6 ++++++ 3 files changed, 38 insertions(+), 13 deletions(-) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index eb78187..ac9fd21 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -2107,6 +2107,28 @@ </element> </define> + <define name="interface-network-attributes"> + <attribute name="network"> + <text/> + </attribute> + <optional> + <attribute name="portgroup"> + <ref name="deviceName"/> + </attribute> + </optional> + </define> + + <define name="interface-bridge-attributes"> + <attribute name="bridge"> + <ref name="deviceName"/> + </attribute> + <optional> + <attribute name="macTableManager"> + <ref name="macTableManager"/> + </attribute> + </optional> + </define> + <!-- An interface description can either be of type bridge in which case it will use a bridging source, or of type ethernet which uses a device @@ -2123,9 +2145,10 @@ <interleave> <optional> <element name="source"> - <attribute name="bridge"> - <ref name="deviceName"/> - </attribute> + <ref name="interface-bridge-attributes"/> + <optional> + <ref name="interface-network-attributes"/> + </optional> <empty/> </element> </optional> @@ -2179,13 +2202,9 @@ </attribute> <interleave> <element name="source"> - <attribute name="network"> - <text/> - </attribute> + <ref name='interface-network-attributes'/> <optional> - <attribute name="portgroup"> - <ref name="deviceName"/> - </attribute> + <ref name="interface-bridge-attributes"/> </optional> <empty/> </element> @@ -2209,6 +2228,9 @@ <ref name="bridgeMode"/> </attribute> </optional> + <optional> + <ref name='interface-network-attributes'/> + </optional> <empty/> </element> <optional> diff --git a/docs/schemas/network.rng b/docs/schemas/network.rng index b67a5ea..c2c51ae 100644 --- a/docs/schemas/network.rng +++ b/docs/schemas/network.rng @@ -72,10 +72,7 @@ <optional> <attribute name="macTableManager"> - <choice> - <value>kernel</value> - <value>libvirt</value> - </choice> + <ref name="macTableManager"/> </attribute> </optional> diff --git a/docs/schemas/networkcommon.rng b/docs/schemas/networkcommon.rng index fb69f7c..a334b83 100644 --- a/docs/schemas/networkcommon.rng +++ b/docs/schemas/networkcommon.rng @@ -260,4 +260,10 @@ </optional> </element> </define> + <define name="macTableManager"> + <choice> + <value>kernel</value> + <value>libvirt</value> + </choice> + </define> </grammar> -- 1.8.3.1

On Wed, Jul 20, 2016 at 03:11:46PM +0300, Nikolay Shirokovskiy wrote:
This patch reflects cases when <interface> element and its <source> subelement for network type are formated based on actual type resolved from referenced network instead of original one. networkAllocateActualDevice and virDomainActualNetDefContentsFormat are taken as reference. --- docs/schemas/domaincommon.rng | 40 +++++++++++++++++++++++++++++++--------- docs/schemas/network.rng | 5 +---- docs/schemas/networkcommon.rng | 6 ++++++ 3 files changed, 38 insertions(+), 13 deletions(-)
ACK Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On Wed, Jul 20, 2016 at 03:11:44PM +0300, Nikolay Shirokovskiy wrote:
Nikolay Shirokovskiy (2): schema: add missed alias element to memory device schema: fix resolved interfaces of network type
docs/schemas/domaincommon.rng | 43 +++++++++++++++++++++++++++++++++--------- docs/schemas/network.rng | 5 +---- docs/schemas/networkcommon.rng | 6 ++++++ 3 files changed, 41 insertions(+), 13 deletions(-)
Now pushed Jan
participants (3)
-
Daniel P. Berrange
-
Ján Tomko
-
Nikolay Shirokovskiy