Skip to content

feat: add ACLP list entities method#674

Draft
shkaruna wants to merge 1 commit intolinode:devfrom
shkaruna:feat/aclp-list-entities
Draft

feat: add ACLP list entities method#674
shkaruna wants to merge 1 commit intolinode:devfrom
shkaruna:feat/aclp-list-entities

Conversation

@shkaruna
Copy link
Copy Markdown

@shkaruna shkaruna commented Mar 30, 2026

📝 Description

  1. Update ACLP monitor AlertDefinition struct. Add scope & region fields.
  2. Add entity envelope in AlertDefinition for GET, POST and PUT API responses.
"entities":` { // empty dict for region and account scope alert
"url":"/monitor/services/{service_type}/alert-definitions/{id}/entities",
  "count": integer,
 "has_more_resources": boolean
 }
  1. Add new method to list entities.
    API: GET /monitor/services/{service_type}/alert-definitions/{id}/entities

JIRA: DPS-41869

✔️ How to Test

What are the steps to reproduce the issue or verify the changes?
Not applicable

How do I run the relevant unit/integration tests?

Prerequisites:
Clone the repository
Prepare environment (zsh / macOS)

Create and activate venv:
python3 -m venv .venv
source .venv/bin/activate

install deps
python -m pip install --upgrade pip

Install runtime dependencies:
pip3 install requests polling deprecated

Install dev/test extras
pip3 install -e '.[dev,test]'

test deps
pip3 install pytest mock httpretty pytest-rerunfailures

Unit tests:

  1. Run all unit tests:
    python -m pytest test/unit -q

  2. Run Monitor alert definition unit tests:
    python -m pytest test/unit/groups/monitor_api_test.py -q -s -v
    =============================================================== test session starts ================================================================
    platform linux -- Python 3.10.12, pytest-9.0.2, pluggy-1.6.0
    rootdir: /home/shkaruna/sdk/linode_api4-python
    configfile: pyproject.toml
    plugins: anyio-4.12.1, rerunfailures-16.1
    collected 4 items

test/unit/groups/monitor_api_test.py ....

================================================================ 4 passed in 0.11s =================================================================

Integration tests: (TODO: API is not live in devcloud & production)

Add entities envelope in AlertDefinition. Add list entities GET API method. Add tests.
@shkaruna shkaruna force-pushed the feat/aclp-list-entities branch from b632359 to 9e99b43 Compare March 30, 2026 06:32
@shkaruna
Copy link
Copy Markdown
Author

@satkumar-akamai : Please review

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.

1 participant