plugins: Move plugins to dedicated submodule
This change groups the plugin modules together under kas.plugins and moves the @kasplugin decorator to this submodule. This will ensure the codebase stays organised as more plugins are added. Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
@@ -327,14 +327,3 @@ def ssh_no_host_key_check():
|
||||
os.mkdir(home + '/.ssh')
|
||||
with open(home + '/.ssh/config', 'w') as fds:
|
||||
fds.write('Host *\n\tStrictHostKeyChecking no\n\n')
|
||||
|
||||
|
||||
def kasplugin(plugin_class):
|
||||
"""
|
||||
A decorator that registers kas plugins
|
||||
"""
|
||||
if not hasattr(kasplugin, 'plugins'):
|
||||
setattr(kasplugin, 'plugins', {})
|
||||
getattr(kasplugin, 'plugins').update({
|
||||
plugin_class.name: plugin_class
|
||||
})
|
||||
|
Reference in New Issue
Block a user