Commit 244570f0 authored by Łukasz Nowak's avatar Łukasz Nowak

Make zeo working a bit.

parent afe4dc75
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
# #
############################################################################## ##############################################################################
from slapos.recipe.librecipe import GenericBaseRecipe from slapos.recipe.librecipe import GenericBaseRecipe
import os
class Recipe(GenericBaseRecipe): class Recipe(GenericBaseRecipe):
""" """
...@@ -57,9 +58,16 @@ class Recipe(GenericBaseRecipe): ...@@ -57,9 +58,16 @@ class Recipe(GenericBaseRecipe):
# Prepare all filestorages # Prepare all filestorages
filestorage_snippet = "" filestorage_snippet = ""
for storage_name in self.options['storage'].split(): for storage_definition in self.options['storage'].splitlines():
storage_path = os.path.join(zodb_directory_path, '%s.fs' % storage_name) storage_definition = storage_definition.strip()
if not storage_definition:
continue
for q in storage_definition.split():
if 'storage-name' in q:
storage_name = q.split('=')[1].strip()
if 'zodb-name' in q:
zodb_name = q.split('=')[1].strip()
storage_path = os.path.join(zodb_directory_path, '%s.fs' % zodb_name)
filestorage_snippet += self.substituteTemplate( filestorage_snippet += self.substituteTemplate(
snippet_filename, dict(storage_name=storage_name, path=storage_path)) snippet_filename, dict(storage_name=storage_name, path=storage_path))
...@@ -81,6 +89,7 @@ class Recipe(GenericBaseRecipe): ...@@ -81,6 +89,7 @@ class Recipe(GenericBaseRecipe):
wrapper_path = self.createPythonScript( wrapper_path = self.createPythonScript(
self.options['wrapper-path'], self.options['wrapper-path'],
'slapos.recipe.librecipe.execute.execute', 'slapos.recipe.librecipe.execute.execute',
arguments=[self.options['binary-path'].strip(), '-C', zeo_conf_path], arguments=[self.options['binary-path'].strip(), '-C',
self.options['conf-path']],)
return [configuration_path, wrapper_path] return [configuration_path, wrapper_path]
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment