Skip to content

feat(discovery): robust OME pagination, GPU collection, and timestamped PXE mapping#4349

Merged
sujit-jadhav merged 2 commits into
pub/q2_devfrom
feature/ome-pagination-gpu-discovery
May 2, 2026
Merged

feat(discovery): robust OME pagination, GPU collection, and timestamped PXE mapping#4349
sujit-jadhav merged 2 commits into
pub/q2_devfrom
feature/ome-pagination-gpu-discovery

Conversation

@sujit-jadhav
Copy link
Copy Markdown
Collaborator

Summary

OME Pagination

  • Replace @odata.nextLink-based pagination with explicit $top/$skip OData parameters for deterministic, scalable device retrieval (8k–20k+ nodes)
  • Add configurable page_size parameter (default 200, max 1000) to ome_server_inventory module and wire through Ansible role defaults
  • Add retry with exponential backoff for transient HTTP 5xx/timeout failures
  • Return pagination stats in module output; display summary in playbook

GPU Collection

  • Collect GPU vendor and type from OME devicePciDevice inventory
  • Append GPU_VENDOR and GPU_TYPE columns to PXE mapping CSV

Timestamped PXE Mapping

  • Generate timestamped PXE mapping files (bmc_pxe_mapping_file_<timestamp>.csv) so each run produces a unique file
  • Update completion message to show actual generated filename

Bug Fixes

  • Handle OME returning list instead of dict from inventory endpoints
  • Fix telemetry_config.yml validation: point to telemetry_validation module instead of removed common_validation.validate_telemetry_config

Tests

  • Add 20 unit tests covering pagination, retry, clamping, edge cases, and type filtering

Files Changed

  • common/library/modules/ome_server_inventory.py
  • common/library/modules/generate_pxe_mapping.py
  • common/library/modules/tests/test_ome_pagination.py (new)
  • common/library/modules/tests/__init__.py (new)
  • common/library/module_utils/input_validation/common_utils/logical_validation.py
  • discovery/roles/ome_discovery/defaults/main.yml
  • discovery/roles/ome_discovery/tasks/collect_inventory.yml
  • discovery/roles/ome_discovery/tasks/generate_pxe_mapping.yml
  • discovery/roles/ome_discovery/vars/main.yml

…ed PXE mapping

- Replace @odata.nextLink-based pagination with explicit $top/$skip OData
  parameters for deterministic, scalable device retrieval (8k-20k+ nodes)
- Add configurable page_size parameter (default 200, max 1000) to
  ome_server_inventory module and wire through Ansible role defaults
- Add retry with exponential backoff for transient HTTP 5xx/timeout failures
- Return pagination stats (total_devices, page_size, total_pages,
  pages_fetched) in module output; display summary in playbook
- Collect GPU vendor and type from OME devicePciDevice inventory; append
  GPU_VENDOR and GPU_TYPE columns to PXE mapping CSV
- Generate timestamped PXE mapping files (bmc_pxe_mapping_file_<ts>.csv)
  so each run produces a unique file
- Handle OME returning list instead of dict from inventory endpoints
- Fix telemetry_config.yml validation: point to telemetry_validation module
  instead of removed common_validation.validate_telemetry_config
- Add 20 unit tests covering pagination, retry, clamping, and filtering
Copy link
Copy Markdown
Collaborator Author

@sujit-jadhav sujit-jadhav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OME pagination, GPU collection and timestamped PXE mapping

@sujit-jadhav sujit-jadhav merged commit ff1379a into pub/q2_dev May 2, 2026
6 checks passed
@abhishek-sa1 abhishek-sa1 deleted the feature/ome-pagination-gpu-discovery branch May 13, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant