From d885339f1cbf208b06c1eb26c49c60d11d62f1c3 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Thu, 22 Jul 2010 14:16:22 -0400 Subject: Require that hosts be resolvable in DNS. Use --force to ignore warnings. This also requires a resolvable hostname on services as well. I want people to think long and hard about adding things that aren't resolvable. The cert plugin can automatically create services on the user's behalf when issuing a cert. It will always set the force flag to True. We use a lot of made-up host names in the test system, all of which require the force flag now. ticket #25 --- ipalib/errors.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'ipalib/errors.py') diff --git a/ipalib/errors.py b/ipalib/errors.py index d1d39a378..c35d424a7 100644 --- a/ipalib/errors.py +++ b/ipalib/errors.py @@ -1054,6 +1054,22 @@ class DefaultGroupError(ExecutionError): errno = 4018 format = _('The default users group cannot be removed') +class DNSNotARecordError(ExecutionError): + """ + **4019** Raised when a hostname is not a DNS A record + + For example: + + >>> raise DNSNotARecordError() + Traceback (most recent call last): + ... + DNSNotARecordError: Host does not have corresponding DNS A record + + """ + + errno = 4019 + format = _('Host does not have corresponding DNS A record') + class BuiltinError(ExecutionError): """ **4100** Base class for builtin execution errors (*4100 - 4199*). -- cgit