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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Lu Xu
slapos
Commits
97daf9b2
Commit
97daf9b2
authored
Aug 29, 2012
by
Antoine Catton
Committed by
Cédric de Saint Martin
Sep 26, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switch addr recipe to GenericSlapRecipe
This is a consequence of f4d0a1f68829 commit.
parent
ad0da563
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
slapos/recipe/addres/__init__.py
slapos/recipe/addres/__init__.py
+8
-9
No files found.
slapos/recipe/addres/__init__.py
View file @
97daf9b2
...
...
@@ -24,29 +24,28 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from
slapos.recipe.librecipe
import
Generic
Base
Recipe
from
slapos.recipe.librecipe
import
Generic
Slap
Recipe
import
sys
import
os
class
Recipe
(
Generic
Base
Recipe
):
class
Recipe
(
Generic
Slap
Recipe
):
""" This class provides the installation of the resilience
script on the partition.
"""
def
install
(
self
):
def
_
install
(
self
):
path_list
=
[]
param_dict
=
self
.
getComputerPartitionInstanceParameterDict
()
self_id
=
int
(
param_dict
[
'number'
])
ip
=
param_dict
[
'ip-list'
].
split
(
' '
)
self_id
=
int
(
self
.
parameter_dict
[
'number'
])
ip
=
self
.
parameter_dict
[
'ip-list'
].
split
(
' '
)
print
'Creating bully script with ips : %s
\
n
'
%
ip
slap_connection
=
self
.
buildout
[
'slap-connection'
]
path_conf
=
os
.
path
.
join
(
self
.
options
[
'script'
],
'conf.in'
)
path_bully
=
os
.
path
.
join
(
self
.
options
[
'script'
],
param
_dict
[
'script'
])
path_bully
=
os
.
path
.
join
(
self
.
options
[
'script'
],
self
.
parameter
_dict
[
'script'
])
path_bully_new
=
os
.
path
.
join
(
self
.
options
[
'script'
],
'new.py'
)
path_run
=
os
.
path
.
join
(
self
.
options
[
'run'
],
param
_dict
[
'wrapper'
])
path_run
=
os
.
path
.
join
(
self
.
options
[
'run'
],
self
.
parameter
_dict
[
'wrapper'
])
print
'paths: %s
\
n
%s
\
n
'
%
(
path_run
,
path_bully
)
bully_conf
=
dict
(
self_id
=
self_id
,
ip_list
=
ip
,
...
...
@@ -58,7 +57,7 @@ class Recipe(GenericBaseRecipe):
computer_id
=
slap_connection
[
'computer-id'
],
partition_id
=
slap_connection
[
'partition-id'
],
software
=
slap_connection
[
'software-release-url'
],
namebase
=
param
_dict
[
'namebase'
],
namebase
=
self
.
parameter
_dict
[
'namebase'
],
confpath
=
path_conf
)
try
:
conf
=
self
.
createFile
(
path_conf
,
...
...
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