Example #1
0
 def test_create_netinterface_with_single_vlan(self):
     xmlfile = os.path.join(XML_FILE_LOCATION, "netinterface_with_single_vlan.xml")
     tree = etree.parse(xmlfile)
     node = tree.getroot()
     iface = netinterface.create_netinterface_from_node(node, self.defaults, self.host)
     self.failUnlessEqual(len(iface.get_vlans()), 1)
     self.failUnlessEqual(iface.get_vlans()[0].number, 1453)
Example #2
0
 def test_create_netinterface_with_mtu(self):
     xmlfile = os.path.join(XML_FILE_LOCATION, "netinterface_with_mtu.xml")
     tree = etree.parse(xmlfile)
     node = tree.getroot()
     iface = netinterface.create_netinterface_from_node(node, self.defaults, self.host)
     self.failUnlessEqual(iface.mtu, 3445)
Example #3
0
 def test_create_netinterface_minimal(self):
     xmlfile = os.path.join(XML_FILE_LOCATION, "netinterface_minimal.xml")
     tree = etree.parse(xmlfile)
     node = tree.getroot()
     iface = netinterface.create_netinterface_from_node(node, self.defaults, self.host)