d0b915c cert-request: more specific errors in IP address validation

Authored and Committed by ftweedal 5 years ago
    cert-request: more specific errors in IP address validation
    
    Update the IP address validation to raise different error messages
    for:
    
    - inability to reach IP address from a DNS name
    - missing PTR records for IP address
    - asymmetric PTR / forward records
    
    If multiple scenarios apply, indicate the first error (from list
    above).
    
    The code should now be a bit easier to follow.  We first build dicts
    of forward and reverse DNS relationships, keyed by IP address.  Then
    we check that entries for each iPAddressName are present in both
    dicts.  Finally we check for PTR-A/AAAA symmetry.
    
    Update the tests to check that raised ValidationErrors indicate the
    expected error.
    
    Part of: https://pagure.io/freeipa/issue/7451
    
    Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
    Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
    
        
file modified
+55 -44