feat(pyoaev): adapt endpoint and AI target APIs to the asset taxonomy remodel (#307)#308
Open
SamuelHassine wants to merge 3 commits into
Open
feat(pyoaev): adapt endpoint and AI target APIs to the asset taxonomy remodel (#307)#308SamuelHassine wants to merge 3 commits into
SamuelHassine wants to merge 3 commits into
Conversation
…led asset_* API (#6704)
There was a problem hiding this comment.
Pull request overview
This PR updates the pyoaev client to align with OpenAEV’s asset taxonomy remodel by moving network-identifying fields to the asset level and treating AI targets as AI_TARGET-category assets behind the /ai_targets facade.
Changes:
- Renames endpoint network fields in endpoint create/upsert payloads from
endpoint_*toasset_*. - Updates AI target API handling to identify targets by
asset_idand adjusts allowed create attributes. - Adds a new injector contract field type
ai-targetfor selecting AI target assets via UI picker.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| test/apis/endpoint/test_endpoint.py | Updates endpoint upsert test payload to use asset_url. |
| pyoaev/contracts/contract_config.py | Adds ContractFieldType.AiTarget and new ContractAiTarget contract element. |
| pyoaev/apis/endpoint.py | Updates endpoint create attribute whitelist to use asset_hostname/asset_ips/asset_mac_addresses/asset_url. |
| pyoaev/apis/ai_target.py | Treats AI targets as assets (asset_id) and updates allowed AI target attributes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
Author
|
Review and fix pass complete:
Remaining before merge: one approving review is required (branch protection blocks self-approval by the author), and the optional smoke test of an injector/collector against a remodeled OpenAEV instance is still unchecked in the test plan. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adapts pyoaev to the OpenAEV asset taxonomy remodel (OpenAEV-Platform/openaev#6704), where AiTarget is merged into Asset and network fields move to the asset level:
BREAKING CHANGE: consumers building endpoint payloads with the old endpoint_hostname / endpoint_ips / endpoint_mac_addresses / endpoint_url keys must switch to the asset_* keys, and ai_target_api_key_variable must become ai_target_token. Requires an OpenAEV backend that includes the asset taxonomy remodel.
Closes #307
Test plan