Skip to content

Redfish driver fixes#253

Open
skatsaounis wants to merge 11 commits into
canonical:mega-power-demofrom
skatsaounis:redfish-driver-fixes
Open

Redfish driver fixes#253
skatsaounis wants to merge 11 commits into
canonical:mega-power-demofrom
skatsaounis:redfish-driver-fixes

Conversation

@skatsaounis

Copy link
Copy Markdown
Contributor

No description provided.

alexsander-souza and others added 11 commits May 13, 2026 17:14
Follow the canonical MAAS RunDir() pattern:
- Snap: /run/snap.<instance>/power-drivers
- Deb: /run/maas/power-drivers

Updated plan.md, contracts/api.md, and quickstart.md.
- Make set_boot_order raise NotImplementedError (matching base PowerDriver on origin/master)
- Update server to extract 'order' parameter and return 501 Not Implemented when the method is not supported
- Replace invalid 'services:' with proper 'apps:' section
- Connect 'power-drivers' content plug to the redfish-driver app
- Ensure the driver can write to the shared socket directory
- Add required 'build-base: devel' for core26 base
- Add 'target' parameter to the power-drivers content plug
- Implement _set_pxe_boot() using PATCH with BootSourceOverrideTarget=Pxe
- Call set_pxe_boot during on() (before powering on)
- Call set_pxe_boot during off() (after powering off, matching original)
- This restores the original Redfish driver behavior where PXE boot is forced during power operations
- Revert unnecessary Python class attributes (chassis, can_probe, can_set_boot_order)
- Fix metadata.json to return original values:
  - chassis: true
  - can_probe: false
- Minor log message alignment with original driver
Since the driver always runs inside a snap, use os.environ['SNAP_COMMON']
directly instead of a hardcoded snap name.
- Replace fragile http.server + manual socket hack with aiohttp
- Use web.UnixSite for clean UNIX domain socket support
- Add aiohttp as dependency in pyproject.toml
- Improve request handling, error responses, and graceful shutdown
GracefulRestart (reset) no longer waits for 'on' state, matching
the original monorepo RedfishPowerDriver behavior.
Fix Python plugin build failure on core26 by explicitly setting
the Python interpreter.
@troyanov

Copy link
Copy Markdown
Contributor

@skatsaounis lets fix the conflicts and merge it, until next time

@alexsander-souza

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

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.

3 participants