mirror of
https://github.com/retspen/webvirtcloud
synced 2026-12-03 17:36:05 +00:00
fix(interfaces): the interface the panel reaches its host by is kept
An interface carrying the address the panel reaches the host by, or a device in it, could be stopped, and a bridge could be built over such a device without that address; either cut the panel off the host, with only a confirmation dialog in the way. Both are refused now: a bridge over such a device must take the address, or DHCP of its family. The addresses are the ones libvirt reports for the running interface; one whose addresses netcf cannot report (a virtio card) and that leases them is kept too. A bridge dropped its device's MTU, so jumbo frames stopped; the bridge now takes it (netcf gives the bridge's MTU to its members), and a deleted bridge gives it back to its members.
This commit is contained in:
parent
de249ebad7
commit
6b92e24359
8 changed files with 186 additions and 23 deletions
|
|
@ -40,6 +40,12 @@ class DeleteInterfaceTestCase(SimpleTestCase):
|
|||
self.assertEqual(bond.xpath("start/@mode"), ["onboot"])
|
||||
self.assertEqual(bond.xpath("protocol/ip/@address"), ["192.0.2.10"])
|
||||
|
||||
def test_the_members_take_the_bridge_mtu(self):
|
||||
# the bridge held it for them: jumbo frames go on
|
||||
(eth1,) = delete("<interface type='bridge' name='br1'><start mode='onboot'/><mtu size='9000'/><bridge>"
|
||||
"<interface type='ethernet' name='eth1'/></bridge></interface>")
|
||||
self.assertEqual(eth1.xpath("mtu/@size"), ["9000"])
|
||||
|
||||
def test_several_members_take_the_start_mode(self):
|
||||
members = delete(
|
||||
"<interface type='bridge' name='br1'><start mode='onboot'/><bridge>"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue