commit b33abb4b070d72c16af914e4292adb205bdee5fa
Author: John Dennis <email address hidden>
Date: Mon Aug 26 19:32:22 2019 -0400
Federation mapping debug should show direct_maps values
If you use keystone-manage mapping_engine --engine-debug to test your
rules (or when debug logging is on during run time) the diagnostic
output fails to emit a piece of crucial information, the contents
direct map array. What you'll get instead is this:
direct_maps: <keystone.federation.utils.DirectMaps object at 0x7f7121887b00>
That's because the DirectMaps class does not have a __str__() method
and Python resorts to __ref__() in the absence of __str__() and all
__ref__() does is print the class name and it's memory location, not
very useful.
This patch adds a __str__() method to the DirectMaps class so the
debug output now includes the actual direct map data like this:
Reviewed: https:/ /review. opendev. org/678700 /git.openstack. org/cgit/ openstack/ keystone/ commit/ ?id=b33abb4b070 d72c16af914e429 2adb205bdee5fa
Committed: https:/
Submitter: Zuul
Branch: master
commit b33abb4b070d72c 16af914e4292adb 205bdee5fa
Author: John Dennis <email address hidden>
Date: Mon Aug 26 19:32:22 2019 -0400
Federation mapping debug should show direct_maps values
If you use keystone-manage mapping_engine --engine-debug to test your
rules (or when debug logging is on during run time) the diagnostic
output fails to emit a piece of crucial information, the contents
direct map array. What you'll get instead is this:
direct_maps: <keystone. federation. utils.DirectMap s object at 0x7f7121887b00>
That's because the DirectMaps class does not have a __str__() method
and Python resorts to __ref__() in the absence of __str__() and all
__ref__() does is print the class name and it's memory location, not
very useful.
This patch adds a __str__() method to the DirectMaps class so the
debug output now includes the actual direct map data like this:
direct_maps: [['<email address hidden>'], ['Group1', 'Group3']]
Co-Authored-By: Lance Bragstad <email address hidden> 2b7eac716a7f671 a2d513e920b
Change-Id: I07643fbe3e1e71
Closes-Bug: 1841486
Signed-off-by: John Dennis <email address hidden>