If all the commands of a plugin are disabled the topic for that plugin is still available. For an example try:
$ ipa help aci
Also the help summary for show-mappings is broken:
Help subtopics: show-mappings <ipalib.cli.show_mappings>
I have fixes for both of these.
diff --git a/ipalib/cli.py b/ipalib/cli.py index 06e7b1c..7fe8087 100644 --- a/ipalib/cli.py +++ b/ipalib/cli.py @@ -748,6 +748,8 @@ class help(frontend.Local): self.print_commands(name) elif name in self.Command: cmd = self.Command[name] + if cmd.NO_CLI: + raise HelpError(topic=name) print unicode(_('Purpose: %s')) % unicode(_(cmd.doc)).strip() self.Backend.cli.build_parser(cmd).print_help() elif mod_name in sys.modules: @@ -805,6 +807,9 @@ class help(frontend.Local): m = '%s.%s' % (self._PLUGIN_BASE_MODULE, topic) doc = (unicode(_(sys.modules[m].__doc__)) or '').strip() + if topic not in self.Command and len(commands) == 0: + raise HelpError(topic=topic) + print doc if len(commands) > 1: print '' @@ -814,6 +819,9 @@ class help(frontend.Local): print "\n" class show_mappings(frontend.Command): + """ + Show mapping of LDAP attributes to command-line option. + """ takes_args = ( Str('command_name', label=_('Command name'),
Be sure to test standalone commands such as ping.
https://bugzilla.redhat.com/show_bug.cgi?id=747028
master: f098b21
ipa-2-1: 7bde6a7
Metadata Update from @rcritten: - Issue assigned to rcritten - Issue set to the milestone: FreeIPA 2.1.3 (bug fixing)
Login to comment on this ticket.