network: Fix parsing route netmask
This commit is contained in:
parent
a7b1414dc5
commit
0323fcfbf7
|
@ -698,6 +698,17 @@
|
|||
</ip>
|
||||
</network>
|
||||
|
||||
<network ipv6='yes'>
|
||||
<name>ipv6route</name>
|
||||
<domain name='bar' />
|
||||
<forward mode='route' dev='eth1'/>
|
||||
<ip family='ipv6' address='fd00:db8:ac10:fd01::1' prefix='64'>
|
||||
<dhcp>
|
||||
<range start='fd00:db8:ac10:fd01::100' end='fd00:db8:ac10:fd01::1ff'/>
|
||||
</dhcp>
|
||||
</ip>
|
||||
<route family='ipv6' address='fd00:db8:ac10:fd00::' prefix='64' gateway='fd00:db8:ac10:fd01::1' />
|
||||
</network>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1041,6 +1041,8 @@ class XMLParseTest(unittest.TestCase):
|
|||
check("prefix", 64, 63)
|
||||
|
||||
net.add_route("192.168.8.0", "24", "192.168.8.10")
|
||||
check = self._make_checker(net.routes[0])
|
||||
check("netmask", None, "foo", None)
|
||||
|
||||
utils.diff_compare(net.get_xml_config(), outfile)
|
||||
utils.test_create(conn, net.get_xml_config(), "networkDefineXML")
|
||||
|
|
|
@ -62,6 +62,7 @@ class _NetworkRoute(XMLBuilder):
|
|||
address = XMLProperty("./@address")
|
||||
prefix = XMLProperty("./@prefix", is_int=True)
|
||||
gateway = XMLProperty("./@gateway")
|
||||
netmask = XMLProperty("./@netmask")
|
||||
|
||||
|
||||
class _NetworkForward(XMLBuilder):
|
||||
|
|
Loading…
Reference in New Issue