Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

updating MonitorService class#568

Merged
lgarber-akamai merged 2 commits intolinode:devlinode/linode_api4-python:devfrom
pmajali:devpmajali/linode_api4-python:devCopy head branch name to clipboard
Jul 9, 2025
Merged

updating MonitorService class#568
lgarber-akamai merged 2 commits intolinode:devlinode/linode_api4-python:devfrom
pmajali:devpmajali/linode_api4-python:devCopy head branch name to clipboard

Conversation

@pmajali
Copy link
Contributor

@pmajali pmajali commented Jul 4, 2025

📝 Description

/monitor/services/{service_type} endpoint was changed to return json instead of list. Updating implementation for the same

✔️ How to Test

import os
import logging
from linode_api4 import LinodeClient

client = LinodeClient(os.environ.get("MY_PERSONAL_ACCESS_TOKEN"))
client.base_url = "https://api.linode.com/v4beta"

# List all services
services = client.monitor.services()
for s in services:
    print("Label:", s.label)
    print("Service Type:", s.service_type)

# List a specific service
dbaas = client.load(MonitorService, "dbaas")
print(f"Service Type: {dbaas.service_type}")
print(f"Label: {dbaas.label}")

How do I run the relevant unit/integration tests?

unit-test: make test-unit TEST_SUITE=monitor
integration tests: make testint TEST_SUITE=monitor

@pmajali pmajali requested a review from a team as a code owner July 4, 2025 11:43
@pmajali pmajali requested review from ykim-akamai and zliang-akamai and removed request for a team July 4, 2025 11:43
@lgarber-akamai lgarber-akamai self-requested a review July 7, 2025 15:58
Copy link
Member

@zliang-akamai zliang-akamai left a comment

Choose a reason for hiding this comment

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

Looks good and works well!

Copy link
Contributor

@ykim-akamai ykim-akamai left a comment

Choose a reason for hiding this comment

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

Tests are passing on my end. Thanks for the fix!

Copy link
Contributor

@lgarber-akamai lgarber-akamai left a comment

Choose a reason for hiding this comment

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

Looks great! MonitorService switching from a JSONObject to Base may technically be a breaking change but I don't think it should affect common use-cases.

@lgarber-akamai lgarber-akamai merged commit b6ccfd3 into linode:dev Jul 9, 2025
12 checks passed
@zliang-akamai zliang-akamai added the new-feature for new features in the changelog. label Jul 11, 2025
@yec-akamai yec-akamai added improvement for improvements in existing functionality in the changelog. and removed new-feature for new features in the changelog. labels Jul 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement for improvements in existing functionality in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.