[libvirt] [PATCH v4 1/5] Add TXT record support for virtual DNS service

Michal Novotny minovotn at redhat.com
Tue Jun 14 09:37:32 UTC 2011


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 at redhat.com>
>> ---
>>  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.

Michal

-- 
Michal Novotny <minovotn at redhat.com>, RHCE
Virtualization Team (xen userspace), Red Hat




More information about the libvir-list mailing list