Comment 2 for bug 1336769

Revision history for this message
Alexander Makarov (amakarov) wrote : Re: LDAP additional attribute mappings do not care about model attribute

Added required attribute validation to keystone.common.models.Model, but applying it resulted in many test failures.
Further analysis revealed that there are some algorythms depending on behaviour
such as saving/retrieving model instanses without some fields declared in a model as required.
So I had to fall back to warning instead of raising validation error.

Additional attribute mapping appeared not working at all:
  * documentation states following format: (<ldap_attr>:<model_key>,)*
  * bug description supposes (<model_key>:<ldap_attr>,)*
  * code converting LDAP request result to model didn't care about additional mapping as described

TODO:
1. keystone.common.models.Model.validate(only, strict)
2. rewrite keystone.common.ldap.core.BaseLdap._ldap_res_to_model() to inclute additionally mapped fields to the result