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
7c9148fe
Commit
7c9148fe
authored
Nov 09, 2012
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use keyword arguments
parent
08b5b9eb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
slapos/recipe/addresiliency/template/bully.py.in
slapos/recipe/addresiliency/template/bully.py.in
+5
-3
slapos/recipe/addresiliency/template/bully_new.py.in
slapos/recipe/addresiliency/template/bully_new.py.in
+5
-4
No files found.
slapos/recipe/addresiliency/template/bully.py.in
View file @
7c9148fe
...
@@ -37,9 +37,11 @@ def rename_broken_and_stop():
...
@@ -37,9 +37,11 @@ def rename_broken_and_stop():
slap.initializeConnection('%(server_url)s',
slap.initializeConnection('%(server_url)s',
'%(key_file)s',
'%(key_file)s',
'%(cert_file)s')
'%(cert_file)s')
computer_partition = slap.registerComputerPartition('%(computer_id)s',
computer_partition = slap.registerComputerPartition(computer_guid='%(computer_id)s',
'%(partition_id)s')
partition_id='%(partition_id)s')
broken = computer_partition.request('%(software)s', 'frozen', '%(namebase)s0')
broken = computer_partition.request(software_release='%(software)s',
software_type='frozen',
partition_reference='%(namebase)s0')
broken.rename('broken-%%s' %% (time.strftime("%%d-%%b_%%H:%%M:%%S", time.gmtime())))
broken.rename('broken-%%s' %% (time.strftime("%%d-%%b_%%H:%%M:%%S", time.gmtime())))
broken.stopped()
broken.stopped()
...
...
slapos/recipe/addresiliency/template/bully_new.py.in
View file @
7c9148fe
...
@@ -12,7 +12,6 @@ sys.path[:] = %(syspath)s
...
@@ -12,7 +12,6 @@ sys.path[:] = %(syspath)s
from slapos import slap as slapmodule
from slapos import slap as slapmodule
port = 50000
port = 50000
size = 1024
def rename_broken_and_stop():
def rename_broken_and_stop():
...
@@ -21,9 +20,11 @@ def rename_broken_and_stop():
...
@@ -21,9 +20,11 @@ def rename_broken_and_stop():
slap.initializeConnection('%(server_url)s',
slap.initializeConnection('%(server_url)s',
'%(key_file)s',
'%(key_file)s',
'%(cert_file)s')
'%(cert_file)s')
computer_partition = slap.registerComputerPartition('%(computer_id)s',
computer_partition = slap.registerComputerPartition(computer_guid='%(computer_id)s',
'%(partition_id)s')
partition_id='%(partition_id)s')
broken = computer_partition.request('%(software)s', 'frozen', '%(namebase)s0')
broken = computer_partition.request(software_release='%(software)s',
software_type='frozen',
partition_reference='%(namebase)s0')
broken.rename('broken-%%s' %% (time.strftime("%%d-%%b_%%H:%%M:%%S", time.gmtime())))
broken.rename('broken-%%s' %% (time.strftime("%%d-%%b_%%H:%%M:%%S", time.gmtime())))
broken.stopped()
broken.stopped()
...
...
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