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
Roque
slapos.core
Commits
2b3426e3
Commit
2b3426e3
authored
Oct 29, 2014
by
Cédric de Saint Martin
Committed by
Rafael Monnerat
Nov 10, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slap: update interface.
parent
37613b1f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
17 deletions
+23
-17
slapos/slap/interface/slap.py
slapos/slap/interface/slap.py
+15
-3
slapos/slap/slap.py
slapos/slap/slap.py
+8
-14
No files found.
slapos/slap/interface/slap.py
View file @
2b3426e3
...
@@ -35,6 +35,12 @@ class IException(Interface):
...
@@ -35,6 +35,12 @@ class IException(Interface):
Classes which implement IException are used to report errors.
Classes which implement IException are used to report errors.
"""
"""
class
IConnectionError
(
IException
):
"""
Classes which implement IServerError are used to report a connection problem
to the slap server.
"""
class
IServerError
(
IException
):
class
IServerError
(
IException
):
"""
"""
Classes which implement IServerError are used to report unexpected error
Classes which implement IServerError are used to report unexpected error
...
@@ -164,6 +170,12 @@ class ISoftwareProductCollection(Interface):
...
@@ -164,6 +170,12 @@ class ISoftwareProductCollection(Interface):
software_product, by querying SlapOS Master.
software_product, by querying SlapOS Master.
"""
"""
class
ISoftwareInstance
(
Interface
):
"""
Classes which implement ISoftwareRelease are used by slap to represent
informations about a Software Instance.
"""
class
IComputerPartition
(
IBuildoutController
,
IRequester
):
class
IComputerPartition
(
IBuildoutController
,
IRequester
):
"""
"""
Computer Partition interface specification
Computer Partition interface specification
...
@@ -306,7 +318,7 @@ class IComputerPartition(IBuildoutController, IRequester):
...
@@ -306,7 +318,7 @@ class IComputerPartition(IBuildoutController, IRequester):
def
getStatus
():
def
getStatus
():
"""
"""
Returns a dictionnary containing the latest status of the
Returns a dictionnary containing the latest status of the
computer partition.
computer partition.
The dictionnary keys are:
The dictionnary keys are:
user -- user who reported the latest status
user -- user who reported the latest status
...
@@ -367,7 +379,7 @@ class IComputer(Interface):
...
@@ -367,7 +379,7 @@ class IComputer(Interface):
def
getStatus
():
def
getStatus
():
"""
"""
Returns a dictionnary containing the latest status of the
Returns a dictionnary containing the latest status of the
computer.
computer.
The dictionnary keys are:
The dictionnary keys are:
user -- user who reported the latest status
user -- user who reported the latest status
...
@@ -377,7 +389,7 @@ class IComputer(Interface):
...
@@ -377,7 +389,7 @@ class IComputer(Interface):
def
generateCertificate
():
def
generateCertificate
():
"""
"""
Returns a dictionnary containing the new certificate files for
Returns a dictionnary containing the new certificate files for
the computer.
the computer.
The dictionnary keys are:
The dictionnary keys are:
key -- key file
key -- key file
...
...
slapos/slap/slap.py
View file @
2b3426e3
...
@@ -60,15 +60,6 @@ fallback_logger.addHandler(fallback_handler)
...
@@ -60,15 +60,6 @@ fallback_logger.addHandler(fallback_handler)
DEFAULT_SOFTWARE_TYPE
=
'RootSoftwareInstance'
DEFAULT_SOFTWARE_TYPE
=
'RootSoftwareInstance'
class
AuthenticationError
(
Exception
):
pass
class
ConnectionError
(
Exception
):
pass
class
SlapDocument
:
class
SlapDocument
:
def
__init__
(
self
,
connection_helper
=
None
):
def
__init__
(
self
,
connection_helper
=
None
):
if
connection_helper
is
not
None
:
if
connection_helper
is
not
None
:
...
@@ -197,6 +188,7 @@ class SoftwareInstance(SlapDocument):
...
@@ -197,6 +188,7 @@ class SoftwareInstance(SlapDocument):
"""
"""
Contains Software Instance information
Contains Software Instance information
"""
"""
zope
.
interface
.
implements
(
interface
.
ISoftwareInstance
)
def
__init__
(
self
,
**
kwargs
):
def
__init__
(
self
,
**
kwargs
):
"""
"""
...
@@ -207,20 +199,22 @@ class SoftwareInstance(SlapDocument):
...
@@ -207,20 +199,22 @@ class SoftwareInstance(SlapDocument):
"""Exposed exceptions"""
"""Exposed exceptions"""
# XXX Why do we need to expose exceptions?
class
ResourceNotReady
(
Exception
):
class
ResourceNotReady
(
Exception
):
zope
.
interface
.
implements
(
interface
.
IResourceNotReady
)
zope
.
interface
.
implements
(
interface
.
IResourceNotReady
)
class
ServerError
(
Exception
):
class
ServerError
(
Exception
):
zope
.
interface
.
implements
(
interface
.
IServerError
)
zope
.
interface
.
implements
(
interface
.
IServerError
)
class
NotFoundError
(
Exception
):
class
NotFoundError
(
Exception
):
zope
.
interface
.
implements
(
interface
.
INotFoundError
)
zope
.
interface
.
implements
(
interface
.
INotFoundError
)
class
AuthenticationError
(
Exception
):
pass
class
ConnectionError
(
Exception
):
zope
.
interface
.
implements
(
interface
.
IConnectionError
)
class
Supply
(
SlapDocument
):
class
Supply
(
SlapDocument
):
zope
.
interface
.
implements
(
interface
.
ISupply
)
zope
.
interface
.
implements
(
interface
.
ISupply
)
...
...
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