Skip to content

Commit

Permalink
Deprecate DBaaS backup-related methods & classes
Browse files Browse the repository at this point in the history
  • Loading branch information
lgarber-akamai committed Feb 5, 2025
1 parent 761734b commit 8528b62
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions linode_api4/objects/database.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from warnings import deprecated

from linode_api4.objects import Base, DerivedBase, MappedObject, Property


Expand Down Expand Up @@ -63,6 +65,9 @@ def invalidate(self):
Base.invalidate(self)


@deprecated(
reason="Backups are not supported for non-legacy database clusters."
)
class DatabaseBackup(DerivedBase):
"""
A generic Managed Database backup.
Expand Down Expand Up @@ -97,6 +102,9 @@ def restore(self):
)


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


@deprecated(
reason="Backups are not supported for non-legacy database clusters."
)
class PostgreSQLDatabaseBackup(DatabaseBackup):
"""
A backup for an accessible Managed PostgreSQL Database.
Expand Down Expand Up @@ -221,6 +232,9 @@ def patch(self):
"{}/patch".format(MySQLDatabase.api_endpoint), model=self
)

@deprecated(
reason="Backups are not supported for non-legacy database clusters."
)
def backup_create(self, label, **kwargs):
"""
Creates a snapshot backup of a Managed MySQL Database.
Expand Down Expand Up @@ -358,6 +372,9 @@ def patch(self):
"{}/patch".format(PostgreSQLDatabase.api_endpoint), model=self
)

@deprecated(
reason="Backups are not supported for non-legacy database clusters."
)
def backup_create(self, label, **kwargs):
"""
Creates a snapshot backup of a Managed PostgreSQL Database.
Expand Down

0 comments on commit 8528b62

Please sign in to comment.