summaryrefslogtreecommitdiffstats
path: root/ipalib/cli.py
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2016-06-21 12:07:21 +0200
committerJan Cholasta <jcholast@redhat.com>2016-06-28 13:30:49 +0200
commit4284d4fb4da1049c8b9f23d838f963b301aef97d (patch)
tree26b1a69fc7438923fea34daf50140a1058af1fac /ipalib/cli.py
parent79d1f5833547044a7cb2700454cacb2a0976dd5f (diff)
downloadfreeipa-4284d4fb4da1049c8b9f23d838f963b301aef97d.tar.gz
freeipa-4284d4fb4da1049c8b9f23d838f963b301aef97d.tar.xz
freeipa-4284d4fb4da1049c8b9f23d838f963b301aef97d.zip
plugable: support plugin versioning
Allow multiple incompatible versions of a plugin using the same name. The current plugins are assumed to be version '1'. The unique identifier of plugins was changed from plugin name to plugin name and version. By default, the highest version available at build time is used. If the plugin is an unknown remote plugin, version of '1' is used by default. https://fedorahosted.org/freeipa/ticket/4427 Reviewed-By: David Kupka <dkupka@redhat.com>
Diffstat (limited to 'ipalib/cli.py')
-rw-r--r--ipalib/cli.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/ipalib/cli.py b/ipalib/cli.py
index f60dc927d..1faf8285c 100644
--- a/ipalib/cli.py
+++ b/ipalib/cli.py
@@ -728,6 +728,8 @@ class help(frontend.Local):
# build help topics
for c in self.api.Command():
+ if c is not self.api.Command[c.name]:
+ continue
if c.NO_CLI:
continue
@@ -792,6 +794,8 @@ class help(frontend.Local):
elif name == "commands":
mcl = 0
for cmd in self.Command():
+ if cmd is not self.Command[cmd.name]:
+ continue
if cmd.NO_CLI:
continue
mcl = max(mcl, len(cmd.name))