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
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
Tom Niget
slapos
Commits
11f5304f
Commit
11f5304f
authored
Jun 05, 2023
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Plain Diff
Update Release Candidate
parents
d2f27c8e
3fc96ff5
Changes
23
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
268 additions
and
120 deletions
+268
-120
component/git/buildout.cfg
component/git/buildout.cfg
+2
-2
component/macros/macro.pythonpath.eggs.cfg
component/macros/macro.pythonpath.eggs.cfg
+10
-18
software/dufs/buildout.hash.cfg
software/dufs/buildout.hash.cfg
+1
-1
software/dufs/instance.cfg.in
software/dufs/instance.cfg.in
+3
-2
software/dufs/software.cfg
software/dufs/software.cfg
+2
-2
software/dufs/test/test.py
software/dufs/test/test.py
+27
-15
software/jupyter/test/test.py
software/jupyter/test/test.py
+60
-49
software/ors-amarisoft/buildout.hash.cfg
software/ors-amarisoft/buildout.hash.cfg
+2
-2
software/ors-amarisoft/config/enb-fdd.jinja2.cfg
software/ors-amarisoft/config/enb-fdd.jinja2.cfg
+1
-0
software/ors-amarisoft/config/enb.jinja2.cfg
software/ors-amarisoft/config/enb.jinja2.cfg
+2
-1
software/ors-amarisoft/config/gnb-fdd.jinja2.cfg
software/ors-amarisoft/config/gnb-fdd.jinja2.cfg
+6
-5
software/ors-amarisoft/config/gnb.jinja2.cfg
software/ors-amarisoft/config/gnb.jinja2.cfg
+5
-4
software/rapid-cdn/buildout.hash.cfg
software/rapid-cdn/buildout.hash.cfg
+1
-1
software/rapid-cdn/instance-slave-list.cfg.in
software/rapid-cdn/instance-slave-list.cfg.in
+1
-1
software/rapid-cdn/test/test.py
software/rapid-cdn/test/test.py
+33
-8
software/rapid-cdn/test/test_data/test.TestEnableHttp2ByDefaultFalseSlave.test00cluster_request_instance_parameter_dict.txt
...seSlave.test00cluster_request_instance_parameter_dict.txt
+30
-2
software/rapid-cdn/test/test_data/test.TestEnableHttp2ByDefaultFalseSlave.test00file_list_log.txt
...estEnableHttp2ByDefaultFalseSlave.test00file_list_log.txt
+6
-0
software/rapid-cdn/test/test_data/test.TestSlave.test00cluster_request_instance_parameter_dict.txt
...stSlave.test00cluster_request_instance_parameter_dict.txt
+30
-2
software/rapid-cdn/test/test_data/test.TestSlave.test00file_list_log.txt
...cdn/test/test_data/test.TestSlave.test00file_list_log.txt
+6
-0
software/rapid-cdn/test/test_data/test.TestSlaveHttp3.test00cluster_request_instance_parameter_dict.txt
...veHttp3.test00cluster_request_instance_parameter_dict.txt
+30
-2
software/rapid-cdn/test/test_data/test.TestSlaveHttp3.test00file_list_log.txt
...est/test_data/test.TestSlaveHttp3.test00file_list_log.txt
+6
-0
software/slapos-master/apache-backend.conf.in
software/slapos-master/apache-backend.conf.in
+3
-2
software/slapos-master/buildout.hash.cfg
software/slapos-master/buildout.hash.cfg
+1
-1
No files found.
component/git/buildout.cfg
View file @
11f5304f
...
@@ -18,8 +18,8 @@ parts =
...
@@ -18,8 +18,8 @@ parts =
[git]
[git]
recipe = slapos.recipe.cmmi
recipe = slapos.recipe.cmmi
shared = true
shared = true
url = https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.
39.2
.tar.xz
url = https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.
40.1
.tar.xz
md5sum =
32d34dc65ae0955cc68c7152b5ca8b13
md5sum =
125d13c374a9ec9253f42c483bacec31
configure-options =
configure-options =
--with-curl=${curl:location}
--with-curl=${curl:location}
--with-openssl=${openssl:location}
--with-openssl=${openssl:location}
...
...
component/macros/macro.pythonpath.eggs.cfg
View file @
11f5304f
...
@@ -3,22 +3,14 @@ parts =
...
@@ -3,22 +3,14 @@ parts =
[macro.pythonpath.eggs]
[macro.pythonpath.eggs]
recipe = slapos.recipe.build
recipe = slapos.recipe.build
_name_ = ${:_buildout_section_name_}
init =
init =
prerequisite = """
self.eggs = [e.strip() for e in options['eggs'].splitlines() if e.strip()]
[.%(_name_)s.prerequisite]
update =
recipe = slapos.recipe.build
init =
section = self.buildout['%(_name_)s']
self.eggs = [e.strip() for e in section['eggs'].splitlines() if e.strip()]
update =
from zc.buildout.easy_install import working_set
from zc.buildout.easy_install import working_set
buildout = self.buildout['buildout']
buildout = self.buildout['buildout']
eggs_directory = buildout['eggs-directory']
eggs_directory = buildout['eggs-directory']
develop_eggs_directory = buildout['develop-eggs-directory']
develop_eggs_directory = buildout['develop-eggs-directory']
dists = working_set(self.eggs, [develop_eggs_directory, eggs_directory])
dists = working_set(self.eggs, [develop_eggs_directory, eggs_directory])
paths = ':'.join(dist.location for dist in dists)
paths = ':'.join(dist.location for dist in dists)
self.buildout['%(environment)s'
]['PYTHONPATH'] = paths
self.buildout[options['environment']
]['PYTHONPATH'] = paths
print("PYTHONPATH=" + paths)
print("PYTHONPATH=" + paths)
""" % options
self.buildout.parse(prerequisite)
software/dufs/buildout.hash.cfg
View file @
11f5304f
...
@@ -15,4 +15,4 @@
...
@@ -15,4 +15,4 @@
[instance.cfg.in]
[instance.cfg.in]
filename = instance.cfg.in
filename = instance.cfg.in
md5sum =
0cb3cbac5479581985e5446078217686
md5sum =
9ed5d03f4f0cdc022f28b39e8ff1323e
software/dufs/instance.cfg.in
View file @
11f5304f
...
@@ -143,8 +143,9 @@ command-line =
...
@@ -143,8 +143,9 @@ command-line =
--bind ${:ip}
--bind ${:ip}
--port ${:port}
--port ${:port}
--allow-all
--allow-all
--auth /@${admin-password:user}:${admin-password:passwd}
--auth-method basic
--auth /pub@${admin-password:user}:${admin-password:passwd}@*
--auth ${admin-password:user}:${admin-password:passwd}@/:rw
--auth @/pub
--tls-cert ${dufs-certificate:cert-file}
--tls-cert ${dufs-certificate:cert-file}
--tls-key ${dufs-certificate:key-file}
--tls-key ${dufs-certificate:key-file}
${directory:dufs-data-dir}
${directory:dufs-data-dir}
...
...
software/dufs/software.cfg
View file @
11f5304f
...
@@ -14,8 +14,8 @@ parts =
...
@@ -14,8 +14,8 @@ parts =
[dufs]
[dufs]
recipe = slapos.recipe.cmmi
recipe = slapos.recipe.cmmi
shared = true
shared = true
url = https://github.com/sigoden/dufs/archive/refs/tags/v0.3
1.0
.tar.gz
url = https://github.com/sigoden/dufs/archive/refs/tags/v0.3
4.1
.tar.gz
md5sum =
4340e59915605e30dcdb70aa9eb06acb
md5sum =
77cbb2523aca8dad90fd77ee0277704f
configure-command = :
configure-command = :
make-binary = cargo install --root=%(location)s --path .
make-binary = cargo install --root=%(location)s --path .
make-targets =
make-targets =
...
...
software/dufs/test/test.py
View file @
11f5304f
...
@@ -67,38 +67,50 @@ class TestFileServer(SlapOSInstanceTestCase):
...
@@ -67,38 +67,50 @@ class TestFileServer(SlapOSInstanceTestCase):
)
)
self
.
assertEqual
(
resp
.
status_code
,
requests
.
codes
.
ok
)
self
.
assertEqual
(
resp
.
status_code
,
requests
.
codes
.
ok
)
with
open
(
os
.
path
.
join
(
self
.
computer_partition_root_path
,
'srv'
,
'www'
,
'secret.txt'
),
'w'
):
resp
=
requests
.
get
(
resp
=
requests
.
get
(
urllib
.
parse
.
urljoin
(
self
.
connection_parameters
[
'public-url'
],
'..
'
),
urllib
.
parse
.
urljoin
(
self
.
connection_parameters
[
'public-url'
],
'../secret.txt
'
),
verify
=
self
.
ca_cert
,
verify
=
self
.
ca_cert
,
)
)
self
.
assertEqual
(
resp
.
status_code
,
requests
.
codes
.
unauthorized
)
self
.
assertEqual
(
resp
.
status_code
,
requests
.
codes
.
unauthorized
)
resp
=
requests
.
get
(
urllib
.
parse
.
urljoin
(
self
.
connection_parameters
[
'public-url'
],
'../not-exist.txt'
),
verify
=
self
.
ca_cert
,
)
self
.
assertEqual
(
resp
.
status_code
,
requests
.
codes
.
unauthorized
)
# index is allowed on / but it only shows /pub/
resp
=
requests
.
get
(
urllib
.
parse
.
urljoin
(
self
.
connection_parameters
[
'public-url'
],
'..'
),
verify
=
self
.
ca_cert
,
)
self
.
assertIn
(
'pub'
,
resp
.
text
)
self
.
assertNotIn
(
'secret'
,
resp
.
text
)
self
.
assertEqual
(
resp
.
status_code
,
requests
.
codes
.
ok
)
def
test_upload_file_refused_without_digest_auth
(
self
):
def
test_upload_file_refused_without_auth
(
self
):
parsed_upload_url
=
urllib
.
parse
.
urlparse
(
self
.
connection_parameters
[
'upload-url'
])
# upload-url has username:password, remove it
self
.
assertTrue
(
parsed_upload_url
.
password
)
upload_url
=
parsed_upload_url
.
_replace
(
netloc
=
f'[
{
parsed_upload_url
.
hostname
}
]:
{
parsed_upload_url
.
port
}
'
).
geturl
()
resp
=
requests
.
put
(
resp
=
requests
.
put
(
urllib
.
parse
.
urljoin
(
self
.
connection_parameters
[
'upload-url'
]
,
'hello.txt'
),
urllib
.
parse
.
urljoin
(
upload_url
,
'hello.txt'
),
data
=
io
.
BytesIO
(
b'hello'
),
data
=
io
.
BytesIO
(
b'hello'
),
verify
=
self
.
ca_cert
,
verify
=
self
.
ca_cert
,
)
)
self
.
assertEqual
(
resp
.
status_code
,
requests
.
codes
.
unauthorized
)
self
.
assertEqual
(
resp
.
status_code
,
requests
.
codes
.
unauthorized
)
def
test_upload_file
(
self
):
def
test_upload_file
(
self
):
parsed_url
=
urllib
.
parse
.
urlparse
(
self
.
connection_parameters
[
'upload-url'
])
auth
=
requests
.
auth
.
HTTPDigestAuth
(
parsed_url
.
username
,
parsed_url
.
password
,
)
resp
=
requests
.
put
(
resp
=
requests
.
put
(
urllib
.
parse
.
urljoin
(
self
.
connection_parameters
[
'upload-url'
],
'hello.txt'
),
urllib
.
parse
.
urljoin
(
self
.
connection_parameters
[
'upload-url'
],
'hello.txt'
),
data
=
io
.
BytesIO
(
b'hello'
),
data
=
io
.
BytesIO
(
b'hello'
),
auth
=
auth
,
verify
=
self
.
ca_cert
,
verify
=
self
.
ca_cert
,
)
)
self
.
assertEqual
(
resp
.
status_code
,
requests
.
codes
.
created
)
self
.
assertEqual
(
resp
.
status_code
,
requests
.
codes
.
created
)
resp
=
requests
.
get
(
resp
=
requests
.
get
(
urllib
.
parse
.
urljoin
(
self
.
connection_parameters
[
'upload-url'
],
'hello.txt'
),
urllib
.
parse
.
urljoin
(
self
.
connection_parameters
[
'upload-url'
],
'hello.txt'
),
auth
=
auth
,
verify
=
self
.
ca_cert
,
verify
=
self
.
ca_cert
,
)
)
self
.
assertEqual
(
resp
.
text
,
'hello'
)
self
.
assertEqual
(
resp
.
text
,
'hello'
)
...
...
software/jupyter/test/test.py
View file @
11f5304f
...
@@ -32,6 +32,7 @@ import os
...
@@ -32,6 +32,7 @@ import os
import
requests
import
requests
import
sqlite3
import
sqlite3
import
subprocess
import
subprocess
import
tempfile
from
slapos.proxy.db_version
import
DB_VERSION
from
slapos.proxy.db_version
import
DB_VERSION
from
slapos.testing.testcase
import
makeModuleSetUpAndTestCaseClass
from
slapos.testing.testcase
import
makeModuleSetUpAndTestCaseClass
...
@@ -271,65 +272,75 @@ class TestJupyterCustomAdditional(SelectMixin, InstanceTestCase):
...
@@ -271,65 +272,75 @@ class TestJupyterCustomAdditional(SelectMixin, InstanceTestCase):
r
.
destroyed
()
r
.
destroyed
()
class
TestIPython
(
InstanceTestCase
):
class
IPythonNotebook
(
object
):
def
__init__
(
self
,
name
,
binary
):
converted_notebook
=
'test.nbconvert.ipynb'
self
.
tempdir
=
tempdir
=
tempfile
.
TemporaryDirectory
()
notebook_filename
=
'test.ipynb'
path
=
os
.
path
.
join
(
tempdir
.
name
,
name
)
test_sentence
=
'test'
self
.
path
=
path
+
'.ipynb'
# input notebook
self
.
output_path
=
path
+
'.nbconvert.ipynb'
# output notebook
self
.
binary
=
binary
def
setUp
(
self
):
def
write
(
self
,
code
):
super
().
setUp
()
content
=
{
notebook_source
=
{
"cells"
:
[
"cells"
:
[
{
{
"cell_type"
:
"code"
,
"cell_type"
:
"code"
,
"execution_count"
:
None
,
"execution_count"
:
None
,
"metadata"
:
{},
"metadata"
:
{},
"outputs"
:
[],
"outputs"
:
[],
"source"
:
[
"source"
:
code
.
splitlines
(
keepends
=
True
)
"import sys
\
n
"
,
"print('"
+
self
.
test_sentence
+
"')"
]
}
}
],
],
"metadata"
:
{},
"metadata"
:
{},
"nbformat"
:
4
,
"nbformat"
:
4
,
"nbformat_minor"
:
4
"nbformat_minor"
:
4
}
}
with
open
(
self
.
notebook_filename
,
'w'
)
as
notebook
:
with
open
(
self
.
path
,
'w'
)
as
notebook
:
notebook
.
write
(
json
.
dumps
(
notebook_source
))
notebook
.
write
(
json
.
dumps
(
content
))
def
run
(
self
):
return
subprocess
.
check_output
(
(
self
.
binary
,
'--execute'
,
'--to'
,
'notebook'
,
self
.
path
),
stderr
=
subprocess
.
STDOUT
,
text
=
True
)
def
readResult
(
self
):
with
open
(
self
.
output_path
)
as
result
:
return
json
.
loads
(
result
.
read
())[
'cells'
][
0
][
'outputs'
][
0
][
'text'
][
0
]
def
__enter__
(
self
):
return
self
def
__exit__
(
self
,
*
args
):
if
self
.
tempdir
:
self
.
tempdir
.
cleanup
()
del
self
.
tempdir
def
tearDown
(
self
):
class
TestIPython
(
InstanceTestCase
):
os
.
remove
(
self
.
notebook_filename
)
message
=
'test_sys'
if
os
.
path
.
exists
(
self
.
converted_notebook
):
module
=
'sys'
os
.
remove
(
self
.
converted_notebook
)
super
().
tearDown
()
def
test
(
self
):
def
test
(
self
):
conversion_output
=
subprocess
.
check_output
([
binary
=
os
.
path
.
join
(
os
.
path
.
join
(
self
.
computer_partition_root_path
,
self
.
computer_partition_root_path
,
'software_release'
,
'software_release'
,
'bin'
,
'jupyter-nbconvert'
)
'bin'
,
with
IPythonNotebook
(
'test'
,
binary
)
as
notebook
:
'jupyter-nbconvert'
,
notebook
.
write
(
"import %s
\
n
print(%r)"
%
(
self
.
module
,
self
.
message
))
),
out
=
notebook
.
run
()
'--execute'
,
'--to'
,
'notebook'
,
self
.
notebook_filename
,
],
stderr
=
subprocess
.
STDOUT
,
text
=
True
)
self
.
assertIn
(
self
.
assertIn
(
'[NbConvertApp] Converting notebook %s to notebook'
%
self
.
notebook_filename
,
"[NbConvertApp] Converting notebook %s to notebook"
%
notebook
.
path
,
conversion_outp
ut
,
o
ut
,
)
)
self
.
assertRegex
(
self
.
assertRegex
(
conversion_outp
ut
,
o
ut
,
r'\
[N
bConvertApp\
] W
riting \
d+
bytes to %s'
%
self
.
converted_notebook
r"\
[N
bConvertApp\
] W
riting \
d+
bytes to %s"
%
notebook
.
output_path
)
)
self
.
assertTrue
(
os
.
path
.
exists
(
self
.
converted_notebook
))
self
.
assertTrue
(
os
.
path
.
exists
(
notebook
.
output_path
))
with
open
(
self
.
converted_notebook
)
as
json_result
:
self
.
assertEqual
(
notebook
.
readResult
(),
self
.
message
+
'
\
n
'
)
self
.
assertEqual
(
json
.
loads
(
json_result
.
read
())[
'cells'
][
0
][
'outputs'
][
0
][
'text'
][
0
],
self
.
test_sentence
+
'
\
n
'
,
class
TestIPythonNumpy
(
TestIPython
):
)
message
=
'test_numpy'
module
=
'numpy'
software/ors-amarisoft/buildout.hash.cfg
View file @
11f5304f
...
@@ -64,7 +64,7 @@ md5sum = dcaac06553a3222b14c0013a13f4a149
...
@@ -64,7 +64,7 @@ md5sum = dcaac06553a3222b14c0013a13f4a149
[enb.jinja2.cfg]
[enb.jinja2.cfg]
filename = config/enb.jinja2.cfg
filename = config/enb.jinja2.cfg
md5sum =
90e0d38ff42dc0f65245496d3809f3b
3
md5sum =
e4b31e8ced0e2ffa08a877e59b8a979
3
[sib23.asn]
[sib23.asn]
filename = config/sib23.asn
filename = config/sib23.asn
...
@@ -72,7 +72,7 @@ md5sum = b377dac7f1fcf94fb9ce9ebed617f36a
...
@@ -72,7 +72,7 @@ md5sum = b377dac7f1fcf94fb9ce9ebed617f36a
[gnb.jinja2.cfg]
[gnb.jinja2.cfg]
filename = config/gnb.jinja2.cfg
filename = config/gnb.jinja2.cfg
md5sum = 9
6236b6e55be2fd3dcc128a19a5fc344
md5sum = 9
1648b9f70a10eb8a89465a88d3975aa
[ltelogs.jinja2.sh]
[ltelogs.jinja2.sh]
filename = ltelogs.jinja2.sh
filename = ltelogs.jinja2.sh
...
...
software/ors-amarisoft/config/enb-fdd.jinja2.cfg
View file @
11f5304f
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
sync: "gps",
sync: "gps",
{% endif %}
{% endif %}
rx_antenna: "tx_rx",
rx_antenna: "tx_rx",
tdd_tx_mod: 1,
},
},
tx_gain: {{ slapparameter_dict.get('tx_gain', slap_configuration['configuration.default_nr_tx_gain']) }},
tx_gain: {{ slapparameter_dict.get('tx_gain', slap_configuration['configuration.default_nr_tx_gain']) }},
rx_gain: {{ slapparameter_dict.get('rx_gain', slap_configuration['configuration.default_nr_rx_gain']) }},
rx_gain: {{ slapparameter_dict.get('rx_gain', slap_configuration['configuration.default_nr_rx_gain']) }},
...
...
software/ors-amarisoft/config/enb.jinja2.cfg
View file @
11f5304f
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
sync: "gps",
sync: "gps",
{% endif %}
{% endif %}
rx_antenna:"tx_rx",
rx_antenna:"tx_rx",
tdd_tx_mod: 1,
},
},
tx_gain: {{ slapparameter_dict.get('tx_gain', slap_configuration['configuration.default_lte_tx_gain']) }},
tx_gain: {{ slapparameter_dict.get('tx_gain', slap_configuration['configuration.default_lte_tx_gain']) }},
rx_gain: {{ slapparameter_dict.get('rx_gain', slap_configuration['configuration.default_lte_rx_gain']) }},
rx_gain: {{ slapparameter_dict.get('rx_gain', slap_configuration['configuration.default_lte_rx_gain']) }},
...
...
software/ors-amarisoft/config/gnb-fdd.jinja2.cfg
View file @
11f5304f
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
sync: "gps",
sync: "gps",
{% endif %}
{% endif %}
rx_antenna: "tx_rx",
rx_antenna: "tx_rx",
tdd_tx_mod: 1,
},
},
tx_gain: {{ slapparameter_dict.get('tx_gain', slap_configuration['configuration.default_nr_tx_gain']) }},
tx_gain: {{ slapparameter_dict.get('tx_gain', slap_configuration['configuration.default_nr_tx_gain']) }},
rx_gain: {{ slapparameter_dict.get('rx_gain', slap_configuration['configuration.default_nr_rx_gain']) }},
rx_gain: {{ slapparameter_dict.get('rx_gain', slap_configuration['configuration.default_nr_rx_gain']) }},
...
...
software/ors-amarisoft/config/gnb.jinja2.cfg
View file @
11f5304f
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
sync: "gps",
sync: "gps",
{% endif %}
{% endif %}
rx_antenna: "tx_rx",
rx_antenna: "tx_rx",
tdd_tx_mod: 1,
},
},
tx_gain: {{ slapparameter_dict.get('tx_gain', slap_configuration['configuration.default_nr_tx_gain']) }},
tx_gain: {{ slapparameter_dict.get('tx_gain', slap_configuration['configuration.default_nr_tx_gain']) }},
rx_gain: {{ slapparameter_dict.get('rx_gain', slap_configuration['configuration.default_nr_rx_gain']) }},
rx_gain: {{ slapparameter_dict.get('rx_gain', slap_configuration['configuration.default_nr_rx_gain']) }},
...
...
software/rapid-cdn/buildout.hash.cfg
View file @
11f5304f
...
@@ -30,7 +30,7 @@ md5sum = 3006197ddce87bd92866b76b5ce8ce08
...
@@ -30,7 +30,7 @@ md5sum = 3006197ddce87bd92866b76b5ce8ce08
[profile-slave-list]
[profile-slave-list]
filename = instance-slave-list.cfg.in
filename = instance-slave-list.cfg.in
md5sum =
f6b3d4c6502cc0fa3a5021e436b4771
b
md5sum =
8289620cb32dbdfcca6ba112c7ec7b2
b
[profile-master-publish-slave-information]
[profile-master-publish-slave-information]
filename = instance-master-publish-slave-information.cfg.in
filename = instance-master-publish-slave-information.cfg.in
...
...
software/rapid-cdn/instance-slave-list.cfg.in
View file @
11f5304f
...
@@ -247,7 +247,7 @@ context =
...
@@ -247,7 +247,7 @@ context =
{%- endif %}
{%- endif %}
{%- endif %}
{%- endif %}
{%- set websocket_path_list = [] %}
{%- set websocket_path_list = [] %}
{%- for websocket_path in
slave_instance.get('websocket-path-list',
'').split() %}
{%- for websocket_path in
('' ~ (slave_instance.get('websocket-path-list', '')) or
'').split() %}
{%- set websocket_path = websocket_path.strip('/') %}
{%- set websocket_path = websocket_path.strip('/') %}
{#- Unquote the path, so %20 and similar can be represented correctly #}
{#- Unquote the path, so %20 and similar can be represented correctly #}
{%- set websocket_path = urllib_module.parse.unquote(websocket_path.strip()) %}
{%- set websocket_path = urllib_module.parse.unquote(websocket_path.strip()) %}
...
...
software/rapid-cdn/test/test.py
View file @
11f5304f
...
@@ -1799,6 +1799,23 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin, AtsMixin):
...
@@ -1799,6 +1799,23 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin, AtsMixin):
'type'
:
'websocket'
,
'type'
:
'websocket'
,
'websocket-path-list'
:
'////ws//// /with%20space/'
,
'websocket-path-list'
:
'////ws//// /with%20space/'
,
},
},
'type-websocket-websocket-path-list-none'
:
{
'url'
:
cls
.
backend_url
,
'type'
:
'websocket'
,
# Note: With reference SlapOS Master requesting
# 'websocket-path-list': '' leads to a problem, as the value for
# the partition is None (type: None), but with slapproxy it is
# required to use None (type: None) in the **request** to lead
# to the same problem. See also
# type-websocket-websocket-path-list-empty
'websocket-path-list'
:
None
,
},
'type-websocket-websocket-path-list-empty'
:
{
'url'
:
cls
.
backend_url
,
'type'
:
'websocket'
,
# Note: See also type-websocket-websocket-path-list-none
'websocket-path-list'
:
''
,
},
'type-websocket-websocket-transparent-false'
:
{
'type-websocket-websocket-transparent-false'
:
{
'url'
:
cls
.
backend_url
,
'url'
:
cls
.
backend_url
,
'type'
:
'websocket'
,
'type'
:
'websocket'
,
...
@@ -2084,9 +2101,9 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin, AtsMixin):
...
@@ -2084,9 +2101,9 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin, AtsMixin):
'monitor-base-url'
:
'https://[%s]:8401'
%
self
.
_ipv6_address
,
'monitor-base-url'
:
'https://[%s]:8401'
%
self
.
_ipv6_address
,
'backend-client-caucase-url'
:
'http://[%s]:8990'
%
self
.
_ipv6_address
,
'backend-client-caucase-url'
:
'http://[%s]:8990'
%
self
.
_ipv6_address
,
'domain'
:
'example.com'
,
'domain'
:
'example.com'
,
'accepted-slave-amount'
:
'6
0
'
,
'accepted-slave-amount'
:
'6
2
'
,
'rejected-slave-amount'
:
'0'
,
'rejected-slave-amount'
:
'0'
,
'slave-amount'
:
'6
0
'
,
'slave-amount'
:
'6
2
'
,
'rejected-slave-dict'
:
{
'rejected-slave-dict'
:
{
},
},
'warning-slave-dict'
:
{
'warning-slave-dict'
:
{
...
@@ -3293,12 +3310,9 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin, AtsMixin):
...
@@ -3293,12 +3310,9 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin, AtsMixin):
self
.
assertTrue
(
'x-real-ip'
in
j
[
'Incoming Headers'
])
self
.
assertTrue
(
'x-real-ip'
in
j
[
'Incoming Headers'
])
self
.
assertHttp1
(
parameter_dict
[
'domain'
])
self
.
assertHttp1
(
parameter_dict
[
'domain'
])
def
test_type_websocket
(
self
):
def
_test_type_websocket
(
self
,
parameter_dict
,
path
=
'test-path'
):
parameter_dict
=
self
.
assertSlaveBase
(
'type-websocket'
)
result
=
fakeHTTPSResult
(
result
=
fakeHTTPSResult
(
parameter_dict
[
'domain'
],
'test-path'
,
parameter_dict
[
'domain'
],
path
,
headers
=
{
'Connection'
:
'Upgrade'
})
headers
=
{
'Connection'
:
'Upgrade'
})
self
.
assertEqual
(
self
.
assertEqual
(
...
@@ -3308,7 +3322,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin, AtsMixin):
...
@@ -3308,7 +3322,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin, AtsMixin):
self
.
assertEqualResultJson
(
self
.
assertEqualResultJson
(
result
,
result
,
'Path'
,
'Path'
,
'/
test-path'
'/
'
+
path
)
)
try
:
try
:
j
=
result
.
json
()
j
=
result
.
json
()
...
@@ -3323,6 +3337,17 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin, AtsMixin):
...
@@ -3323,6 +3337,17 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin, AtsMixin):
self
.
assertTrue
(
'x-real-ip'
in
j
[
'Incoming Headers'
])
self
.
assertTrue
(
'x-real-ip'
in
j
[
'Incoming Headers'
])
self
.
assertHttp1
(
parameter_dict
[
'domain'
])
self
.
assertHttp1
(
parameter_dict
[
'domain'
])
def
test_type_websocket
(
self
):
self
.
_test_type_websocket
(
self
.
assertSlaveBase
(
'type-websocket'
))
def
test_type_websocket_websocket_path_list_none
(
self
):
self
.
_test_type_websocket
(
self
.
assertSlaveBase
(
'type-websocket-websocket-path-list-none'
),
'None'
)
def
test_type_websocket_websocket_path_list_empty
(
self
):
self
.
_test_type_websocket
(
self
.
assertSlaveBase
(
'type-websocket-websocket-path-list-empty'
))
def
test_type_websocket_websocket_transparent_false
(
self
):
def
test_type_websocket_websocket_transparent_false
(
self
):
parameter_dict
=
self
.
assertSlaveBase
(
parameter_dict
=
self
.
assertSlaveBase
(
'type-websocket-websocket-transparent-false'
)
'type-websocket-websocket-transparent-false'
)
...
...
software/rapid-cdn/test/test_data/test.TestEnableHttp2ByDefaultFalseSlave.test00cluster_request_instance_parameter_dict.txt
View file @
11f5304f
This diff is collapsed.
Click to expand it.
software/rapid-cdn/test/test_data/test.TestEnableHttp2ByDefaultFalseSlave.test00file_list_log.txt
View file @
11f5304f
...
@@ -141,6 +141,12 @@ T-2/var/log/httpd/_type-redirect-custom_domain_access_log
...
@@ -141,6 +141,12 @@ T-2/var/log/httpd/_type-redirect-custom_domain_access_log
T-2/var/log/httpd/_type-redirect-custom_domain_frontend_log
T-2/var/log/httpd/_type-redirect-custom_domain_frontend_log
T-2/var/log/httpd/_type-redirect_access_log
T-2/var/log/httpd/_type-redirect_access_log
T-2/var/log/httpd/_type-redirect_frontend_log
T-2/var/log/httpd/_type-redirect_frontend_log
T-2/var/log/httpd/_type-websocket-websocket-path-list-empty_access_log
T-2/var/log/httpd/_type-websocket-websocket-path-list-empty_backend_log
T-2/var/log/httpd/_type-websocket-websocket-path-list-empty_frontend_log
T-2/var/log/httpd/_type-websocket-websocket-path-list-none_access_log
T-2/var/log/httpd/_type-websocket-websocket-path-list-none_backend_log
T-2/var/log/httpd/_type-websocket-websocket-path-list-none_frontend_log
T-2/var/log/httpd/_type-websocket-websocket-path-list-websocket-transparent-false_access_log
T-2/var/log/httpd/_type-websocket-websocket-path-list-websocket-transparent-false_access_log
T-2/var/log/httpd/_type-websocket-websocket-path-list-websocket-transparent-false_backend_log
T-2/var/log/httpd/_type-websocket-websocket-path-list-websocket-transparent-false_backend_log
T-2/var/log/httpd/_type-websocket-websocket-path-list-websocket-transparent-false_frontend_log
T-2/var/log/httpd/_type-websocket-websocket-path-list-websocket-transparent-false_frontend_log
...
...
software/rapid-cdn/test/test_data/test.TestSlave.test00cluster_request_instance_parameter_dict.txt
View file @
11f5304f
This diff is collapsed.
Click to expand it.
software/rapid-cdn/test/test_data/test.TestSlave.test00file_list_log.txt
View file @
11f5304f
...
@@ -141,6 +141,12 @@ T-2/var/log/httpd/_type-redirect-custom_domain_access_log
...
@@ -141,6 +141,12 @@ T-2/var/log/httpd/_type-redirect-custom_domain_access_log
T-2/var/log/httpd/_type-redirect-custom_domain_frontend_log
T-2/var/log/httpd/_type-redirect-custom_domain_frontend_log
T-2/var/log/httpd/_type-redirect_access_log
T-2/var/log/httpd/_type-redirect_access_log
T-2/var/log/httpd/_type-redirect_frontend_log
T-2/var/log/httpd/_type-redirect_frontend_log
T-2/var/log/httpd/_type-websocket-websocket-path-list-empty_access_log
T-2/var/log/httpd/_type-websocket-websocket-path-list-empty_backend_log
T-2/var/log/httpd/_type-websocket-websocket-path-list-empty_frontend_log
T-2/var/log/httpd/_type-websocket-websocket-path-list-none_access_log
T-2/var/log/httpd/_type-websocket-websocket-path-list-none_backend_log
T-2/var/log/httpd/_type-websocket-websocket-path-list-none_frontend_log
T-2/var/log/httpd/_type-websocket-websocket-path-list-websocket-transparent-false_access_log
T-2/var/log/httpd/_type-websocket-websocket-path-list-websocket-transparent-false_access_log
T-2/var/log/httpd/_type-websocket-websocket-path-list-websocket-transparent-false_backend_log
T-2/var/log/httpd/_type-websocket-websocket-path-list-websocket-transparent-false_backend_log
T-2/var/log/httpd/_type-websocket-websocket-path-list-websocket-transparent-false_frontend_log
T-2/var/log/httpd/_type-websocket-websocket-path-list-websocket-transparent-false_frontend_log
...
...
software/rapid-cdn/test/test_data/test.TestSlaveHttp3.test00cluster_request_instance_parameter_dict.txt
View file @
11f5304f
This diff is collapsed.
Click to expand it.
software/rapid-cdn/test/test_data/test.TestSlaveHttp3.test00file_list_log.txt
View file @
11f5304f
...
@@ -141,6 +141,12 @@ T-2/var/log/httpd/_type-redirect-custom_domain_access_log
...
@@ -141,6 +141,12 @@ T-2/var/log/httpd/_type-redirect-custom_domain_access_log
T-2/var/log/httpd/_type-redirect-custom_domain_frontend_log
T-2/var/log/httpd/_type-redirect-custom_domain_frontend_log
T-2/var/log/httpd/_type-redirect_access_log
T-2/var/log/httpd/_type-redirect_access_log
T-2/var/log/httpd/_type-redirect_frontend_log
T-2/var/log/httpd/_type-redirect_frontend_log
T-2/var/log/httpd/_type-websocket-websocket-path-list-empty_access_log
T-2/var/log/httpd/_type-websocket-websocket-path-list-empty_backend_log
T-2/var/log/httpd/_type-websocket-websocket-path-list-empty_frontend_log
T-2/var/log/httpd/_type-websocket-websocket-path-list-none_access_log
T-2/var/log/httpd/_type-websocket-websocket-path-list-none_backend_log
T-2/var/log/httpd/_type-websocket-websocket-path-list-none_frontend_log
T-2/var/log/httpd/_type-websocket-websocket-path-list-websocket-transparent-false_access_log
T-2/var/log/httpd/_type-websocket-websocket-path-list-websocket-transparent-false_access_log
T-2/var/log/httpd/_type-websocket-websocket-path-list-websocket-transparent-false_backend_log
T-2/var/log/httpd/_type-websocket-websocket-path-list-websocket-transparent-false_backend_log
T-2/var/log/httpd/_type-websocket-websocket-path-list-websocket-transparent-false_frontend_log
T-2/var/log/httpd/_type-websocket-websocket-path-list-websocket-transparent-false_frontend_log
...
...
software/slapos-master/apache-backend.conf.in
View file @
11f5304f
...
@@ -168,13 +168,14 @@ Listen {{ ip }}:{{ port }}
...
@@ -168,13 +168,14 @@ Listen {{ ip }}:{{ port }}
# Custom block we use for now different parameters.
# Custom block we use for now different parameters.
RequestHeader set Remote-User %{SSL_CLIENT_S_DN_CN}s
RequestHeader set Remote-User %{SSL_CLIENT_S_DN_CN}s
SSLCACertificateFile {{ parameter_dict['shared-ca-cert'] }}
SSLCACertificateFile {{ parameter_dict['shared-ca-cert'] }}
SSLCARevocationCheck chain
SSLCARevocationPath {{ parameter_dict['shared-crl'] }}
SSLCARevocationPath {{ parameter_dict['shared-crl'] }}
LogFormat "%h %l %{R
EMOTE_USER}i %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %D" combined
LogFormat "%h %l %{R
emote-User}i %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %D" service
# We would like to separate the the authentificated logs.
# We would like to separate the the authentificated logs.
ErrorLog "{{ parameter_dict['log-dir'] }}/apache-service-error.log"
ErrorLog "{{ parameter_dict['log-dir'] }}/apache-service-error.log"
CustomLog "{{ parameter_dict['log-dir'] }}/apache-service-access.log"
combined
CustomLog "{{ parameter_dict['log-dir'] }}/apache-service-access.log"
service
{% endif -%}
{% endif -%}
RewriteRule ^/(.*) {{ backend }}/$1 [L,P]
RewriteRule ^/(.*) {{ backend }}/$1 [L,P]
</VirtualHost>
</VirtualHost>
...
...
software/slapos-master/buildout.hash.cfg
View file @
11f5304f
...
@@ -22,7 +22,7 @@ md5sum = da8399562377b472c9488a337d0230dc
...
@@ -22,7 +22,7 @@ md5sum = da8399562377b472c9488a337d0230dc
[template-apache-backend-conf]
[template-apache-backend-conf]
filename = apache-backend.conf.in
filename = apache-backend.conf.in
md5sum =
9d7104ce18f79a7a84988efc11f5ed23
md5sum =
6cf13e8f5545d241e6514503f9824b02
[template-haproxy-cfg]
[template-haproxy-cfg]
filename = haproxy.cfg.in
filename = haproxy.cfg.in
...
...
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