Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions nodescraper/base/inbandcollectortask.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ def _run_sut_cmd(
Returns:
CommandArtifact: The result of the command execution, which includes stdout, stderr, and exit code.
"""
if self.system_info.os_family == OSFamily.ESXI:
# ESXi runs as root and has no sudo binary; prefixing sudo would fail.
sudo = False
command_res = self.connection.run_command(
command=command, sudo=sudo, timeout=timeout, strip=strip
)
Expand Down
2 changes: 2 additions & 0 deletions nodescraper/connection/inband/inbandmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ def _check_os_family(self):
res = self.connection.run_command("uname -s")
if "not recognized as an internal or external command" in res.stdout + res.stderr:
self.system_info.os_family = OSFamily.WINDOWS
elif res.exit_code == 0 and "VMkernel" in res.stdout:
self.system_info.os_family = OSFamily.ESXI
elif res.exit_code == 0:
self.system_info.os_family = OSFamily.LINUX
else:
Expand Down
1 change: 1 addition & 0 deletions nodescraper/enums/osfamily.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@ class OSFamily(enum.Enum):
WINDOWS = enum.auto()
UNKNOWN = enum.auto()
LINUX = enum.auto()
ESXI = enum.auto()
EOS = enum.auto()
SONIC = enum.auto()
Loading