c5afee9 cli: simplify parsing of arbitrary types

2 files Authored by ftweedal 6 years ago, Committed by pvomacka 6 years ago,
    cli: simplify parsing of arbitrary types
    
    Add the 'constructor' type to IPAOption to allow parsing arbitrary
    types.
    
    When using this type, supply the 'constructor' attribute with the
    constructor of the type.  The checker for the 'constructor' type
    attempts to construct the data, returning if successful else raising
    OptionValueError.
    
    The 'knob' interface remains unchanged but now accepts arbitrary
    constructors.
    
    This feature subsumes the '_option_callback' mechanism, which has
    been refactored away.
    
    This feature also subsumes the "dn" type in IPAOption, but this
    refactor is deferred.
    
    Part of: https://pagure.io/freeipa/issue/6858
    
    Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
    
        
file modified
+14 -2
file modified
+4 -24