summaryrefslogtreecommitdiffstats
path: root/ipalib/cli.py
diff options
context:
space:
mode:
authorPavel Zuna <pzuna@redhat.com>2010-03-16 15:06:07 +0100
committerRob Crittenden <rcritten@redhat.com>2010-03-22 10:41:36 -0400
commit43ab2c483d91dbac72b44b489fc5cf68a9f57d98 (patch)
tree7104990a2a17a14ddf91c53eb3876bde69588f83 /ipalib/cli.py
parentc19911845d93e4cbbf296caf18568231549a3e60 (diff)
downloadfreeipa-43ab2c483d91dbac72b44b489fc5cf68a9f57d98.tar.gz
freeipa-43ab2c483d91dbac72b44b489fc5cf68a9f57d98.tar.xz
freeipa-43ab2c483d91dbac72b44b489fc5cf68a9f57d98.zip
Add INTERNAL flag to frontend plugins. If set, the plugin won't show in UI.
Diffstat (limited to 'ipalib/cli.py')
-rw-r--r--ipalib/cli.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/ipalib/cli.py b/ipalib/cli.py
index 904d34d49..db4a08e85 100644
--- a/ipalib/cli.py
+++ b/ipalib/cli.py
@@ -612,6 +612,8 @@ class help(frontend.Command):
# build help topics
for c in self.Command():
+ if c.INTERNAL:
+ continue
topic = self._get_command_module(c.module)
if topic:
self._topics.setdefault(topic, [0]).append(c)
@@ -779,7 +781,7 @@ class cli(backend.Executioner):
self.create_context()
(key, argv) = (argv[0], argv[1:])
name = from_cli(key)
- if name not in self.Command:
+ if name not in self.Command or self.Command[name].INTERNAL:
raise CommandError(name=key)
cmd = self.Command[name]
kw = self.parse(cmd, argv)