Production-ready UFM configuration comparison tool with automated email reports, interactive HTML tables, and CI/CD support via --yes flag
Project description
UFM Configuration Differentiator Tool
A powerful, production-ready tool to compare UFM (Unified Fabric Manager) configurations between two NVIDIA Docker images with advanced interactive HTML reports, table sorting/filtering, and email notifications.
โก Quick Start
# Install the tool
pip install ufm-config-diff --break-system-packages
# or
pipx install ufm-config-diff
# Run complete comparison with email and automation
ufm-config-diff ufm_6.20.0-1.ubuntu22.x86_64-docker.img.gz \
ufm_6.21.0-8.ubuntu22.x86_64-docker.img.gz \
nvidia-ufm-enterprise-evaluation.lic \
--email admin@company.com \
--yes
๐ Features
Core Functionality
- Docker Image Comparison: Compare UFM configurations between two Docker images
- Automatic Version Detection: Extract and compare UFM, SHARP, MFT, and OpenSM versions
- Configuration Analysis: Identify differences in 5+ configuration files (gv.cfg, opensm.conf, sharp_am.cfg, mft.conf, etc.)
- Smart Version Ordering: Automatically displays higher version on the right for easier comparison
Interactive HTML Reports
- ๐ Advanced Table Sorting: Click column headers to sort ascending/descending
- ๐ Real-time Filtering: Search across all table content with instant results
- ๐ท๏ธ Status-based Filters: Filter by Modified/New Parameter/Deleted Parameter
- ๐จ Color-coded Status: Visual indicators for different change types
- ๐ฑ Responsive Design: Works perfectly on desktop and mobile devices
- ๐จ๏ธ Print-friendly: Clean printing with hidden controls
Professional Features
- ๐ง Email Reports: Send HTML reports with version comparison tables
- โก Auto-yes Mode: Non-interactive mode for automation and CI/CD
- ๐ง Network Interface Support: Configure fabric and management interfaces
- ๐ Results Persistence: Save configuration files for future reference
- ๐ฏ Zero External Dependencies: Self-contained JavaScript functionality
๐ฆ Installation
Install from PyPI
Method 1: Using pipx (Recommended for CLI tools)
# Install pipx if not available
sudo apt install pipx # On Ubuntu/Debian
# or
brew install pipx # On macOS
# Install ufm-config-diff
pipx install ufm-config-diff
Method 2: Using virtual environment (Recommended for development)
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install ufm-config-diff
Method 3: System-wide installation (Advanced users)
# For systems with externally-managed-environment restrictions
pip install ufm-config-diff --break-system-packages
# Standard installation (older Python versions)
pip install ufm-config-diff
Install from Source
git clone https://github.com/Mellanox/ufm-config-diff.git
cd ufm-config-diff
# Using virtual environment (recommended)
python3 -m venv venv
source venv/bin/activate
pip install .
# Or system-wide (if needed)
pip install . --break-system-packages
Development Installation
git clone https://github.com/Mellanox/ufm-config-diff.git
cd ufm-config-diff
# Using virtual environment (recommended)
python3 -m venv venv
source venv/bin/activate
pip install -e .
# Or system-wide (if needed)
pip install -e . --break-system-packages
๐ง Package Management
Upgrade to Latest Version
pip install --upgrade ufm-config-diff
Check Current Version
pip show ufm-config-diff
Uninstall
pip uninstall ufm-config-diff
๐ Prerequisites
- Python: 3.6 or higher
- Docker: Installed and running
- System Access: Root/sudo privileges for Docker operations
- Network Ports: Free ports required by UFM (80, 443, 8000, 6306, 8005, 8888, 2022)
- InfiniBand Interface: Configured with IP address and in "up" state (if comparing IB configurations)
๐ฏ Usage Examples
Main Example (Recommended)
# Complete UFM configuration comparison with email notification and automation
ufm-config-diff ufm_6.20.0-1.ubuntu22.x86_64-docker.img.gz \
ufm_6.21.0-8.ubuntu22.x86_64-docker.img.gz \
nvidia-ufm-enterprise-evaluation.lic \
--email admin@company.com \
--yes
Basic Usage
# Simple comparison between two UFM Docker images
ufm-config-diff old_image.tar.gz new_image.tar.gz license_file.lic
# Interactive mode (will prompt for confirmations)
ufm-config-diff ufm_6.20.0-1.ubuntu22.x86_64-docker.img.gz \
ufm_6.21.0-8.ubuntu22.x86_64-docker.img.gz \
nvidia-ufm-enterprise-evaluation.lic
Advanced Usage
# With network interface configuration
ufm-config-diff old_image.tar.gz new_image.tar.gz license_file.lic \
--fabric-interface ib0 \
--mgmt-interface eth0 \
--email admin@company.com \
--yes
# With custom output file and timestamp
ufm-config-diff old_image.tar.gz new_image.tar.gz license_file.lic \
ufm_comparison_report_$(date +%Y%m%d_%H%M%S).html \
--yes
# Automation-ready with all options
ufm-config-diff old_image.gz new_image.gz license.lic \
--fabric-interface ib0 \
--mgmt-interface eth0 \
--email admin@company.com \
--yes
Using the Standalone Report Generator
# Generate report from existing configuration files
python -m ufm_config_diff.create_simple_table_report
๐ Interactive HTML Report Features
The generated HTML reports include:
๐ Filtering & Search
- Text Search: Type in the search box to filter across all content
- Status Filters: Click buttons to show only Modified/New/Deleted parameters
- Clear Filters: Reset all filters with one click
๐ Sorting
- Column Headers: Click any column header to sort
- Visual Indicators: โ (ascending) / โ (descending) arrows
- Smart Status Sorting: Modified โ New โ Deleted order
๐จ Visual Design
- Color-coded Rows:
- ๐ก Yellow: Modified parameters
- ๐ข Green: New parameters added
- ๐ด Red: Parameters deleted
- Professional Styling: NVIDIA-branded design
- Responsive Layout: Adapts to screen size
๐ง Email Integration
- HTML Email Body: Includes version comparison table
- Professional Formatting: Clean, corporate-style emails
- Attachment Support: Full HTML report attached
๐ง Configuration Files Analyzed
| File | Description | Version Extraction |
|---|---|---|
gv.cfg |
UFM Global View configuration | โ |
opensm.conf |
OpenSM subnet manager configuration | โ |
sharp_am.cfg |
SHARP aggregation manager configuration | โ |
mft.conf |
Mellanox Firmware Tools configuration | โ |
ufm_version |
UFM version information | โ |
๐ Output Structure
results/
โโโ old_configs/ # Server 1 configuration files
โ โโโ gv.cfg
โ โโโ opensm.conf
โ โโโ sharp_am.cfg
โ โโโ mft.conf
โ โโโ ufm_version
โโโ new_configs/ # Server 2 configuration files
โ โโโ [same files]
โโโ version_comparison.md # Human-readable version report
โโโ version_comparison.json # Machine-readable version data
โโโ ufm_comparison_report_YYYYMMDD_HHMMSS.html # Interactive report
๐จ Troubleshooting
Common Issues
Externally-Managed-Environment Error
# Error: externally-managed-environment
# Solution 1: Use pipx (recommended)
sudo apt install pipx
pipx install ufm-config-diff
# Solution 2: Use virtual environment
python3 -m venv venv
source venv/bin/activate
pip install ufm-config-diff
# Solution 3: Override system protection (advanced users only)
pip install ufm-config-diff --break-system-packages
Docker Permission Denied
sudo usermod -aG docker $USER
# Log out and log back in
Port Already in Use
# Check what's using UFM ports
sudo netstat -tulpn | grep -E ':(80|443|8000|6306|8005|8888|2022)\s'
UFM Already Installed
# The tool will automatically detect and offer to uninstall
# Or use --yes flag for automatic handling
ufm-config-diff old.gz new.gz license.lic --yes
Email Not Sending
# Set SMTP server environment variable
export SMTP_SERVER=your-smtp-server.com
ufm-config-diff old.gz new.gz license.lic --email user@company.com
Command Not Found After Installation
# If installed with pipx, ensure pipx bin directory is in PATH
pipx ensurepath
# If installed in virtual environment, make sure it's activated
source venv/bin/activate
# If installed system-wide, try:
which ufm-config-diff
๐ Version History
v1.0.0 (Latest)
- โ Interactive table sorting and filtering
- โ Black status column text for better readability
- โ Enhanced email reports with version comparison
- โ Improved MFT version extraction
- โ Font consistency across all tables
- โ Professional timestamped report filenames
- โ Zero external dependencies
v0.2.0
- Basic UFM configuration comparison
- HTML report generation
- Docker image support
๐ค Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Support
- Issues: GitHub Issues
- Documentation: GitHub Wiki
- Email: support@nvidia.com
๐ข About NVIDIA
This tool is developed and maintained by NVIDIA for the InfiniBand and Ethernet networking community.
Made with โค๏ธ by NVIDIA
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ufm-config-diff-1.0.3.tar.gz.
File metadata
- Download URL: ufm-config-diff-1.0.3.tar.gz
- Upload date:
- Size: 33.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3dc625db54d9d68ffc6801171bbc9a8db1bf1f76012196a2e9cfed30c6e11a48
|
|
| MD5 |
356b3070179b9f9e97f102454ba440d4
|
|
| BLAKE2b-256 |
57510dba47145b72f4566898be8bf5c2ad74bb88bcc71a13bd329e2ef892c231
|
File details
Details for the file ufm_config_diff-1.0.3-py3-none-any.whl.
File metadata
- Download URL: ufm_config_diff-1.0.3-py3-none-any.whl
- Upload date:
- Size: 30.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f942c2c11d1240356b8056fbf6fdcef272c958d8f268ac22fe88f56240bba57c
|
|
| MD5 |
dcdc3748c74b11ec256118394d291d21
|
|
| BLAKE2b-256 |
1905cf049af75cea0571ee10631ed345e1e151c89eb3795291f2c1cafdf9d139
|