-
Notifications
You must be signed in to change notification settings - Fork 85
Expand file tree
/
Copy pathmaintenance.py
More file actions
25 lines (17 loc) · 878 Bytes
/
maintenance.py
File metadata and controls
25 lines (17 loc) · 878 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from linode_api4.groups import Group
from linode_api4.objects import MappedObject
class MaintenanceGroup(Group):
"""
Collections related to Maintenance.
"""
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
API Documentation: https://techdocs.akamai.com/linode-api/reference/get-maintenance-policies
:returns: A list of Maintenance Policies that can be applied to Linodes
:rtype: List of MaintenancePolicy objects as MappedObjects
"""
result = self.client.get("/maintenance/policies", model=self)
return [MappedObject(**r) for r in result["data"]]