Skip to content

Commit 8528b62

Browse files
Deprecate DBaaS backup-related methods & classes
1 parent 761734b commit 8528b62

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

linode_api4/objects/database.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from warnings import deprecated
2+
13
from linode_api4.objects import Base, DerivedBase, MappedObject, Property
24

35

@@ -63,6 +65,9 @@ def invalidate(self):
6365
Base.invalidate(self)
6466

6567

68+
@deprecated(
69+
reason="Backups are not supported for non-legacy database clusters."
70+
)
6671
class DatabaseBackup(DerivedBase):
6772
"""
6873
A generic Managed Database backup.
@@ -97,6 +102,9 @@ def restore(self):
97102
)
98103

99104

105+
@deprecated(
106+
reason="Backups are not supported for non-legacy database clusters."
107+
)
100108
class MySQLDatabaseBackup(DatabaseBackup):
101109
"""
102110
A backup for an accessible Managed MySQL Database.
@@ -107,6 +115,9 @@ class MySQLDatabaseBackup(DatabaseBackup):
107115
api_endpoint = "/databases/mysql/instances/{database_id}/backups/{id}"
108116

109117

118+
@deprecated(
119+
reason="Backups are not supported for non-legacy database clusters."
120+
)
110121
class PostgreSQLDatabaseBackup(DatabaseBackup):
111122
"""
112123
A backup for an accessible Managed PostgreSQL Database.
@@ -221,6 +232,9 @@ def patch(self):
221232
"{}/patch".format(MySQLDatabase.api_endpoint), model=self
222233
)
223234

235+
@deprecated(
236+
reason="Backups are not supported for non-legacy database clusters."
237+
)
224238
def backup_create(self, label, **kwargs):
225239
"""
226240
Creates a snapshot backup of a Managed MySQL Database.
@@ -358,6 +372,9 @@ def patch(self):
358372
"{}/patch".format(PostgreSQLDatabase.api_endpoint), model=self
359373
)
360374

375+
@deprecated(
376+
reason="Backups are not supported for non-legacy database clusters."
377+
)
361378
def backup_create(self, label, **kwargs):
362379
"""
363380
Creates a snapshot backup of a Managed PostgreSQL Database.

0 commit comments

Comments
 (0)