missing_required = []
for tool, package in required_tools.items():
if not shutil.which(tool):
missing_required.append(f"{tool} (install {package})")
if missing_required:
raise RuntimeError(f"Missing required tools: {', '.join(missing_required)}")
for tool in optional_tools:
if not shutil.which(tool):
logger.info(f"Optional tool {tool} not found - some features disabled")
If smartctl, nvme, ceph, or pct commands are missing, the script fails loudly. It should report to run this script to install them (curl -s http://10.10.10.63:3000/LotusGuild/freshStartScript/raw/branch/main/freshStart.sh | bash)
Add tool detection:
def _check_tool_availability(self):
"""Check if required tools are available."""
required_tools = {
'smartctl': 'smartmontools',
'lsblk': 'util-linux',
}
optional_tools = {
'nvme': 'nvme-cli',
'ceph': 'ceph-common',
'pct': 'proxmox-ve',
}
missing_required = []
for tool, package in required_tools.items():
if not shutil.which(tool):
missing_required.append(f"{tool} (install {package})")
if missing_required:
raise RuntimeError(f"Missing required tools: {', '.join(missing_required)}")
for tool in optional_tools:
if not shutil.which(tool):
logger.info(f"Optional tool {tool} not found - some features disabled")
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
If smartctl, nvme, ceph, or pct commands are missing, the script fails loudly. It should report to run this script to install them (curl -s http://10.10.10.63:3000/LotusGuild/freshStartScript/raw/branch/main/freshStart.sh | bash)
Add tool detection:
def _check_tool_availability(self):
"""Check if required tools are available."""
required_tools = {
'smartctl': 'smartmontools',
'lsblk': 'util-linux',
}
optional_tools = {
'nvme': 'nvme-cli',
'ceph': 'ceph-common',
'pct': 'proxmox-ve',
}