11 Commits

Author SHA1 Message Date
Steve Martinelli
fff88e0a9c switch to keystoneauth
move troveclient to keystoneauth as keystoneclient's auth session,
plugins and adapter code has been deprecated.

Change-Id: I3d57dde9c013038accbab8cc30d9622a142d0f71
2016-05-22 22:06:51 -04:00
Zhiqiang Fan
4ed9ef91e0 remove unnecessary message when running unit test
When we test log related code, we still print the tested log message
into stderr, which is not quite useful for developers, we should
mock those message. Package fixtures.FakeLogger already provides an
option to mock specified logger, so let's use it.

Note: this patch also changes an unnecessary object attribute to local
varible.

Change-Id: I4bc5beaa4eba149f12c58f072fe66163aed8c0c8
Closes-Bug: #1500236
2015-10-21 07:08:42 -06:00
Sushil Kumar
61a756a014 Added more unit-tests to improve code coverage
Following files were too low on code coverage,
so the coverage has been enhanced with addition of more unit-tests.
- troveclient/client.py
- troveclient/v1/shell.py

The methodology to test shell.py has been motivated from the
one used by python-novaclient to test novaclient/v2/shell.py

Also, found an unmocked entry in test_secgroups.py,
which was causing intermittent failure while
writing the tests for shell.py.

Closes-Bug: #1455856
Change-Id: I6a148fb5caad6a83b6ac23411b6458f231064ead
2015-06-08 10:51:40 +00:00
Sushil Kumar
8b1e3c3663 Corrects order of parameters to assertEqual
The correct order of parameters to assertEqual is (expected,
actual).
It makes the assertion message more meaningful when there is
a failure.

Change-Id: Ifd35dbf6a6157c6ec7607e8ace6757b12f47657d
Closes-Bug: #1277104
2015-04-28 13:33:05 +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
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
Dirk Mueller
4ddb58ce9e Start using pyflakes
Instead of globally disabling pyflakes warnings,
disable only those that occur frequently and
fix the rest. Enable gating on those.

Change-Id: I774d809ebcda2339b30c104b031211a3b2c491bd
2013-06-26 13:48:18 +02: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