Commit 64727f23 authored by Łukasz Nowak's avatar Łukasz Nowak

Begin implementation of tidstorage configuration.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@45785 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0e58f46c
......@@ -28,6 +28,7 @@ from slapos.lib.recipe.BaseSlapRecipe import BaseSlapRecipe
import binascii
import os
import pkg_resources
import pprint
import hashlib
import sys
import zc.buildout
......@@ -545,6 +546,35 @@ class Recipe(BaseSlapRecipe):
self.path_list.append(wrapper)
return zeo_configuration_dict
def installTidStorage(self, ip, port, known_tid_storage_identifier_dict,
access_url):
"""Install TidStorage with all required backup tools
known_tid_storage_identifier_dict is a dictionary of:
((ip, port), storagename): (filestorage path, url for serialize)
url for serialize will be merged with access_url by internal tidstorage
"""
backup_base_path = self.createBackupDirectory('zodb')
# it is time to fill known_tid_storage_identifier_dict with backup
# destination
raise NotImplementedError
for k, v in known_tid_storage_identifier_dict.iteritems():
# generate unique name for each backup
name = '_'.join(['_'.join([str(q) for q in k[0]]), k[1]])
destination = os.path.join(backup_base_path, name)
self._createDirectory(destination)
known_tid_storage_identifier_dict[k] = (v[0], destination, v[1])
self.createConfigurationFile('tidstorage.py', self.substituteTemplate(
self.getTemplateFilename('tidstorage.py.in'), dict(
known_tid_storage_identifier_dict=pprint.pformat(known_tid_storage_identifier_dict),
base_url='s/%%' % access_url,
host=ip,
port=port,
timestamp_file_path=os.path.join(self.log_directory, 'repozo_tidstorage_timestamp.log'),
)))
raise NotImplementedError
def installZope(self, ip, port, name, zodb_configuration_string,
with_timerservice=False):
# Create zope configuration file
......
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