Extend ipa-replica-manage to be able to manage DNA ranges.

Attempt to automatically save DNA ranges when a master is removed.
This is done by trying to find a master that does not yet define
a DNA on-deck range. If one can be found then the range on the deleted
master is added.

If one cannot be found then it is reported as an error.

Some validation of the ranges are done to ensure that they do overlap
an IPA local range and do not overlap existing DNA ranges configured
on other masters.

http://freeipa.org/page/V3/Recover_DNA_Ranges

https://fedorahosted.org/freeipa/ticket/3321
This commit is contained in:
Rob Crittenden
2013-03-01 15:02:14 -05:00
parent 63407ed477
commit 9005b9bc8a
8 changed files with 453 additions and 9 deletions

View File

@@ -1806,6 +1806,8 @@ class IPAdmin(LDAPClient):
if removes:
if not force_replace:
modlist.append((ldap.MOD_DELETE, key, removes))
elif new_values == []: # delete an empty value
modlist.append((ldap.MOD_DELETE, key, removes))
return modlist