Updated the hacking version as per global-requirements.
Fixed some of new appearing hacking rules, as listed follows:
- E128 continuation line under-indented for visual indent
- E265 block comment should start with '# '
- E713 test for membership should be 'not in'
- H238 old style class declaration, use new style (inherit from `object`)
Rules which are not yet fixed have been incorporated to ignorelist
- H405 Multi line docstrings should start with a one line summary
followed by an empty line
- H501 Do not use locals() or self.__dict__ for formatting strings
Change-Id: I885c6fa8ad0e6a98f7a8479f3441ed08ed2cbaa6
The Oslo libraries have moved all of their code out of the 'oslo'
namespace package into per-library packages. The namespace package was
retained during kilo for backwards compatibility, but will be removed by
the liberty-2 milestone. This change removes the use of the namespace
package, replacing it with the new package names.
The patches in the libraries will be put on hold until application
patches have landed, or L2, whichever comes first. At that point, new
versions of the libraries without namespace packages will be released as
a major version update.
Please merge this patch, or an equivalent, before L2 to avoid problems
with those library releases.
Blueprint: remove-namespace-packages
https://blueprints.launchpad.net/oslo-incubator/+spec/remove-namespace-packages
Change-Id: I2a8caa859830b3416bfe54e4261dd3415ac5a76a
While testing the osprofiler code, certain grammatical inconsistencies
were found in the help/messages.
These have been fixed.
Change-Id: Ia0b81870e15a9bc118bcaa81e698ef0e44c96f94
The python-troveclient module still had references to strutils, and
gettextutils which are now obsolete.
Change-Id: Ia54a565c00966b0a1cb5f18c6e17e1237b2bfee6
Partial-Bug: #1380789
To be able to create profiling traces for Trove, client should be
able to send special HTTP header that contains trace info.
This patch is as well important to be able to make cross project
traces. (Typical case horizon calls Trove via python client, if
profiler is initialized, Trove client will add extra header, that
will be parsed by special osprofiler middleware in Trove api)
Don't worry no security issue here, trace information is signed
by HMAC key that is setted in api-paste.ini. So only person that
knows HMAC key is able to send proper header.
Main patch in Trove is: I580cce8d2b3c4ec9ce625ac09de6f14e1249f6f5
We prepared a common BP in oslo-spec due to integration change is
similar to all projects: I95dccdc9f274661767d2659c18b96da169891f30
Currently there are 2 other projects are using osprofiler: Glance &
Cinder, and some others are working in progress.
Change-Id: I5a76e11d428c63d33f6d2c2021426090ebf8340c
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
Updated trove client to support Keystone V3 API. The
Keystoneclient session object is used for authentication, retrieving
the service catalog and HTTP connection/session management.
Added additional CLI parameters for Keystone V3.
Added tests using requests_mock instead of mocking completely the
session object like the previous failed patch:
https://review.openstack.org/#/c/102315
Change-Id: Ib804c0a45b3b4d3f8670ec642b2c2fd1be6cd656
Trove CLI appears to be broken (fresh checkout, devstack as well as
openstack gate). All commands fail with
ERROR: __init__() got an unexpected keyword argument 'http_log_debug'
Correcting the obvious place where this appears to be an issue is
causing additional failures and as it is time-critical to get this
back up and running, I'm proposing a reversal of the change from
3c47a1855b7ee1345dadfb00ae90a6279b7c424e while that change is
completely reworked.
I will ping trove core for an approval on this and if I don't get an
approval, I'll fast track this reversal.
Change-Id: Icac028cfafac57c7e3ef03d4277ae2b7833bf58f
Partial-Bug: 1391840
Updated trove client to support Keystone V3 API. The
Keystoneclient session object is used for authentication, retrieving
the service catalog and HTTP connection/session management.
Added additional CLI parameters for Keystone V3.
Change-Id: I800c252234be2ff11d818cf7513c61c5431eb15c
Closes-Bug: 1323866
Overwrite the HelpFormatter constructor in the class
OpenStackHelpFormatter to modify the default value of the
max_help_position to extend the width of the argument column
in the help output.
example output before this patch:
configuration-attach
Attaches a configuration group to an instance.
configuration-create
Creates a configuration group.
configuration-default
Shows the default configuration of an instance.
configuration-delete
Deletes a configuration group.
configuration-detach
Detaches a configuration group from an instance.
example output after this patch:
configuration-attach Attaches a configuration group to an
instance.
configuration-create Creates a configuration group.
configuration-default Shows the default configuration of an
instance.
configuration-delete Deletes a configuration group.
configuration-detach Detaches a configuration group from an
instance.
Change-Id: Ia3ad8e9fefca6da40f55ab3de902c015a0d17006
Closes-Bug: #1326471
BaseException.message has been deprecated as of Python 2.6.
http://legacy.python.org/dev/peps/pep-0352/
Replaced e.message with six.text_type(e) (uses unicode with
Python 2.x and str with Python 3.x).
Change-Id: I590749a1d05f39350996ec5ce5838b9c90baeb92
* E265 block comment should start with '# '
* E128 continuation line under-indented for visual indent
* E713 test for membership should be 'not in'
Tested with pep8 version 1.5.6 (2014-04-14).
Change-Id: If2853c79bea91ebef5cd97dff66788b46b174a9a
Make help strings more consistent:
* Fix spelling and capitalization
* Add "." at end of each string
* Fix spaces.
* Improve wording
Change-Id: I22e84ebecb87f1c803cfb8369db3798fe56903ff
extensions on the contrib path (i.e. troveclient/v1/contrib/*.py),
extensions on the python path that follow the naming convention of
*_python_troveclient_ext, and entry-points will now be discovered
and loaded.
due to the mismatch of the api version and the troveclient
package name, '1.0' vs. '1', the client has been patched to look
for contrib in troveclient/v1 vs. the standard troveclient/v1_0
Change-Id: I3ea7bb5ba471b0d421581dcfda7216f429cb7b65
Closes-Bug: #1267577
Reason:
- trove help output misplaces the position of "<subcommand> ..."
from bottom to top.
- This behavior is because of formatting done to
Print positionals before optionals.
Changes:
- Sequence fixed in trove help output.
Change-Id: I8aff2eec9f915a7ec1960b67ee7ba8423624aad6
Closes-Bug: #1260332
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
print positionals before optionals in the usage string to help
users avoid argparse nargs='*' problems.
ex: 'trove create --databases <db_name> <name> <flavor_id>'
fails with 'error: too few arguments', but this succeeds:
'trove create <name> <flavor_id> --databases <db_name>'
Change-Id: I400c9f0ca5580bd287c5f3bcf935352e88071bc8
Closes-Bug: #1243981
Rackspace is currently setting their service types to weird things.
Support them, because we love special snowflakes.
Change-Id: I1519be00a3086945338a953bc2a1e7a4e0e65400
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