mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 19:11:16 +00:00
schemas: add schema for nwfilter binding XML document
Reviewed-by: John Ferlan <jferlan@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
17b1ebf4ec
commit
41d619e99c
@ -5,6 +5,7 @@
|
|||||||
<include href='storagecommon.rng'/>
|
<include href='storagecommon.rng'/>
|
||||||
<include href='networkcommon.rng'/>
|
<include href='networkcommon.rng'/>
|
||||||
<include href='cputypes.rng'/>
|
<include href='cputypes.rng'/>
|
||||||
|
<include href='nwfilter_params.rng'/>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
description and title element, may be placed anywhere under the root
|
description and title element, may be placed anywhere under the root
|
||||||
@ -5407,22 +5408,6 @@
|
|||||||
</element>
|
</element>
|
||||||
</define>
|
</define>
|
||||||
|
|
||||||
<define name="filterref-node-attributes">
|
|
||||||
<attribute name="filter">
|
|
||||||
<data type="NCName"/>
|
|
||||||
</attribute>
|
|
||||||
<zeroOrMore>
|
|
||||||
<element name="parameter">
|
|
||||||
<attribute name="name">
|
|
||||||
<ref name="filter-param-name"/>
|
|
||||||
</attribute>
|
|
||||||
<attribute name="value">
|
|
||||||
<ref name="filter-param-value"/>
|
|
||||||
</attribute>
|
|
||||||
</element>
|
|
||||||
</zeroOrMore>
|
|
||||||
</define>
|
|
||||||
|
|
||||||
<define name="deviceBoot">
|
<define name="deviceBoot">
|
||||||
<element name="boot">
|
<element name="boot">
|
||||||
<attribute name="order">
|
<attribute name="order">
|
||||||
@ -6149,16 +6134,6 @@
|
|||||||
<param name="pattern">[a-zA-Z0-9_\.\+\-/]+</param>
|
<param name="pattern">[a-zA-Z0-9_\.\+\-/]+</param>
|
||||||
</data>
|
</data>
|
||||||
</define>
|
</define>
|
||||||
<define name="filter-param-name">
|
|
||||||
<data type="string">
|
|
||||||
<param name="pattern">[a-zA-Z0-9_]+</param>
|
|
||||||
</data>
|
|
||||||
</define>
|
|
||||||
<define name="filter-param-value">
|
|
||||||
<data type="string">
|
|
||||||
<param name="pattern">[a-zA-Z0-9_\.:]+</param>
|
|
||||||
</data>
|
|
||||||
</define>
|
|
||||||
<define name="spaprvioReg">
|
<define name="spaprvioReg">
|
||||||
<data type="string">
|
<data type="string">
|
||||||
<param name="pattern">(0x)?[0-9a-fA-F]{1,16}</param>
|
<param name="pattern">(0x)?[0-9a-fA-F]{1,16}</param>
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<grammar ns="" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
<grammar ns="" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
||||||
<include href='basictypes.rng'/>
|
<include href='basictypes.rng'/>
|
||||||
|
<include href='nwfilter_params.rng'/>
|
||||||
<start>
|
<start>
|
||||||
<ref name="filter"/>
|
<ref name="filter"/>
|
||||||
</start>
|
</start>
|
||||||
@ -246,22 +247,6 @@
|
|||||||
</optional>
|
</optional>
|
||||||
</define>
|
</define>
|
||||||
|
|
||||||
<define name="filterref-node-attributes">
|
|
||||||
<attribute name="filter">
|
|
||||||
<data type="NCName"/>
|
|
||||||
</attribute>
|
|
||||||
<zeroOrMore>
|
|
||||||
<element name="parameter">
|
|
||||||
<attribute name="name">
|
|
||||||
<ref name="filter-param-name"/>
|
|
||||||
</attribute>
|
|
||||||
<attribute name="value">
|
|
||||||
<ref name="filter-param-value"/>
|
|
||||||
</attribute>
|
|
||||||
</element>
|
|
||||||
</zeroOrMore>
|
|
||||||
</define>
|
|
||||||
|
|
||||||
<define name="rule-node-attributes">
|
<define name="rule-node-attributes">
|
||||||
<attribute name="action">
|
<attribute name="action">
|
||||||
<ref name='action-type'/>
|
<ref name='action-type'/>
|
||||||
@ -938,18 +923,6 @@
|
|||||||
</choice>
|
</choice>
|
||||||
</define>
|
</define>
|
||||||
|
|
||||||
<define name="filter-param-name">
|
|
||||||
<data type="string">
|
|
||||||
<param name="pattern">[a-zA-Z0-9_]+</param>
|
|
||||||
</data>
|
|
||||||
</define>
|
|
||||||
|
|
||||||
<define name="filter-param-value">
|
|
||||||
<data type="string">
|
|
||||||
<param name="pattern">[a-zA-Z0-9_\.:]+</param>
|
|
||||||
</data>
|
|
||||||
</define>
|
|
||||||
|
|
||||||
<define name='action-type'>
|
<define name='action-type'>
|
||||||
<choice>
|
<choice>
|
||||||
<value>drop</value>
|
<value>drop</value>
|
||||||
|
32
docs/schemas/nwfilter_params.rng
Normal file
32
docs/schemas/nwfilter_params.rng
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<!-- network-related definitions used in multiple grammars -->
|
||||||
|
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
||||||
|
|
||||||
|
<define name="filterref-node-attributes">
|
||||||
|
<attribute name="filter">
|
||||||
|
<data type="NCName"/>
|
||||||
|
</attribute>
|
||||||
|
<zeroOrMore>
|
||||||
|
<element name="parameter">
|
||||||
|
<attribute name="name">
|
||||||
|
<ref name="filter-param-name"/>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="value">
|
||||||
|
<ref name="filter-param-value"/>
|
||||||
|
</attribute>
|
||||||
|
</element>
|
||||||
|
</zeroOrMore>
|
||||||
|
</define>
|
||||||
|
|
||||||
|
<define name="filter-param-name">
|
||||||
|
<data type="string">
|
||||||
|
<param name="pattern">[a-zA-Z0-9_]+</param>
|
||||||
|
</data>
|
||||||
|
</define>
|
||||||
|
<define name="filter-param-value">
|
||||||
|
<data type="string">
|
||||||
|
<param name="pattern">[a-zA-Z0-9_\.:]+</param>
|
||||||
|
</data>
|
||||||
|
</define>
|
||||||
|
|
||||||
|
</grammar>
|
49
docs/schemas/nwfilterbinding.rng
Normal file
49
docs/schemas/nwfilterbinding.rng
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
||||||
|
<!-- domain-related definitions used in multiple grammars -->
|
||||||
|
<include href='basictypes.rng'/>
|
||||||
|
<include href='nwfilter_params.rng'/>
|
||||||
|
|
||||||
|
<start>
|
||||||
|
<ref name="filterbinding"/>
|
||||||
|
</start>
|
||||||
|
|
||||||
|
<define name="filterbinding">
|
||||||
|
<element name="filterbinding">
|
||||||
|
<interleave>
|
||||||
|
<element name="owner">
|
||||||
|
<element name="name">
|
||||||
|
<text/>
|
||||||
|
</element>
|
||||||
|
<element name="uuid">
|
||||||
|
<ref name="UUID"/>
|
||||||
|
</element>
|
||||||
|
</element>
|
||||||
|
|
||||||
|
<element name="portdev">
|
||||||
|
<attribute name="name"/>
|
||||||
|
<empty/>
|
||||||
|
</element>
|
||||||
|
|
||||||
|
<optional>
|
||||||
|
<element name="linkdev">
|
||||||
|
<attribute name="name"/>
|
||||||
|
<empty/>
|
||||||
|
</element>
|
||||||
|
</optional>
|
||||||
|
|
||||||
|
<element name="mac">
|
||||||
|
<attribute name="address">
|
||||||
|
<ref name="uniMacAddr"/>
|
||||||
|
</attribute>
|
||||||
|
<empty/>
|
||||||
|
</element>
|
||||||
|
|
||||||
|
<element name="filterref">
|
||||||
|
<ref name="filterref-node-attributes"/>
|
||||||
|
</element>
|
||||||
|
</interleave>
|
||||||
|
</element>
|
||||||
|
</define>
|
||||||
|
|
||||||
|
</grammar>
|
@ -230,6 +230,7 @@ mymain(void)
|
|||||||
"networkxml2xmlout", "networkxml2confdata");
|
"networkxml2xmlout", "networkxml2confdata");
|
||||||
DO_TEST_DIR("nodedev.rng", "nodedevschemadata");
|
DO_TEST_DIR("nodedev.rng", "nodedevschemadata");
|
||||||
DO_TEST_DIR("nwfilter.rng", "nwfilterxml2xmlout", "../examples/xml/nwfilter");
|
DO_TEST_DIR("nwfilter.rng", "nwfilterxml2xmlout", "../examples/xml/nwfilter");
|
||||||
|
DO_TEST_DIR("nwfilterbinding.rng", "virnwfilterbindingxml2xmldata");
|
||||||
DO_TEST_DIR("secret.rng", "secretxml2xmlin");
|
DO_TEST_DIR("secret.rng", "secretxml2xmlin");
|
||||||
DO_TEST_DIR("storagepool.rng", "storagepoolxml2xmlin", "storagepoolxml2xmlout",
|
DO_TEST_DIR("storagepool.rng", "storagepoolxml2xmlin", "storagepoolxml2xmlout",
|
||||||
"storagepoolschemadata");
|
"storagepoolschemadata");
|
||||||
|
Loading…
Reference in New Issue
Block a user