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
20
Merge Requests
20
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
slapos.core
Commits
78599dd5
Commit
78599dd5
authored
Nov 26, 2018
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
standalone: implementation of IStandaloneSlapOS
parent
aa2081e2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
2 deletions
+52
-2
slapos/slap/standalone.py
slapos/slap/standalone.py
+49
-0
slapos/tests/interface.py
slapos/tests/interface.py
+3
-2
No files found.
slapos/slap/standalone.py
0 → 100644
View file @
78599dd5
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2018 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import
zope.interface
from
.interface.slap
import
IStandaloneSlapOS
from
.interface.slap
import
IStandaloneSlapOSProcess
from
.interface.slap
import
ISynchronousStandaloneSlapOS
class
StandaloneSlapOS
(
object
):
"""Standalone/Embeddable SlapOS.
See ``slapos.core.interface.slap.IStandaloneSlapOS`` for details.
"""
zope
.
interface
.
implements
(
IStandaloneSlapOS
)
class
SychronousStandaloneSlapOS
(
StandaloneSlapOS
):
"""Standalone/Embeddable SlapOS with a synchronous API.
See ``slapos.core.interface.slap.IStandaloneSlapOS`` for details.
"""
zope
.
interface
.
implements
(
ISynchronousStandaloneSlapOS
)
slapos/tests/interface.py
View file @
78599dd5
...
...
@@ -29,7 +29,7 @@ import unittest
from
zope.interface.verify
import
verifyClass
import
zope.interface
import
types
from
slapos
import
slap
import
slapos.slap.standalone
def
getOnlyImplementationAssertionMethod
(
klass
,
method_list
):
"""Returns method which verifies if a klass only implements its interfaces"""
...
...
@@ -96,7 +96,8 @@ class TestInterface(unittest.TestCase):
"""
# add methods to test class
generateTestMethodListOnClass
(
TestInterface
,
slap
)
generateTestMethodListOnClass
(
TestInterface
,
slapos
.
slap
)
generateTestMethodListOnClass
(
TestInterface
,
slapos
.
slap
.
standalone
)
if
__name__
==
'__main__'
:
unittest
.
main
()
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