Added policies and used policy enforcement engine
- 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.
Signed-off-by: Amir Mofakhar <firstname.lastname@example.org>
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.
* reworked to use fixtures
It is common for OpenStack projects to use oslo-config-generator to generate
a sample config file which contains all available configuration options.
* 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