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
Jérome Perrin
slapos.core
Commits
63e7ec10
Commit
63e7ec10
authored
Feb 01, 2018
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
grid.promise: implement a new promise launcher in slapgrid
parent
4b7a7060
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
462 additions
and
0 deletions
+462
-0
slapos/grid/promise/__init__.py
slapos/grid/promise/__init__.py
+433
-0
slapos/grid/promise/interface.py
slapos/grid/promise/interface.py
+29
-0
No files found.
slapos/grid/promise/__init__.py
0 → 100644
View file @
63e7ec10
This diff is collapsed.
Click to expand it.
slapos/grid/promise/interface.py
0 → 100644
View file @
63e7ec10
# coding: utf-8
from
zope.interface
import
Interface
class
IPromise
(
Interface
):
"""Base Promise interface."""
def
__init__
(
config
):
"""
@param config: Configurations needed to start the promise
"""
def
anomaly
(
self
):
"""
Called to detect if there is an anomaly.
@return AnomalyResult object
"""
def
sense
(
self
):
"""
Run the promise code and store the result
raise error, log error message, ... for failure
"""
def
test
(
self
):
"""
Test promise and say if problem is detected or not
@return TestResult 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