Skip to content

Added v4beta notices for new fields and methods #578

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions linode_api4/groups/linode.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,8 @@ def instance_create(
:type placement_group: Union[InstancePlacementGroupAssignment, PlacementGroup, Dict[str, Any], int]
: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
Expand Down
2 changes: 2 additions & 0 deletions linode_api4/groups/maintenance.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ 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

Expand Down
4 changes: 1 addition & 3 deletions linode_api4/groups/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
]
from typing import Any, Optional

from linode_api4 import (
PaginatedList,
)
from linode_api4 import PaginatedList
from linode_api4.errors import UnexpectedResponseError
from linode_api4.groups import Group
from linode_api4.objects import (
Expand Down
6 changes: 4 additions & 2 deletions linode_api4/objects/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,9 @@ class AccountSettings(Base):
),
"object_storage": Property(),
"backups_enabled": Property(mutable=True),
"maintenance_policy": Property(mutable=True),
"maintenance_policy": Property(
mutable=True
), # Note: This field is only available when using v4beta.
}


Expand Down Expand Up @@ -227,7 +229,7 @@ class Event(Base):
"duration": Property(),
"secondary_entity": Property(),
"message": Property(),
"maintenance_policy_set": Property(),
"maintenance_policy_set": Property(), # Note: This field is only available when using v4beta.
"description": Property(),
"source": Property(),
"not_before": Property(is_datetime=True),
Expand Down
4 changes: 3 additions & 1 deletion linode_api4/objects/linode.py
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,9 @@ class Instance(Base):
"disk_encryption": Property(),
"lke_cluster_id": Property(),
"capabilities": Property(unordered=True),
"maintenance_policy": Property(mutable=True),
"maintenance_policy": Property(
mutable=True
), # Note: This field is only available when using v4beta.
}

@property
Expand Down