diff options
| author | Michael Biebl <biebl@debian.org> | 2025-08-01 19:15:18 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2025-08-01 19:15:18 +0200 |
| commit | 43a9f1ee48d7f7b9f4447e9fe17a4274c6fad67f (patch) | |
| tree | 5f570d79dfc6eb4c736b708a99b3b2e5ed7608d1 /src/tests/client/test-client.py | |
| parent | e0a3970cd0ea64b36773deae96366bbe7d1efbee (diff) | |
| parent | 7e9091a5960f67a84787c03153324915220e4816 (diff) | |
Update upstream source from tag 'upstream/1.54.0'
Update to upstream version '1.54.0' with Debian dir efd253369d835d8f9c404eef4f97d88deb9625fe
Diffstat (limited to 'src/tests/client/test-client.py')
| -rwxr-xr-x | src/tests/client/test-client.py | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/src/tests/client/test-client.py b/src/tests/client/test-client.py index 62b72b79..cc76d37b 100755 --- a/src/tests/client/test-client.py +++ b/src/tests/client/test-client.py @@ -2125,6 +2125,113 @@ class TestNmcli(unittest.TestCase): replace_stdout=replace_uuids, ) + # It is allowed to set IP method disabled/ignore for ports + replace_uuids.append( + self.ctx.srv.ReplaceTextConUuid( + "con-port1", "UUID-con-port1-REPLACED-REPLACED-REP" + ) + ) + self.call_nmcli( + [ + "connection", + "add", + "type", + "ethernet", + "ifname", + "foobar", + "con-name", + "con-port1", + "ipv4.method", + "disabled", + "ipv6.method", + "ignore", + "connection.port-type", + "bridge", + "connection.controller", + "bridge1", + ], + replace_stdout=replace_uuids, + ) + + # It is NOT allowed to set IP method != disabled/ignore for ports + self.call_nmcli( + [ + "connection", + "add", + "type", + "ethernet", + "ifname", + "foobar", + "con-name", + "ethernet-foobar", + "ipv6.method", + "auto", + "connection.port-type", + "bridge", + "connection.controller", + "bridge1", + ], + replace_stdout=replace_uuids, + ) + + # ovs-interface connections support IP configuration + replace_uuids.append( + self.ctx.srv.ReplaceTextConUuid( + "con-ovs-int", "UUID-con-ovs-int-REPLACED-REPLACED-R" + ) + ) + self.call_nmcli( + [ + "connection", + "add", + "type", + "ovs-interface", + "ifname", + "ovs-int", + "con-name", + "con-ovs-int", + "ipv4.method", + "auto", + "ipv6.method", + "link-local", + "connection.port-type", + "ovs-port", + "connection.controller", + "ovs-port1", + ], + replace_stdout=replace_uuids, + ) + + # VRF ports support IP configuration + replace_uuids.append( + self.ctx.srv.ReplaceTextConUuid( + "con-port2", "UUID-con-port2-REPLACED-REPLACED-REP" + ) + ) + self.call_nmcli( + [ + "connection", + "add", + "type", + "ethernet", + "ifname", + "enp1s0", + "con-name", + "con-port2", + "ipv4.method", + "manual", + "ipv4.addresses", + "192.0.2.1/24", + "ipv6.method", + "dhcp", + "connection.port-type", + "vrf", + "connection.controller", + "vrf1", + ], + replace_stdout=replace_uuids, + ) + @nm_test_no_dbus def test_offline(self): # Make sure we're not using D-Bus |