keystone/doc/source
John Dennis 8726573940 Fix keystone-manage mapping_engine tester
There were several problems with keystone-manage mapping_engine

* It aborts with a backtrace because of wrong number of arguments
  passed to the RuleProcessor, it was missing the mapping_id
  parameter.

* Error messages related to input data were cryptic and inprecise.

* The --engine-debug option did not work.

A fake mapping_id is now generated and passed to the RuleProcessor.

If there was invalid data passed it was nearly impossible to determine
what was causing the error, the command takes 2 input files, but which
file contained the error? At what line? Why? For example I was
consistently getting this error:

Error while parsing line: '{': need more than 1 value to unpack

and had no idea of what was wrong, the JSON looked valid to me. Turns
out the assertion file is not formatted as JSON (yes this is
documented in the help message but given the rules are JSON formatted
and the RuleProcessor expects a dict for the assertion_data it's
reasonsable to assume the data in the assertion file is formatted as a
JSON object).

The documentation in mapping_combinations.rst added a note in the
section suggesting the use of the keystone-manage mapping_engine
tester alerting the reader to the expected file formats.

The MappingEngineTester class was refactored slighly to allow each
method to know what file it was operating on and emit error messages
that identify the file. The error message in addition to the pathname
now includes the offending line number as well. As a bonus it doesn't
fail if there is a blank line. The error message now looks like this:

assertion file input.txt at line 4 expected 'key: value' but found 'foo' see help for file format

The mapping_engine.LOG.logger level is now explictily set to DEBUG
when --engine-debug is passed instead of (mistakenly assuming it
defaulted to DEBUG) otherwise it's set to WARN.

Closes-Bug: 1655182
Signed-off-by: John Dennis <jdennis@redhat.com>
Change-Id: I2dea0f38b127ec185b79bfe06dd6a212da75cbca
(cherry picked from commit f2d0f8c9ab)
2017-05-22 18:40:38 +00:00
..
_static Add token feature support matrix to documentation 2016-07-28 15:44:28 +00:00
devref Prepare for using standard python tests 2017-02-02 12:13:27 +00:00
federation Fix keystone-manage mapping_engine tester 2017-05-22 18:40:38 +00:00
man Few new commands missing from docs 2016-09-02 08:17:21 -07:00
apache-httpd.rst Fix the nit on how to deploy keystone with `mod_proxy_uwsgi` 2016-09-12 14:39:26 +08:00
api_change_tutorial.rst Fixed a Typo 2016-07-05 20:08:29 +00:00
api_curl_examples.rst Wrong usage of "an" 2015-10-17 12:14:48 +08:00
architecture.rst Remove mention of db_sync per backend 2016-08-04 12:09:35 -05:00
auth-totp.rst fix typo 2016-04-09 14:26:52 +08:00
community.rst Minor community doc edits 2016-02-25 20:10:40 -08:00
conf.py Add token feature support matrix to documentation 2016-07-28 15:44:28 +00:00
configuration.rst Merge "Add docs for the null key" 2016-09-08 14:05:33 +00:00
configure_tokenless_x509.rst Fix up some doc nits 2016-09-06 21:27:24 -07:00
configuringservices.rst Add missing backslash to keystone-manage bootstrap command in documentation 2016-04-11 15:20:32 +02:00
developing.rst Fix up some doc nits 2016-09-06 21:27:24 -07:00
developing_drivers.rst Update driver versioning documentation 2016-06-15 17:47:31 +00:00
event_notifications.rst Update the Administrator guide link 2016-04-06 17:32:14 +05:30
extensions.rst Update docs for legacy keystone extensions 2015-11-24 00:41:39 +08:00
external-auth.rst Doc update on enabled external auth and federation 2016-07-08 13:50:47 +00:00
http-api.rst Repair link in Keystone documentation 2016-08-26 17:00:29 +00:00
identity-support-matrix.ini Add a feature support matrix for identity sources 2016-08-29 13:56:47 -05:00
index.rst Fix up some doc nits 2016-09-06 21:27:24 -07:00
installing.rst Update documentation to remove keystone-all 2016-05-10 17:06:49 -05:00
key_terms.rst Correct description in Keystone key_terms 2015-11-05 10:45:31 -06:00
middlewarearchitecture.rst Update references to auth_token middleware. 2014-10-31 17:17:13 -05:00
online_schema_migration_examples.rst Remove the dead link in schema migration doc 2016-09-09 15:45:52 -07:00
performance.rst Add performance tuning documentation 2016-07-26 11:44:19 -04:00
policy_mapping.rst Concrete role assignments for federated users 2016-06-29 02:24:03 +00:00
sample_config.rst include sample config file in docs 2016-02-08 16:40:58 -05:00
services.rst Explain default domain in docs for other services 2015-10-20 15:06:54 -05:00
token-support-matrix.ini Add token feature support matrix to documentation 2016-07-28 15:44:28 +00:00
upgrading.rst New notes on advanced upgrade/fallback for cluster 2016-09-08 20:51:19 +00:00