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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos.core
Commits
09eaa975
Commit
09eaa975
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
fccd63ad
Changes
2
Show 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 @
09eaa975
...
@@ -35,12 +35,24 @@ class IException(Interface):
...
@@ -35,12 +35,24 @@ class IException(Interface):
Classes which implement IException are used to report errors.
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
):
class
INotFoundError
(
IException
):
"""
"""
Classes which implement INotFoundError are used to report missing
Classes which implement INotFoundError are used to report missing
informations on the slap server.
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
):
class
IUnauthorized
(
IException
):
"""
"""
Classes which implement IUnauthorized are used to report missing
Classes which implement IUnauthorized are used to report missing
...
...
slapos/slap/slap.py
View file @
09eaa975
...
@@ -140,10 +140,10 @@ class SoftwareInstance(SlapDocument):
...
@@ -140,10 +140,10 @@ class SoftwareInstance(SlapDocument):
"""Exposed exceptions"""
"""Exposed exceptions"""
# XXX Why do we need to expose exceptions?
# XXX Why do we need to expose exceptions?
class
ResourceNotReady
(
Exception
):
class
ResourceNotReady
(
Exception
):
pass
zope
.
interface
.
implements
(
interface
.
IResourceNotReady
)
class
ServerError
(
Exception
):
class
ServerError
(
Exception
):
pass
zope
.
interface
.
implements
(
interface
.
IServerError
)
class
NotFoundError
(
Exception
):
class
NotFoundError
(
Exception
):
zope
.
interface
.
implements
(
interface
.
INotFoundError
)
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