Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: create ironic hooks to set resource class #245

Merged
merged 14 commits into from
Aug 30, 2024

Conversation

skrobul
Copy link
Collaborator

@skrobul skrobul commented Aug 29, 2024

This PR introduces a Python package that enhances Ironic's functionality by automatically setting the resource_class on Nodes.

The package parses the contents of the Flavors YAML defined in the undercloud-nautobot-device-types repository, and during Node inspection, it cross-checks the received inventory data against the defined flavors.

This feature supports both in-band (inspect_interface set to agent) and out-of-band inspection methods (redfish-understack and idrac-redfish-understack).

The specification repository is automatically synced to the local hostPath volume. However, changes will only take effect after the ironic-conductor is restarted.

Closes PUC-433

so that it can be installed along with sushy-oem package
After giving this some thought, matching multiple machines in one go is
YAGNI.
Both traditional redfish and idrac rely on the same elements of
inventory, so extract the common code and use the inventory everywhere.
Prior to this, the redfish driver relied on properties instead, but they
were just a copies that also exist in inventory.
@skrobul skrobul changed the title PUC-433 create ironic hooks to set resource class feat: create ironic hooks to set resource class Aug 29, 2024
@skrobul skrobul changed the title feat: create ironic hooks to set resource class feat: create ironic hooks to set resource class Aug 29, 2024
Copy link

github-actions bot commented Aug 29, 2024

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
314 213 68% 0% 🟢

New Files

File Coverage Status
python/ironic-understack/ironic_understack/init.py 100% 🟢
python/ironic-understack/ironic_understack/conf.py 0% 🟢
python/ironic-understack/ironic_understack/flavor_spec.py 96% 🟢
python/ironic-understack/ironic_understack/machine.py 100% 🟢
python/ironic-understack/ironic_understack/matcher.py 100% 🟢
python/ironic-understack/ironic_understack/redfish_inspect_understack.py 0% 🟢
python/ironic-understack/ironic_understack/resource_class.py 0% 🟢
python/ironic-understack/ironic_understack/tests/init.py 100% 🟢
python/ironic-understack/ironic_understack/tests/test_flavor_spec.py 99% 🟢
python/ironic-understack/ironic_understack/tests/test_machine.py 100% 🟢
python/ironic-understack/ironic_understack/tests/test_matcher.py 100% 🟢
TOTAL 72% 🟢

Modified Files

No covered modified files...

updated for commit: 3c434b5 by action🐍

@skrobul skrobul force-pushed the PUC-433-create-ironic-hooks-to-set-resource-class branch 2 times, most recently from d023d14 to b38b5a9 Compare August 29, 2024 14:23
Scoring logic should live in the FlavorSpec and provide an easy way to
obtain score for a given Machine.

This reduces Matcher functionality to simply interacting with a
collection of flavors and matching them against Machine.
@skrobul skrobul force-pushed the PUC-433-create-ironic-hooks-to-set-resource-class branch from b38b5a9 to 3c434b5 Compare August 29, 2024 14:35
@skrobul skrobul requested a review from a team August 30, 2024 08:18
@cardoe cardoe merged commit d835258 into main Aug 30, 2024
18 checks passed
@cardoe cardoe deleted the PUC-433-create-ironic-hooks-to-set-resource-class branch August 30, 2024 14:29
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.

2 participants