Skip to main content

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

PyPI version Python 3.6+ License: MIT

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

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ†˜ Support

๐Ÿข 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

ufm-config-diff-1.0.4.tar.gz (33.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ufm_config_diff-1.0.4-py3-none-any.whl (30.3 kB view details)

Uploaded Python 3

File details

Details for the file ufm-config-diff-1.0.4.tar.gz.

File metadata

  • Download URL: ufm-config-diff-1.0.4.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

Hashes for ufm-config-diff-1.0.4.tar.gz
Algorithm Hash digest
SHA256 968507565a576eeb83abcfb831d40e37ac9ca72caf5a0bde432e39423da41e23
MD5 40a05c67d3d2570ac61853f770d45720
BLAKE2b-256 cf22b32ffa1a5bdc177165d4391d63e2367ac5d6a1b43778860387a86731a51a

See more details on using hashes here.

File details

Details for the file ufm_config_diff-1.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for ufm_config_diff-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 bdac7561d524abd0b1a828fb2920e9bf76d46cf1c7293b5f2e8607e3985c1073
MD5 d30d0dd40653c5660c8fac7374a4319a
BLAKE2b-256 9f4a044d34300d356e51c609f4ce7db12e44b648b05f715b94895c6d421a1903

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page