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
Xiaowu Zhang
slapos.core
Commits
84333d85
Commit
84333d85
authored
Aug 17, 2012
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update SLAP interface to add exceptions
parent
81c5c5b4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
slapos/slap/interface/slap.py
slapos/slap/interface/slap.py
+12
-0
slapos/slap/slap.py
slapos/slap/slap.py
+2
-2
No files found.
slapos/slap/interface/slap.py
View file @
84333d85
...
...
@@ -35,12 +35,24 @@ class IException(Interface):
Classes which implement IException are used to report errors.
"""
class
IServerError
(
IException
):
"""
Classes which implement IServerError are used to report unexpected error
from the slap server.
"""
class
INotFoundError
(
IException
):
"""
Classes which implement INotFoundError are used to report missing
informations on the slap server.
"""
class
IResourceNotReady
(
IException
):
"""
Classes which implement IResourceNotReady are used to report resource not
ready on the slap server.
"""
class
IUnauthorized
(
IException
):
"""
Classes which implement IUnauthorized are used to report missing
...
...
slapos/slap/slap.py
View file @
84333d85
...
...
@@ -140,10 +140,10 @@ class SoftwareInstance(SlapDocument):
"""Exposed exceptions"""
# XXX Why do we need to expose exceptions?
class
ResourceNotReady
(
Exception
):
pass
zope
.
interface
.
implements
(
interface
.
IResourceNotReady
)
class
ServerError
(
Exception
):
pass
zope
.
interface
.
implements
(
interface
.
IServerError
)
class
NotFoundError
(
Exception
):
zope
.
interface
.
implements
(
interface
.
INotFoundError
)
...
...
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