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
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>
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
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
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
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
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
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
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
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
* Adds a parent argument to backup-create.
* Adds parent_id to the backup create body if present.
Implements: blueprint incremental-backups
Change-Id: I76f720ae4eadf2a1977c4c2cbf286db4db079b63
* 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