[libvirt] [PATCHv2 2/7] Move network route definition to networkcommon.rng

Michal Privoznik mprivozn at redhat.com
Thu Jan 15 12:27:01 UTC 2015


On 15.01.2015 13:11, Cedric Bosdonnat wrote:
> On Thu, 2015-01-15 at 11:58 +0100, Michal Privoznik wrote:
>> On 15.01.2015 10:25, Cédric Bosdonnat wrote:
>>> Moving network route to the network common schema will allow reusing it.
>>> ---
>>>  docs/schemas/network.rng       | 20 +-------------------
>>>  docs/schemas/networkcommon.rng | 22 ++++++++++++++++++++++
>>>  2 files changed, 23 insertions(+), 19 deletions(-)
>>>
>>> diff --git a/docs/schemas/network.rng b/docs/schemas/network.rng
>>> index 9a7d156..63d81c1 100644
>>> --- a/docs/schemas/network.rng
>>> +++ b/docs/schemas/network.rng
>>> @@ -371,25 +371,7 @@
>>>          </zeroOrMore>
>>>          <!-- <route> element -->
>>>          <zeroOrMore>
>>> -          <!-- The (static) route element specifies a network address and gateway
>>> -               address to access that network. Both the network address and
>>> -               the gateway address must be specified. -->
>>> -          <element name="route">
>>> -            <optional>
>>> -              <attribute name="family"><ref name="addr-family"/></attribute>
>>> -            </optional>
>>> -            <attribute name="address"><ref name="ipAddr"/></attribute>
>>> -            <optional>
>>> -              <choice>
>>> -                <attribute name="netmask"><ref name="ipv4Addr"/></attribute>
>>> -                <attribute name="prefix"><ref name="ipPrefix"/></attribute>
>>> -              </choice>
>>> -            </optional>
>>> -            <attribute name="gateway"><ref name="ipAddr"/></attribute>
>>> -            <optional>
>>> -              <attribute name="metric"><ref name="unsignedInt"/></attribute>
>>> -            </optional>
>>> -          </element>
>>> +          <ref name="routex"/>
>>>          </zeroOrMore>
>>>        </interleave>
>>>      </element>
>>> diff --git a/docs/schemas/networkcommon.rng b/docs/schemas/networkcommon.rng
>>> index e26b7f3..cbcae91 100644
>>> --- a/docs/schemas/networkcommon.rng
>>> +++ b/docs/schemas/networkcommon.rng
>>> @@ -224,4 +224,26 @@
>>>        <param name='maxInclusive'>65535</param>
>>>      </data>
>>>    </define>
>>> +
>>> +  <!-- The (static) route element specifies a network address and gateway
>>> +       address to access that network. Both the network address and
>>> +       the gateway address must be specified. -->
>>> +  <define name='routex'>
>>
>> routex? That's an odd name. However, looking into the future at 4/7 I
>> can see why yo need to do it this way.
> 
> Such a name was proposed by Laine to avoid the definition conflict when
> moving to networkcommon.rng. May be a better name could still be
> appreciated, even for a temporary renaming.
> 

No need for that. It's just that I was curious when I first saw it.

Michal




More information about the libvir-list mailing list