diff options
author | Pavel Zuna <pzuna@redhat.com> | 2009-11-05 16:15:47 +0100 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2009-11-06 16:05:31 -0700 |
commit | 566a3cb9722233b4ee92ef55db5a04dc0f26ee9d (patch) | |
tree | 0215e8e5f942e2038a9ca45c5b68859dcea60fe1 /ipalib/parameters.py | |
parent | da58b0cc75ffd59e34729d3caedaa715d8dd2584 (diff) | |
download | freeipa-566a3cb9722233b4ee92ef55db5a04dc0f26ee9d.tar.gz freeipa-566a3cb9722233b4ee92ef55db5a04dc0f26ee9d.tar.xz freeipa-566a3cb9722233b4ee92ef55db5a04dc0f26ee9d.zip |
Add 'File' parameter type.
Accepts filenames and loads file contents as parameter value.
Diffstat (limited to 'ipalib/parameters.py')
-rw-r--r-- | ipalib/parameters.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ipalib/parameters.py b/ipalib/parameters.py index 819a158ff..0630915cb 100644 --- a/ipalib/parameters.py +++ b/ipalib/parameters.py @@ -1254,6 +1254,18 @@ class List(Param): return +class File(Str): + """ + File parameter type. + + Accepts file names and loads their content into the parameter value. + """ + kwargs = Str.kwargs + ( + # valid for CLI, other backends (e.g. webUI) can ignore this + ('stdin_if_missing', bool, False), + ) + + class GeneralizedTime(Str): """ Generalized time parameter type. |