Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
0ecf79a
Update test region capability for LDE (#530)
ykim-akamai Apr 15, 2025
b2eff93
Implement JSONObject put_class ClassVar (#534)
lgarber-akamai Apr 28, 2025
c72280e
add retry to flaky test, safety around bucket delete (#538)
ykim-akamai Apr 28, 2025
c449113
update obj test region (#539)
ykim-akamai Apr 29, 2025
8cc03ee
Trusted publisher for PyPI (#536)
zliang-akamai May 7, 2025
751180e
Project: Limits Visibility M1 (#544)
yec-akamai May 12, 2025
ace528b
Update test assertion (#546)
ykim-akamai May 12, 2025
a8fa1d7
improve test (#547)
yec-akamai May 12, 2025
40c1630
build(deps): bump slackapi/slack-github-action from 2.0.0 to 2.1.0 (#…
dependabot[bot] May 13, 2025
3a1ec42
Drop LA and v4beta notice for Limits Visibility (#550)
yec-akamai May 20, 2025
032f294
Proj/configurable db params (#553)
ezilber-akamai May 21, 2025
ff344dd
Deprecate `Event.mark_read()` (#551)
zliang-akamai May 24, 2025
8ea18d1
Added missing doc links (#556)
ezilber-akamai May 27, 2025
fc620df
project: UDP NodeBalancers (#549)
lgarber-akamai May 27, 2025
0b1b2af
Adding SDK changes for ACLP APIs (#528)
pmajali Jun 2, 2025
7b7f647
Reorganized DB unit tests (#561)
ezilber-akamai Jun 6, 2025
389905e
Fix Tests for v5.33 release (#567)
zliang-akamai Jun 30, 2025
b6ccfd3
updating MonitorService class (#568)
pmajali Jul 9, 2025
818feb8
Add basic model filter integration test coverage (#563)
ykim-akamai Jul 15, 2025
e35ffe8
build(deps): bump slackapi/slack-github-action from 2.1.0 to 2.1.1 (#…
dependabot[bot] Jul 16, 2025
de7cde1
Fix timeout integration test cases (#575)
yec-akamai Jul 22, 2025
9987e83
Raise the exception from the API error after retry in tests (#576)
zliang-akamai Jul 24, 2025
74e272a
Support Monitor Client and Fetch Entity Metrics (#569)
yec-akamai Aug 11, 2025
e18c8f1
Project: Host Maintenance Policy (#582)
ezilber-akamai Aug 15, 2025
5918824
Fixed maintenance policy test (#584)
ezilber-akamai Aug 15, 2025
b66a974
fix (#585)
vshanthe Aug 18, 2025
4825c2b
Fix monitor-api integration test (#586)
yec-akamai Aug 18, 2025
0c32726
build(deps): bump actions/checkout from 4 to 5 (#579)
dependabot[bot] Aug 20, 2025
f2055c6
build(deps): bump actions/download-artifact from 4 to 5 (#580)
dependabot[bot] Aug 20, 2025
78ae618
Add label to nodepool (#588)
rammanoj Aug 22, 2025
0c1f2b8
Updated incorrect documentation link for maintenance policies (#590)
ezilber-akamai Sep 5, 2025
8b85487
Resolve various integration test failures (#591)
lgarber-akamai Sep 8, 2025
2d30277
Add no-osl-1 to image test disallow list (#593)
lgarber-akamai Sep 8, 2025
4f8ba4c
build(deps): bump actions/setup-python from 5 to 6 (#595)
dependabot[bot] Sep 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: setup python 3
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.x'

Expand All @@ -33,8 +33,8 @@ jobs:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Run tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
build-mode: none
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 'Checkout repository'
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: 'Dependency Review'
uses: actions/dependency-review-action@v4
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/e2e-test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:

# Check out merge commit
- name: Checkout PR
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
ref: ${{ inputs.sha }}
fetch-depth: 0
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.x'

Expand Down Expand Up @@ -150,7 +150,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0
submodules: 'recursive'
Expand All @@ -176,7 +176,7 @@ jobs:

steps:
- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.x'

Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,21 @@ jobs:
steps:
- name: Clone Repository with SHA
if: ${{ inputs.sha != '' }}
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0
submodules: 'recursive'
ref: ${{ inputs.sha }}

- name: Clone Repository without SHA
if: ${{ inputs.sha == '' }}
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0
submodules: 'recursive'

- name: Setup Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ inputs.run-eol-python-version == 'true' && env.EOL_PYTHON_VERSION || inputs.python-version || env.DEFAULT_PYTHON_VERSION }}

Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0
submodules: 'recursive'
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:

steps:
- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.x'

Expand Down Expand Up @@ -178,18 +178,18 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0
submodules: 'recursive'

- name: Download test report
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: test-report-file

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.x'

Expand Down Expand Up @@ -232,7 +232,7 @@ jobs:
steps:
- name: Notify Slack
id: main_message
uses: slackapi/slack-github-action@v2.0.0
uses: slackapi/slack-github-action@v2.1.1
with:
method: chat.postMessage
token: ${{ secrets.SLACK_BOT_TOKEN }}
Expand Down Expand Up @@ -264,7 +264,7 @@ jobs:

- name: Test summary thread
if: success()
uses: slackapi/slack-github-action@v2.0.0
uses: slackapi/slack-github-action@v2.1.1
with:
method: chat.postMessage
token: ${{ secrets.SLACK_BOT_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
-
name: Run Labeler
uses: crazy-max/ghaction-github-labeler@24d110aa46a59976b8a7f35518cb7f14f434c916
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/nightly-smoke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
ref: dev

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.x'

Expand All @@ -45,7 +45,7 @@ jobs:

- name: Notify Slack
if: always() && github.repository == 'linode/linode_api4-python'
uses: slackapi/slack-github-action@v2.0.0
uses: slackapi/slack-github-action@v2.1.1
with:
method: chat.postMessage
token: ${{ secrets.SLACK_BOT_TOKEN }}
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/publish-pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@ on:
types: [ published ]
jobs:
pypi-release:
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
runs-on: ubuntu-latest
environment: pypi-release
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.x'

Expand All @@ -25,5 +29,3 @@ jobs:

- name: Publish the release artifacts to PyPI
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # pin@release/v1.12.4
with:
password: ${{ secrets.PYPI_API_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/release-cross-repo-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout linode_api4 repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0
submodules: 'recursive'
Expand All @@ -25,12 +25,12 @@ jobs:
run: sudo apt-get install -y build-essential

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.10'

- name: Checkout ansible repo
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
repository: linode/ansible_linode
path: .ansible/collections/ansible_collections/linode/cloud
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-notify-slack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
- name: Notify Slack - Main Message
id: main_message
uses: slackapi/slack-github-action@v2.0.0
uses: slackapi/slack-github-action@v2.1.1
with:
method: chat.postMessage
token: ${{ secrets.SLACK_BOT_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ lint: build
# TEST_CASE: Optional, specify a test case (e.g. 'test_image_replication')
# TEST_ARGS: Optional, additional arguments for pytest (e.g. '-v' for verbose mode)

TEST_COMMAND = $(if $(TEST_SUITE),$(if $(filter $(TEST_SUITE),linode_client login_client),$(TEST_SUITE),models/$(TEST_SUITE)))
TEST_COMMAND = $(if $(TEST_SUITE),$(if $(filter $(TEST_SUITE),linode_client login_client filters),$(TEST_SUITE),models/$(TEST_SUITE)))

.PHONY: test-int
test-int:
Expand Down
2 changes: 1 addition & 1 deletion linode_api4/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# isort: skip_file
from linode_api4.objects import *
from linode_api4.errors import ApiError, UnexpectedResponseError
from linode_api4.linode_client import LinodeClient
from linode_api4.linode_client import LinodeClient, MonitorClient
from linode_api4.login_client import LinodeLoginClient, OAuthScopes
from linode_api4.paginated_list import PaginatedList
from linode_api4.polling import EventPoller
3 changes: 3 additions & 0 deletions linode_api4/groups/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
from .lke import *
from .lke_tier import *
from .longview import *
from .maintenance import *
from .monitor import *
from .monitor_api import *
from .networking import *
from .nodebalancer import *
from .object_storage import *
Expand Down
2 changes: 1 addition & 1 deletion linode_api4/groups/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def maintenance(self):
"""
Returns a collection of Maintenance objects for any entity a user has permissions to view. Cancelled Maintenance objects are not returned.

API Documentation: https://techdocs.akamai.com/linode-api/reference/get-account-logins
API Documentation: https://techdocs.akamai.com/linode-api/reference/get-maintenance

:returns: A list of Maintenance objects on this account.
:rtype: List of Maintenance objects as MappedObjects
Expand Down
54 changes: 52 additions & 2 deletions linode_api4/groups/database.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
from typing import Any, Dict, Union

from linode_api4 import (
MySQLDatabaseConfigOptions,
PostgreSQLDatabaseConfigOptions,
)
from linode_api4.errors import UnexpectedResponseError
from linode_api4.groups import Group
from linode_api4.objects import (
Expand Down Expand Up @@ -63,6 +69,26 @@ def engines(self, *filters):
"""
return self.client._get_and_filter(DatabaseEngine, *filters)

def mysql_config_options(self):
"""
Returns a detailed list of all the configuration options for MySQL Databases.

API Documentation: https://techdocs.akamai.com/linode-api/reference/get-databases-mysql-config

:returns: The JSON configuration options for MySQL Databases.
"""
return self.client.get("/databases/mysql/config", model=self)

def postgresql_config_options(self):
"""
Returns a detailed list of all the configuration options for PostgreSQL Databases.

API Documentation: https://techdocs.akamai.com/linode-api/reference/get-databases-postgresql-config

:returns: The JSON configuration options for PostgreSQL Databases.
"""
return self.client.get("/databases/postgresql/config", model=self)

def instances(self, *filters):
"""
Returns a list of Managed Databases active on this account.
Expand Down Expand Up @@ -93,7 +119,15 @@ def mysql_instances(self, *filters):
"""
return self.client._get_and_filter(MySQLDatabase, *filters)

def mysql_create(self, label, region, engine, ltype, **kwargs):
def mysql_create(
self,
label,
region,
engine,
ltype,
engine_config: Union[MySQLDatabaseConfigOptions, Dict[str, Any]] = None,
**kwargs,
):
"""
Creates an :any:`MySQLDatabase` on this account with
the given label, region, engine, and node type. For example::
Expand Down Expand Up @@ -123,13 +157,16 @@ def mysql_create(self, label, region, engine, ltype, **kwargs):
:type engine: str or Engine
:param ltype: The Linode Type to use for this cluster
:type ltype: str or Type
:param engine_config: The configuration options for this MySQL cluster
:type engine_config: Dict[str, Any] or MySQLDatabaseConfigOptions
"""

params = {
"label": label,
"region": region,
"engine": engine,
"type": ltype,
"engine_config": engine_config,
}
params.update(kwargs)

Expand Down Expand Up @@ -216,7 +253,17 @@ def postgresql_instances(self, *filters):
"""
return self.client._get_and_filter(PostgreSQLDatabase, *filters)

def postgresql_create(self, label, region, engine, ltype, **kwargs):
def postgresql_create(
self,
label,
region,
engine,
ltype,
engine_config: Union[
PostgreSQLDatabaseConfigOptions, Dict[str, Any]
] = None,
**kwargs,
):
"""
Creates an :any:`PostgreSQLDatabase` on this account with
the given label, region, engine, and node type. For example::
Expand Down Expand Up @@ -246,13 +293,16 @@ def postgresql_create(self, label, region, engine, ltype, **kwargs):
:type engine: str or Engine
:param ltype: The Linode Type to use for this cluster
:type ltype: str or Type
:param engine_config: The configuration options for this PostgreSQL cluster
:type engine_config: Dict[str, Any] or PostgreSQLDatabaseConfigOptions
"""

params = {
"label": label,
"region": region,
"engine": engine,
"type": ltype,
"engine_config": engine_config,
}
params.update(kwargs)

Expand Down
Loading
Loading