Skip to content

Commit

Permalink
How to load multiple python plugins
Browse files Browse the repository at this point in the history
This adds a configuration example on how to load multiple python plugins
via 'Dir Plugin Options' Directive.
  • Loading branch information
fbergkemper authored and joergsteffens committed Jun 14, 2018
1 parent 04368ab commit d5c0d0b
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions docs/manuals/en/main/plugins.tex
Expand Up @@ -480,9 +480,9 @@ \subsubsection{Loading plugins}
\end{itemize}
Example:
Single Python Plugin Loading Example:
\begin{bconfig}{bareos-dir.conf: Python Plugins}
\begin{bconfig}{bareos-dir.conf: Single Python Plugin Loading Example}
Director {
# ...
# Plugin directory
Expand All @@ -501,6 +501,30 @@ \subsubsection{Loading plugins}
}
\end{bconfig}
Multiple Python Plugin Loading Example:
\begin{bconfig}{bareos-dir.conf: Multiple Python Plugin Loading Example}
Director {
# ...
# Plugin directory
Plugin Directory = /usr/lib64/bareos/plugins
# Load the python plugin
Plugin Names = "python"
}
JobDefs {
Name = "DefaultJob"
Type = Backup
# ...
# Load the class based plugin with testoption=testparam
Dir Plugin Options = "python:instance=0:module_path=/usr/lib64/bareos/plugins:module_name=bareos-dir-class-plugins:testoption=testparam1
Dir Plugin Options = "python:instance=1:module_path=/usr/lib64/bareos/plugins:module_name=bareos-dir-class-plugins:testoption=testparam2
# ...
}
\end{bconfig}
\subsubsection{Write your own Python Plugin}
Some plugin examples are available on \url{https://github.com/bareos/bareos-contrib}.
Expand Down

0 comments on commit d5c0d0b

Please sign in to comment.