diff --git a/opt/ahenk/plugins/sample/init.py b/opt/ahenk/plugins/sample/init.py new file mode 100644 index 0000000..4ddf5d6 --- /dev/null +++ b/opt/ahenk/plugins/sample/init.py @@ -0,0 +1,20 @@ +#!/usr/bin/python3 +# -*- coding: utf-8 -*- + +from base.plugin.abstract_plugin import AbstractPlugin + + +class Init(AbstractPlugin): + def __init__(self, context): + super(Init, self).__init__() + self.context = context + self.logger = self.get_logger() + + def handle_init_mode(self): + # TODO Do what do you want to do! + pass + + +def handle_mode(context): + init = Init(context) + init.handle_init_mode() \ No newline at end of file diff --git a/opt/ahenk/plugins/sample/login.py b/opt/ahenk/plugins/sample/login.py new file mode 100644 index 0000000..d54477f --- /dev/null +++ b/opt/ahenk/plugins/sample/login.py @@ -0,0 +1,21 @@ +#!/usr/bin/python3 +# -*- coding: utf-8 -*- + +from base.plugin.abstract_plugin import AbstractPlugin + + +class Login(AbstractPlugin): + def __init__(self, context): + super(Login, self).__init__() + self.context = context + self.username = str(context.get_username()) + self.logger = self.get_logger() + + def handle_login_mode(self): + # TODO Do what do you want to do! + pass + + +def handle_mode(context): + login = Login(context) + login.handle_login_mode() \ No newline at end of file diff --git a/opt/ahenk/plugins/sample/logout.py b/opt/ahenk/plugins/sample/logout.py new file mode 100644 index 0000000..83c066b --- /dev/null +++ b/opt/ahenk/plugins/sample/logout.py @@ -0,0 +1,21 @@ +#!/usr/bin/python3 +# -*- coding: utf-8 -*- + +from base.plugin.abstract_plugin import AbstractPlugin + + +class Logout(AbstractPlugin): + def __init__(self, context): + super(Logout, self).__init__() + self.context = context + self.username = str(context.get_username()) + self.logger = self.get_logger() + + def handle_logout_mode(self): + # TODO Do what do you want to do! + pass + + +def handle_mode(context): + logout = Logout(context) + logout.handle_logout_mode() \ No newline at end of file diff --git a/opt/ahenk/plugins/sample/main.py b/opt/ahenk/plugins/sample/main.py new file mode 100644 index 0000000..c353133 --- /dev/null +++ b/opt/ahenk/plugins/sample/main.py @@ -0,0 +1,5 @@ +#!/usr/bin/python3 +# -*- coding: utf-8 -*- + +def info(): + return None \ No newline at end of file diff --git a/opt/ahenk/plugins/sample/policy.py b/opt/ahenk/plugins/sample/policy.py new file mode 100644 index 0000000..c0a4c70 --- /dev/null +++ b/opt/ahenk/plugins/sample/policy.py @@ -0,0 +1,23 @@ +#!/usr/bin/python3 +# -*- coding: utf-8 -*- + +from base.plugin.abstract_plugin import AbstractPlugin + + +class Sample(AbstractPlugin): + def __init__(self, profile_data, context): + super(Sample, self).__init__() + self.profile_data = profile_data + self.context = context + self.logger = self.get_logger() + + def handle_policy(self): + # TODO Do what do you want to do! + # TODO Don't Forget returning response with + pass + + +def handle_policy(profile_data, context): + print('Sample Plugin Policy') + sample = Sample(profile_data, context) + sample.handle_policy() \ No newline at end of file diff --git a/opt/ahenk/plugins/sample/safe.py b/opt/ahenk/plugins/sample/safe.py new file mode 100644 index 0000000..2445976 --- /dev/null +++ b/opt/ahenk/plugins/sample/safe.py @@ -0,0 +1,21 @@ +#!/usr/bin/python3 +# -*- coding: utf-8 -*- + +from base.plugin.abstract_plugin import AbstractPlugin + + +class Safe(AbstractPlugin): + def __init__(self, context): + super(Safe, self).__init__() + self.context = context + self.username = str(context.get_username()) + self.logger = self.get_logger() + + def handle_safe_mode(self): + # TODO Do what do you want to do! + pass + + +def handle_mode(context): + safe = Safe(context) + safe.handle_safe_mode() \ No newline at end of file diff --git a/opt/ahenk/plugins/sample/shutdown.py b/opt/ahenk/plugins/sample/shutdown.py new file mode 100644 index 0000000..f21eb8a --- /dev/null +++ b/opt/ahenk/plugins/sample/shutdown.py @@ -0,0 +1,20 @@ +#!/usr/bin/python3 +# -*- coding: utf-8 -*- + +from base.plugin.abstract_plugin import AbstractPlugin + + +class Shutdown(AbstractPlugin): + def __init__(self, context): + super(Shutdown, self).__init__() + self.context = context + self.logger = self.get_logger() + + def handle_shutdown_mode(self): + # TODO Do what do you want to do! + pass + + +def handle_mode(context): + shutdown = Shutdown(context) + shutdown.handle_shutdown_mode() \ No newline at end of file diff --git a/opt/ahenk/plugins/sample/task_command_id.py b/opt/ahenk/plugins/sample/task_command_id.py new file mode 100644 index 0000000..99dd67e --- /dev/null +++ b/opt/ahenk/plugins/sample/task_command_id.py @@ -0,0 +1,23 @@ +#!/usr/bin/python3 +# -*- coding: utf-8 -*- + +from base.plugin.abstract_plugin import AbstractPlugin + + +class Sample(AbstractPlugin): + def __init__(self, task, context): + super(Sample, self).__init__() + self.task = task + self.context = context + self.logger = self.get_logger() + + def handle_task(self): + # TODO Do what do you want to do! + # TODO Don't Forget returning response with + pass + + +def handle_task(task, context): + print('Sample Plugin Task') + sample = Sample(task, context) + sample.handle_task() \ No newline at end of file