diff options
author | Martin Basti <mbasti@redhat.com> | 2015-03-06 17:44:47 +0100 |
---|---|---|
committer | Tomas Babej <tbabej@redhat.com> | 2015-03-19 12:40:24 +0100 |
commit | c95c4849ae1ecc90ac926b8b7d61e153b42e7699 (patch) | |
tree | a61d964ebdc10ec41648af56d80dd87b733e92c2 /ipaserver/install/plugins/dns.py | |
parent | a42fcfc18bb94fbf97ec310dbb920e045b0473a5 (diff) | |
download | freeipa-c95c4849ae1ecc90ac926b8b7d61e153b42e7699.tar.gz freeipa-c95c4849ae1ecc90ac926b8b7d61e153b42e7699.tar.xz freeipa-c95c4849ae1ecc90ac926b8b7d61e153b42e7699.zip |
Server Upgrade: respect --test option in plugins
Several plugins do the LDAP data modification directly.
In test mode these plugis should not be executed.
https://fedorahosted.org/freeipa/ticket/3448
Reviewed-By: David Kupka <dkupka@redhat.com>
Diffstat (limited to 'ipaserver/install/plugins/dns.py')
-rw-r--r-- | ipaserver/install/plugins/dns.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ipaserver/install/plugins/dns.py b/ipaserver/install/plugins/dns.py index f562978bc..2e33982e7 100644 --- a/ipaserver/install/plugins/dns.py +++ b/ipaserver/install/plugins/dns.py @@ -60,6 +60,10 @@ class update_dnszones(PostUpdate): order=MIDDLE def execute(self, **options): + if not options.get('live_run'): + self.log.info("Test mode: skipping 'update_dnszones'") + return False, False, () + ldap = self.obj.backend if not dns_container_exists(ldap): return (False, False, []) @@ -159,6 +163,11 @@ class update_master_to_dnsforwardzones(PostUpdate): backup_path = u'%s%s' % (backup_dir, backup_filename) def execute(self, **options): + if not options.get('live_run'): + self.log.info("Test mode: skipping " + "'update_master_to_dnsforwardzones'") + return False, False, () + ldap = self.obj.backend # check LDAP if forwardzones already uses new semantics dns_container_dn = DN(api.env.container_dns, api.env.basedn) |