5a3268f Improve hostgroup/netgroup collision checks

Authored and Committed by mkosek 10 years ago
    Improve hostgroup/netgroup collision checks
    
    When the NGP plugin is enabled, a managed netgroup is created for
    every hostgroup. We already check that netgroup with the same
    name does not exist and provide a meaningful error message.
    However, this error message was also printed when a duplicate
    hostgroup existed.
    
    This patch checks for duplicate hostgroup existence first and
    netgroup on the second place. It also makes sure that when NGP
    plugin is (temporarily) disabled, a colliding netgroup cannot
    be created.
    
    https://fedorahosted.org/freeipa/ticket/1914
    
        
file modified
+12 -2
file modified
+20 -0