Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
Thomas Leymonerie
slapos.core
Commits
09748757
Commit
09748757
authored
Apr 25, 2013
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
realRun() now handles a single method
parent
d03a91a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
slapos/grid/slapgrid.py
slapos/grid/slapgrid.py
+10
-11
No files found.
slapos/grid/slapgrid.py
View file @
09748757
...
...
@@ -334,7 +334,7 @@ def parseArgumentTupleAndReturnSlapgridObject(*argument_tuple):
options
])
def
realRun
(
argument_tuple
,
method
_list
):
def
realRun
(
argument_tuple
,
method
):
slapgrid_object
,
options
=
\
parseArgumentTupleAndReturnSlapgridObject
(
*
argument_tuple
)
pidfile
=
options
.
get
(
'pidfile'
)
...
...
@@ -343,13 +343,12 @@ def realRun(argument_tuple, method_list):
try
:
failed
=
False
failed_promise
=
False
for
method
in
method_list
:
# Quite complicated way to figure out if everything went fine
return_value
=
getattr
(
slapgrid_object
,
method
)()
if
return_value
==
SLAPGRID_FAIL
:
failed
=
True
if
return_value
==
SLAPGRID_PROMISE_FAIL
:
failed_promise
=
True
# Quite complicated way to figure out if everything went fine
return_value
=
getattr
(
slapgrid_object
,
method
)()
if
return_value
==
SLAPGRID_FAIL
:
failed
=
True
if
return_value
==
SLAPGRID_PROMISE_FAIL
:
failed_promise
=
True
finally
:
if
pidfile
:
setFinished
(
pidfile
)
...
...
@@ -363,19 +362,19 @@ def realRun(argument_tuple, method_list):
def
runSoftwareRelease
(
*
argument_tuple
):
"""Hook for entry point to process Software Releases only
"""
realRun
(
argument_tuple
,
[
'processSoftwareReleaseList'
]
)
realRun
(
argument_tuple
,
'processSoftwareReleaseList'
)
def
runComputerPartition
(
*
argument_tuple
):
"""Hook for entry point to process Computer Partitions only
"""
realRun
(
argument_tuple
,
[
'processComputerPartitionList'
]
)
realRun
(
argument_tuple
,
'processComputerPartitionList'
)
def
runUsageReport
(
*
argument_tuple
):
"""Hook for entry point to process Usage Reports only
"""
realRun
(
argument_tuple
,
[
'agregateAndSendUsage'
]
)
realRun
(
argument_tuple
,
'agregateAndSendUsage'
)
class
Slapgrid
(
object
):
...
...
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