From d637e02df7303369ef98857aee5df7b9cb17dd21 Mon Sep 17 00:00:00 2001 From: Marco Mariani <marco.mariani@nexedi.com> Date: Mon, 3 Dec 2012 14:14:25 +0100 Subject: [PATCH] slapmonitor-xml recipe --- setup.py | 3 ++- slapos/recipe/slapmonitor/__init__.py | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 7a414bd7d3..90816e1bfa 100755 --- a/setup.py +++ b/setup.py @@ -129,7 +129,8 @@ setup(name=name, 'siptester = slapos.recipe.siptester:SipTesterRecipe', 'slapconfiguration = slapos.recipe.slapconfiguration:Recipe', 'slapcontainer = slapos.recipe.container:Recipe', - 'slapmonitor = slapos.recipe.slapmonitor:Recipe', + 'slapmonitor = slapos.recipe.slapmonitor:MonitorRecipe', + 'slapmonitor-xml = slapos.recipe.slapmonitor:MonitorXMLRecipe', 'slapreport = slapos.recipe.slapreport:Recipe', 'slaprunner = slapos.recipe.slaprunner:Recipe', 'slaprunner.test = slapos.recipe.slaprunner:Test', diff --git a/slapos/recipe/slapmonitor/__init__.py b/slapos/recipe/slapmonitor/__init__.py index 810c024d82..4b353af609 100644 --- a/slapos/recipe/slapmonitor/__init__.py +++ b/slapos/recipe/slapmonitor/__init__.py @@ -27,7 +27,7 @@ from slapos.recipe.librecipe import GenericBaseRecipe -class Recipe(GenericBaseRecipe): +class MonitorRecipe(GenericBaseRecipe): def install(self): options = self.options @@ -39,3 +39,16 @@ class Recipe(GenericBaseRecipe): ]) return [script] + +class MonitorXMLRecipe(GenericBaseRecipe): + + def install(self): + options = self.options + script = self.createWrapper(name=options['path'], + command=options['slapmonitor-xml-path'], + parameters=[ + options['database-path'], + ], + parameters_extra=True) + return [script] + -- 2.30.9