12 Commits

Author SHA1 Message Date
Sean McGinnis
2b8282bb1e
Use unittest.mock instead of third party mock
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>
2020-04-18 11:59:46 -05:00
Doug Shelley
df3afb2abc Add instance name as parameter to CLI
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
2014-12-08 14:29:06 -05:00
Jenkins
045f6791bb Merge "Enabled F821, H306, H402, and H404 flake8 rule" 2014-05-23 04:59:20 +00:00
Peter Stachowski
ec4bfea842 Added check for empty attributes in trove CLI
Validated that new attributes are passed in for
user-update-attributes.  Added unit test and changed help message.

Change-Id: I1363278912fb5ffddd2e64550dc6ba70df8a9df8
Closes-Bug: #1298760
2014-05-13 10:37:08 -04:00
Sushil Kumar
8bc695bd70 Enabled F821, H306, H402, and H404 flake8 rule
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
2014-05-09 08:54:39 +00:00
He Yongli
59ec2bb433 Remove vim header
No need to set tabstop tons of times, this can be set in your vimrc
file instead.

More disucssion:
http://openstack.10931.n7.nabble.com/Remove-vim-modelines-td21780.html

Change-Id: I45766d91f0c0b3622bbdc7dc5517497c87ebee8c
Closes-Bug: #1229324
2014-02-16 13:08:07 +08:00
Robert Myers
fba4941fd2 Adding pagination support for backups
* 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
2013-12-11 10:15:50 -06:00
Denis Makogon
69c865695f Ignore fewer PEP8/flake8 rules
Reasons:
- code should be pythonicaly clean,
  that is why number of ignored rules should reduced

Changes:
- E125, F811, H102, H103, F201, H23,
  H302, F841, H301, H702, H703 rules are now enabled

Change-Id: Ibf4025162244d3c2f1278b49a76ec1527a729042
2013-12-10 18:49:20 +02:00
Michael Basnight
af4d4ed4f7 Fixing copyright and license headers
* Added HP copyrights as appropriate

Change-Id: If4f30b0caf03b16f5fb4f54185ba80d9fa41d0b0
2013-10-22 11:21:33 -07:00
Michael Basnight
fd43cbd73b Massive refactoring to the troveclient
The new client adheres to the standards of the other clients
now. It prints out tables, uses ENVVAR's for auth, no longer
stores pickled json in a login token, uses openstack common,
and moves the cli operations into a v1 module for the future
of trove when it has a v2 api.

Please note for compatibility, the troveclient.compat module
has the old cli. In order to deploy it, amend the setup.cfg
to include the compat module.

implements blueprint cli-compliance-upgrade

Change-Id: Ie69d9dbc75ce90496da316244c97acca1877a327
2013-10-09 19:21:08 -07:00
Denis M
812755e8a0 PEP8 with tox -epep8 check fails
Change-Id: Ife06919f321ab4ad73bece2e6080fbd7d947eeef
Fixes: bug #1219014
2013-08-30 20:32:17 +03:00
Michael Basnight
9916c8f273 Rename from reddwarf to trove.
Implements Blueprint reddwarf-trove-rename

Change-Id: Ib2d694c7466887ca297bea4250eca17cdc06b7bf
2013-06-21 20:15:23 +00:00