Skip to content

feature: Add pyzes support for device APIs - #524

Open
aviralni wants to merge 1 commit into
oneapi-src:masterfrom
aviralni:pyzes_device
Open

aviralni wants to merge 1 commit into
oneapi-src:masterfrom
aviralni:pyzes_device

Conversation

@aviralni

@aviralni aviralni commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor
  1. zesDeviceGetState
  2. zesDeviceResetExt
  3. zesDeviceEnumFirmwares
  4. zesDeviceEventRegister
  5. zesDeviceGetHealthStatusExt
  6. zesDeviceSetHealthStatusExt

Add python bindings, unit tests, black box test coverage and README
entries for:
1. zesDeviceGetState
2. zesDeviceResetExt
3. zesDeviceEnumFirmwares
4. zesDeviceEventRegister
5. zesDeviceGetHealthStatusExt
6. zesDeviceSetHealthStatusExt

Related-To: SYSM-434

Signed-off-by: Aviral Nigam <aviral.nigam@intel.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The black-box test performs unconditional writes to non-volatile device health state.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 Medium severity · 1 Low severity

Open (2)
What changed in this PR

Adds Python bindings, tests, examples, and documentation for six Sysman device APIs.

Changes:

  • Adds device state, reset, event, health, and firmware bindings.
  • Extends unit and black-box coverage.
  • Documents the newly supported APIs.
File Review
bindings/​sysman/​python/​test/​unit_tests/​test_device.py Adds unit tests for the new wrappers.
bindings/​sysman/​python/​source/​pyzes.py Adds ctypes types and API wrappers.
bindings/​sysman/​python/​source/​examples/​pyzes_black_box_test.py Adds black-box coverage. Moderate: Avoid unconditional persistent health-status writes; keep the path read-only or explicitly opt-in.
bindings/​sysman/​python/​README.md Documents API support. Nit: Align the stated 0.1.3 availability with package metadata and release notes.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +929 to +937
if is_root_user():
# Write back the health status just read so the device state is unchanged
rc = pz.zesDeviceSetHealthStatusExt(device_handle, health.value)
if check_rc(f"zesDeviceSetHealthStatusExt(device {device_index})", rc):
print_verbose(" Set health status successfully")
else:
print_verbose(
" Skipping zesDeviceSetHealthStatusExt due to insufficient permissions"
)
Comment on lines +161 to +166
| `zesDeviceGetState` | Device | 0.1.3 | None |
| `zesDeviceResetExt` | Device | 0.1.3 | Linux: Requires superuser; all device state is lost |
| `zesDeviceEventRegister` | Device | 0.1.3 | None |
| `zesDeviceGetHealthStatusExt` | Device | 0.1.3 | None |
| `zesDeviceSetHealthStatusExt` | Device | 0.1.3 | Linux: Requires superuser; persisted to non-volatile memory |
| `zesDeviceEnumFirmwares` | Device | 0.1.3 | None |

This branch has not been deployed

No deployments
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