diff options
author | Rob Crittenden <rcritten@redhat.com> | 2011-02-01 14:24:46 -0500 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2011-02-02 10:00:38 -0500 |
commit | 275998f6bde90c253d935c2f2724538b64cbd618 (patch) | |
tree | bd2840606a906276d21e646eae47db49f7adb6c2 /ipalib/errors.py | |
parent | f3d04bfc405753b3c6a11a53ec6b2ccc99e8bf09 (diff) | |
download | freeipa-275998f6bde90c253d935c2f2724538b64cbd618.tar.gz freeipa-275998f6bde90c253d935c2f2724538b64cbd618.tar.xz freeipa-275998f6bde90c253d935c2f2724538b64cbd618.zip |
Add support for tracking and counting entitlements
Adds a plugin, entitle, to register to the entitlement server, consume
entitlements and to count and track them. It is also possible to
import an entitlement certificate (if for example the remote entitlement
server is unaviailable).
This uses the candlepin server from https://fedorahosted.org/candlepin/wiki
for entitlements.
Add a cron job to validate the entitlement status and syslog the results.
tickets 28, 79, 278
Diffstat (limited to 'ipalib/errors.py')
-rw-r--r-- | ipalib/errors.py | 41 |
1 files changed, 37 insertions, 4 deletions
diff --git a/ipalib/errors.py b/ipalib/errors.py index 20cd52b05..f48ad55aa 100644 --- a/ipalib/errors.py +++ b/ipalib/errors.py @@ -1406,7 +1406,7 @@ class CertificateFormatError(CertificateError): class MutuallyExclusiveError(ExecutionError): """ - **4302** Raised when an operation would result in setting two attributes which are mutually exlusive. + **4303** Raised when an operation would result in setting two attributes which are mutually exlusive. For example: @@ -1417,13 +1417,13 @@ class MutuallyExclusiveError(ExecutionError): """ - errno = 4302 + errno = 4303 format = _('%(reason)s') class NonFatalError(ExecutionError): """ - **4303** Raised when part of an operation succeeds and the part that failed isn't critical. + **4304** Raised when part of an operation succeeds and the part that failed isn't critical. For example: @@ -1434,10 +1434,43 @@ class NonFatalError(ExecutionError): """ - errno = 4303 + errno = 4304 format = _('%(reason)s') +class AlreadyRegisteredError(ExecutionError): + """ + **4305** Raised when registering a user that is already registered. + + For example: + + >>> raise AlreadyRegisteredError() + Traceback (most recent call last): + ... + AlreadyRegisteredError: Already registered + + """ + + errno = 4305 + format = _('Already registered') + + +class NotRegisteredError(ExecutionError): + """ + **4306** Raised when not registered and a registration is required + + For example: + >>> raise NotRegisteredError() + Traceback (most recent call last): + ... + NotRegisteredError: Not registered yet + + """ + + errno = 4306 + format = _('Not registered yet') + + ############################################################################## # 5000 - 5999: Generic errors |