ironic-python-agent/examples
Jay Faulkner 36e5993a04 [codespell] Fix spelling issues in IPA
This fixes several spelling issues identified by codepsell. In some
cases, I may have manually modified a line to make the output more clear
or to correct grammatical issues which were obvious in the codespell
output.

Later changes in this chain will provide the codespell config used to
generate this, as well as adding this commit's SHA, once landed, to a
.git-blame-ignore-revs file to ensure it will not pollute git historys
for modern clients.

Related-Bug: 2047654
Change-Id: I240cf8484865c9b748ceb51f3c7b9fd973cb5ada
2023-12-28 10:54:46 -08:00
..
business-logic Increase version of hacking and pycodestyle 2021-07-30 14:34:33 +02:00
custom-disk-erase Add example for custom disk erasure 2020-11-02 15:46:19 -08:00
vendor-device [codespell] Fix spelling issues in IPA 2023-12-28 10:54:46 -08:00
README.rst Add example for custom disk erasure 2020-11-02 15:46:19 -08:00

Example Hardware Managers

vendor-device

This example manager is meant to demonstrate good patterns for developing a device-specific hardware manager, such as for a specific version of NIC or disk.

Use Cases include:

  • Adding device-specific clean-steps, such as to flash firmware or verify it's still properly working after being provisioned.
  • Implementing erase_device() using a vendor-provided utility for a given disk model.

custom-disk-erase

This example manager is meant to demonstrate good patterns for developing a hardware manager to perform disk erasure using a custom vendor utility.

Use case: * Ensuring block devices of a specific model are erased using custom code

business-logic

This example manager is meant to demonstrate how cleaning and the agent can use the node object and the node itself to enforce business logic and node consistency.

Use Cases include:

  • Quality control on hardware by ensuring no component is beyond its useful life.
  • Asserting truths about the node; such as number of disks or total RAM.
  • Reporting metrics about the node's hardware state.
  • Overriding logic of get_os_install_device().
  • Inserting additional deploy steps.

Make your own Manager based on these

To make your own hardware manager based on these examples, copy a relevant example out of this directory. Modify class names and entrypoints in setup.cfg to be not-examples.

Since the entrypoints are defined in setup.cfg, simply installing your new python package alongside IPA in a custom ramdisk should be enough to enable the new hardware manager.