diff options
author | Petr Spacek <pspacek@redhat.com> | 2016-05-17 17:20:25 +0200 |
---|---|---|
committer | Martin Basti <mbasti@redhat.com> | 2016-05-30 20:14:32 +0200 |
commit | ec49130b94d2aa195c6b704a30fe6c3137fabdbf (patch) | |
tree | 4cfc49b4132079b2baab6edf7c73eeddcbac3aac /ipalib/plugins | |
parent | 0c75df4bf3784eae08f41c176bbaab44c6d510a7 (diff) | |
download | freeipa-ec49130b94d2aa195c6b704a30fe6c3137fabdbf.tar.gz freeipa-ec49130b94d2aa195c6b704a30fe6c3137fabdbf.tar.xz freeipa-ec49130b94d2aa195c6b704a30fe6c3137fabdbf.zip |
Use root_logger for verify_host_resolvable()
After discussion with Martin Basti we decided to standardize on root_logger
with hope that one day we will use root_logger.getLogger('module')
to make logging prettier and tunable per module.
https://fedorahosted.org/freeipa/ticket/5710
Reviewed-By: Martin Basti <mbasti@redhat.com>
Diffstat (limited to 'ipalib/plugins')
-rw-r--r-- | ipalib/plugins/dns.py | 4 | ||||
-rw-r--r-- | ipalib/plugins/host.py | 2 | ||||
-rw-r--r-- | ipalib/plugins/service.py | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/ipalib/plugins/dns.py b/ipalib/plugins/dns.py index 72be52469..32319dc0f 100644 --- a/ipalib/plugins/dns.py +++ b/ipalib/plugins/dns.py @@ -1657,7 +1657,7 @@ def check_ns_rec_resolvable(zone, name, log): # this is a DNS name relative to the zone name = name.derelativize(zone.make_absolute()) try: - verify_host_resolvable(name, log) + verify_host_resolvable(name) except errors.DNSNotARecordError: raise errors.NotFound( reason=_('Nameserver \'%(host)s\' does not have a corresponding ' @@ -4286,7 +4286,7 @@ class dns_resolve(Command): query=args[0] try: - verify_host_resolvable(query, self.log) + verify_host_resolvable(query) except errors.DNSNotARecordError: raise errors.NotFound( reason=_('Host \'%(host)s\' not found') % {'host': query} diff --git a/ipalib/plugins/host.py b/ipalib/plugins/host.py index f15d5db2f..4cd08ebb2 100644 --- a/ipalib/plugins/host.py +++ b/ipalib/plugins/host.py @@ -633,7 +633,7 @@ class host_add(LDAPCreate): check_forward=True, check_reverse=check_reverse) if not options.get('force', False) and not 'ip_address' in options: - util.verify_host_resolvable(keys[-1], self.log) + util.verify_host_resolvable(keys[-1]) if 'locality' in entry_attrs: entry_attrs['l'] = entry_attrs['locality'] entry_attrs['cn'] = keys[-1] diff --git a/ipalib/plugins/service.py b/ipalib/plugins/service.py index 4f03bd35f..2d3476e83 100644 --- a/ipalib/plugins/service.py +++ b/ipalib/plugins/service.py @@ -563,10 +563,10 @@ class service_add(LDAPCreate): entry_attrs['usercertificate'] = certs_der if not options.get('force', False): - # We know the host exists if we've gotten this far but we - # really want to discourage creating services for hosts that - # don't exist in DNS. - util.verify_host_resolvable(hostname, self.log) + # We know the host exists if we've gotten this far but we + # really want to discourage creating services for hosts that + # don't exist in DNS. + util.verify_host_resolvable(hostname) if not 'managedby' in entry_attrs: entry_attrs['managedby'] = hostresult['dn'] |