|
5 | 5 |
|
6 | 6 | from lisa.base_tools import Cat |
7 | 7 | from lisa.executable import Tool |
8 | | -from lisa.operating_system import Debian, Fedora, Redhat, Suse |
| 8 | +from lisa.operating_system import CBLMariner, Debian, Fedora, Redhat, Suse |
9 | 9 | from lisa.util import LisaException, UnsupportedDistroException, find_group_in_lines |
10 | 10 |
|
11 | 11 | from .ls import Ls |
@@ -71,8 +71,17 @@ def get_timeout(self) -> int: |
71 | 71 | if group and not group["default"]: |
72 | 72 | value = int(group["number"]) |
73 | 73 | is_default_value = False |
74 | | - elif isinstance(self.node.os, Fedora): |
75 | | - # the default value in fedora is 300 |
| 74 | + elif isinstance(self.node.os, (Fedora, CBLMariner)): |
| 75 | + # Fedora and AZL4+ use NetworkManager for DHCP; default timeout is 300. |
| 76 | + # AZL2/3 used dhcpcd (handled by the Debian-like path above via Redhat |
| 77 | + # inheritance), but AZL4 switched to NetworkManager. |
| 78 | + if isinstance(self.node.os, CBLMariner) and ( |
| 79 | + self.node.os.information.version.major < 4 |
| 80 | + ): |
| 81 | + raise UnsupportedDistroException( |
| 82 | + os=self.node.os, |
| 83 | + message="CBLMariner < 4 dhclient timeout is not supported here", |
| 84 | + ) |
76 | 85 | value = 300 |
77 | 86 | result = self.node.execute("NetworkManager --print-config", sudo=True) |
78 | 87 | group = find_group_in_lines(result.stdout, self._fedora_pattern) |
|
0 commit comments