diff options
Diffstat (limited to 'ipalib')
-rw-r--r-- | ipalib/__init__.py | 2 | ||||
-rw-r--r-- | ipalib/parameters.py | 8 | ||||
-rw-r--r-- | ipalib/plugins/hbac.py | 6 |
3 files changed, 8 insertions, 8 deletions
diff --git a/ipalib/__init__.py b/ipalib/__init__.py index e96c75d52..c1ad760b6 100644 --- a/ipalib/__init__.py +++ b/ipalib/__init__.py @@ -870,7 +870,7 @@ from frontend import Command, LocalOrRemote from frontend import Object, Method, Property from crud import Create, Retrieve, Update, Delete, Search from parameters import DefaultFrom, Bool, Flag, Int, Float, Bytes, Str, Password,List -from parameters import BytesEnum, StrEnum, GeneralizedTime, File +from parameters import BytesEnum, StrEnum, AccessTime, File from errors import SkipPluginModule # We can't import the python uuid since it includes ctypes which makes diff --git a/ipalib/parameters.py b/ipalib/parameters.py index 68264af49..00880bd2b 100644 --- a/ipalib/parameters.py +++ b/ipalib/parameters.py @@ -1309,9 +1309,9 @@ class File(Str): ) -class GeneralizedTime(Str): +class AccessTime(Str): """ - Generalized time parameter type. + Access time parameter type. Accepts values conforming to generalizedTime as defined in RFC 4517 section 3.3.13 without time zone information. @@ -1427,7 +1427,7 @@ class GeneralizedTime(Str): if len(t) not in (10, 12, 14): raise ValueError('incomplete generalized time') if not t.isnumeric(): - raise ValueError('generalized time non-numeric') + raise ValueError('time non-numeric') # don't check year value, with time travel and all :) self._check_month_num(t[4:6]) year_num = int(t[0:4]) @@ -1450,7 +1450,7 @@ class GeneralizedTime(Str): raise ValueError('invalid time range separator') self._check_generalized(ts[3]) if int(ts[1]) >= int(ts[3]): - raise ValueError('invalid generalized time range') + raise ValueError('invalid time range') elif ts[0] == 'periodic': if ts[1] == 'yearly': index = self._check_Y_spec(ts, 2) diff --git a/ipalib/plugins/hbac.py b/ipalib/plugins/hbac.py index 12be2eb6c..4a7cc9407 100644 --- a/ipalib/plugins/hbac.py +++ b/ipalib/plugins/hbac.py @@ -21,7 +21,7 @@ Host based access control """ from ipalib import api, errors -from ipalib import GeneralizedTime, Password, Str, StrEnum +from ipalib import AccessTime, Password, Str, StrEnum from ipalib.plugins.baseldap import * class hbac(LDAPObject): @@ -222,7 +222,7 @@ class hbac_add_accesstime(LDAPQuery): Add access time to HBAC rule. """ takes_options = ( - GeneralizedTime('accesstime', + AccessTime('accesstime', cli_name='time', doc='access time', ), @@ -260,7 +260,7 @@ class hbac_remove_accesstime(LDAPQuery): Remove access time to HBAC rule. """ takes_options = ( - GeneralizedTime('accesstime?', + AccessTime('accesstime?', cli_name='time', doc='access time', ), |