From b73b4bb9e49bbb8b39973c003f39ea6967728789 Mon Sep 17 00:00:00 2001 From: ezilber-akamai Date: Mon, 9 Feb 2026 14:25:08 -0500 Subject: [PATCH 1/2] Removed v4beta notices from Maintenance Policy fields/methods --- linode_api4/groups/linode.py | 2 -- linode_api4/groups/maintenance.py | 2 -- linode_api4/objects/account.py | 4 ++-- linode_api4/objects/linode.py | 2 +- test/integration/models/linode/test_linode.py | 3 +-- 5 files changed, 4 insertions(+), 9 deletions(-) diff --git a/linode_api4/groups/linode.py b/linode_api4/groups/linode.py index f88808e64..e32a284f1 100644 --- a/linode_api4/groups/linode.py +++ b/linode_api4/groups/linode.py @@ -335,8 +335,6 @@ def instance_create( :type network_helper: bool :param maintenance_policy: The slug of the maintenance policy to apply during maintenance. If not provided, the default policy (linode/migrate) will be applied. - NOTE: This field is in beta and may only - function if base_url is set to `https://api.linode.com/v4beta`. :type maintenance_policy: str :returns: A new Instance object, or a tuple containing the new Instance and diff --git a/linode_api4/groups/maintenance.py b/linode_api4/groups/maintenance.py index 7d56cec6e..63cb424df 100644 --- a/linode_api4/groups/maintenance.py +++ b/linode_api4/groups/maintenance.py @@ -9,8 +9,6 @@ class MaintenanceGroup(Group): def maintenance_policies(self): """ - .. note:: This endpoint is in beta. This will only function if base_url is set to `https://api.linode.com/v4beta`. - Returns a collection of MaintenancePolicy objects representing available maintenance policies that can be applied to Linodes diff --git a/linode_api4/objects/account.py b/linode_api4/objects/account.py index 54298ed11..c5ee9fa35 100644 --- a/linode_api4/objects/account.py +++ b/linode_api4/objects/account.py @@ -220,7 +220,7 @@ class AccountSettings(Base): "interfaces_for_new_linodes": Property(mutable=True), "maintenance_policy": Property( mutable=True - ), # Note: This field is only available when using v4beta. + ), } @@ -249,7 +249,7 @@ class Event(Base): "duration": Property(), "secondary_entity": Property(), "message": Property(), - "maintenance_policy_set": Property(), # Note: This field is only available when using v4beta. + "maintenance_policy_set": Property(), "description": Property(), "source": Property(), "not_before": Property(is_datetime=True), diff --git a/linode_api4/objects/linode.py b/linode_api4/objects/linode.py index fae0926d5..87df246ad 100644 --- a/linode_api4/objects/linode.py +++ b/linode_api4/objects/linode.py @@ -802,7 +802,7 @@ class Instance(Base): "interface_generation": Property(), "maintenance_policy": Property( mutable=True - ), # Note: This field is only available when using v4beta. + ), "locks": Property(unordered=True), } diff --git a/test/integration/models/linode/test_linode.py b/test/integration/models/linode/test_linode.py index c485dd19c..574d5d9d2 100644 --- a/test/integration/models/linode/test_linode.py +++ b/test/integration/models/linode/test_linode.py @@ -1101,8 +1101,7 @@ def test_delete_interface_containing_vpc( def test_create_linode_with_maintenance_policy(test_linode_client): client = test_linode_client - # TODO: Replace with random region after GA - region = "ap-south" + region = get_region(client, {"Linodes", "Cloud Firewall"}, site_type="core") label = get_test_label() policies = client.maintenance.maintenance_policies() From 7687029bddd42e9c8c675c45573121cb72469990 Mon Sep 17 00:00:00 2001 From: ezilber-akamai Date: Mon, 9 Feb 2026 14:33:22 -0500 Subject: [PATCH 2/2] Fix lint --- linode_api4/objects/account.py | 4 +--- linode_api4/objects/linode.py | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/linode_api4/objects/account.py b/linode_api4/objects/account.py index c5ee9fa35..a4aca1848 100644 --- a/linode_api4/objects/account.py +++ b/linode_api4/objects/account.py @@ -218,9 +218,7 @@ class AccountSettings(Base): "object_storage": Property(), "backups_enabled": Property(mutable=True), "interfaces_for_new_linodes": Property(mutable=True), - "maintenance_policy": Property( - mutable=True - ), + "maintenance_policy": Property(mutable=True), } diff --git a/linode_api4/objects/linode.py b/linode_api4/objects/linode.py index 87df246ad..1edf4e014 100644 --- a/linode_api4/objects/linode.py +++ b/linode_api4/objects/linode.py @@ -800,9 +800,7 @@ class Instance(Base): "lke_cluster_id": Property(), "capabilities": Property(unordered=True), "interface_generation": Property(), - "maintenance_policy": Property( - mutable=True - ), + "maintenance_policy": Property(mutable=True), "locks": Property(unordered=True), }