summaryrefslogtreecommitdiff
path: root/troveclient/tests/test_backups.py
Commit message (Collapse)AuthorAgeFilesLines
* Use unittest.mock instead of mockHervé Beraud2020-06-111-2/+3
| | | | | | | | The mock third party library was needed for mock support in py2 runtimes. Since we now only support py36 and later, we can use the standard lib unittest.mock module instead. Change-Id: Ida35e5f79ee17ef8ac6ea2186019ddd4040ec882
* Use unittest.mock instead of third party mockSean McGinnis2020-04-181-1/+1
| | | | | | | | Now that we no longer support py27, we can use the standard library unittest.mock module instead of the third party mock lib. Change-Id: Ib83e626f51e6e01898bb7931c1660a1a548500f3 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* Support backup filteringLingxian Kong2019-08-251-0/+20
| | | | | | | | | | | | | | To get all the backups of an instance: openstack database backup list --instance-id <instance-id> Admin user gets backups of all the projects: openstack database backup list --all-projects Story: #2006433 Task: #36346 Change-Id: I871d1ffa27805158024e8ecbe1dceae725c4deac
* Remove extra parameter 'backup' in backup-createint32bit2017-08-221-9/+0
| | | | | | | | | | | The parameter 'backup' in backup-create is never read by our Trove API[1], so I guess it's a extra key argument for history reason. In addition, the 'backup-copy' subcommand should be removed as well because it does not support in current Trove API. [1] https://github.com/openstack/trove/blob/master/trove/backup/service.py#L61-L77 Change-Id: I33d439e0037efd4573eeae186758fd778ba5c514
* Implement scheduled backups2.5.0Morgan Jones2016-08-251-0/+123
| | | | | | | | Implements Trove client APIs to implement scheduled backups via Mistral workflow. Change-Id: I012eb88359e063adbb86979a8fbd2e2a1e83f816 Implements: blueprint scheduled-backups
* Add --incremental flag to backup-createAli Adil2016-08-251-5/+16
| | | | | | | | | | Added --incremental flag to backup-create and set the default value to False. When the flag is passed it will create a backup based on the last good known full/incremental backup. If there is no previous backup a full backup will be created. Change-Id: I96498180890b8b1692b1bac3b19988532f6eb077 Partial-Bug: #1607429
* Fix troveclient to support MistralMorgan Jones2016-05-261-1/+2
| | | | | | | | | | | | | | | Mistral gets confused by Trove's (aguably wrong) inclusion of a member called 'items' in the Pagenated object that Trove returns as the result of 'list' client methods. This change changes Pagenated to inherit from the 'list' class so that the items method is not required (and has the additional benefit of just generally being a better implementation of a list type result). Change-Id: I683120451f69f07f131e6fa422c082f85735b196 Closes-bug: 1585705 Depends-On: Id674ae57bfcdc5e09bde1e323a614b3a03a7cad3
* Correct order of parameters to assertEqualAmrith Kumar2015-02-231-1/+1
| | | | | | | | | The correct order of parameters to assertEqual is (expected, actual). It makes the assertion message more meaningful when there is a failure. Change-Id: I1ab6933d2eee336b41f6ab791e32ad6eaa004a6b Partial-Bug: #1277104
* Add instance name as parameter to CLIDoug Shelley2014-12-081-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow CLI to take instance name as well as instance id for sub-commands where instance can be specified. This commit does not include the metadata-* commands as the backend for that feature isn't merged. The spec will be adjusted to reflect that they commands will be out of scope. Affected sub-commands are: backup-create backup-list-instance configuration-attach configuration-default configuration-detach create (just for --replica_of) database-create database-delete database-list detach-replica delete resize-flavor resize-instance resize-volume restart root-enable root-show update user-create user-delete user-grant-access user-list user-revoke-access user-show user-show-access user-update-attributes Unit tests were added to test passing in an instance object for the affected sub-commands. A new set of unit tests were added for databases.py (doesn't look like any existed before). Change-Id: I5554a7d423990ff9cb24437a893d90d212b022b1 blueprint: add-instance-name-to-cli
* Merge "Adding command for copying backups"Jenkins2014-06-271-0/+8
|\
| * Adding command for copying backupsSteve Leon2014-06-031-0/+8
| | | | | | | | | | | | | | | | | | Added sub-command 'backup-copy' that will take a backup ID (could be from a different region) and copies it to its own region. Partially implements: blueprint cross-region-backup-availability Change-Id: Ia9561ead98762fa817e07098a104c39e211315e0
* | Add datastore filter to backup-listSteve Leon2014-06-031-1/+11
|/ | | | | | | | | | | | | | | This fix enhances the backup-list command to optionally receive a datastore name or ID to filter the backup list by. The filter is sent as a query string. To attach the query string to the URL and have it still work with the URL for pagination, i have made some changes in the way url with query strings are constructed. This includes the pagination URL. partially implements: blueprint backup-metadata Change-Id: I0b9ef3ec7f51ed76517a22f9c0edfdce3694a36f
* Enabled F821, H306, H402, and H404 flake8 ruleSushil Kumar2014-05-091-1/+1
| | | | | | | | | | | | | | Reasons: - F821 is disabled. - H306 is disabled. - H402 is disabled. - H404 is disabled. Changes: - Updates tox.ini to enable F821, H306, H402 and H404 rules. - Updates code for F821, H306, H402 and H404 violation. Change-Id: I772270bb833ac774e080fc63e330d6b333f23de2
* Adding support for incremental backupsRobert Myers2014-01-281-0/+8
| | | | | | | | | * Adds a parent argument to backup-create. * Adds parent_id to the backup create body if present. Implements: blueprint incremental-backups Change-Id: I76f720ae4eadf2a1977c4c2cbf286db4db079b63
* Adding pagination support for backupsRobert Myers2013-12-111-0/+101
* add a _pagination method to base Manager * switched existing paginated list to use the new method * removed description from backup list and added updated Implements: blueprint paginate-backup-list Change-Id: If33c55a35bae8ebd6ed654af5ce6dfd7f9e40096