1#!/usr/bin/env python 2# -*- coding: utf-8 -*- 3# Copyright (C) 2015-2020 Bareos GmbH & Co. KG 4# 5# This program is Free Software; you can redistribute it and/or 6# modify it under the terms of version three of the GNU Affero General Public 7# License as published by the Free Software Foundation, which is 8# listed in the file LICENSE. 9# 10# This program is distributed in the hope that it will be useful, but 11# WITHOUT ANY WARRANTY; without even the implied warranty of 12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13# Affero General Public License for more details. 14# 15# You should have received a copy of the GNU Affero General Public License 16# along with this program; if not, write to the Free Software 17# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 18# 02110-1301, USA. 19# 20 21# Provided by the Bareos FD Python plugin interface 22from bareosfd import * 23from bareos_fd_consts import * 24 25# This module contains the wrapper functions called by the Bareos-FD, the functions call the corresponding 26# methods from your plugin class 27from BareosFdWrapper import * 28 29# This module contains the used plugin class 30from BareosFdPluginPerconaXtraBackup import * 31 32 33def load_bareos_plugin(context, plugindef): 34 """ 35 This function is called by the Bareos-FD to load the plugin 36 We use it to instantiate the plugin class 37 """ 38 # BareosFdWrapper.bareos_fd_plugin_object is the module attribute that holds the plugin class object 39 BareosFdWrapper.bareos_fd_plugin_object = BareosFdPercona(context, plugindef) 40 return bRCs["bRC_OK"] 41 42 43# the rest is done in the Plugin module 44