DNS Locations: server-mod: add automatic records update

For any location or server weight change is required to update records

https://fedorahosted.org/freeipa/ticket/2008

Reviewed-By: Petr Spacek <pspacek@redhat.com>
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
Martin Basti
2016-06-13 13:32:25 +02:00
parent a7e463948d
commit 4076e8e4e5
2 changed files with 16 additions and 1 deletions

View File

@@ -230,8 +230,13 @@ class server_mod(LDAPUpdate):
def post_callback(self, ldap, dn, entry_attrs, *keys, **options):
assert isinstance(dn, DN)
self.obj.convert_location(entry_attrs, **options)
self.obj.get_enabled_roles(entry_attrs)
if 'ipalocation' or 'ipalocationweight' in entry_attrs:
result = self.api.Command.dns_update_system_records()
if not result.get('value'):
self.add_message(messages.AutomaticDNSRecordsUpdateFailed())
self.obj.convert_location(entry_attrs, **options)
return dn