Commit Graph

45 Commits

Author SHA1 Message Date
Martin Chacon Piza 91022f3e80 Remove project content on master branch
This is step 2b of repository deprecation process as described in [1].

[1] https://docs.openstack.org/project-team-guide/repository.html#step-2b-remove-project-content

Change-Id: Ie446c1cd447789d189a9e723fff9ee783dd3cf4f
2021-02-22 14:57:15 +01:00
Andreas Jaeger d2f2144ebb Cleanup py27 support
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
2020-05-27 09:06:04 +02:00
Ghanshyam Mann 98f8469157 [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

monasca-log-api is ready with python 3 and ok to drop the
python 2.7 support.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Depends-On: https://review.opendev.org/#/c/693631/
Change-Id: I3909027440b3af91d5c4fb964e862dedceaa6bed
2019-11-16 14:23:06 +00:00
Corey Bryant 4de81f8eff Add Python 3 Train unit tests
This is a mechanically generated patch to ensure unit testing is in place
for all of the Tested Runtimes for Train.

See the Train python3-updates goal document for details:
https://governance.openstack.org/tc/goals/train/python3-updates.html

Change-Id: Id18ba326da128998d7deb25e305fe2a2150a9f6f
Story: #2005924
Task: #34223
2019-07-05 13:09:04 -04:00
zhulingjie 55e7a787a7 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I4edf3307be5a2d668306efa33c0ab55f6867d8a6
2019-06-26 13:40:04 +00:00
Ghanshyam Mann a8402b4ef5 Dropping the py35 testing
All the integration testing has been moved to
Bionic now[1] and py3.5 is not tested runtime for
Train or stable/stein[2].

As per below ML thread, we are good to drop the py35
testing now:
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/005097.html

[1] http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004647.html
[2]
https://governance.openstack.org/tc/reference/runtimes/stein.html
https://governance.openstack.org/tc/reference/runtimes/train.html

Change-Id: I036824344601821624f674f05edb6842b1b1baf3
2019-04-15 18:14:14 +00:00
Zuul 54ea78c900 Merge "tox: Stop building *all* docs in 'docs'" 2018-11-05 17:41:44 +00:00
Sean McGinnis 630ce3ccd5 Remove setup.py check from pep8 job
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>
2018-10-30 10:32:15 -05:00
Andreas Jaeger 2eaf6b3aff tox: Stop building *all* docs in 'docs'
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
2018-10-27 16:48:26 +02:00
Witold Bedyk f290f8db3f Fix README.rst and add syntax check
PyPI rejects invalid rst files and rejects publishing the library.

Change-Id: I9fd0dba77d8e358452e370fd3fe2b787f80d1dd7
Story: 2002163
Task: 24254
2018-08-03 14:51:48 +02:00
Zuul 8b6582d8d4 Merge "Using oslo.policy for monasca-log-api" 2018-07-31 14:03:04 +00:00
Amir Mofakhar 5729d7e7c8 Using oslo.policy for monasca-log-api
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>
2018-07-19 09:55:54 +02:00
Witold Bedyk 3fac289159 Fix and unify cover environment
Fix cover environment and unify it accordingly to Project Testing
Interface [1].

[1] https://governance.openstack.org/tc/reference/pti/python.html#coverage-jobs

Change-Id: I9cde2c00785596f3971378520cbc0ea96e141ac1
2018-07-02 15:29:28 +02:00
Witold Bedyk 8fbdb9423a Clean-up tox.ini
* move ostestr execution to [testenv]
* effectively enable `lower-constraints` job execution
* use default configuration for `py36` environment

Change-Id: Id8f914b5a7f4cbc996238c5c4f2b1f352b901e5d
2018-06-28 11:14:02 +02:00
Vu Cong Tuan c372a9b412 Add py36 testenv
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
2018-06-27 15:29:38 +07:00
Charles Short 1247e7bd8e Switch to using stestr
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>
2018-06-19 19:52:46 -04:00
Doug Hellmann 1562cdb243 fix tox python3 overrides
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>
2018-06-06 17:30:58 -04:00
Zuul c81822a378 Merge "add lower-constraints job" 2018-04-30 09:13:48 +00:00
Doug Hellmann d1aedd322d add lower-constraints job
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>
2018-04-27 14:48:44 +00:00
Jui Chandwaskar 78f79a45b8 Add pep8 max line length check
Set max line length to 100.

Change-Id: I9c9aeca09a6e952de7ccb93194d0722b791d7745
Signed-off-by: Jui Chandwaskar <jchandwaskar@op5.com>
2018-04-11 13:20:41 +02:00
Andreas Jaeger b8d7b60781 Remove -U from pip install
'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
2017-12-02 19:26:26 +01:00
Andreas Jaeger 5e13aaca2c Avoid tox_install.sh for constraints support
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
2017-12-01 15:41:14 +01:00
Tomasz Trębski 9c163622e2 Migrate log integration test to ZuulV3
- define .zuul.yaml to contain new job definitions
- move gate hooks to appropriate location

Story: 2001238
Task: 5763
Task: 5766

Depends-On: I263b1a92a9ec7b5e38d9c1dc8b02e214102a92c2
Change-Id: Icfb32df7e083c2c58c89fa3d2fe9a3eacfda6beb
2017-10-24 08:15:57 +00:00
Tomasz Trębski 86433df26f Tweaks in tox.ini to speed it up
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
2017-07-19 05:38:44 +00:00
Jenkins 6b0dbac6d8 Merge "Use oslo-config-generator" 2017-07-05 12:13:52 +00:00
Thomas Bechtold d243ed35d0 Use oslo-config-generator
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
2017-07-05 09:44:35 +00:00
Tomasz Trębski 0acaeba534 Enable codebase documenation
Change adds building the codebase documentation
that will be part of contributors user guide.

Change-Id: I24df404289c8d843d413e094af56b933eb2e22e7
2017-07-03 13:54:01 +02:00
Tomasz Trębski 29126ba9f8 Migrate documentation to Sphinx
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
2017-07-03 07:38:53 +00:00
blue55 20cde160c0 Enable some off-by-default checks
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
2017-06-22 09:02:09 +08:00
Tomasz Trębski 5e7ebdd9c5 Composite paste for monasca-log-api
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
2017-06-02 14:20:43 +00:00
Tomasz Trębski 35a6314182 Make monasca-log-api work with Python 3.5
Following commits ensures that monasca-log-api
is Python 3.5 compatible.

Change-Id: If4ab448756dbc533a5c12e35415b9989db96c47d
2017-01-18 13:41:29 +01:00
Tomasz Trębski 04030115db Migrate testing to ostestr and adding docs
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
2017-01-17 12:53:54 +01:00
Dirk Mueller 09302e7a31 Enable checking with bandit
bandit is statically analyzing source code in order to identify
potentially security sensitive constructs.

Change-Id: Iea7057ccfd68cefea84e23fcd26ae498e6bc6533
2016-12-23 09:13:09 +01:00
Dobroslaw Zybort edef047506 Add bashate check to tox file
Fix errors:
    [E] E003: Indent not multiple of 4
    [E] E042: local declaration hides errors

Change-Id: I82a6d6d3e48d1cc63acc4dbaa8cd1237b5b7d0d7
2016-12-15 08:36:29 +01:00
Dirk Mueller 0db2f1cd2a Add Constraints support
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
2016-12-04 18:28:02 +01:00
Artur Basiak a1cfc85c2c Fixing problems with tox
Remove option -w which throws an error:
nosetests: error: no such option: -w
,and add option verbose.

Change-Id: I81a6213b1651d61e381c906529bd15996a5819f2
2016-11-16 14:17:31 +01:00
Artur Basiak d0bb9f0e8e Fix E126 test
Fix indentation in code for E126 tests.

Change-Id: I835a00262d10f813e33808a854f9fc174443a6ae
2016-08-29 12:33:55 +02:00
Andreas Jaeger 5f987c3bf4 Manual sync with requirements
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
2016-08-26 06:32:07 +02:00
Witold Bedyk 17a215eeac Adds [testenv:venv] section to tox.ini
'publish-to-pypi' Zuul job tries to execute 'tox -evenv python setup.py sdist'
and fails without 'venv' being set.

http://logs.openstack.org/42/420c840a2b3c40ce057e819d0c7c48406a33e76e/release/monasca-log-api-tarball/1b09581/console.html.gz

Change-Id: I90462831c8ecfe9fcdf42fbebe95dc314d03aef6
2016-03-31 15:28:32 +02:00
Tomasz Trębski 412892aed2 Adding healthcheck
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
2016-02-22 12:49:21 +01:00
Tomasz Trębski 33e9d7aaa3 Security update for monasca-log-api
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
2015-12-17 11:27:12 +01:00
Tomasz Trębski d2d50f42d4 Migrating tempest to project
- moving tempest test from old location
to the project

Change-Id: I018a898a621163d3d058e1c3950ae00b53944f84
2015-12-09 12:13:53 +01:00
Tomasz Trębski d7f501ea3f Cleaning python bytecode before tests run
For more information see bug
https://bugs.launchpad.net/nova/+bug/1368661

Change-Id: I19f0b6ea2007b06ac1aa8f8da33773bb063bbbe3
2015-12-02 10:38:01 +01:00
Tomasz Trębski 321279ca30 Adding generating coverage
code coverage can be genarated with tox
using command tox -ecover

Change-Id: I5dcca1fe6ee57091cce62155757356f538b26061
2015-11-30 13:04:24 +01:00
Tomasz Trębski e921fd506c monasca-log-api python
- single log message with rest api
- parsing / validation for data
- configuration
- bootstrapping
- tox
- unit tests

Change-Id: I7386b3500ee9097383a573bf915da55ce2ff881f
2015-10-08 10:38:12 +02:00