move troveclient to keystoneauth as keystoneclient's auth session,
plugins and adapter code has been deprecated.
Change-Id: I3d57dde9c013038accbab8cc30d9622a142d0f71
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
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
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
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
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
Instead of globally disabling pyflakes warnings,
disable only those that occur frequently and
fix the rest. Enable gating on those.
Change-Id: I774d809ebcda2339b30c104b031211a3b2c491bd