https://fedorahosted.org/freeipa/ticket/4689
From 46e9f334afa0a640f5d772e754b047124b75bc41 Mon Sep 17 00:00:00 2001
From: Nathaniel McCallum <npmccal...@redhat.com>
Date: Thu, 6 Nov 2014 15:19:01 -0500
Subject: [PATCH] Improve otptoken help messages

https://fedorahosted.org/freeipa/ticket/4689
---
 ipalib/plugins/otptoken.py | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/ipalib/plugins/otptoken.py b/ipalib/plugins/otptoken.py
index 2b5f1c5fb83341d392e165a3507f5076820f1d3a..03360b1a34cdd45a5ccd833eb761e72e62df6328 100644
--- a/ipalib/plugins/otptoken.py
+++ b/ipalib/plugins/otptoken.py
@@ -153,6 +153,7 @@ class otptoken(LDAPObject):
         ),
         StrEnum('type?',
             label=_('Type'),
+            doc=_('Set the type of the token.'),
             default=u'totp',
             autofill=True,
             values=tuple(TOKEN_TYPES.keys() + [x.upper() for x in TOKEN_TYPES]),
@@ -161,42 +162,52 @@ class otptoken(LDAPObject):
         Str('description?',
             cli_name='desc',
             label=_('Description'),
+            doc=_('Set a token description (informational only).'),
         ),
         Str('ipatokenowner?',
             cli_name='owner',
             label=_('Owner'),
+            doc=_('Set the assigned user of the token (default: self).'),
         ),
         Str('managedby_user?',
             label=_('Manager'),
+            doc=_('Set the assigned manager of the token (default: self).'),
             flags=['no_create', 'no_update', 'no_search'],
         ),
         Bool('ipatokendisabled?',
             cli_name='disabled',
-            label=_('Disabled state')
+            label=_('Disabled'),
+            doc=_('Mark the token as disabled (default: false).')
         ),
         DateTime('ipatokennotbefore?',
             cli_name='not_before',
             label=_('Validity start'),
+            doc=_('Set the first date/time the token can be used.'),
         ),
         DateTime('ipatokennotafter?',
             cli_name='not_after',
             label=_('Validity end'),
+            doc=_('Set the last date/time the token can be used.'),
         ),
         Str('ipatokenvendor?',
             cli_name='vendor',
             label=_('Vendor'),
+            doc=_('Set the token vendor name (informational only).'),
         ),
         Str('ipatokenmodel?',
             cli_name='model',
             label=_('Model'),
+            doc=_('Set the token model (informational only).'),
         ),
         Str('ipatokenserial?',
             cli_name='serial',
             label=_('Serial'),
+            doc=_('Set the token serial (informational only).'),
         ),
         OTPTokenKey('ipatokenotpkey?',
             cli_name='key',
             label=_('Key'),
+            doc=_('Set the token secret (Base32; default: random).'),
             default_from=lambda: os.urandom(KEY_LENGTH),
             autofill=True,
             flags=('no_display', 'no_update', 'no_search'),
@@ -204,6 +215,7 @@ class otptoken(LDAPObject):
         StrEnum('ipatokenotpalgorithm?',
             cli_name='algo',
             label=_('Algorithm'),
+            doc=_('Set the token\'s hashing algorithm.'),
             default=u'sha1',
             autofill=True,
             flags=('no_update'),
@@ -212,6 +224,7 @@ class otptoken(LDAPObject):
         IntEnum('ipatokenotpdigits?',
             cli_name='digits',
             label=_('Digits'),
+            doc=_('Set the number of digits each token code will have.'),
             values=(6, 8),
             default=6,
             autofill=True,
@@ -220,6 +233,7 @@ class otptoken(LDAPObject):
         Int('ipatokentotpclockoffset?',
             cli_name='offset',
             label=_('Clock offset'),
+            doc=_('Set the TOTP token / FreeIPA server time difference.'),
             default=0,
             autofill=True,
             flags=('no_update'),
@@ -227,6 +241,7 @@ class otptoken(LDAPObject):
         Int('ipatokentotptimestep?',
             cli_name='interval',
             label=_('Clock interval'),
+            doc=_('Set the length of TOTP token code validity.'),
             default=30,
             autofill=True,
             minvalue=5,
@@ -235,6 +250,7 @@ class otptoken(LDAPObject):
         Int('ipatokenhotpcounter?',
             cli_name='counter',
             label=_('Counter'),
+            doc=_('Set the initial counter for the HOTP token.'),
             default=0,
             autofill=True,
             minvalue=0,
-- 
2.1.0

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to