
From: Aline Manera <alinefm@br.ibm.com> To avoid duplicating code in model and mockmodel, the code related to plugin resource was added to model_/plugins.py Signed-off-by: Aline Manera <alinefm@br.ibm.com> --- src/kimchi/model_/plugins.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/kimchi/model_/plugins.py diff --git a/src/kimchi/model_/plugins.py b/src/kimchi/model_/plugins.py new file mode 100644 index 0000000..3cbae77 --- /dev/null +++ b/src/kimchi/model_/plugins.py @@ -0,0 +1,29 @@ +# +# Project Kimchi +# +# Copyright IBM, Corp. 2013 +# +# Authors: +# Adam Litke <agl@linux.vnet.ibm.com> +# Aline Manera <alinefm@linux.vnet.ibm.com> +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +from kimchi import utils + +class Plugins(object): + def get_list(self): + return [plugin for (plugin, config) in utils.get_enabled_plugins()] + -- 1.7.10.4