Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sebastien Robin
slapos
Commits
fad66997
Commit
fad66997
authored
Sep 24, 2012
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for non-string storage definition.
In preparation for better ERP5 clusterisation.
parent
020bb119
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
11 deletions
+17
-11
slapos/recipe/zeo/__init__.py
slapos/recipe/zeo/__init__.py
+17
-11
No files found.
slapos/recipe/zeo/__init__.py
View file @
fad66997
...
@@ -56,17 +56,23 @@ class Recipe(GenericBaseRecipe):
...
@@ -56,17 +56,23 @@ class Recipe(GenericBaseRecipe):
'zeo-filestorage-snippet.conf.in'
)
'zeo-filestorage-snippet.conf.in'
)
# Prepare all filestorages
# Prepare all filestorages
filestorage_snippet
=
""
filestorage_snippet
=
""
for
storage_definition
in
self
.
options
[
'storage'
].
splitlines
():
storage
=
self
.
options
[
'storage'
]
storage_definition
=
storage_definition
.
strip
()
if
isinstance
(
storage
,
basestring
):
if
not
storage_definition
:
for
storage_definition
in
storage
.
splitlines
():
continue
storage_definition
=
storage_definition
.
strip
()
for
q
in
storage_definition
.
split
():
if
not
storage_definition
:
if
'storage-name'
in
q
:
continue
storage_name
=
q
.
split
(
'='
)[
1
].
strip
()
for
q
in
storage_definition
.
split
():
if
'zodb-path'
in
q
:
if
'storage-name'
in
q
:
zodb_path
=
q
.
split
(
'='
)[
1
].
strip
()
storage_name
=
q
.
split
(
'='
)[
1
].
strip
()
filestorage_snippet
+=
self
.
substituteTemplate
(
if
'zodb-path'
in
q
:
snippet_filename
,
dict
(
storage_name
=
storage_name
,
path
=
zodb_path
))
zodb_path
=
q
.
split
(
'='
)[
1
].
strip
()
filestorage_snippet
+=
self
.
substituteTemplate
(
snippet_filename
,
dict
(
storage_name
=
storage_name
,
path
=
zodb_path
))
else
:
for
storage_name
,
path
in
storage
:
filestorage_snippet
+=
self
.
substituteTemplate
(
snippet_filename
,
{
'storage_name'
:
storage_name
,
'path'
:
path
})
config
=
dict
(
config
=
dict
(
zeo_ip
=
self
.
options
[
'ip'
],
zeo_ip
=
self
.
options
[
'ip'
],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment