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>
This commit is a follow-up of "switch to using stestr"
which was merged already [1].
After switch to using stestr, testrepository and .testr.conf
are unnecessary and should be removed.
[1] https://review.openstack.org/576665
Change-Id: I7a0494c23389e6656a8a38042aeaa4507e12ce9a
Stestr after update changed configuration file format
This fix test warring : UserWarning: No .stestr.conf file found in the CWD. Please create one to to replace the .testr.conf. You can find a script to do this in the stestr.
Change-Id: I5df81345087e665ddea7da9ec82a0c722ab9a718
Passing any CLI arguments to log-api is not possible
for the case where it runs under gunicorn server.
Gunicorn's argument parsing processes clashes with oslo's.
Effectivelly that means that either of them cannot understand
the arguments of another. However log-api is capable of being launched
under, for example, apache_mod-wsgi.
That permits passing oslo CLI arguments.
Added simple method that detect the executable that was used to run
log-api. If that is not gunicorn, CLI opts will be enabled.
Otherwise log-api will print out warning and proceed as it was.
Extra:
* reworked to use fixtures
Change-Id: I6b2fc386aeb823ab735270ffc1d3f7e15985830f
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
Following change allows to run monasca-log-api
devstack plugin on the Xenial environment.
That was implemented with the help of:
* start/stop of processes handles through run_process
and stop_process & no services files
* setting up environment using devstack functions
** monasca-log-api virtual env (USE_VENV)
** installing monasca-log-api dependencies from git
** saving data in keystone catalog with Openstack CLI
Additionally added method that downloads tarballs
only if they are not found in the system.
Change-Id: I08b2ddbe17b2c7899056a63a5633070ae9a2c2db
Implemented specification proposal for batch support at,
https://review.openstack.org/#/c/273058/
Note, if you want to use this in the monasca-vagrant environment
it should work. I've modified the value of the field kafka_url in
etc/monasca/monasca_log_api.conf to use the kafka server in the
mini-mon vm.
After you've deployed monasca-vagrant using "vagrant up"
ssh into mini-mon "vagrant ssh mini-mon" and then create a new
topic for logs which can be done running the command:
/opt/kafka/bin/kafka-topics.sh --create -zookeeper localhost:2181
--replication-factor 1 --partitions 128 --topic logs
To watch the log messages at the console in the mini-mon VM
/opt/kafka/bin/kafka-console-consumer.sh
--zookeeper localhost:2181 --topic logs
Change-Id: I4247d1824a237ecbe4db878e72485938f40a31c3
- removed own kafka abstraction in favour of monasca-common
- removed monasca keystone context filter, not actually used
- changed URI of logs endpoints to /v1.0/log/single
Change-Id: Iaceabdce2b2862451cfe63d2a612577d7710022b
- single log message with rest api
- parsing / validation for data
- configuration
- bootstrapping
- tox
- unit tests
Change-Id: I7386b3500ee9097383a573bf915da55ce2ff881f