From 0323fcfbf723d169c7b89a7a47380484fe49a73b Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Mon, 23 Sep 2013 09:10:43 -0400 Subject: [PATCH] network: Fix parsing route netmask --- tests/testdriver.xml | 11 +++++++++++ tests/xmlparse.py | 2 ++ virtinst/network.py | 1 + 3 files changed, 14 insertions(+) diff --git a/tests/testdriver.xml b/tests/testdriver.xml index 444391da9..fd9b827a1 100644 --- a/tests/testdriver.xml +++ b/tests/testdriver.xml @@ -698,6 +698,17 @@ + + ipv6route + + + + + + + + + diff --git a/tests/xmlparse.py b/tests/xmlparse.py index 4cae880ca..ac787c113 100644 --- a/tests/xmlparse.py +++ b/tests/xmlparse.py @@ -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") diff --git a/virtinst/network.py b/virtinst/network.py index 7929ab903..60ee1a367 100644 --- a/virtinst/network.py +++ b/virtinst/network.py @@ -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):