Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xiaowu Zhang
slapos
Commits
e153a886
Commit
e153a886
authored
May 06, 2021
by
Thomas Gambier
🚴🏼
Browse files
Options
Browse Files
Download
Plain Diff
software/[theia, slaprunner]: Enable hateoas support
See merge request
nexedi/slapos!977
parents
8eab718f
ab285b26
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
13 deletions
+18
-13
software/slaprunner/buildout.hash.cfg
software/slaprunner/buildout.hash.cfg
+1
-1
software/slaprunner/template/slapos.cfg.in
software/slaprunner/template/slapos.cfg.in
+1
-0
software/slaprunner/test/test.py
software/slaprunner/test/test.py
+7
-11
software/theia/software.cfg
software/theia/software.cfg
+1
-0
software/theia/test/test.py
software/theia/test/test.py
+7
-0
stack/slapos.cfg
stack/slapos.cfg
+1
-1
No files found.
software/slaprunner/buildout.hash.cfg
View file @
e153a886
...
@@ -50,7 +50,7 @@ md5sum = 7a2f5e25a818cb29964666ada7852a5c
...
@@ -50,7 +50,7 @@ md5sum = 7a2f5e25a818cb29964666ada7852a5c
[template-slapos-cfg]
[template-slapos-cfg]
filename = template/slapos.cfg.in
filename = template/slapos.cfg.in
md5sum =
3b228b26a170f3c07c50a0f2ae056daf
md5sum =
03322b8a0f42ea579d35981211359190
[template-slapformat-definition.cfg]
[template-slapformat-definition.cfg]
filename = template/slapformat-definition.cfg.in
filename = template/slapformat-definition.cfg.in
...
...
software/slaprunner/template/slapos.cfg.in
View file @
e153a886
...
@@ -13,6 +13,7 @@ shared_part_list =
...
@@ -13,6 +13,7 @@ shared_part_list =
{%- endfor %}
{%- endfor %}
{{ slaprunner['shared_root'] }}
{{ slaprunner['shared_root'] }}
master_url = http://{{ slaprunner['ipv4'] }}:{{ slaprunner['proxy_port'] }}
master_url = http://{{ slaprunner['ipv4'] }}:{{ slaprunner['proxy_port'] }}
master_rest_url = http://{{ slaprunner['ipv4'] }}:{{ slaprunner['proxy_port'] }}/hateoas
computer_id = slaprunner
computer_id = slaprunner
maximal_delay = 0
maximal_delay = 0
root_check = {{ slaprunner['root_check'] }}
root_check = {{ slaprunner['root_check'] }}
...
...
software/slaprunner/test/test.py
View file @
e153a886
...
@@ -53,10 +53,6 @@ setUpModule, SlapOSInstanceTestCase = makeModuleSetUpAndTestCaseClass(
...
@@ -53,10 +53,6 @@ setUpModule, SlapOSInstanceTestCase = makeModuleSetUpAndTestCaseClass(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'..'
,
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'..'
,
'software%s.cfg'
%
(
"-py3"
if
six
.
PY3
else
""
))))
'software%s.cfg'
%
(
"-py3"
if
six
.
PY3
else
""
))))
class
SlaprunnerTestCase
(
SlapOSInstanceTestCase
):
# Slaprunner uses unix sockets, so it needs short paths.
__partition_reference__
=
's'
class
SlaprunnerTestCase
(
SlapOSInstanceTestCase
):
class
SlaprunnerTestCase
(
SlapOSInstanceTestCase
):
# Slaprunner uses unix sockets, so it needs short paths.
# Slaprunner uses unix sockets, so it needs short paths.
__partition_reference__
=
's'
__partition_reference__
=
's'
...
@@ -423,14 +419,14 @@ class TestSlapOS(SlaprunnerTestCase):
...
@@ -423,14 +419,14 @@ class TestSlapOS(SlaprunnerTestCase):
def
test_slapos_command
(
self
):
def
test_slapos_command
(
self
):
# in ~/bin/slapos there is a wrapper setting configuration to use slapos from
# in ~/bin/slapos there is a wrapper setting configuration to use slapos from
# the web runner.
# the web runner.
proxy_show_output
=
subprocess
.
check_output
(
slapos
=
os
.
path
.
join
(
self
.
computer_partition_root_path
,
'bin'
,
'slapos'
)
(
# ensure the node is formatted
os
.
path
.
join
(
self
.
computer_partition_root_path
,
'bin'
,
'slapos'
),
subprocess
.
check_call
((
slapos
,
'node'
,
'format'
,
'--now'
),
env
=
{})
'proxy'
,
proxy_show_output
=
subprocess
.
check_output
((
slapos
,
'proxy'
,
'show'
),
env
=
{})
'show'
,
),
env
=
{})
self
.
assertIn
(
b'slaprunner'
,
proxy_show_output
)
self
.
assertIn
(
b'slaprunner'
,
proxy_show_output
)
# check hateoas cli support
computer_list_output
=
subprocess
.
check_output
((
slapos
,
'computer'
,
'list'
),
env
=
{})
self
.
assertIn
(
b'slaprunner'
,
computer_list_output
)
def
test_shared_part_list
(
self
):
def
test_shared_part_list
(
self
):
# this slapos used shared_part_list
# this slapos used shared_part_list
...
...
software/theia/software.cfg
View file @
e153a886
...
@@ -97,6 +97,7 @@ initialization =
...
@@ -97,6 +97,7 @@ initialization =
software_root="%s/software" % args.base_directory,
software_root="%s/software" % args.base_directory,
instance_root="%s/instance" % args.base_directory,
instance_root="%s/instance" % args.base_directory,
partition_forward_configuration=partition_forward_configuration,
partition_forward_configuration=partition_forward_configuration,
slapos_bin="${buildout:bin-directory}/slapos",
)
)
standalone.start()
standalone.start()
partition_count = 20
partition_count = 20
...
...
software/theia/test/test.py
View file @
e153a886
...
@@ -187,6 +187,13 @@ class TestTheia(TheiaTestCase):
...
@@ -187,6 +187,13 @@ class TestTheia(TheiaTestCase):
)
)
self
.
assertTrue
(
os
.
path
.
exists
(
script_path
))
self
.
assertTrue
(
os
.
path
.
exists
(
script_path
))
def
test_slapos_cli
(
self
):
slapos
=
self
.
_getSlapos
()
proxy_show_output
=
subprocess
.
check_output
((
slapos
,
'proxy'
,
'show'
))
self
.
assertIn
(
'slaprunner'
,
proxy_show_output
)
computer_list_output
=
subprocess
.
check_output
((
slapos
,
'computer'
,
'list'
))
self
.
assertIn
(
'slaprunner'
,
computer_list_output
)
class
TestTheiaEmbeddedSlapOSShutdown
(
TheiaTestCase
):
class
TestTheiaEmbeddedSlapOSShutdown
(
TheiaTestCase
):
def
test_stopping_instance_stops_embedded_slapos
(
self
):
def
test_stopping_instance_stops_embedded_slapos
(
self
):
...
...
stack/slapos.cfg
View file @
e153a886
...
@@ -208,7 +208,7 @@ setuptools-dso = 1.7
...
@@ -208,7 +208,7 @@ setuptools-dso = 1.7
rubygemsrecipe = 0.3.0
rubygemsrecipe = 0.3.0
six = 1.12.0
six = 1.12.0
slapos.cookbook = 1.0.184
slapos.cookbook = 1.0.184
slapos.core = 1.6.
9
slapos.core = 1.6.
12
slapos.extension.strip = 0.4
slapos.extension.strip = 0.4
slapos.extension.shared = 1.0
slapos.extension.shared = 1.0
slapos.libnetworkcache = 0.20
slapos.libnetworkcache = 0.20
...
...
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