Make a few cleanups:
- Remove python 2.7 stanza from setup.py
- Add requires on python >= 3.6 to setup.cfg so that pypi and pip
know about the requirement
- Remove obsolete sections from setup.cfg:
* Wheel is not needed for python 3 only repo
* Some other sections are obsolete
- Update classifiers
- Use sphinx-build everywhere
- Remove py27 testing, use victoria jobs template
- Set ignore_basepython_conflict in tox.ini
Change-Id: I8067cc94f5a8d29c836771173399f3ce71897ad8
Using "python setup.py check -r -s" method of checking the package has
been deprecated with the new recommendation to build the sdist and
wheel, then running "twine check" against the output.
Luckily, there is already a job that covers this that only runs when the
README, setup.py, or setup.cfg files change, making running this in the
pep8 job redundant. This covered by the test-release-openstack-python3
that is defined in the publish-to-pypi-python3 template.
More details can be found in this mailing list post:
http://lists.openstack.org/pipermail/openstack-dev/2018-October/136136.html
Change-Id: I97c4b98c7825f7f55b1d47db760c5662545c3e38
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
The 'docs' target currently builds the documentation trees in 'api-ref'
and 'api-guide', in addition to 'doc'. This massively increases the
amount of time docs take to build both locally and in the gate. It's
not necessary for gate, since separate jobs take care of the other
documents for barbican. As such, we should stop doing it.
For users that *do* care about this (for whatever reason) a new
'all-docs' target is included.
Change-Id: I3aa314f8643fcb4da93f8642034edddc2145bc32
Added policies and used policy enforcement engine
from monasca-common.
- Updated role_middleware to remove authorization into the routes.
- Updated unit tests and implemented some new tests.
- Added a new entry point for generating sample policy file by tox.
story: 2001233
task: 22086
Change-Id: I3d199fac244eca94fc434d19c78bc5a17e804c37
Signed-off-by: Amir Mofakhar <amofakhar@op5.com>
Python 3.6 is installed by default in Ubuntu 18.04 LTS.
Therefore, according to transition plan [1],
we should have py36 testenv ready for it.
[1] https://wiki.ubuntu.com/Python/Python36Transition
Change-Id: I70c34207a37b7e4c3d917d6cbb6667c47495e860
According to Openstack summit session [1] stestr is
maintained project to which all Openstack projects
should migrate.
Let's switch it then.
[1] https://etherpad.openstack.org/p/YVR-python-pti
Change-Id: I36d605e1bcb17bffd0effcf3018e87ba6c1a0865
Signed-off-by: Charles Short <zulcss@gmail.com>
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.
We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.
We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.
Change-Id: Ia069985b92af920970af9e84d37e27ddc8625437
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Create a tox environment for running the unit tests against the lower
bounds of the dependencies.
Create a lower-constraints.txt to be used to enforce the lower bounds
in those tests.
Add openstack-tox-lower-constraints job to the zuul configuration.
Remove the cap on eventlet at the same time to make the requirements
match the global list.
See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.
Change-Id: I5efe5f6e7a0725f1f20de11ca0b2fe656a4c099d
Depends-On: https://review.openstack.org/563087
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
'pip install -U' ugrades specified packages, this is not necessary
since we use constraints, remove the parameter '-U' from the line.
With tools/tox_install.sh - which a previous change of mine removed -
the -U was not harmful, but with the current set up, it might cause
upgrades, so remove it.
Change-Id: I28b0b0e86f749f6aa81571f79426ba5ca9043a15
We do not need tox_install.sh, pip can handle constraints itself
and install the project correctly. Thus update tox.ini and remove
the now obsolete tools/tox_install.sh file.
This follows https://review.openstack.org/#/c/508061 to remove
tools/tox_install.sh.
Change-Id: I3a6c85db180c25e360934ada60df7328ed7a765a
Reworked several environments where installing of the
package (monasca-log-api) is not necessary.
Also added validating all bash files with bashate
for the devstack plugin part.
Change-Id: I02bd5bfcc3bfbdfda30bc9b6bcc977b37c6c3674
It is common for OpenStack projects to use oslo-config-generator to generate
a sample config file which contains all available configuration options.
Work items:
* removed etc/monasca/log-api.conf (it is autogenerated)
* keep all config in one place to mimic the configuration file
* added configuration files to documentation
Story: 2000970
Task: 4121
Change-Id: I8777ed6cd38739e87b19be248b9c120e84626ad1
Migration of Openstack Project is held in
*.rst files and build with Sphinx.
Following change provides:
* technical documention
* api guide
* api ref
* releasenotes
Note:
For now, generating codebase documentation is disabled.
It caused gate failures because of, yet unnown, reasons.
In order to pull this foundation, this part is skipped.
Extra:
* provided venvs descriptions to let user know what is the scope
Story: 2001058
Task: 4665
Change-Id: Ieb2b58e165de1617748d97d997af368bd91d5c0e
Some of the available checks are disabled by default, like:
[H106] Don’t put vim configuration in source files
[H203] Use assertIs(Not)None to check for None
Change-Id: Ic498fd70d476bc85a094d3d6c2db729c6fd8532c
Following commit introduces using composite
paste file to describe application pipelines.
With the help of composite feature it was possible to
define 4 distinct supapplications, each having different
pipeline setup:
* version_app => no keystoneauth, simple data return with error trap
* healthcheck_app => no keystoneauth, simple data return with error trap
* api_v2 => as it was, added error_trap though
* api_v3 => as it was, added error_trap though
Following approach opens up the possibilities of modelling an API
in far more flexible way and removes the need of any hacking inside
the codebase.
Note:
Keeps backward compatibility with older codebase.
Extra:
* removed dirty hack around skipping certain request.path
in keystonemiddleware (now described in paste file)
* removed 404 when issuing ```curl api_host:api_port/```. Request
is redirected down to VersionApp
Depends-On: I0323eacb5cbba8418550e3322189104c35cf4c36
Change-Id: I873e1376665c8cf66c8ee503975324f9b93ddb45
Following commits not only enables running
unit tests with ostestr, like other
OS projects, but also:
* enables covarage with testr
* enables building documentation with build_sphinx commands
Additionally:
* tox.ini was organized a bit
Change-Id: I2a21f9cee0e00f7148142465a8fc131ef4ff6f44
bandit is statically analyzing source code in order to identify
potentially security sensitive constructs.
Change-Id: Iea7057ccfd68cefea84e23fcd26ae498e6bc6533
Adding constraints support to clients is slightly more complex than
services as the clients themselves are listed in upper-constraints.txt
which leads to errors that you can't install a specific version and a
constrained version.
This change adds constraints support by also adding a helper script to
edit the constraints to remove monasca-log-api.
Change-Id: Iac96425ce785890b1bd06fe00f5b666a6ecdbc61
Remove option -w which throws an error:
nosetests: error: no such option: -w
,and add option verbose.
Change-Id: I81a6213b1651d61e381c906529bd15996a5819f2
Sync manually with requirements. The automatic sync will not work yet
since gunicorn is not in global-requirements file and then the sync
stops.
So, let's sync what can be synced...
Remove flake8, let hacking install it as dependency in the corresponding
version.
Disable E126 flake8 test since it now fails due to newer flake8
version.
Change-Id: I9547e654de0c618386d56dd98c053118ec0100cf
Healthcheck allows to verify if:
- API is up and running
- Kafka, that monasca-log-api sends data to, is up and running
and an expected topic can be found there.
Other:
- added documentation entries
Change-Id: I316c1d9518cfed37119f11c326c071bfbfc7658e
Created middleware to authorize access
to log api. Only configured roles (i.e. default) can access
the api. Also middleware detect if the request would
come from monasca-log-agent.
Summary:
- middleware added (logic + tests)
- extended documentation
Additionaly:
- added better tox processing
- added minimum coverage
Change-Id: Ic848bfa3a8552887661f8223078efe3a4bca5c37
- single log message with rest api
- parsing / validation for data
- configuration
- bootstrapping
- tox
- unit tests
Change-Id: I7386b3500ee9097383a573bf915da55ce2ff881f