def _cleanup_server_dns_records(self, hostname, **options): if not self.api.Command.dns_is_enabled(**options): return try: bindinstance.remove_master_dns_records(hostname, self.api.env.realm) dnskeysyncinstance.remove_replica_public_keys(hostname) except Exception as e: self.add_message( messages.ServerRemovalWarning( message=_("Failed to cleanup %(hostname)s DNS entries: " "%(err)s") % dict(hostname=hostname, err=e))) self.add_message( messages.ServerRemovalWarning( message=_("You may need to manually remove them from the " "tree")))
def _cleanup_server_dns_records(self, hostname, **options): if not self.api.Command.dns_is_enabled( **options): return try: bindinstance.remove_master_dns_records( hostname, self.api.env.realm) dnskeysyncinstance.remove_replica_public_keys(hostname) except Exception as e: self.add_message( messages.ServerRemovalWarning( message=_( "Failed to cleanup %(hostname)s DNS entries: " "%(err)s") % dict(hostname=hostname, err=e))) self.add_message( messages.ServerRemovalWarning( message=_("You may need to manually remove them from the " "tree")))