mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
help, makeapi: allow setting command topic explicitly
Help topic can now be specified in the 'topic' class attribute of command plugins. Default value is the name of the module where the command is defined. This allows defining a command outside of the topic module. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
This commit is contained in:
@@ -427,6 +427,10 @@ class Command(HasParam):
|
||||
|
||||
callback_types = ('interactive_prompt',)
|
||||
|
||||
@property
|
||||
def topic(self):
|
||||
return type(self).__module__.rpartition('.')[2]
|
||||
|
||||
def __call__(self, *args, **options):
|
||||
"""
|
||||
Perform validation and then execute the command.
|
||||
|
||||
Reference in New Issue
Block a user