6aebfe7 Add context manager to ipalib.API

3 files Authored by cheimes a year ago, Committed by frenaud a year ago,
    Add context manager to ipalib.API
    
    `ipalib.API` instances like `ipalib.api` now provide a context manager
    that connects and disconnects the API object. Users no longer have to
    deal with different types of backends or finalize the API correctly.
    
    ```python
    import ipalib
    
    with ipalib.api as api:
        api.Commands.ping()
    ```
    
    See: https://pagure.io/freeipa/issue/9443
    Signed-off-by: Christian Heimes <cheimes@redhat.com>
    Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
    
        
file modified
+62 -0