summaryrefslogtreecommitdiffstats
path: root/ipalib/parameters.py
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2014-03-18 10:11:19 +0100
committerPetr Viktorin <pviktori@redhat.com>2014-03-21 12:49:21 +0100
commitffd9bb2d7c4d19dae8e1e9b8daac415d83012c8e (patch)
tree52bd40cacfd71c344ea7e741fb9f5e74c0ed3676 /ipalib/parameters.py
parent84c401f7d605cde6d0ca1429a7fc4c2ef65a38e1 (diff)
downloadfreeipa-ffd9bb2d7c4d19dae8e1e9b8daac415d83012c8e.tar.gz
freeipa-ffd9bb2d7c4d19dae8e1e9b8daac415d83012c8e.tar.xz
freeipa-ffd9bb2d7c4d19dae8e1e9b8daac415d83012c8e.zip
cli: Add mechanism for deprecated option name aliases
Add a new Param kwarg, deprecated_cli_aliases, that lists deprecated aliases. The aliases will appear in a "Deprecated options" in the help, and otherwise act as the normal variant. Preparation for: https://fedorahosted.org/freeipa/ticket/4231
Diffstat (limited to 'ipalib/parameters.py')
-rw-r--r--ipalib/parameters.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/ipalib/parameters.py b/ipalib/parameters.py
index 0b354969d..fc5e64981 100644
--- a/ipalib/parameters.py
+++ b/ipalib/parameters.py
@@ -300,6 +300,7 @@ class Param(ReadOnly):
- cli_name: option name in CLI
- cli_short_name: one character version of cli_name
+ - deprecated_cli_aliases: deprecated CLI aliases
- label: very short description of the parameter. This value is used in
when the Command output is printed to CLI or in a Command help
- doc: parameter long description used in help
@@ -384,6 +385,7 @@ class Param(ReadOnly):
kwargs = (
('cli_name', str, None),
('cli_short_name', str, None),
+ ('deprecated_cli_aliases', frozenset, frozenset()),
('label', (basestring, Gettext), None),
('doc', (basestring, Gettext), None),
('required', bool, True),