Skip to content

Commit

Permalink
add controller_backupdb api method
Browse files Browse the repository at this point in the history
  • Loading branch information
rp- committed Feb 1, 2022
1 parent 6f79c05 commit 6a8a68e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions linstor/linstorapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -2699,6 +2699,20 @@ def controller_del_prop(self, key):
body
)

def controller_backupdb(self, backup_name):
"""
Backup controller database with the given backup_name.
:param str backup_name: Name the backup should have.
:return: A list containing ApiCallResponses from the controller.
:rtype: list[ApiCallResponse]
"""
self._require_version("1.13.0", msg="Backup DB is not support by controller version")
body = {
"backup_name": backup_name
}
return self._rest_request("BackupDb", "POST", "/v1/controller/backup/db", body)

def controller_info(self):
"""
If connected this method returns the controller info string.
Expand Down

0 comments on commit 6a8a68e

Please sign in to comment.