On Tue, Jun 14, 2011 at 11:37:32AM +0200, Michal Novotny wrote: > On 06/14/2011 09:28 AM, Daniel Veillard wrote: > > On Mon, Jun 13, 2011 at 06:55:02PM +0200, Michal Novotny wrote: > >> This commit introduces the <dns> element and <txt> record for the virtual DNS > >> network. The DNS TXT record can be defined using following syntax in the > >> network XML file: > >> > >> <dns> > >> <txt name="example" value="example value" /> > >> </dns> > >> > >> Signed-off-by: Michal Novotny <minovotn@xxxxxxxxxx> > >> --- > >> docs/formatnetwork.html.in | 19 ++++ > >> docs/schemas/network.rng | 13 +++ > >> src/conf/network_conf.c | 97 ++++++++++++++++++++ > >> src/conf/network_conf.h | 16 +++ > >> src/network/bridge_driver.c | 21 ++++- > >> .../nat-network-dns-txt-record.xml | 24 +++++ > >> .../nat-network-dns-txt-record.xml | 24 +++++ > >> tests/networkxml2xmltest.c | 1 + > >> 8 files changed, 214 insertions(+), 1 deletions(-) > >> create mode 100644 tests/networkxml2xmlin/nat-network-dns-txt-record.xml > >> create mode 100644 tests/networkxml2xmlout/nat-network-dns-txt-record.xml > >> > > [...] > >> diff --git a/docs/schemas/network.rng b/docs/schemas/network.rng > >> index 6d01b06..3780af5 100644 > >> --- a/docs/schemas/network.rng > >> +++ b/docs/schemas/network.rng > >> @@ -87,6 +87,19 @@ > >> </element> > >> </optional> > >> > >> + <!-- Define the DNS related elements like TXT records > >> + and other features in the <dns> element --> > >> + <optional> > >> + <element name="dns"> > >> + <zeroOrMore> > >> + <element name="txt"> > >> + <attribute name="name"><text/></attribute> > > Hum, we should probably restrict the name attribute value space to > > something like [a-zA-Z0-9-] , spaces are definitely forbidden here. > > Yes, that's right. We should forbid spaces there. and limit to ascii alphanumeric for name records I suggest to incorporate the following: diff --git a/docs/schemas/network.rng b/docs/schemas/network.rng index 3780af5..c49f679 100644 --- a/docs/schemas/network.rng +++ b/docs/schemas/network.rng @@ -93,7 +93,7 @@ <element name="dns"> <zeroOrMore> <element name="txt"> - <attribute name="name"><text/></attribute> + <attribute name="name"><ref name="dns-name"/></attribute> <attribute name="value"><text/></attribute> </element> </zeroOrMore> @@ -196,4 +196,10 @@ </data> </define> + <define name='dns-name'> + <data type='string'> + <param name="pattern">[a-zA-Z0-9-]{1,64}</param> + </data> + </define> + </grammar> -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@xxxxxxxxxxxx | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list