Skip to main content

Advanced UFM configuration comparison tool with interactive HTML reports, table sorting/filtering, and email notifications

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.

๐Ÿš€ 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 (Recommended)

pip install ufm-config-diff

Install from Source

git clone https://github.com/Mellanox/ufm-config-diff.git
cd ufm-config-diff
pip install .

Development Installation

git clone https://github.com/Mellanox/ufm-config-diff.git
cd ufm-config-diff
pip install -e .

๐Ÿ”ง 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

Basic Usage

# Compare two UFM Docker images
ufm-config-diff old_image.tar.gz new_image.tar.gz license_file.lic

# Example with real files
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

# 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

# Non-interactive mode for automation
ufm-config-diff old_image.tar.gz new_image.tar.gz license_file.lic \
                --yes

# With email notification
ufm-config-diff old_image.tar.gz new_image.tar.gz license_file.lic \
                --email admin@company.com

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

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

๐Ÿ”„ 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.1.tar.gz (31.9 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.1-py3-none-any.whl (29.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ufm-config-diff-1.0.1.tar.gz
  • Upload date:
  • Size: 31.9 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.1.tar.gz
Algorithm Hash digest
SHA256 ffb2bf2d19ff0445a33279ef71368fb372ca4cc6e6b2a07701834c6c3da3f846
MD5 f8fd8e4d603a80dbbd94fe410563e64c
BLAKE2b-256 2ad1adba00e3dcf75ebba5d710d2cea00d54958d8bc1a034b555f4be1ed19127

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ufm_config_diff-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6b6d387c438513fde3493af5d3c28c16b5e7a1545a07787ae92dee966c1f1c0c
MD5 2ab581e83718dc98193b57144361c543
BLAKE2b-256 d231a161f3f8c7f3c070a26ef4fa3821eb0545ba0a43bdbb13b90eed855bc5c2

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