Commit 1368d75d authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼 Committed by Rafael Monnerat

CLEANUP: remove bridge support in slapos node format

The bridge was never used anymore. For KVM software release, we are using tap with their own routes (packets are routes directly through the tap device).
parent 5e7fbda4
Changes
=======
1.4.12 (???)
------------
* totally deprecate no_bridge and bridge_name options (there was a warning for a long time)
* create_tap = True won't create tap attached to bridge anymore
-> it should always be used with option tap_gateway_interface
-> if option tap_gateway_interface is not present, the tap will have a default gateway (10.0.0.1)
1.4.11 (2018-09-28)
-------------------
......
......@@ -6,7 +6,6 @@ slapformat is an application to prepare SlapOS-ready node to be used inside Slap
It "formats" the machine by:
- creating users and groups
- creating bridge interface
- creating needed tap interfaces
- creating TUN interfaces
- creating needed directories with proper ownership and permissions
......@@ -31,11 +30,10 @@ This program shall be only run by root.
Requirements
------------
Linux with IPv6, bridging and tap interface support.
Linux with IPv6 and tap interface support.
Binaries:
* brctl
* groupadd
* ip
* useradd
This diff is collapsed.
......@@ -116,11 +116,6 @@ class FakeCallAndRead:
retval = 0, 'OK'
elif argument_list[:3] == ['route', 'add', '-host']:
retval = 0, 'OK'
elif argument_list[:2] == ['brctl', 'show']:
retval = 0, "\n".join(("bridge name bridge id STP enabled interfaces",
"bridge bridge bridge b001 000:000 1 fakeinterface",
" fakeinterface2"
""))
self.external_command_list.append(' '.join(argument_list))
return retval
......@@ -351,10 +346,7 @@ class TestComputer(SlapformatMixin):
"makedirs('/software_root', 493)",
"chmod('/software_root', 493)"],
self.test_result.bucket)
self.assertEqual([
'ip addr list bridge',
'brctl show',
],
self.assertEqual([],
self.fakeCallAndRead.external_command_list)
@unittest.skip("Not implemented")
......@@ -391,10 +383,7 @@ class TestComputer(SlapformatMixin):
"makedirs('/software_root', 493)",
"chmod('/software_root', 493)"],
self.test_result.bucket)
self.assertEqual([
'ip addr list bridge',
'brctl show',
],
self.assertEqual([],
self.fakeCallAndRead.external_command_list)
@unittest.skip("Not implemented")
......@@ -431,11 +420,8 @@ class TestComputer(SlapformatMixin):
'useradd -d /software_root -g slapsoft slapsoft -r',
'groupadd testuser',
'useradd -d /instance_root/partition -g testuser -G slapsoft testuser -r',
'brctl show',
'ip tuntap add dev tap mode tap user testuser',
'ip link set tap up',
'brctl show',
'brctl addif bridge tap',
'ip addr add ip/255.255.255.255 dev bridge',
'ip addr list bridge',
'ip addr add ip/ffff:ffff:ffff:ffff:: dev bridge',
......@@ -476,13 +462,8 @@ class TestComputer(SlapformatMixin):
],
self.test_result.bucket)
self.assertEqual([
'ip addr list bridge',
'brctl show',
'ip tuntap add dev tap mode tap user testuser',
'ip link set tap up',
#'brctl show',
#'brctl show',
#'brctl addif bridge tap',
'ip addr add ip/ffff:ffff:ffff:ffff:ffff:ffff:: dev tap',
'ip -6 addr list tap',
'ip route show 10.0.0.2',
......@@ -533,8 +514,6 @@ class TestComputer(SlapformatMixin):
],
self.test_result.bucket)
self.assertEqual([
'ip addr list iface',
'brctl show',
'ip tuntap add dev tap mode tap user testuser',
'ip link set tap up',
'ip addr add ip/ffff:ffff:ffff:ffff:ffff:ffff:: dev tap',
......@@ -622,8 +601,6 @@ class TestComputer(SlapformatMixin):
],
self.test_result.bucket)
self.assertEqual([
'ip addr list bridge',
'brctl show',
'ip addr add ip/255.255.255.255 dev bridge',
# 'ip addr list bridge',
'ip addr add ip/ffff:ffff:ffff:ffff:: dev bridge',
......@@ -664,8 +641,6 @@ class TestComputer(SlapformatMixin):
],
self.test_result.bucket)
self.assertEqual([
'ip addr list myinterface',
'brctl show',
'ip address add dev myinterface fd00::1/64',
'ip addr add ip/255.255.255.255 dev myinterface',
'ip addr add ip/ffff:ffff:ffff:ffff:: dev myinterface',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment