diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-08-12 08:26:50 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-08-12 08:29:53 -0400 |
commit | 5c573e00a168c90c5c718566c75aadf736566676 (patch) | |
tree | 0dba4d9411304f4d29daf3569535227be8939abf /src/lib/Bcfg2/Options/Common.py | |
parent | 0f7edd60e67d32438a8be42002faacde4e4a7649 (diff) | |
download | bcfg2-5c573e00a168c90c5c718566c75aadf736566676.tar.gz bcfg2-5c573e00a168c90c5c718566c75aadf736566676.tar.bz2 bcfg2-5c573e00a168c90c5c718566c75aadf736566676.zip |
testsuite: fixed more unit tests
Diffstat (limited to 'src/lib/Bcfg2/Options/Common.py')
-rw-r--r-- | src/lib/Bcfg2/Options/Common.py | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/lib/Bcfg2/Options/Common.py b/src/lib/Bcfg2/Options/Common.py index b44c58990..a00bb241c 100644 --- a/src/lib/Bcfg2/Options/Common.py +++ b/src/lib/Bcfg2/Options/Common.py @@ -1,5 +1,6 @@ """ Common options used in multiple different contexts. """ +from Bcfg2.Utils import classproperty # pylint: disable=W0403 import Types from Actions import PluginsAction, ComponentAction @@ -10,17 +11,6 @@ from Options import Option, PathOption, BooleanOption __all__ = ["Common"] -class classproperty(object): - """ Decorator that can be used to create read-only class - properties. """ - - def __init__(self, getter): - self.getter = getter - - def __get__(self, instance, owner): - return self.getter(owner) - - class ReportingTransportAction(ComponentAction): """ :class:`Bcfg2.Options.ComponentAction` that loads a single reporting transport from :mod:`Bcfg2.Reporting.Transport`. """ @@ -62,6 +52,8 @@ class Common(object): import Bcfg2.Server.FileMonitor class FileMonitorAction(ComponentAction): + """ ComponentAction for loading a single FAM backend + class """ islist = False mapping = Bcfg2.Server.FileMonitor.available @@ -135,3 +127,9 @@ class Common(object): default_paranoid = Option( cf=('mdata', 'paranoid'), dest="default_paranoid", default='true', choices=['true', 'false'], help='Default Path paranoid setting') + + #: Client timeout + client_timeout = Option( + "-t", "--timeout", type=float, default=90.0, dest="client_timeout", + cf=('communication', 'timeout'), + help='Set the client XML-RPC timeout') |