summaryrefslogtreecommitdiffstats
path: root/ipalib/errors.py
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2010-11-23 17:47:29 -0500
committerSimo Sorce <ssorce@redhat.com>2010-11-23 18:23:29 -0500
commit6d51a48af8afc52a0bf3f9437b2de1c2b8c1c0d4 (patch)
tree35d4bdbc63877cd3596f607f0b95b61ae31cd8c4 /ipalib/errors.py
parentaa70959f16bc9111798e14da5371c34438a7c146 (diff)
downloadfreeipa-6d51a48af8afc52a0bf3f9437b2de1c2b8c1c0d4.tar.gz
freeipa-6d51a48af8afc52a0bf3f9437b2de1c2b8c1c0d4.tar.xz
freeipa-6d51a48af8afc52a0bf3f9437b2de1c2b8c1c0d4.zip
Add ability to add/remove DNS records when adding/removing a host entry.
A host in DNS must have an IP address so a valid IP address is required when adding a host. The --force flag will be needed too since you are adding a host that isn't in DNS. For IPv4 it will create an A and a PTR DNS record. IPv6 isn't quite supported yet. Some basic work in the DNS installer is needed to get this working. Once the get_reverse_zone() returns the right value then this should start working and create an AAAA record and the appropriate reverse entry. When deleting a host with the --updatedns flag it will try to remove all records it can find in the zone for this host. ticket 238
Diffstat (limited to 'ipalib/errors.py')
-rw-r--r--ipalib/errors.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/ipalib/errors.py b/ipalib/errors.py
index 22138ab01..86cd60d11 100644
--- a/ipalib/errors.py
+++ b/ipalib/errors.py
@@ -1310,6 +1310,23 @@ class MutuallyExclusiveError(ExecutionError):
format = _('%(reason)s')
+class NonFatalError(ExecutionError):
+ """
+ **4303** Raised when part of an operation succeeds and the part that failed isn't critical.
+
+ For example:
+
+ >>> raise NonFatalError(reason=u'The host was added but the DNS update failed')
+ Traceback (most recent call last):
+ ...
+ NonFatalError: The host was added but the DNS update failed
+
+ """
+
+ errno = 4303
+ format = _('%(reason)s')
+
+
##############################################################################
# 5000 - 5999: Generic errors