Skip to content

Conversation

@balajikumaran-c-s
Copy link
Contributor

This PR introduces a complete enterprise-grade automation framework for Dell Omnia Infrastructure Manager (OIM) deployment, testing, and lifecycle management. The framework provides comprehensive prerequisite validation, automated testing, and professional reporting capabilities.

🚀 Key Features
Core Automation Framework

  • Modular Architecture: Clean separation of concerns with automation_library/ containing specialized modules
  • 15+ Prerequisite Checks: Hardware, OS, network, storage, and service validation
  • Professional Reporting: HTML/JSON reports with detailed test results and metrics
  • Configuration Management: Centralized user_config.yml.

Testing Infrastructure

  • Molecule Framework: End-to-end infrastructure testing with real environment validation
  • Multiple Test Scenarios: omnia_sh_install, omnia_sh_cleanup, prepare_oim, local_repo
  • Ansible-Lint Compliance: All playbooks pass production-profile ansible-lint standards
  • Testinfra Integration: Infrastructure validation with detailed reporting

balajikumaran-c-s and others added 28 commits December 8, 2025 19:48
…eporting

- Split omnia_sh into separate install/cleanup scenarios
- Add run_molecule.sh with 'all' command for running multiple scenarios
- Implement hierarchical HTML report (Pipeline > Scenarios > Tests)
- Add shared report_id for appending results across scenarios
- Reorganize automation_library with core module
- Update conftest.py for proper module detection
- Clean up user_config.yml (remove sensitive data)
- Remove unused imports (sys, set_debug_mode)
- Fix undefined variables (container_name, OMNIA_SH_CONFIG_PATH)
- Add encoding to file operations
- Replace bare except with specific exceptions
- Remove unused variables (status_bg, pct_color)
- Fix import order in report.py and formatting.py
- Remove obsolete load_omnia_sh_config function
- Shorten long lines where possible

All modules now pass pylint with score >= 8.0
prepare_oim automation scenario
- Created modular structure for checks/ and omnia_sh/ directories
- Moved omnia_sh files to new organized structure (functions/, vars/, messages/)
- Improved pylint scores for all checks files to 8.21+ individually:
  * services.py: 8.89/10
  * system.py: 8.88/10
  * hardware.py: 8.84/10
  * validation.py: 8.79/10
  * repository.py: 8.62/10
  * network.py: 8.35/10
  * main.py: 8.31/10
- Fixed line length issues, removed unused variables, centralized messages
- Updated import paths for new modular structure
- Updated molecule test imports for omnia_sh reorganization
- All functionality preserved and tested
- omnia_sh_vars.py: 9.60 → 10.00/10 (added missing final newline)
- omnia_sh_func.py: 9.17 → 9.28/10 (fixed unused variables, line lengths)
- omnia_sh_msgs.py: already perfect 10.00/10

All omnia_sh files now exceed 8.21+ individual target scores
Updated import path to use new modular structure:
- Changed from: automation_library.functions.oim_prereq_func
- Changed to: automation_library.checks.functions.main

Script now works correctly with reorganized automation_library structure
Signed-off-by: balajikumaran.cs <[email protected]>
- Move prepare_oim files to automation_library/prepare_oim/
  - functions/prepare_oim_func.py
  - messages/prepare_oim_msgs.py
  - vars/prepare_oim_vars.py
- Add __init__.py files for proper module imports
- Update test imports to use new paths
- Remove test_omnia_core_container test
- Fix _get_project_root() path for new folder depth
- Remove duplicate local_repo files from flat structure (functions/, vars/, messages/)
- Update test_local_repo.py imports to use new module path:
  - automation_library.local_repo.messages.local_repo_msgs
  - automation_library.local_repo.functions.local_repo_func
- Add PULP_CONTAINER constant to prepare_oim_vars.py
- Add check_pulp_api_status function to prepare_oim_func.py
- Add pulp_api_status messages to prepare_oim_msgs.py
- Fix pylint issues: trailing whitespace, unnecessary elif, f-string without interpolation
- Remove unused CORE_CONTAINERS import from test_prepare_oim.py
- Fix ansible-lint issues in omnia_sh_install: add pipefail, use command module, add changed_when
- Break long lines in converge.yml and prepare.yml
These files were moved to automation_library/checks/ in previous refactoring
- Added Dell Apache 2.0 license headers to 49 Python files
- Added license headers to 13 molecule YAML files
- Added license headers to 2 shell script files
- Fixed import paths in omnia_sh and prepare_oim modules
- Fixed directory creation bug in repository.py download function
- Updated HTML report labels from 'Pipeline' to 'Test Run'
- All files now comply with Dell licensing standards
- Added 'set -o pipefail' to shell commands using pipes (risky-shell-pipe)
- Added 'changed_when' condition for idempotency (no-changed-when)
- Both omnia_sh_install and omnia_sh_cleanup now pass production profile
- All molecule modules are now ansible-lint compliant
Signed-off-by: balajikumaran.cs <[email protected]>
return {
"passed": False,
"message": OIM_PREREQ_MSGS["podman_not_found"],
"details": f"ACTION REQUIRED: Install Podman.\n- Run: dnf install -y podman\n- Error: {stderr}"
Copy link
Collaborator

Choose a reason for hiding this comment

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

all error message should be kept in seperate file. can be taken up later

@abhishek-sa1 abhishek-sa1 merged commit cffbedd into dell:automation Dec 23, 2025
3 checks passed
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.

4 participants