diff --git a/source/fusiondirectory-orchestrator/development/index.rst b/source/fusiondirectory-orchestrator/development/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..ef1fcf45ecd24fc80cc437cd924bd9fc0b3ea6b0 --- /dev/null +++ b/source/fusiondirectory-orchestrator/development/index.rst @@ -0,0 +1,8 @@ +======================== +Development Orchestrator +======================== + +.. toctree:: + :maxdepth: 2 + + orchDevPlugin.rst diff --git a/source/fusiondirectory-orchestrator/development/orchDevPlugin.rst b/source/fusiondirectory-orchestrator/development/orchDevPlugin.rst new file mode 100644 index 0000000000000000000000000000000000000000..72f793a565385e2778098f43d033ff9bf18c6d77 --- /dev/null +++ b/source/fusiondirectory-orchestrator/development/orchDevPlugin.rst @@ -0,0 +1,71 @@ +=================== +Orchestrator plugin +=================== + +This guide will help you get started with development within our GitLab environment. +It covers account creation, issue creation, project forking, and submitting a Merge Request (MR). + +---------------------------- +1. Orchestrator contribution +---------------------------- + +Please follow how to create an account, fork a project, create an MR and creating issues from FusionDirectory development section. +Exact same methodology will apply for your orchestrator plugin if you want it to be contributed within the main project. + +With that said, let's see how to create a plugin, a new orchestrator endpoints. + + +------------------ +2. Class structure +------------------ + +**Your class must implements the interface "EndPointInterface"** + +In order to interact with many defined methods, including LDAP interaction, we received a "gateway" object. + +class anOrchestratorPluginClass implements EndpointInterface +{ + + private TaskGateway $gateway; + + public function __construct (TaskGateway $gateway) + { + $this->gateway = $gateway; + } + + /** + * @return array + * Part of the interface of orchestrator plugin to treat GET method + */ + public function processEndPointGet (): array + { + } + + /** + * @param array|null $data + * @return array + */ + public function processEndPointPost (array $data = NULL): array + { + return []; + } + + /** + * @param array|NULL $data + * @return array + */ + public function processEndPointDelete (array $data = NULL): array + { + return []; + } + + /** + * @param array|NULL $data + * @return array + * @throws Exception + */ + public function processEndPointPatch (array $data = NULL): array + { + } + +} \ No newline at end of file diff --git a/source/fusiondirectory-orchestrator/index.rst b/source/fusiondirectory-orchestrator/index.rst index 4596c59432ed7ae9279fc8b315555601b6a6761c..110fd9ef47c19b5dd78c7d5bab86cd6d9b4efc55 100644 --- a/source/fusiondirectory-orchestrator/index.rst +++ b/source/fusiondirectory-orchestrator/index.rst @@ -6,3 +6,4 @@ FusionDirectory Orchestrator whatis/orchestrator.rst requirements/mandatory.rst + development/index.rst