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
Levin Zimmermann
slapos
Commits
08268cff
Commit
08268cff
authored
Aug 18, 2022
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master' into zope4py2
parents
57cdc374
6bda49ec
Changes
67
Hide whitespace changes
Inline
Side-by-side
Showing
67 changed files
with
2136 additions
and
112 deletions
+2136
-112
software/caddy-frontend/buildout.hash.cfg
software/caddy-frontend/buildout.hash.cfg
+4
-4
software/caddy-frontend/instance-apache-frontend.cfg.in
software/caddy-frontend/instance-apache-frontend.cfg.in
+2
-0
software/caddy-frontend/instance-apache-replicate.cfg.in
software/caddy-frontend/instance-apache-replicate.cfg.in
+41
-0
software/caddy-frontend/instance-kedifa.cfg.in
software/caddy-frontend/instance-kedifa.cfg.in
+26
-0
software/caddy-frontend/templates/apache-custom-slave-list.cfg.in
.../caddy-frontend/templates/apache-custom-slave-list.cfg.in
+27
-0
software/caddy-frontend/test/test.py
software/caddy-frontend/test/test.py
+13
-71
software/caddy-frontend/test/test_data/test.TestEnableHttp2ByDefaultDefaultSlave.test_file_list_plugin.txt
...nableHttp2ByDefaultDefaultSlave.test_file_list_plugin.txt
+5
-0
software/caddy-frontend/test/test_data/test.TestEnableHttp2ByDefaultDefaultSlaveGlobalDisableHttp2.test_file_list_plugin.txt
...tDefaultSlaveGlobalDisableHttp2.test_file_list_plugin.txt
+5
-0
software/caddy-frontend/test/test_data/test.TestEnableHttp2ByDefaultFalseSlave.test_file_list_plugin.txt
...tEnableHttp2ByDefaultFalseSlave.test_file_list_plugin.txt
+5
-0
software/caddy-frontend/test/test_data/test.TestEnableHttp2ByDefaultFalseSlaveGlobalDisableHttp2.test_file_list_plugin.txt
...ultFalseSlaveGlobalDisableHttp2.test_file_list_plugin.txt
+5
-0
software/caddy-frontend/test/test_data/test.TestMasterAIKCDisabledAIBCCDisabledRequest.test_file_list_plugin.txt
...IKCDisabledAIBCCDisabledRequest.test_file_list_plugin.txt
+5
-0
software/caddy-frontend/test/test_data/test.TestMasterRequest.test_file_list_plugin.txt
...est_data/test.TestMasterRequest.test_file_list_plugin.txt
+5
-0
software/caddy-frontend/test/test_data/test.TestMasterRequestDomain.test_file_list_plugin.txt
...ta/test.TestMasterRequestDomain.test_file_list_plugin.txt
+5
-0
software/caddy-frontend/test/test_data/test.TestRe6stVerificationUrlDefaultSlave.test_file_list_plugin.txt
...e6stVerificationUrlDefaultSlave.test_file_list_plugin.txt
+5
-0
software/caddy-frontend/test/test_data/test.TestRe6stVerificationUrlSlave.test_file_list_plugin.txt
...t.TestRe6stVerificationUrlSlave.test_file_list_plugin.txt
+5
-0
software/caddy-frontend/test/test_data/test.TestReplicateSlave.test_file_list_plugin.txt
...st_data/test.TestReplicateSlave.test_file_list_plugin.txt
+6
-0
software/caddy-frontend/test/test_data/test.TestSlave.test_file_list_plugin.txt
...d/test/test_data/test.TestSlave.test_file_list_plugin.txt
+5
-0
software/caddy-frontend/test/test_data/test.TestSlaveCiphers.test_file_list_plugin.txt
...test_data/test.TestSlaveCiphers.test_file_list_plugin.txt
+5
-0
software/caddy-frontend/test/test_data/test.TestSlaveGlobalDisableHttp2.test_file_list_plugin.txt
...est.TestSlaveGlobalDisableHttp2.test_file_list_plugin.txt
+5
-0
software/caddy-frontend/test/test_data/test.TestSlaveHealthCheck.test_file_list_plugin.txt
..._data/test.TestSlaveHealthCheck.test_file_list_plugin.txt
+5
-0
software/caddy-frontend/test/test_data/test.TestSlaveHostHaproxyClash.test_file_list_plugin.txt
.../test.TestSlaveHostHaproxyClash.test_file_list_plugin.txt
+5
-0
software/caddy-frontend/test/test_data/test.TestSlaveSlapOSMasterCertificateCompatibility.test_file_list_plugin.txt
...SMasterCertificateCompatibility.test_file_list_plugin.txt
+5
-0
software/caddy-frontend/test/test_data/test.TestSlaveSlapOSMasterCertificateCompatibilityOverrideMaster.test_file_list_plugin.txt
...cateCompatibilityOverrideMaster.test_file_list_plugin.txt
+5
-0
software/caddy-frontend/test/test_data/test.TestSlaveSlapOSMasterCertificateCompatibilityUpdate.test_file_list_plugin.txt
...rCertificateCompatibilityUpdate.test_file_list_plugin.txt
+5
-0
software/kvm/buildout.hash.cfg
software/kvm/buildout.hash.cfg
+1
-1
software/kvm/instance-kvm.cfg.jinja2
software/kvm/instance-kvm.cfg.jinja2
+3
-1
software/kvm/test/test.py
software/kvm/test/test.py
+130
-2
software/metabase/software.cfg
software/metabase/software.cfg
+2
-2
software/ors-amarisoft/buildout.hash.cfg
software/ors-amarisoft/buildout.hash.cfg
+10
-10
software/ors-amarisoft/config/enb.jinja2.cfg
software/ors-amarisoft/config/enb.jinja2.cfg
+2
-4
software/ors-amarisoft/config/gnb.jinja2.cfg
software/ors-amarisoft/config/gnb.jinja2.cfg
+1
-1
software/ors-amarisoft/config/mme.jinja2.cfg
software/ors-amarisoft/config/mme.jinja2.cfg
+6
-6
software/ors-amarisoft/instance-enb-input-schema.jinja2.json
software/ors-amarisoft/instance-enb-input-schema.jinja2.json
+6
-0
software/ors-amarisoft/instance-enb.jinja2.cfg
software/ors-amarisoft/instance-enb.jinja2.cfg
+11
-1
software/ors-amarisoft/instance-gnb-input-schema.jinja2.json
software/ors-amarisoft/instance-gnb-input-schema.jinja2.json
+6
-0
software/ors-amarisoft/instance-gnb.jinja2.cfg
software/ors-amarisoft/instance-gnb.jinja2.cfg
+11
-1
software/ors-amarisoft/instance-mme.jinja2.cfg
software/ors-amarisoft/instance-mme.jinja2.cfg
+12
-3
software/ors-amarisoft/instance-tdd1900-enb-epc-input-schema.json
.../ors-amarisoft/instance-tdd1900-enb-epc-input-schema.json
+6
-0
software/ors-amarisoft/instance-tdd1900-enb-input-schema.json
...ware/ors-amarisoft/instance-tdd1900-enb-input-schema.json
+6
-0
software/ors-amarisoft/instance-tdd1900-gnb-epc-input-schema.json
.../ors-amarisoft/instance-tdd1900-gnb-epc-input-schema.json
+6
-0
software/ors-amarisoft/instance-tdd1900-gnb-input-schema.json
...ware/ors-amarisoft/instance-tdd1900-gnb-input-schema.json
+6
-0
software/ors-amarisoft/instance-tdd2600-enb-epc-input-schema.json
.../ors-amarisoft/instance-tdd2600-enb-epc-input-schema.json
+6
-0
software/ors-amarisoft/instance-tdd2600-enb-input-schema.json
...ware/ors-amarisoft/instance-tdd2600-enb-input-schema.json
+6
-0
software/ors-amarisoft/instance-tdd2600-gnb-epc-input-schema.json
.../ors-amarisoft/instance-tdd2600-gnb-epc-input-schema.json
+6
-0
software/ors-amarisoft/instance-tdd2600-gnb-input-schema.json
...ware/ors-amarisoft/instance-tdd2600-gnb-input-schema.json
+6
-0
software/ors-amarisoft/instance-tdd3500-enb-epc-input-schema.json
.../ors-amarisoft/instance-tdd3500-enb-epc-input-schema.json
+6
-0
software/ors-amarisoft/instance-tdd3500-enb-input-schema.json
...ware/ors-amarisoft/instance-tdd3500-enb-input-schema.json
+6
-0
software/ors-amarisoft/instance-tdd3500-gnb-epc-input-schema.json
.../ors-amarisoft/instance-tdd3500-gnb-epc-input-schema.json
+6
-0
software/ors-amarisoft/instance-tdd3500-gnb-input-schema.json
...ware/ors-amarisoft/instance-tdd3500-gnb-input-schema.json
+6
-0
software/ors-amarisoft/instance-tdd3700-enb-epc-input-schema.json
.../ors-amarisoft/instance-tdd3700-enb-epc-input-schema.json
+6
-0
software/ors-amarisoft/instance-tdd3700-enb-input-schema.json
...ware/ors-amarisoft/instance-tdd3700-enb-input-schema.json
+6
-0
software/ors-amarisoft/instance-tdd3700-gnb-epc-input-schema.json
.../ors-amarisoft/instance-tdd3700-gnb-epc-input-schema.json
+6
-0
software/ors-amarisoft/instance-tdd3700-gnb-input-schema.json
...ware/ors-amarisoft/instance-tdd3700-gnb-input-schema.json
+6
-0
software/ors-amarisoft/promise/check_interface_up.jinja2.py
software/ors-amarisoft/promise/check_interface_up.jinja2.py
+6
-1
software/ors-amarisoft/promise/check_sdr_busy.jinja2.py
software/ors-amarisoft/promise/check_sdr_busy.jinja2.py
+6
-0
software/ors-amarisoft/render-templates
software/ors-amarisoft/render-templates
+5
-0
software/ors-amarisoft/test/README.md
software/ors-amarisoft/test/README.md
+1
-0
software/ors-amarisoft/test/setup.py
software/ors-amarisoft/test/setup.py
+51
-0
software/ors-amarisoft/test/test.jinja2.py
software/ors-amarisoft/test/test.jinja2.py
+311
-0
software/ors-amarisoft/test/testTDD1900.py
software/ors-amarisoft/test/testTDD1900.py
+311
-0
software/ors-amarisoft/test/testTDD2600.py
software/ors-amarisoft/test/testTDD2600.py
+311
-0
software/ors-amarisoft/test/testTDD3500.py
software/ors-amarisoft/test/testTDD3500.py
+311
-0
software/ors-amarisoft/test/testTDD3700.py
software/ors-amarisoft/test/testTDD3700.py
+311
-0
software/slapos-sr-testing/software.cfg
software/slapos-sr-testing/software.cfg
+7
-0
stack/erp5/buildout.hash.cfg
stack/erp5/buildout.hash.cfg
+2
-2
stack/erp5/instance-kumofs.cfg.in
stack/erp5/instance-kumofs.cfg.in
+1
-1
stack/erp5/instance-zeo.cfg.in
stack/erp5/instance-zeo.cfg.in
+1
-1
No files found.
software/caddy-frontend/buildout.hash.cfg
View file @
08268cff
...
...
@@ -22,15 +22,15 @@ md5sum = 5784bea3bd608913769ff9a8afcccb68
[profile-caddy-frontend]
filename = instance-apache-frontend.cfg.in
md5sum =
874133120f3a4eda1d0505b8608b280f
md5sum =
75db32dd9b17c923b16420784dfba581
[profile-caddy-replicate]
filename = instance-apache-replicate.cfg.in
md5sum =
5ae9b9c95042af3f65f1b1ff263eb3f9
md5sum =
e7209d9c66fd30e1fa950d2d07957b95
[profile-slave-list]
_update_hash_filename_ = templates/apache-custom-slave-list.cfg.in
md5sum =
268a945e5c7a52c8766b54a817215c4c
md5sum =
8028eff10acbc6e3415a50ffe534d424
[profile-replicate-publish-slave-information]
_update_hash_filename_ = templates/replicate-publish-slave-information.cfg.in
...
...
@@ -102,7 +102,7 @@ md5sum = 1c866272ec0ea0c161f0c0d80cb6e584
[profile-kedifa]
filename = instance-kedifa.cfg.in
md5sum =
2f1c9cc9a3d2f4c6ac59eba5a99d4983
md5sum =
b757e0409ec3e70679a8fc4aab4a065f
[template-backend-haproxy-rsyslogd-conf]
_update_hash_filename_ = templates/backend-haproxy-rsyslogd.conf.in
...
...
software/caddy-frontend/instance-apache-frontend.cfg.in
View file @
08268cff
...
...
@@ -356,6 +356,7 @@ organization = {{ slapparameter_dict['cluster-identification'] }}
organizational-unit = {{ instance_parameter_dict['configuration.frontend-name'] }}
backend-client-caucase-url = {{ slapparameter_dict['backend-client-caucase-url'] }}
partition_ipv6 = ${slap-configuration:ipv6-random}
url-ready-file = ${directory:var}/url-ready.txt
extra-context =
key caddy_configuration_directory caddy-directory:slave-configuration
key backend_client_caucase_url :backend-client-caucase-url
...
...
@@ -365,6 +366,7 @@ extra-context =
key master_key_download_url :master_key_download_url
key autocert caddy-directory:autocert
key caddy_log_directory caddy-directory:slave-log
key url_ready_file :url-ready-file
key expose_csr_organization :organization
key expose_csr_organizational_unit :organizational-unit
key global_ipv6 slap-configuration:ipv6-random
...
...
software/caddy-frontend/instance-apache-replicate.cfg.in
View file @
08268cff
...
...
@@ -931,6 +931,44 @@ config-filename = ${rejected-slave-json:output}
config-state = empty
config-url = ${rejected-slave-publish:url}
[master-key-upload-url-ready]
recipe = slapos.recipe.build
directory = ${directory:var}
output = ${directory:var}/${:_buildout_section_name_}.txt
key = ${request-kedifa:connection-master-key-upload-url}
init =
import os
# protect against early init
if os.path.isdir(options['directory']):
with open(options['output'], 'w') as fh:
if 'NotReadyYet' in options['key']:
fh.write('NotReadyYet')
else:
fh.write('')
[master-key-upload-url-ready-promise]
<= monitor-promise-base
promise = check_file_state
name = ${:_buildout_section_name_}.py
config-filename = ${master-key-upload-url-ready:output}
config-state = empty
[master-key-generate-auth-url-ready]
<= master-key-upload-url-ready
key = ${request-kedifa:connection-master-key-generate-auth-url}
[master-key-generate-auth-url-ready-promise]
<= master-key-upload-url-ready-promise
config-filename = ${master-key-generate-auth-url-ready:output}
[master-key-download-url-ready]
<= master-key-upload-url-ready
key = ${request-kedifa:connection-master-key-download-url}
[master-key-download-url-ready-promise]
<= master-key-upload-url-ready-promise
config-filename = ${master-key-download-url-ready:output}
[caucased-backend-client]
hash-existing-files = ${buildout:directory}/software_release/buildout.cfg
{{ caucase.caucased(
...
...
@@ -959,6 +997,9 @@ parts =
promise-rejected-slave-publish-ip-port
caucased-backend-client
caucased-backend-client-promise
master-key-upload-url-ready-promise
master-key-generate-auth-url-ready-promise
master-key-download-url-ready-promise
{% for part in part_list %}
{{ ' %s' % part }}
{% endfor %}
software/caddy-frontend/instance-kedifa.cfg.in
View file @
08268cff
...
...
@@ -19,6 +19,7 @@ parts =
caucase-updater
promise-expose-csr-ip-port
promise-logrotate-setup
promise-kedifa-auth-ready
[monitor-instance-parameter]
# Note: Workaround for monitor stack, which uses monitor-httpd-port parameter
...
...
@@ -73,6 +74,9 @@ backup-caucased = ${:backup}/caucased
# reservation
reservation = ${:srv}/reservation
# auth ready
auth-ready = ${:var}/auth-ready
# CSR publication
expose-csr = ${:srv}/expose-csr
expose-csr-etc = ${:etc}/expose-csr
...
...
@@ -278,12 +282,21 @@ update-command = ${:command}
[auth-random]
recipe = slapos.recipe.build
directory = ${directory:auth-ready}
auth-ready = ${directory:auth-ready}/${:_buildout_section_name_}
init =
import os
options['passwd'] = 'NotReadyYet'
if os.path.exists(options['file']):
with open(options['file'], 'r') as fh:
options['passwd'] = fh.read()
if os.path.exists(options['auth-ready']):
os.unlink(options['auth-ready'])
else:
# protect against too early init run - wait for directory to be created
if os.path.isdir(options['directory']):
with open(options['auth-ready'], 'w') as fh:
fh.write('')
[master-auth-random]
<= auth-random
...
...
@@ -308,4 +321,17 @@ name = ${:_buildout_section_name_}.py
config-command =
${logrotate:wrapper-path} -d
[kedifa-auth-ready]
recipe = plone.recipe.command
output = ${directory:var}/${:_buildout_section_name_}.txt
update-command = ${:command}
command = find ${directory:auth-ready} -type f > ${:output}
[promise-kedifa-auth-ready]
<= monitor-promise-base
promise = check_file_state
name = ${:_buildout_section_name_}.py
config-filename = ${kedifa-auth-ready:output}
config-state = empty
{%- endif -%} {# if instance_parameter_dict['slap-software-type'] == software_type #}
software/caddy-frontend/templates/apache-custom-slave-list.cfg.in
View file @
08268cff
...
...
@@ -551,6 +551,7 @@ parts +=
kedifa-updater-run
backend-haproxy-configuration
promise-logrotate-setup
promise-key-download-url-ready
{%- for part in part_list %}
{{ ' %s' % part }}
{%- endfor %}
...
...
@@ -626,3 +627,29 @@ promise = check_command_execute
name = ${:_buildout_section_name_}.py
config-command =
${logrotate:wrapper-path} -d
[key-download-url-ready]
recipe = slapos.recipe.build
output = {{ url_ready_file }}
master-key-download-url = {{ master_key_download_url }}
slave-kedifa-information = {{ dumps(slave_kedifa_information) }}
init =
not_ready_count = 0
if not options['master-key-download-url'] or 'NotReadyYet' in options['master-key-download-url']:
not_ready_count += 1
for slave_kedifa_reference, slave_kedifa_information in options['slave-kedifa-information'].items():
key_download_url = slave_kedifa_information.get('key-download-url')
if not key_download_url or 'NotReadyYet' in key_download_url:
not_ready_count += 1
with open(options['output'], 'w') as fh:
if not_ready_count > 0:
fh.write('%s' % (not_ready_count,))
else:
fh.write('')
[promise-key-download-url-ready]
<= monitor-promise-base
promise = check_file_state
name = ${:_buildout_section_name_}.py
config-filename = ${key-download-url-ready:output}
config-state = empty
software/caddy-frontend/test/test.py
View file @
08268cff
...
...
@@ -82,9 +82,6 @@ else:
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'..'
,
'software.cfg'
)))
# XXX Keep using slapos node instance --all, because of missing promises
SlapOSInstanceTestCase
.
slap
.
_force_slapos_node_instance_all
=
True
# ports chosen to not collide with test systems
HTTP_PORT
=
'11080'
HTTPS_PORT
=
'11443'
...
...
@@ -858,9 +855,6 @@ class HttpFrontendTestCase(SlapOSInstanceTestCase):
@
classmethod
def
setUpMaster
(
cls
):
# run partition until AIKC finishes
cls
.
runComputerPartitionUntil
(
cls
.
untilNotReadyYetNotInMasterKeyGenerateAuthUrl
)
parameter_dict
=
cls
.
requestDefaultInstance
().
getConnectionParameterDict
()
cls
.
_fetchKedifaCaucaseCaCertificateFile
(
parameter_dict
)
auth
=
requests
.
get
(
...
...
@@ -908,31 +902,6 @@ class HttpFrontendTestCase(SlapOSInstanceTestCase):
'*.alias1.example.com'
,
])
@
classmethod
def
runComputerPartitionUntil
(
cls
,
until
):
max_try
=
10
try_num
=
1
while
True
:
if
until
():
break
if
try_num
>
max_try
:
raise
ValueError
(
'Failed to run computer partition with %r'
%
(
until
,))
try
:
cls
.
slap
.
waitForInstance
()
except
Exception
:
cls
.
logger
.
exception
(
"Error during until run"
)
try_num
+=
1
@
classmethod
def
untilNotReadyYetNotInMasterKeyGenerateAuthUrl
(
cls
):
parameter_dict
=
cls
.
requestDefaultInstance
().
getConnectionParameterDict
()
key
=
'master-key-generate-auth-url'
if
key
not
in
parameter_dict
:
return
False
if
'NotReadyYet'
in
parameter_dict
[
key
]:
return
False
return
True
@
classmethod
def
callSupervisorMethod
(
cls
,
method
,
*
args
,
**
kwargs
):
with
cls
.
slap
.
instance_supervisor_rpc
as
instance_supervisor
:
...
...
@@ -1366,30 +1335,8 @@ class SlaveHttpFrontendTestCase(HttpFrontendTestCase):
).
getConnectionParameterDict
()
return
parameter_dict_dict
@
classmethod
def
untilSlavePartitionReady
(
cls
):
# all on-watch services shall not be exited
for
process
in
cls
.
callSupervisorMethod
(
'getAllProcessInfo'
):
if
process
[
'name'
].
endswith
(
'-on-watch'
)
and
\
process
[
'statename'
]
==
'EXITED'
:
if
process
[
'name'
].
startswith
(
'monitor-http'
):
continue
return
False
for
parameter_dict
in
cls
.
getSlaveConnectionParameterDictList
():
log_access_ready
=
'log-access-url'
in
parameter_dict
key
=
'key-generate-auth-url'
key_generate_auth_ready
=
key
in
parameter_dict
\
and
'NotReadyYet'
not
in
parameter_dict
[
key
]
if
not
(
log_access_ready
and
key_generate_auth_ready
):
return
False
return
True
@
classmethod
def
setUpSlaves
(
cls
):
cls
.
runComputerPartitionUntil
(
cls
.
untilSlavePartitionReady
)
cls
.
updateSlaveConnectionParameterDictDict
()
@
classmethod
...
...
@@ -2119,9 +2066,18 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin):
def
writeNodeInformation
(
node_information
,
path
):
with
open
(
path
,
'w'
)
as
fh
:
json
.
dump
(
node_information
,
fh
,
sort_keys
=
True
)
self
.
waitForInstance
()
self
.
waitForInstance
()
self
.
waitForInstance
()
# full processing is needed as this is just simulation which does
# not bang the instance tree
slap_force_slapos_node_instance_all
=
\
self
.
slap
.
_force_slapos_node_instance_all
self
.
slap
.
_force_slapos_node_instance_all
=
True
try
:
self
.
waitForInstance
()
self
.
waitForInstance
()
self
.
waitForInstance
()
finally
:
self
.
slap
.
_force_slapos_node_instance_all
=
\
slap_force_slapos_node_instance_all
self
.
addCleanup
(
writeNodeInformation
,
current_node_information
,
...
...
@@ -5012,10 +4968,6 @@ class TestSlaveSlapOSMasterCertificateCompatibilityOverrideMaster(
SlaveHttpFrontendTestCase
,
TestDataMixin
):
@
classmethod
def
setUpMaster
(
cls
):
# run partition until AIKC finishes
cls
.
runComputerPartitionUntil
(
cls
.
untilNotReadyYetNotInMasterKeyGenerateAuthUrl
)
parameter_dict
=
cls
.
requestDefaultInstance
().
getConnectionParameterDict
()
cls
.
_fetchKedifaCaucaseCaCertificateFile
(
parameter_dict
)
# Do not upload certificates for the master partition
...
...
@@ -5139,10 +5091,6 @@ class TestSlaveSlapOSMasterCertificateCompatibility(
@
classmethod
def
setUpMaster
(
cls
):
# run partition until AIKC finishes
cls
.
runComputerPartitionUntil
(
cls
.
untilNotReadyYetNotInMasterKeyGenerateAuthUrl
)
parameter_dict
=
cls
.
requestDefaultInstance
().
getConnectionParameterDict
()
cls
.
_fetchKedifaCaucaseCaCertificateFile
(
parameter_dict
)
# Do not upload certificates for the master partition
...
...
@@ -5741,10 +5689,6 @@ class TestSlaveSlapOSMasterCertificateCompatibilityUpdate(
SlaveHttpFrontendTestCase
,
TestDataMixin
):
@
classmethod
def
setUpMaster
(
cls
):
# run partition until AIKC finishes
cls
.
runComputerPartitionUntil
(
cls
.
untilNotReadyYetNotInMasterKeyGenerateAuthUrl
)
parameter_dict
=
cls
.
requestDefaultInstance
().
getConnectionParameterDict
()
cls
.
_fetchKedifaCaucaseCaCertificateFile
(
parameter_dict
)
# Do not upload certificates for the master partition
...
...
@@ -5977,9 +5921,7 @@ class TestSlaveRejectReportUnsafeDamaged(SlaveHttpFrontendTestCase):
cls
.
fillSlaveParameterDictDict
()
cls
.
requestSlaves
()
try
:
cls
.
slap
.
waitForInstance
(
max_retry
=
2
# two runs shall be enough
)
cls
.
slap
.
waitForInstance
(
max_retry
=
10
)
except
Exception
:
# ignores exceptions, as problems are tested
pass
...
...
software/caddy-frontend/test/test_data/test.TestEnableHttp2ByDefaultDefaultSlave.test_file_list_plugin.txt
View file @
08268cff
...
...
@@ -7,6 +7,9 @@ T-0/etc/plugin/buildout-T-0-status.py
T-0/etc/plugin/caucased-backend-client.py
T-0/etc/plugin/check-backend-haproxy-statistic-url-caddy-frontend-1.py
T-0/etc/plugin/check-free-disk-space.py
T-0/etc/plugin/master-key-download-url-ready-promise.py
T-0/etc/plugin/master-key-generate-auth-url-ready-promise.py
T-0/etc/plugin/master-key-upload-url-ready-promise.py
T-0/etc/plugin/monitor-bootstrap-status.py
T-0/etc/plugin/monitor-http-frontend.py
T-0/etc/plugin/monitor-httpd-listening-on-tcp.py
...
...
@@ -21,6 +24,7 @@ T-1/etc/plugin/kedifa-http-reply.py
T-1/etc/plugin/monitor-bootstrap-status.py
T-1/etc/plugin/monitor-http-frontend.py
T-1/etc/plugin/monitor-httpd-listening-on-tcp.py
T-1/etc/plugin/promise-kedifa-auth-ready.py
T-1/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/__init__.py
T-2/etc/plugin/backend-client-caucase-updater.py
...
...
@@ -40,6 +44,7 @@ T-2/etc/plugin/frontend-caddy-configuration-promise.py
T-2/etc/plugin/monitor-bootstrap-status.py
T-2/etc/plugin/monitor-http-frontend.py
T-2/etc/plugin/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/re6st-connectivity.py
T-2/etc/plugin/slave-introspection-configuration.py
...
...
software/caddy-frontend/test/test_data/test.TestEnableHttp2ByDefaultDefaultSlaveGlobalDisableHttp2.test_file_list_plugin.txt
View file @
08268cff
...
...
@@ -7,6 +7,9 @@ T-0/etc/plugin/buildout-T-0-status.py
T-0/etc/plugin/caucased-backend-client.py
T-0/etc/plugin/check-backend-haproxy-statistic-url-caddy-frontend-1.py
T-0/etc/plugin/check-free-disk-space.py
T-0/etc/plugin/master-key-download-url-ready-promise.py
T-0/etc/plugin/master-key-generate-auth-url-ready-promise.py
T-0/etc/plugin/master-key-upload-url-ready-promise.py
T-0/etc/plugin/monitor-bootstrap-status.py
T-0/etc/plugin/monitor-http-frontend.py
T-0/etc/plugin/monitor-httpd-listening-on-tcp.py
...
...
@@ -21,6 +24,7 @@ T-1/etc/plugin/kedifa-http-reply.py
T-1/etc/plugin/monitor-bootstrap-status.py
T-1/etc/plugin/monitor-http-frontend.py
T-1/etc/plugin/monitor-httpd-listening-on-tcp.py
T-1/etc/plugin/promise-kedifa-auth-ready.py
T-1/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/__init__.py
T-2/etc/plugin/backend-client-caucase-updater.py
...
...
@@ -40,6 +44,7 @@ T-2/etc/plugin/frontend-caddy-configuration-promise.py
T-2/etc/plugin/monitor-bootstrap-status.py
T-2/etc/plugin/monitor-http-frontend.py
T-2/etc/plugin/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/re6st-connectivity.py
T-2/etc/plugin/slave-introspection-configuration.py
...
...
software/caddy-frontend/test/test_data/test.TestEnableHttp2ByDefaultFalseSlave.test_file_list_plugin.txt
View file @
08268cff
...
...
@@ -7,6 +7,9 @@ T-0/etc/plugin/buildout-T-0-status.py
T-0/etc/plugin/caucased-backend-client.py
T-0/etc/plugin/check-backend-haproxy-statistic-url-caddy-frontend-1.py
T-0/etc/plugin/check-free-disk-space.py
T-0/etc/plugin/master-key-download-url-ready-promise.py
T-0/etc/plugin/master-key-generate-auth-url-ready-promise.py
T-0/etc/plugin/master-key-upload-url-ready-promise.py
T-0/etc/plugin/monitor-bootstrap-status.py
T-0/etc/plugin/monitor-http-frontend.py
T-0/etc/plugin/monitor-httpd-listening-on-tcp.py
...
...
@@ -21,6 +24,7 @@ T-1/etc/plugin/kedifa-http-reply.py
T-1/etc/plugin/monitor-bootstrap-status.py
T-1/etc/plugin/monitor-http-frontend.py
T-1/etc/plugin/monitor-httpd-listening-on-tcp.py
T-1/etc/plugin/promise-kedifa-auth-ready.py
T-1/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/__init__.py
T-2/etc/plugin/backend-client-caucase-updater.py
...
...
@@ -40,6 +44,7 @@ T-2/etc/plugin/frontend-caddy-configuration-promise.py
T-2/etc/plugin/monitor-bootstrap-status.py
T-2/etc/plugin/monitor-http-frontend.py
T-2/etc/plugin/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/re6st-connectivity.py
T-2/etc/plugin/slave-introspection-configuration.py
...
...
software/caddy-frontend/test/test_data/test.TestEnableHttp2ByDefaultFalseSlaveGlobalDisableHttp2.test_file_list_plugin.txt
View file @
08268cff
...
...
@@ -7,6 +7,9 @@ T-0/etc/plugin/buildout-T-0-status.py
T-0/etc/plugin/caucased-backend-client.py
T-0/etc/plugin/check-backend-haproxy-statistic-url-caddy-frontend-1.py
T-0/etc/plugin/check-free-disk-space.py
T-0/etc/plugin/master-key-download-url-ready-promise.py
T-0/etc/plugin/master-key-generate-auth-url-ready-promise.py
T-0/etc/plugin/master-key-upload-url-ready-promise.py
T-0/etc/plugin/monitor-bootstrap-status.py
T-0/etc/plugin/monitor-http-frontend.py
T-0/etc/plugin/monitor-httpd-listening-on-tcp.py
...
...
@@ -21,6 +24,7 @@ T-1/etc/plugin/kedifa-http-reply.py
T-1/etc/plugin/monitor-bootstrap-status.py
T-1/etc/plugin/monitor-http-frontend.py
T-1/etc/plugin/monitor-httpd-listening-on-tcp.py
T-1/etc/plugin/promise-kedifa-auth-ready.py
T-1/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/__init__.py
T-2/etc/plugin/backend-client-caucase-updater.py
...
...
@@ -40,6 +44,7 @@ T-2/etc/plugin/frontend-caddy-configuration-promise.py
T-2/etc/plugin/monitor-bootstrap-status.py
T-2/etc/plugin/monitor-http-frontend.py
T-2/etc/plugin/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/re6st-connectivity.py
T-2/etc/plugin/slave-introspection-configuration.py
...
...
software/caddy-frontend/test/test_data/test.TestMasterAIKCDisabledAIBCCDisabledRequest.test_file_list_plugin.txt
View file @
08268cff
...
...
@@ -3,6 +3,9 @@ T-0/etc/plugin/buildout-T-0-status.py
T-0/etc/plugin/caucased-backend-client.py
T-0/etc/plugin/check-backend-haproxy-statistic-url-caddy-frontend-1.py
T-0/etc/plugin/check-free-disk-space.py
T-0/etc/plugin/master-key-download-url-ready-promise.py
T-0/etc/plugin/master-key-generate-auth-url-ready-promise.py
T-0/etc/plugin/master-key-upload-url-ready-promise.py
T-0/etc/plugin/monitor-bootstrap-status.py
T-0/etc/plugin/monitor-http-frontend.py
T-0/etc/plugin/monitor-httpd-listening-on-tcp.py
...
...
@@ -17,6 +20,7 @@ T-1/etc/plugin/kedifa-http-reply.py
T-1/etc/plugin/monitor-bootstrap-status.py
T-1/etc/plugin/monitor-http-frontend.py
T-1/etc/plugin/monitor-httpd-listening-on-tcp.py
T-1/etc/plugin/promise-kedifa-auth-ready.py
T-1/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/__init__.py
T-2/etc/plugin/backend-client-caucase-updater.py
...
...
@@ -36,6 +40,7 @@ T-2/etc/plugin/frontend-caddy-configuration-promise.py
T-2/etc/plugin/monitor-bootstrap-status.py
T-2/etc/plugin/monitor-http-frontend.py
T-2/etc/plugin/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/re6st-connectivity.py
T-2/etc/plugin/slave-introspection-configuration.py
...
...
software/caddy-frontend/test/test_data/test.TestMasterRequest.test_file_list_plugin.txt
View file @
08268cff
...
...
@@ -7,6 +7,9 @@ T-0/etc/plugin/buildout-T-0-status.py
T-0/etc/plugin/caucased-backend-client.py
T-0/etc/plugin/check-backend-haproxy-statistic-url-caddy-frontend-1.py
T-0/etc/plugin/check-free-disk-space.py
T-0/etc/plugin/master-key-download-url-ready-promise.py
T-0/etc/plugin/master-key-generate-auth-url-ready-promise.py
T-0/etc/plugin/master-key-upload-url-ready-promise.py
T-0/etc/plugin/monitor-bootstrap-status.py
T-0/etc/plugin/monitor-http-frontend.py
T-0/etc/plugin/monitor-httpd-listening-on-tcp.py
...
...
@@ -21,6 +24,7 @@ T-1/etc/plugin/kedifa-http-reply.py
T-1/etc/plugin/monitor-bootstrap-status.py
T-1/etc/plugin/monitor-http-frontend.py
T-1/etc/plugin/monitor-httpd-listening-on-tcp.py
T-1/etc/plugin/promise-kedifa-auth-ready.py
T-1/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/__init__.py
T-2/etc/plugin/backend-client-caucase-updater.py
...
...
@@ -40,6 +44,7 @@ T-2/etc/plugin/frontend-caddy-configuration-promise.py
T-2/etc/plugin/monitor-bootstrap-status.py
T-2/etc/plugin/monitor-http-frontend.py
T-2/etc/plugin/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/re6st-connectivity.py
T-2/etc/plugin/slave-introspection-configuration.py
...
...
software/caddy-frontend/test/test_data/test.TestMasterRequestDomain.test_file_list_plugin.txt
View file @
08268cff
...
...
@@ -7,6 +7,9 @@ T-0/etc/plugin/buildout-T-0-status.py
T-0/etc/plugin/caucased-backend-client.py
T-0/etc/plugin/check-backend-haproxy-statistic-url-caddy-frontend-1.py
T-0/etc/plugin/check-free-disk-space.py
T-0/etc/plugin/master-key-download-url-ready-promise.py
T-0/etc/plugin/master-key-generate-auth-url-ready-promise.py
T-0/etc/plugin/master-key-upload-url-ready-promise.py
T-0/etc/plugin/monitor-bootstrap-status.py
T-0/etc/plugin/monitor-http-frontend.py
T-0/etc/plugin/monitor-httpd-listening-on-tcp.py
...
...
@@ -21,6 +24,7 @@ T-1/etc/plugin/kedifa-http-reply.py
T-1/etc/plugin/monitor-bootstrap-status.py
T-1/etc/plugin/monitor-http-frontend.py
T-1/etc/plugin/monitor-httpd-listening-on-tcp.py
T-1/etc/plugin/promise-kedifa-auth-ready.py
T-1/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/__init__.py
T-2/etc/plugin/backend-client-caucase-updater.py
...
...
@@ -40,6 +44,7 @@ T-2/etc/plugin/frontend-caddy-configuration-promise.py
T-2/etc/plugin/monitor-bootstrap-status.py
T-2/etc/plugin/monitor-http-frontend.py
T-2/etc/plugin/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/re6st-connectivity.py
T-2/etc/plugin/slave-introspection-configuration.py
...
...
software/caddy-frontend/test/test_data/test.TestRe6stVerificationUrlDefaultSlave.test_file_list_plugin.txt
View file @
08268cff
...
...
@@ -7,6 +7,9 @@ T-0/etc/plugin/buildout-T-0-status.py
T-0/etc/plugin/caucased-backend-client.py
T-0/etc/plugin/check-backend-haproxy-statistic-url-caddy-frontend-1.py
T-0/etc/plugin/check-free-disk-space.py
T-0/etc/plugin/master-key-download-url-ready-promise.py
T-0/etc/plugin/master-key-generate-auth-url-ready-promise.py
T-0/etc/plugin/master-key-upload-url-ready-promise.py
T-0/etc/plugin/monitor-bootstrap-status.py
T-0/etc/plugin/monitor-http-frontend.py
T-0/etc/plugin/monitor-httpd-listening-on-tcp.py
...
...
@@ -21,6 +24,7 @@ T-1/etc/plugin/kedifa-http-reply.py
T-1/etc/plugin/monitor-bootstrap-status.py
T-1/etc/plugin/monitor-http-frontend.py
T-1/etc/plugin/monitor-httpd-listening-on-tcp.py
T-1/etc/plugin/promise-kedifa-auth-ready.py
T-1/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/__init__.py
T-2/etc/plugin/backend-client-caucase-updater.py
...
...
@@ -40,6 +44,7 @@ T-2/etc/plugin/frontend-caddy-configuration-promise.py
T-2/etc/plugin/monitor-bootstrap-status.py
T-2/etc/plugin/monitor-http-frontend.py
T-2/etc/plugin/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/re6st-connectivity.py
T-2/etc/plugin/slave-introspection-configuration.py
...
...
software/caddy-frontend/test/test_data/test.TestRe6stVerificationUrlSlave.test_file_list_plugin.txt
View file @
08268cff
...
...
@@ -7,6 +7,9 @@ T-0/etc/plugin/buildout-T-0-status.py
T-0/etc/plugin/caucased-backend-client.py
T-0/etc/plugin/check-backend-haproxy-statistic-url-caddy-frontend-1.py
T-0/etc/plugin/check-free-disk-space.py
T-0/etc/plugin/master-key-download-url-ready-promise.py
T-0/etc/plugin/master-key-generate-auth-url-ready-promise.py
T-0/etc/plugin/master-key-upload-url-ready-promise.py
T-0/etc/plugin/monitor-bootstrap-status.py
T-0/etc/plugin/monitor-http-frontend.py
T-0/etc/plugin/monitor-httpd-listening-on-tcp.py
...
...
@@ -21,6 +24,7 @@ T-1/etc/plugin/kedifa-http-reply.py
T-1/etc/plugin/monitor-bootstrap-status.py
T-1/etc/plugin/monitor-http-frontend.py
T-1/etc/plugin/monitor-httpd-listening-on-tcp.py
T-1/etc/plugin/promise-kedifa-auth-ready.py
T-1/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/__init__.py
T-2/etc/plugin/backend-client-caucase-updater.py
...
...
@@ -40,6 +44,7 @@ T-2/etc/plugin/frontend-caddy-configuration-promise.py
T-2/etc/plugin/monitor-bootstrap-status.py
T-2/etc/plugin/monitor-http-frontend.py
T-2/etc/plugin/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/re6st-connectivity.py
T-2/etc/plugin/slave-introspection-configuration.py
...
...
software/caddy-frontend/test/test_data/test.TestReplicateSlave.test_file_list_plugin.txt
View file @
08268cff
...
...
@@ -8,6 +8,9 @@ T-0/etc/plugin/caucased-backend-client.py
T-0/etc/plugin/check-backend-haproxy-statistic-url-caddy-frontend-1.py
T-0/etc/plugin/check-backend-haproxy-statistic-url-caddy-frontend-2.py
T-0/etc/plugin/check-free-disk-space.py
T-0/etc/plugin/master-key-download-url-ready-promise.py
T-0/etc/plugin/master-key-generate-auth-url-ready-promise.py
T-0/etc/plugin/master-key-upload-url-ready-promise.py
T-0/etc/plugin/monitor-bootstrap-status.py
T-0/etc/plugin/monitor-http-frontend.py
T-0/etc/plugin/monitor-httpd-listening-on-tcp.py
...
...
@@ -22,6 +25,7 @@ T-1/etc/plugin/kedifa-http-reply.py
T-1/etc/plugin/monitor-bootstrap-status.py
T-1/etc/plugin/monitor-http-frontend.py
T-1/etc/plugin/monitor-httpd-listening-on-tcp.py
T-1/etc/plugin/promise-kedifa-auth-ready.py
T-1/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/__init__.py
T-2/etc/plugin/backend-client-caucase-updater.py
...
...
@@ -41,6 +45,7 @@ T-2/etc/plugin/frontend-caddy-configuration-promise.py
T-2/etc/plugin/monitor-bootstrap-status.py
T-2/etc/plugin/monitor-http-frontend.py
T-2/etc/plugin/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/re6st-connectivity.py
T-2/etc/plugin/slave-introspection-configuration.py
...
...
@@ -65,6 +70,7 @@ T-3/etc/plugin/frontend-caddy-configuration-promise.py
T-3/etc/plugin/monitor-bootstrap-status.py
T-3/etc/plugin/monitor-http-frontend.py
T-3/etc/plugin/monitor-httpd-listening-on-tcp.py
T-3/etc/plugin/promise-key-download-url-ready.py
T-3/etc/plugin/promise-logrotate-setup.py
T-3/etc/plugin/re6st-connectivity.py
T-3/etc/plugin/slave-introspection-configuration.py
...
...
software/caddy-frontend/test/test_data/test.TestSlave.test_file_list_plugin.txt
View file @
08268cff
...
...
@@ -7,6 +7,9 @@ T-0/etc/plugin/buildout-T-0-status.py
T-0/etc/plugin/caucased-backend-client.py
T-0/etc/plugin/check-backend-haproxy-statistic-url-caddy-frontend-1.py
T-0/etc/plugin/check-free-disk-space.py
T-0/etc/plugin/master-key-download-url-ready-promise.py
T-0/etc/plugin/master-key-generate-auth-url-ready-promise.py
T-0/etc/plugin/master-key-upload-url-ready-promise.py
T-0/etc/plugin/monitor-bootstrap-status.py
T-0/etc/plugin/monitor-http-frontend.py
T-0/etc/plugin/monitor-httpd-listening-on-tcp.py
...
...
@@ -21,6 +24,7 @@ T-1/etc/plugin/kedifa-http-reply.py
T-1/etc/plugin/monitor-bootstrap-status.py
T-1/etc/plugin/monitor-http-frontend.py
T-1/etc/plugin/monitor-httpd-listening-on-tcp.py
T-1/etc/plugin/promise-kedifa-auth-ready.py
T-1/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/__init__.py
T-2/etc/plugin/backend-client-caucase-updater.py
...
...
@@ -42,6 +46,7 @@ T-2/etc/plugin/frontend-caddy-configuration-promise.py
T-2/etc/plugin/monitor-bootstrap-status.py
T-2/etc/plugin/monitor-http-frontend.py
T-2/etc/plugin/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/re6st-connectivity.py
T-2/etc/plugin/slave-introspection-configuration.py
...
...
software/caddy-frontend/test/test_data/test.TestSlaveCiphers.test_file_list_plugin.txt
View file @
08268cff
...
...
@@ -7,6 +7,9 @@ T-0/etc/plugin/buildout-T-0-status.py
T-0/etc/plugin/caucased-backend-client.py
T-0/etc/plugin/check-backend-haproxy-statistic-url-caddy-frontend-1.py
T-0/etc/plugin/check-free-disk-space.py
T-0/etc/plugin/master-key-download-url-ready-promise.py
T-0/etc/plugin/master-key-generate-auth-url-ready-promise.py
T-0/etc/plugin/master-key-upload-url-ready-promise.py
T-0/etc/plugin/monitor-bootstrap-status.py
T-0/etc/plugin/monitor-http-frontend.py
T-0/etc/plugin/monitor-httpd-listening-on-tcp.py
...
...
@@ -21,6 +24,7 @@ T-1/etc/plugin/kedifa-http-reply.py
T-1/etc/plugin/monitor-bootstrap-status.py
T-1/etc/plugin/monitor-http-frontend.py
T-1/etc/plugin/monitor-httpd-listening-on-tcp.py
T-1/etc/plugin/promise-kedifa-auth-ready.py
T-1/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/__init__.py
T-2/etc/plugin/backend-client-caucase-updater.py
...
...
@@ -40,6 +44,7 @@ T-2/etc/plugin/frontend-caddy-configuration-promise.py
T-2/etc/plugin/monitor-bootstrap-status.py
T-2/etc/plugin/monitor-http-frontend.py
T-2/etc/plugin/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/re6st-connectivity.py
T-2/etc/plugin/slave-introspection-configuration.py
...
...
software/caddy-frontend/test/test_data/test.TestSlaveGlobalDisableHttp2.test_file_list_plugin.txt
View file @
08268cff
...
...
@@ -7,6 +7,9 @@ T-0/etc/plugin/buildout-T-0-status.py
T-0/etc/plugin/caucased-backend-client.py
T-0/etc/plugin/check-backend-haproxy-statistic-url-caddy-frontend-1.py
T-0/etc/plugin/check-free-disk-space.py
T-0/etc/plugin/master-key-download-url-ready-promise.py
T-0/etc/plugin/master-key-generate-auth-url-ready-promise.py
T-0/etc/plugin/master-key-upload-url-ready-promise.py
T-0/etc/plugin/monitor-bootstrap-status.py
T-0/etc/plugin/monitor-http-frontend.py
T-0/etc/plugin/monitor-httpd-listening-on-tcp.py
...
...
@@ -21,6 +24,7 @@ T-1/etc/plugin/kedifa-http-reply.py
T-1/etc/plugin/monitor-bootstrap-status.py
T-1/etc/plugin/monitor-http-frontend.py
T-1/etc/plugin/monitor-httpd-listening-on-tcp.py
T-1/etc/plugin/promise-kedifa-auth-ready.py
T-1/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/__init__.py
T-2/etc/plugin/backend-client-caucase-updater.py
...
...
@@ -42,6 +46,7 @@ T-2/etc/plugin/frontend-caddy-configuration-promise.py
T-2/etc/plugin/monitor-bootstrap-status.py
T-2/etc/plugin/monitor-http-frontend.py
T-2/etc/plugin/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/re6st-connectivity.py
T-2/etc/plugin/slave-introspection-configuration.py
...
...
software/caddy-frontend/test/test_data/test.TestSlaveHealthCheck.test_file_list_plugin.txt
View file @
08268cff
...
...
@@ -7,6 +7,9 @@ T-0/etc/plugin/buildout-T-0-status.py
T-0/etc/plugin/caucased-backend-client.py
T-0/etc/plugin/check-backend-haproxy-statistic-url-caddy-frontend-1.py
T-0/etc/plugin/check-free-disk-space.py
T-0/etc/plugin/master-key-download-url-ready-promise.py
T-0/etc/plugin/master-key-generate-auth-url-ready-promise.py
T-0/etc/plugin/master-key-upload-url-ready-promise.py
T-0/etc/plugin/monitor-bootstrap-status.py
T-0/etc/plugin/monitor-http-frontend.py
T-0/etc/plugin/monitor-httpd-listening-on-tcp.py
...
...
@@ -21,6 +24,7 @@ T-1/etc/plugin/kedifa-http-reply.py
T-1/etc/plugin/monitor-bootstrap-status.py
T-1/etc/plugin/monitor-http-frontend.py
T-1/etc/plugin/monitor-httpd-listening-on-tcp.py
T-1/etc/plugin/promise-kedifa-auth-ready.py
T-1/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/__init__.py
T-2/etc/plugin/backend-client-caucase-updater.py
...
...
@@ -40,6 +44,7 @@ T-2/etc/plugin/frontend-caddy-configuration-promise.py
T-2/etc/plugin/monitor-bootstrap-status.py
T-2/etc/plugin/monitor-http-frontend.py
T-2/etc/plugin/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/re6st-connectivity.py
T-2/etc/plugin/slave-introspection-configuration.py
...
...
software/caddy-frontend/test/test_data/test.TestSlaveHostHaproxyClash.test_file_list_plugin.txt
View file @
08268cff
...
...
@@ -7,6 +7,9 @@ T-0/etc/plugin/buildout-T-0-status.py
T-0/etc/plugin/caucased-backend-client.py
T-0/etc/plugin/check-backend-haproxy-statistic-url-caddy-frontend-1.py
T-0/etc/plugin/check-free-disk-space.py
T-0/etc/plugin/master-key-download-url-ready-promise.py
T-0/etc/plugin/master-key-generate-auth-url-ready-promise.py
T-0/etc/plugin/master-key-upload-url-ready-promise.py
T-0/etc/plugin/monitor-bootstrap-status.py
T-0/etc/plugin/monitor-http-frontend.py
T-0/etc/plugin/monitor-httpd-listening-on-tcp.py
...
...
@@ -21,6 +24,7 @@ T-1/etc/plugin/kedifa-http-reply.py
T-1/etc/plugin/monitor-bootstrap-status.py
T-1/etc/plugin/monitor-http-frontend.py
T-1/etc/plugin/monitor-httpd-listening-on-tcp.py
T-1/etc/plugin/promise-kedifa-auth-ready.py
T-1/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/__init__.py
T-2/etc/plugin/backend-client-caucase-updater.py
...
...
@@ -40,6 +44,7 @@ T-2/etc/plugin/frontend-caddy-configuration-promise.py
T-2/etc/plugin/monitor-bootstrap-status.py
T-2/etc/plugin/monitor-http-frontend.py
T-2/etc/plugin/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/re6st-connectivity.py
T-2/etc/plugin/slave-introspection-configuration.py
...
...
software/caddy-frontend/test/test_data/test.TestSlaveSlapOSMasterCertificateCompatibility.test_file_list_plugin.txt
View file @
08268cff
...
...
@@ -7,6 +7,9 @@ T-0/etc/plugin/buildout-T-0-status.py
T-0/etc/plugin/caucased-backend-client.py
T-0/etc/plugin/check-backend-haproxy-statistic-url-caddy-frontend-1.py
T-0/etc/plugin/check-free-disk-space.py
T-0/etc/plugin/master-key-download-url-ready-promise.py
T-0/etc/plugin/master-key-generate-auth-url-ready-promise.py
T-0/etc/plugin/master-key-upload-url-ready-promise.py
T-0/etc/plugin/monitor-bootstrap-status.py
T-0/etc/plugin/monitor-http-frontend.py
T-0/etc/plugin/monitor-httpd-listening-on-tcp.py
...
...
@@ -21,6 +24,7 @@ T-1/etc/plugin/kedifa-http-reply.py
T-1/etc/plugin/monitor-bootstrap-status.py
T-1/etc/plugin/monitor-http-frontend.py
T-1/etc/plugin/monitor-httpd-listening-on-tcp.py
T-1/etc/plugin/promise-kedifa-auth-ready.py
T-1/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/__init__.py
T-2/etc/plugin/backend-client-caucase-updater.py
...
...
@@ -40,6 +44,7 @@ T-2/etc/plugin/frontend-caddy-configuration-promise.py
T-2/etc/plugin/monitor-bootstrap-status.py
T-2/etc/plugin/monitor-http-frontend.py
T-2/etc/plugin/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/re6st-connectivity.py
T-2/etc/plugin/slave-introspection-configuration.py
...
...
software/caddy-frontend/test/test_data/test.TestSlaveSlapOSMasterCertificateCompatibilityOverrideMaster.test_file_list_plugin.txt
View file @
08268cff
...
...
@@ -7,6 +7,9 @@ T-0/etc/plugin/buildout-T-0-status.py
T-0/etc/plugin/caucased-backend-client.py
T-0/etc/plugin/check-backend-haproxy-statistic-url-caddy-frontend-1.py
T-0/etc/plugin/check-free-disk-space.py
T-0/etc/plugin/master-key-download-url-ready-promise.py
T-0/etc/plugin/master-key-generate-auth-url-ready-promise.py
T-0/etc/plugin/master-key-upload-url-ready-promise.py
T-0/etc/plugin/monitor-bootstrap-status.py
T-0/etc/plugin/monitor-http-frontend.py
T-0/etc/plugin/monitor-httpd-listening-on-tcp.py
...
...
@@ -21,6 +24,7 @@ T-1/etc/plugin/kedifa-http-reply.py
T-1/etc/plugin/monitor-bootstrap-status.py
T-1/etc/plugin/monitor-http-frontend.py
T-1/etc/plugin/monitor-httpd-listening-on-tcp.py
T-1/etc/plugin/promise-kedifa-auth-ready.py
T-1/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/__init__.py
T-2/etc/plugin/backend-client-caucase-updater.py
...
...
@@ -40,6 +44,7 @@ T-2/etc/plugin/frontend-caddy-configuration-promise.py
T-2/etc/plugin/monitor-bootstrap-status.py
T-2/etc/plugin/monitor-http-frontend.py
T-2/etc/plugin/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/re6st-connectivity.py
T-2/etc/plugin/slave-introspection-configuration.py
...
...
software/caddy-frontend/test/test_data/test.TestSlaveSlapOSMasterCertificateCompatibilityUpdate.test_file_list_plugin.txt
View file @
08268cff
...
...
@@ -7,6 +7,9 @@ T-0/etc/plugin/buildout-T-0-status.py
T-0/etc/plugin/caucased-backend-client.py
T-0/etc/plugin/check-backend-haproxy-statistic-url-caddy-frontend-1.py
T-0/etc/plugin/check-free-disk-space.py
T-0/etc/plugin/master-key-download-url-ready-promise.py
T-0/etc/plugin/master-key-generate-auth-url-ready-promise.py
T-0/etc/plugin/master-key-upload-url-ready-promise.py
T-0/etc/plugin/monitor-bootstrap-status.py
T-0/etc/plugin/monitor-http-frontend.py
T-0/etc/plugin/monitor-httpd-listening-on-tcp.py
...
...
@@ -21,6 +24,7 @@ T-1/etc/plugin/kedifa-http-reply.py
T-1/etc/plugin/monitor-bootstrap-status.py
T-1/etc/plugin/monitor-http-frontend.py
T-1/etc/plugin/monitor-httpd-listening-on-tcp.py
T-1/etc/plugin/promise-kedifa-auth-ready.py
T-1/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/__init__.py
T-2/etc/plugin/backend-client-caucase-updater.py
...
...
@@ -40,6 +44,7 @@ T-2/etc/plugin/frontend-caddy-configuration-promise.py
T-2/etc/plugin/monitor-bootstrap-status.py
T-2/etc/plugin/monitor-http-frontend.py
T-2/etc/plugin/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/re6st-connectivity.py
T-2/etc/plugin/slave-introspection-configuration.py
...
...
software/kvm/buildout.hash.cfg
View file @
08268cff
...
...
@@ -19,7 +19,7 @@ md5sum = 7e90da1f6dac4233e1aa3248f48e357c
[template-kvm]
filename = instance-kvm.cfg.jinja2
md5sum =
44dc93281f2fffe64d014754fae1b38a
md5sum =
ff9fb2378a48d1ca8c72f6a87d3a0221
[template-kvm-cluster]
filename = instance-kvm-cluster.cfg.jinja2.in
...
...
software/kvm/instance-kvm.cfg.jinja2
View file @
08268cff
...
...
@@ -939,7 +939,9 @@ recipe = collective.recipe.template
input = inline:
{{ data_list | join('\n ') }}
output = {{ file_path }}
{% if mode %}
mode = {{ mode }}
{% endif %}
{% endmacro -%}
# write vm-data into file public/data
...
...
@@ -1110,7 +1112,7 @@ data-to-vm =
{% set key_list = v.split('\n') -%}
{{ k }} =
{{ key_list | join('\n ') }}
{% elif k in ['boot-image-url-list', 'boot-image-url-select', 'whitelist-domains'] %}
{% elif k in ['boot-image-url-list', 'boot-image-url-select', 'whitelist-domains'
, 'data-to-vm'
] %}
{# needs to decorate possibly multiline or maybe unsafe value #}
{{ k }} = {{ dumps(v) }}
{% else -%}
...
...
software/kvm/test/test.py
View file @
08268cff
...
...
@@ -221,6 +221,12 @@ i0:whitelist-firewall-{hash} RUNNING""",
)
@
skipUnlessKvm
class
TestInstanceJson
(
KvmMixinJson
,
TestInstance
):
pass
@
skipUnlessKvm
class
TestMemoryManagement
(
InstanceTestCase
,
KvmMixin
):
__partition_reference__
=
'i'
...
...
@@ -817,7 +823,7 @@ class TestInstanceNbdServerJson(
pass
class
FakeImage
Handler
(
SimpleHTTPServer
.
SimpleHTTPRequestHandler
):
class
Http
Handler
(
SimpleHTTPServer
.
SimpleHTTPRequestHandler
):
def
log_message
(
self
,
*
args
):
if
os
.
environ
.
get
(
'SLAPOS_TEST_DEBUG'
):
return
SimpleHTTPServer
.
SimpleHTTPRequestHandler
.
log_message
(
self
,
*
args
)
...
...
@@ -831,7 +837,7 @@ class FakeImageServerMixin(KvmMixin):
cls
.
image_source_directory
=
tempfile
.
mkdtemp
()
server
=
SocketServer
.
TCPServer
(
(
cls
.
_ipv4_address
,
findFreeTCPPort
(
cls
.
_ipv4_address
)),
FakeImage
Handler
)
Http
Handler
)
# c89f17758be13adeb06886ef935d5ff1
fake_image_content
=
b'fake_image_content'
...
...
@@ -2195,3 +2201,125 @@ class TestExternalDiskModernIndexRequired(InstanceTestCase, ExternalDiskMixin):
self
.
getExternalDiskInstanceParameterDict
(
self
.
first_disk
,
second_disk
,
self
.
third_disk
))})
self
.
raising_waitForInstance
(
10
)
@
skipUnlessKvm
class
TestInstanceHttpServer
(
InstanceTestCase
,
KvmMixin
):
__partition_reference__
=
'ihs'
@
classmethod
def
startHttpServer
(
cls
):
cls
.
http_directory
=
tempfile
.
mkdtemp
()
server
=
SocketServer
.
TCPServer
(
(
cls
.
_ipv4_address
,
findFreeTCPPort
(
cls
.
_ipv4_address
)),
HttpHandler
)
bootstrap_script
=
b'bootstrap_script'
cls
.
bootstrap_script_md5sum
=
hashlib
.
md5
(
bootstrap_script
).
hexdigest
()
with
open
(
os
.
path
.
join
(
cls
.
http_directory
,
cls
.
bootstrap_script_md5sum
),
'wb'
)
as
fh
:
fh
.
write
(
bootstrap_script
)
url
=
'http://%s:%s'
%
server
.
server_address
cls
.
bootstrap_script_url
=
'/'
.
join
([
url
,
cls
.
bootstrap_script_md5sum
])
old_dir
=
os
.
path
.
realpath
(
os
.
curdir
)
os
.
chdir
(
cls
.
http_directory
)
try
:
cls
.
server_process
=
multiprocessing
.
Process
(
target
=
server
.
serve_forever
,
name
=
'HttpServer'
)
cls
.
server_process
.
start
()
finally
:
os
.
chdir
(
old_dir
)
@
classmethod
def
stopHttpServer
(
cls
):
cls
.
logger
.
debug
(
'Stopping process %s'
%
(
cls
.
server_process
,))
cls
.
server_process
.
join
(
10
)
cls
.
server_process
.
terminate
()
time
.
sleep
(
0.1
)
if
cls
.
server_process
.
is_alive
():
cls
.
logger
.
warning
(
'Process %s still alive'
%
(
cls
.
server_process
,
))
shutil
.
rmtree
(
cls
.
http_directory
)
@
classmethod
def
setUpClass
(
cls
):
cls
.
startHttpServer
()
super
(
TestInstanceHttpServer
,
cls
).
setUpClass
()
@
classmethod
def
tearDownClass
(
cls
):
super
(
TestInstanceHttpServer
,
cls
).
tearDownClass
()
cls
.
stopHttpServer
()
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'enable-http-server'
:
True
,
'bootstrap-script-url'
:
'%s#%s'
%
(
cls
.
bootstrap_script_url
,
cls
.
bootstrap_script_md5sum
),
'data-to-vm'
:
"""data
to
vm"""
,
}
def
test
(
self
):
connection_parameter_dict
=
self
.
getConnectionParameterDictJson
()
present_key_list
=
[]
assert_key_list
=
[
'backend-url'
,
'url'
,
'monitor-setup-url'
,
'ipv6-network-info'
,
'tap-ipv4'
,
'tap-ipv6'
]
for
k
in
assert_key_list
:
if
k
in
connection_parameter_dict
:
present_key_list
.
append
(
k
)
connection_parameter_dict
.
pop
(
k
)
self
.
assertEqual
(
connection_parameter_dict
,
{
'ipv6'
:
self
.
_ipv6_address
,
'maximum-extra-disk-amount'
:
'0'
,
'monitor-base-url'
:
'https://[%s]:8026'
%
(
self
.
_ipv6_address
,),
'nat-rule-port-tcp-22'
:
'%s : 10022'
%
(
self
.
_ipv6_address
,),
'nat-rule-port-tcp-443'
:
'%s : 10443'
%
(
self
.
_ipv6_address
,),
'nat-rule-port-tcp-80'
:
'%s : 10080'
%
(
self
.
_ipv6_address
,),
}
)
self
.
assertEqual
(
set
(
present_key_list
),
set
(
assert_key_list
))
self
.
assertEqual
(
"""ihs0:6tunnel-10022-{hash}-on-watch RUNNING
ihs0:6tunnel-10080-{hash}-on-watch RUNNING
ihs0:6tunnel-10443-{hash}-on-watch RUNNING
ihs0:bootstrap-monitor EXITED
ihs0:certificate_authority-{hash}-on-watch RUNNING
ihs0:crond-{hash}-on-watch RUNNING
ihs0:http-server-{hash}-on-watch RUNNING
ihs0:kvm-{kvm-hash-value}-on-watch RUNNING
ihs0:kvm_controller EXITED
ihs0:monitor-httpd-{hash}-on-watch RUNNING
ihs0:monitor-httpd-graceful EXITED
ihs0:websockify-{hash}-on-watch RUNNING
ihs0:whitelist-domains-download-{hash} RUNNING
ihs0:whitelist-firewall-{hash} RUNNING"""
,
self
.
getProcessInfo
()
)
public_dir
=
os
.
path
.
join
(
self
.
computer_partition_root_path
,
'srv'
,
'public'
)
self
.
assertEqual
(
[
'data'
,
'gateway'
,
'hostname'
,
'ipv4'
,
'ipv6_config.sh'
,
'netmask'
,
'network'
,
'vm-bootstrap'
],
sorted
(
os
.
listdir
(
public_dir
))
)
with
open
(
os
.
path
.
join
(
public_dir
,
'data'
),
'r'
)
as
fh
:
self
.
assertEqual
(
"""data
to
vm"""
,
fh
.
read
())
with
open
(
os
.
path
.
join
(
public_dir
,
'vm-bootstrap'
),
'r'
)
as
fh
:
self
.
assertEqual
(
'bootstrap_script'
,
fh
.
read
())
@
skipUnlessKvm
class
TestInstanceHttpServerJson
(
KvmMixinJson
,
TestInstanceHttpServer
):
pass
software/metabase/software.cfg
View file @
08268cff
...
...
@@ -22,8 +22,8 @@ part = python3
[metabase.jar]
recipe = slapos.recipe.build:download
url = https://downloads.metabase.com/v0.4
3
.1/metabase.jar
md5sum =
8033ba58825239e7dff29be8d4c885a7
url = https://downloads.metabase.com/v0.4
4
.1/metabase.jar
md5sum =
a97e8e67a0cc647f7c44ca787eb9a41a
[instance-profile]
recipe = slapos.recipe.template
...
...
software/ors-amarisoft/buildout.hash.cfg
View file @
08268cff
...
...
@@ -24,7 +24,7 @@ md5sum = b10c10a9408a934052fd0960f31a75fc
[template-lte-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg
md5sum = c
5a82279b6ada358c74a90c3b660bf55
md5sum = c
450b8c307d20738a98bcb4f6ffeee16
[template-lte-gnb-epc]
_update_hash_filename_ = instance-gnb-epc.jinja2.cfg
...
...
@@ -36,11 +36,11 @@ md5sum = 2cfe5679374559ab94478b987d646d83
[template-lte-gnb]
_update_hash_filename_ = instance-gnb.jinja2.cfg
md5sum =
eabbdb8ced563180f0bba8ca06e4bac4
md5sum =
9732653a0e2c7fe91d80da80762430d2
[template-lte-mme]
_update_hash_filename_ = instance-mme.jinja2.cfg
md5sum =
2c2d2dc4fd6b7a9100642e34812a5140
md5sum =
51b8762d4691f525d0228fa1f286e772
[ue_db.jinja2.cfg]
filename = config/ue_db.jinja2.cfg
...
...
@@ -48,7 +48,7 @@ md5sum = dcaac06553a3222b14c0013a13f4a149
[enb.jinja2.cfg]
filename = config/enb.jinja2.cfg
md5sum = f
5848c48f573c79615f595b07c358ce8
md5sum = f
aed74244d0c539dea53a0377ad0e103
[sib23.asn]
filename = config/sib23.asn
...
...
@@ -56,7 +56,7 @@ md5sum = b377dac7f1fcf94fb9ce9ebed617f36a
[gnb.jinja2.cfg]
filename = config/gnb.jinja2.cfg
md5sum =
b3fb1b32aa1b151892eeb87a03e1d152
md5sum =
a9df6d3d66bf5a48ed2bc1dc7084291a
[ltelogs.jinja2.sh]
filename = ltelogs.jinja2.sh
...
...
@@ -64,16 +64,16 @@ md5sum = 1ba2e065bdf14a6411e95e80db17dcfd
[mme.jinja2.cfg]
filename = config/mme.jinja2.cfg
md5sum =
a96c33a0a2a301f204cac8642267ad97
md5sum =
0c1e086de705f074654a794a2248cad0
[ims.jinja2.cfg]
filename = config/ims.jinja2.cfg
md5sum = 36281b03597252cf75169417d02fc28c
[sdr-busy-promise]
_update_hash_filename_ = promise/check_sdr_busy.py
md5sum =
f7436ff76fea58e37a401d4712275422
_update_hash_filename_ = promise/check_sdr_busy.
jinja2.
py
md5sum =
93dacb1da15310eb70d0815711a06cdf
[interface-up-promise]
_update_hash_filename_ = promise/check_interface_up.py
md5sum =
505efcbe04e717088924f2267b10c2b9
_update_hash_filename_ = promise/check_interface_up.
jinja2.
py
md5sum =
63d3bbac7b6f480ee0c510e80aa1ccf7
software/ors-amarisoft/config/enb.jinja2.cfg
View file @
08268cff
...
...
@@ -56,9 +56,7 @@
{%- endif %}
plmn: "{{ slapparameter_dict['plmn_list'][k]['plmn'] }}",
reserved: {{ str(slapparameter_dict['plmn_list'][k].get('reserved', false)).lower() }},
{%- if slapparameter_dict['plmn_list'][k].get('attach_without_pdn', '') %}
attach_without_pdn: {{ str(slapparameter_dict['plmn_list'][k]['attach_without_pdn']).lower() }},
{%- endif %}
attach_without_pdn: {{ str(slapparameter_dict['plmn_list'][k].get('attach_without_pdn', false)).lower() }},
}
{%- endfor -%}
{% else %}
...
...
@@ -68,7 +66,7 @@
dl_earfcn: {{ slapparameter_dict.get('dl_earfcn', slap_configuration['configuration.default_dl_earfcn']) }},
n_id_cell:
1
,
n_id_cell:
{{ slapparameter_dict.get('pci', 1) }}
,
cell_id: 0x01,
tac: 0x0001,
root_sequence_index: 204,
...
...
software/ors-amarisoft/config/gnb.jinja2.cfg
View file @
08268cff
...
...
@@ -138,7 +138,7 @@
#endif
},
ssb_period: 20,
n_id_cell:
500
,
n_id_cell:
{{ slapparameter_dict.get('pci', 500) }}
,
plmn_list: [
{%- if slapparameter_dict.get('plmn_list', '') %}
...
...
software/ors-amarisoft/config/mme.jinja2.cfg
View file @
08268cff
...
...
@@ -51,15 +51,15 @@
pdn_list: [
{
pdn_type: "ipv4",
tun_ifname: "{{ slap_configuration
['tun-name']
}}",
tun_ifname: "{{ slap_configuration
.get('tun-name', '')
}}",
access_point_name: ["default", "internet", "ims", "sos"],
first_ip_addr: "{{ netaddr.IPAddress(netaddr.IPNetwork(slap_configuration['tun-ipv4-network']).first) + 2 }}",
last_ip_addr: "{{ netaddr.IPAddress(netaddr.IPNetwork(slap_configuration['tun-ipv4-network']).last) - 1 }}",
{% if slap_configuration.get('tun-name', '') %}
first_ip_addr: "{{ netaddr.IPAddress(netaddr.IPNetwork(slap_configuration.get('tun-ipv4-network', '')).first) + 2 }}",
last_ip_addr: "{{ netaddr.IPAddress(netaddr.IPNetwork(slap_configuration.get('tun-ipv4-network', '')).last) - 1 }}",
{% endif %}
ip_addr_shift: 2,
dns_addr: "8.8.8.8",
// TODO: enable this instead of Google's DNS above
// dns_addr: "{{ slap_configuration['tun-ipv4-addr'] }}",
p_cscf_addr: ["{{ slap_configuration['tun-ipv4-addr'] }}"],
p_cscf_addr: ["{{ slap_configuration.get('tun-ipv4-addr', '') }}"],
erabs: [
{
...
...
software/ors-amarisoft/instance-enb-input-schema.jinja2.json
View file @
08268cff
...
...
@@ -65,6 +65,12 @@
"type"
:
"string"
,
"default"
:
"0x1A2D0"
},
"pci"
:
{
"title"
:
"Physical Cell ID"
,
"description"
:
"Physical Cell ID"
,
"type"
:
"number"
,
"default"
:
1
},
"plmn_list"
:
{
"title"
:
"PLMN list"
,
"description"
:
"List of PLMNs broadcasted by the eNodeB, at most 6 (default: 00101)"
,
...
...
software/ors-amarisoft/instance-enb.jinja2.cfg
View file @
08268cff
...
...
@@ -73,8 +73,10 @@ recipe = slapos.recipe.template
output = ${directory:bin}/${:_buildout_section_name_}
inline =
#!/bin/sh
{% if not slapparameter_dict.get("testing", False) %}
sudo /opt/amarisoft/rm-tmp-lte | true;
{{ enb }}/lteenb ${directory:etc}/enb.cfg >> ${directory:log}/enb-output.log 2>> ${directory:log}/enb-output.log
{% endif %}
### eNodeB (enb)
[lte-enb-service]
...
...
@@ -125,9 +127,17 @@ monitor-title = {{ slapparameter_dict['name'] | string }}
password = {{ slapparameter_dict['monitor-password'] | string }}
{% endif %}
[sdr-busy-promise-template]
recipe = slapos.recipe.template:jinja2
url = {{ sdr_busy_promise }}
output = ${directory:etc}/check-sdr-busy.py
extensions = jinja2.ext.do
context =
key slapparameter_dict slap-configuration:configuration
# Add custom promise to check if /dev/sdr0 is busy
[sdr-busy-promise]
recipe = slapos.cookbook:promise.plugin
eggs = slapos.core
file =
{{ sdr_busy_promise }
}
file =
${sdr-busy-promise-template:output
}
output = ${directory:plugins}/check-sdr-busy.py
software/ors-amarisoft/instance-gnb-input-schema.jinja2.json
View file @
08268cff
...
...
@@ -71,6 +71,12 @@
"type"
:
"string"
,
"default"
:
"0x12345"
},
"pci"
:
{
"title"
:
"Physical Cell ID"
,
"description"
:
"Physical Cell ID"
,
"type"
:
"number"
,
"default"
:
1
},
"ssb_pos_bitmap"
:
{
"title"
:
"SSB Position Bitmap"
,
"description"
:
"SSB position bitmap in bits (4, 8 or 64 bits depending on the DL frequency)."
,
...
...
software/ors-amarisoft/instance-gnb.jinja2.cfg
View file @
08268cff
...
...
@@ -74,8 +74,10 @@ recipe = slapos.recipe.template
output = ${directory:bin}/${:_buildout_section_name_}
inline =
#!/bin/sh
{% if not slapparameter_dict.get("testing", False) %}
sudo /opt/amarisoft/rm-tmp-lte | true;
{{ enb }}/lteenb ${directory:etc}/gnb.cfg >> ${directory:log}/gnb-output.log 2>> ${directory:log}/gnb-output.log
{% endif %}
### eNodeB (enb)
[lte-enb-service]
...
...
@@ -125,9 +127,17 @@ monitor-title = {{ slapparameter_dict['name'] | string }}
password = {{ slapparameter_dict['monitor-password'] | string }}
{% endif %}
[sdr-busy-promise-template]
recipe = slapos.recipe.template:jinja2
url = {{ sdr_busy_promise }}
output = ${directory:etc}/check-sdr-busy.py
extensions = jinja2.ext.do
context =
key slapparameter_dict slap-configuration:configuration
# Add custom promise to check if /dev/sdr0 is busy
[sdr-busy-promise]
recipe = slapos.cookbook:promise.plugin
eggs = slapos.core
file =
{{ sdr_busy_promise }
}
file =
${sdr-busy-promise-template:output
}
output = ${directory:plugins}/check-sdr-busy.py
software/ors-amarisoft/instance-mme.jinja2.cfg
View file @
08268cff
...
...
@@ -84,8 +84,10 @@ recipe = slapos.recipe.template
output = ${directory:bin}/${:_buildout_section_name_}
inline =
#!/bin/sh
{% if not slapparameter_dict.get("testing", False) %}
rm -f ${directory:var}/lte_ue.db;
{{ mme }}/ltemme ${directory:etc}/mme.cfg >> ${directory:log}/mme-output.log 2>> ${directory:log}/mme-output.log
{% endif %}
### MME
[lte-mme-service]
...
...
@@ -152,10 +154,17 @@ recipe = slapos.cookbook:publish.serialised
epc-ipv6 = ${slap-configuration:ipv6-random}
epc-ipv4 = {{ epc_ipv4 }}
# Add custom promise to check if /dev/sdr0 is busy
[tun-up-promise-template]
recipe = slapos.recipe.template:jinja2
url = {{ interface_up_promise }}
output = ${directory:etc}/check-tun-up.py
extensions = jinja2.ext.do
context =
key slapparameter_dict slap-configuration:configuration
# Add custom promise to check if tun is up
[tun-up-promise]
recipe = slapos.cookbook:promise.plugin
eggs = slapos.core
file =
{{ interface_up_promise }
}
file =
${tun-up-promise-template:output
}
output = ${directory:plugins}/check-tun-up.py
config-ifname = ${slap-configuration:tun-name}
software/ors-amarisoft/instance-tdd1900-enb-epc-input-schema.json
View file @
08268cff
...
...
@@ -63,6 +63,12 @@
"type"
:
"string"
,
"default"
:
"0x1A2D0"
},
"pci"
:
{
"title"
:
"Physical Cell ID"
,
"description"
:
"Physical Cell ID"
,
"type"
:
"number"
,
"default"
:
1
},
"plmn_list"
:
{
"title"
:
"PLMN list"
,
"description"
:
"List of PLMNs broadcasted by the eNodeB, at most 6 (default: 00101)"
,
...
...
software/ors-amarisoft/instance-tdd1900-enb-input-schema.json
View file @
08268cff
...
...
@@ -51,6 +51,12 @@
"type"
:
"string"
,
"default"
:
"0x1A2D0"
},
"pci"
:
{
"title"
:
"Physical Cell ID"
,
"description"
:
"Physical Cell ID"
,
"type"
:
"number"
,
"default"
:
1
},
"plmn_list"
:
{
"title"
:
"PLMN list"
,
"description"
:
"List of PLMNs broadcasted by the eNodeB, at most 6 (default: 00101)"
,
...
...
software/ors-amarisoft/instance-tdd1900-gnb-epc-input-schema.json
View file @
08268cff
...
...
@@ -69,6 +69,12 @@
"type"
:
"string"
,
"default"
:
"0x12345"
},
"pci"
:
{
"title"
:
"Physical Cell ID"
,
"description"
:
"Physical Cell ID"
,
"type"
:
"number"
,
"default"
:
1
},
"ssb_pos_bitmap"
:
{
"title"
:
"SSB Position Bitmap"
,
"description"
:
"SSB position bitmap in bits (4, 8 or 64 bits depending on the DL frequency)."
,
...
...
software/ors-amarisoft/instance-tdd1900-gnb-input-schema.json
View file @
08268cff
...
...
@@ -57,6 +57,12 @@
"type"
:
"string"
,
"default"
:
"0x12345"
},
"pci"
:
{
"title"
:
"Physical Cell ID"
,
"description"
:
"Physical Cell ID"
,
"type"
:
"number"
,
"default"
:
1
},
"ssb_pos_bitmap"
:
{
"title"
:
"SSB Position Bitmap"
,
"description"
:
"SSB position bitmap in bits (4, 8 or 64 bits depending on the DL frequency)."
,
...
...
software/ors-amarisoft/instance-tdd2600-enb-epc-input-schema.json
View file @
08268cff
...
...
@@ -63,6 +63,12 @@
"type"
:
"string"
,
"default"
:
"0x1A2D0"
},
"pci"
:
{
"title"
:
"Physical Cell ID"
,
"description"
:
"Physical Cell ID"
,
"type"
:
"number"
,
"default"
:
1
},
"plmn_list"
:
{
"title"
:
"PLMN list"
,
"description"
:
"List of PLMNs broadcasted by the eNodeB, at most 6 (default: 00101)"
,
...
...
software/ors-amarisoft/instance-tdd2600-enb-input-schema.json
View file @
08268cff
...
...
@@ -51,6 +51,12 @@
"type"
:
"string"
,
"default"
:
"0x1A2D0"
},
"pci"
:
{
"title"
:
"Physical Cell ID"
,
"description"
:
"Physical Cell ID"
,
"type"
:
"number"
,
"default"
:
1
},
"plmn_list"
:
{
"title"
:
"PLMN list"
,
"description"
:
"List of PLMNs broadcasted by the eNodeB, at most 6 (default: 00101)"
,
...
...
software/ors-amarisoft/instance-tdd2600-gnb-epc-input-schema.json
View file @
08268cff
...
...
@@ -69,6 +69,12 @@
"type"
:
"string"
,
"default"
:
"0x12345"
},
"pci"
:
{
"title"
:
"Physical Cell ID"
,
"description"
:
"Physical Cell ID"
,
"type"
:
"number"
,
"default"
:
1
},
"ssb_pos_bitmap"
:
{
"title"
:
"SSB Position Bitmap"
,
"description"
:
"SSB position bitmap in bits (4, 8 or 64 bits depending on the DL frequency)."
,
...
...
software/ors-amarisoft/instance-tdd2600-gnb-input-schema.json
View file @
08268cff
...
...
@@ -57,6 +57,12 @@
"type"
:
"string"
,
"default"
:
"0x12345"
},
"pci"
:
{
"title"
:
"Physical Cell ID"
,
"description"
:
"Physical Cell ID"
,
"type"
:
"number"
,
"default"
:
1
},
"ssb_pos_bitmap"
:
{
"title"
:
"SSB Position Bitmap"
,
"description"
:
"SSB position bitmap in bits (4, 8 or 64 bits depending on the DL frequency)."
,
...
...
software/ors-amarisoft/instance-tdd3500-enb-epc-input-schema.json
View file @
08268cff
...
...
@@ -63,6 +63,12 @@
"type"
:
"string"
,
"default"
:
"0x1A2D0"
},
"pci"
:
{
"title"
:
"Physical Cell ID"
,
"description"
:
"Physical Cell ID"
,
"type"
:
"number"
,
"default"
:
1
},
"plmn_list"
:
{
"title"
:
"PLMN list"
,
"description"
:
"List of PLMNs broadcasted by the eNodeB, at most 6 (default: 00101)"
,
...
...
software/ors-amarisoft/instance-tdd3500-enb-input-schema.json
View file @
08268cff
...
...
@@ -51,6 +51,12 @@
"type"
:
"string"
,
"default"
:
"0x1A2D0"
},
"pci"
:
{
"title"
:
"Physical Cell ID"
,
"description"
:
"Physical Cell ID"
,
"type"
:
"number"
,
"default"
:
1
},
"plmn_list"
:
{
"title"
:
"PLMN list"
,
"description"
:
"List of PLMNs broadcasted by the eNodeB, at most 6 (default: 00101)"
,
...
...
software/ors-amarisoft/instance-tdd3500-gnb-epc-input-schema.json
View file @
08268cff
...
...
@@ -69,6 +69,12 @@
"type"
:
"string"
,
"default"
:
"0x12345"
},
"pci"
:
{
"title"
:
"Physical Cell ID"
,
"description"
:
"Physical Cell ID"
,
"type"
:
"number"
,
"default"
:
1
},
"ssb_pos_bitmap"
:
{
"title"
:
"SSB Position Bitmap"
,
"description"
:
"SSB position bitmap in bits (4, 8 or 64 bits depending on the DL frequency)."
,
...
...
software/ors-amarisoft/instance-tdd3500-gnb-input-schema.json
View file @
08268cff
...
...
@@ -57,6 +57,12 @@
"type"
:
"string"
,
"default"
:
"0x12345"
},
"pci"
:
{
"title"
:
"Physical Cell ID"
,
"description"
:
"Physical Cell ID"
,
"type"
:
"number"
,
"default"
:
1
},
"ssb_pos_bitmap"
:
{
"title"
:
"SSB Position Bitmap"
,
"description"
:
"SSB position bitmap in bits (4, 8 or 64 bits depending on the DL frequency)."
,
...
...
software/ors-amarisoft/instance-tdd3700-enb-epc-input-schema.json
View file @
08268cff
...
...
@@ -63,6 +63,12 @@
"type"
:
"string"
,
"default"
:
"0x1A2D0"
},
"pci"
:
{
"title"
:
"Physical Cell ID"
,
"description"
:
"Physical Cell ID"
,
"type"
:
"number"
,
"default"
:
1
},
"plmn_list"
:
{
"title"
:
"PLMN list"
,
"description"
:
"List of PLMNs broadcasted by the eNodeB, at most 6 (default: 00101)"
,
...
...
software/ors-amarisoft/instance-tdd3700-enb-input-schema.json
View file @
08268cff
...
...
@@ -51,6 +51,12 @@
"type"
:
"string"
,
"default"
:
"0x1A2D0"
},
"pci"
:
{
"title"
:
"Physical Cell ID"
,
"description"
:
"Physical Cell ID"
,
"type"
:
"number"
,
"default"
:
1
},
"plmn_list"
:
{
"title"
:
"PLMN list"
,
"description"
:
"List of PLMNs broadcasted by the eNodeB, at most 6 (default: 00101)"
,
...
...
software/ors-amarisoft/instance-tdd3700-gnb-epc-input-schema.json
View file @
08268cff
...
...
@@ -69,6 +69,12 @@
"type"
:
"string"
,
"default"
:
"0x12345"
},
"pci"
:
{
"title"
:
"Physical Cell ID"
,
"description"
:
"Physical Cell ID"
,
"type"
:
"number"
,
"default"
:
1
},
"ssb_pos_bitmap"
:
{
"title"
:
"SSB Position Bitmap"
,
"description"
:
"SSB position bitmap in bits (4, 8 or 64 bits depending on the DL frequency)."
,
...
...
software/ors-amarisoft/instance-tdd3700-gnb-input-schema.json
View file @
08268cff
...
...
@@ -57,6 +57,12 @@
"type"
:
"string"
,
"default"
:
"0x12345"
},
"pci"
:
{
"title"
:
"Physical Cell ID"
,
"description"
:
"Physical Cell ID"
,
"type"
:
"number"
,
"default"
:
1
},
"ssb_pos_bitmap"
:
{
"title"
:
"SSB Position Bitmap"
,
"description"
:
"SSB position bitmap in bits (4, 8 or 64 bits depending on the DL frequency)."
,
...
...
software/ors-amarisoft/promise/check_interface_up.py
→
software/ors-amarisoft/promise/check_interface_up.
jinja2.
py
View file @
08268cff
...
...
@@ -27,7 +27,12 @@ class RunPromise(GenericPromise):
In this case, check whether the file exists.
"""
ifname
=
self
.
getConfig
(
'ifname'
)
ifname
=
"{{ slapparameter_dict.get('tun-name', '') }}"
testing
=
{{
slapparameter_dict
.
get
(
'testing'
,
False
)
}}
if
testing
:
self
.
logger
.
info
(
"skipping promise"
)
return
f
=
open
(
'/sys/class/net/%s/operstate'
%
ifname
,
'r'
)
if
f
.
read
()
==
'up
\
n
'
:
...
...
software/ors-amarisoft/promise/check_sdr_busy.py
→
software/ors-amarisoft/promise/check_sdr_busy.
jinja2.
py
View file @
08268cff
...
...
@@ -27,7 +27,13 @@ class RunPromise(GenericPromise):
In this case, check whether the file exists.
"""
testing
=
{{
slapparameter_dict
.
get
(
'testing'
,
False
)
}}
sdr_dev
=
'/dev/sdr0'
if
testing
:
self
.
logger
.
info
(
"skipping promise"
)
return
try
:
open
(
sdr_dev
,
'w'
).
close
()
self
.
logger
.
error
(
"eNB is not using %s"
,
sdr_dev
)
...
...
software/ors-amarisoft/render-templates
View file @
08268cff
...
...
@@ -108,11 +108,16 @@ with open('instance-gnb-input-schema.jinja2.json', 'r') as f:
instance_gnb_json_template
=
Template
(
f
.
read
())
with
open
(
'software.jinja2.cfg'
,
'r'
)
as
f
:
software_template
=
Template
(
f
.
read
())
with
open
(
'test/test.jinja2.py'
,
'r'
)
as
f
:
test_template
=
Template
(
f
.
read
())
for
rf_mode_context
in
rf_mode_context_list
:
with
open
(
'software-{}.cfg.json'
.
format
(
rf_mode_context
[
'rf_mode'
]),
'w+'
)
as
f
:
f
.
write
(
software_json_template
.
render
(
**
rf_mode_context
,
**
global_context
)
+
'
\
n
'
)
with
open
(
'test/test{}.py'
.
format
(
rf_mode_context
[
'rf_mode'
].
upper
()),
'w+'
)
as
f
:
f
.
write
(
test_template
.
render
(
**
rf_mode_context
,
**
global_context
)
+
'
\
n
'
)
with
open
(
'software-{}.cfg'
.
format
(
rf_mode_context
[
'rf_mode'
]),
'w+'
)
as
f
:
f
.
write
(
software_template
.
render
(
**
rf_mode_context
,
**
global_context
)
+
'
\
n
'
)
...
...
software/ors-amarisoft/test/README.md
0 → 100644
View file @
08268cff
Tests for ors-amarisoft software release
software/ors-amarisoft/test/setup.py
0 → 100644
View file @
08268cff
##############################################################################
#
# Copyright (c) 2018 Nexedi SA 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.
#
##############################################################################
from
setuptools
import
setup
,
find_packages
version
=
'0.0.1.dev0'
name
=
'slapos.test.ors_amarisoft'
with
open
(
"README.md"
)
as
f
:
long_description
=
f
.
read
()
setup
(
name
=
name
,
version
=
version
,
description
=
"Test for SlapOS' ors-amarisoft"
,
long_description
=
long_description
,
long_description_content_type
=
'text/markdown'
,
maintainer
=
"Nexedi"
,
maintainer_email
=
"info@nexedi.com"
,
url
=
"https://lab.nexedi.com/nexedi/slapos"
,
packages
=
find_packages
(),
install_requires
=
[
'slapos.core'
,
'slapos.libnetworkcache'
,
'slapos.cookbook'
,
],
zip_safe
=
True
,
test_suite
=
'test'
,
)
software/ors-amarisoft/test/test.jinja2.py
0 → 100644
View file @
08268cff
##############################################################################
#
# Copyright (c) 2018 Nexedi SA 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
os
import
yaml
import
json
import
glob
from
slapos.testing.testcase
import
makeModuleSetUpAndTestCaseClass
setUpModule
,
ORSTestCase
=
makeModuleSetUpAndTestCaseClass
(
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'..'
,
'software-{{ rf_mode }}.cfg'
)))
class
TestGNBParameters
(
ORSTestCase
):
param_dict
=
{
'testing'
:
True
,
'nssai'
:
{
'1'
:
{
'sd'
:
'1'
,
'sst'
:
'10'
},
'2'
:
{
'sd'
:
'2'
,
'sst'
:
'20'
},
},
}
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
(
cls
.
param_dict
)}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"gnb"
def
test_gnb_conf
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'gnb.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
for
p
in
conf
[
'nr_cell_default'
][
'plmn_list'
][
0
][
'nssai'
]:
for
n
in
"sd sst"
.
split
():
self
.
assertEqual
(
p
[
n
],
self
.
param_dict
[
'nssai'
][
p
[
'sd'
]][
n
])
class
TestGNBParameters
(
ORSTestCase
):
param_dict
=
{
'testing'
:
True
,
'tx_gain'
:
17
,
'rx_gain'
:
17
,
'dl_nr_arfcn'
:
325320
,
'nr_band'
:
99
,
'nr_bandwidth'
:
50
,
'gnb_id'
:
"0x17"
,
'ssb_pos_bitmap'
:
"10"
,
'pci'
:
250
,
'plmn_list'
:
{
'00101'
:
{
'plmn'
:
'00101'
,
'ranac'
:
1
,
'reserved'
:
True
,
'tac'
:
1
},
'00102'
:
{
'plmn'
:
'00102'
,
'ranac'
:
2
,
'reserved'
:
False
,
'tac'
:
2
},
},
'amf_list'
:
{
'10.0.0.1'
:
{
'amf_addr'
:
'10.0.0.1'
},
'2001:db8::1'
:
{
'amf_addr'
:
'2001:db8::1'
},
},
}
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
(
cls
.
param_dict
)}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"gnb"
def
test_gnb_conf
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'gnb.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
self
.
assertEqual
(
conf
[
'tx_gain'
],
self
.
param_dict
[
'tx_gain'
])
self
.
assertEqual
(
conf
[
'rx_gain'
],
self
.
param_dict
[
'rx_gain'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'dl_nr_arfcn'
],
self
.
param_dict
[
'dl_nr_arfcn'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'band'
],
self
.
param_dict
[
'nr_band'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'ssb_pos_bitmap'
],
self
.
param_dict
[
'ssb_pos_bitmap'
])
self
.
assertEqual
(
conf
[
'nr_cell_default'
][
'n_id_cell'
],
self
.
param_dict
[
'pci'
])
self
.
assertEqual
(
conf
[
'gnb_id'
],
int
(
self
.
param_dict
[
'gnb_id'
],
16
))
for
p
in
conf
[
'nr_cell_default'
][
'plmn_list'
]:
for
n
in
"plmn ranac reserved tac"
.
split
():
self
.
assertEqual
(
p
[
n
],
self
.
param_dict
[
'plmn_list'
][
p
[
'plmn'
]][
n
])
for
p
in
conf
[
'amf_list'
]:
self
.
assertEqual
(
p
[
'amf_addr'
],
self
.
param_dict
[
'amf_list'
][
p
[
'amf_addr'
]][
'amf_addr'
])
with
open
(
conf_file
,
'r'
)
as
f
:
for
l
in
f
:
if
l
.
startswith
(
'#define NR_BANDWIDTH'
):
self
.
assertIn
(
str
(
self
.
param_dict
[
'nr_bandwidth'
]),
l
)
enb_param_dict
=
{
'testing'
:
True
,
'tx_gain'
:
17
,
'rx_gain'
:
17
,
'dl_earfcn'
:
325320
,
'n_rb_dl'
:
50
,
'enb_id'
:
"0x17"
,
'pci'
:
250
,
'plmn_list'
:
{
'00101'
:
{
'attach_without_pdn'
:
True
,
'plmn'
:
'00101'
,
'reserved'
:
True
},
'00102'
:
{
'attach_without_pdn'
:
False
,
'plmn'
:
'00102'
,
'reserved'
:
False
},
},
'mme_list'
:
{
'10.0.0.1'
:
{
'mme_addr'
:
'10.0.0.1'
},
'2001:db8::1'
:
{
'mme_addr'
:
'2001:db8::1'
},
},
}
epc_param_dict
=
{
'testing'
:
True
,
'epc_plmn'
:
'00102'
,
}
def
test_enb_conf
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'enb.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
self
.
assertEqual
(
conf
[
'tx_gain'
],
enb_param_dict
[
'tx_gain'
])
self
.
assertEqual
(
conf
[
'rx_gain'
],
enb_param_dict
[
'rx_gain'
])
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'dl_earfcn'
],
enb_param_dict
[
'dl_earfcn'
])
self
.
assertEqual
(
conf
[
'enb_id'
],
int
(
enb_param_dict
[
'enb_id'
],
16
))
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'n_id_cell'
],
enb_param_dict
[
'pci'
])
for
p
in
conf
[
'cell_list'
][
0
][
'plmn_list'
]:
for
n
in
"plmn attach_without_pdn reserved"
.
split
():
self
.
assertEqual
(
p
[
n
],
enb_param_dict
[
'plmn_list'
][
p
[
'plmn'
]][
n
])
for
p
in
conf
[
'mme_list'
]:
self
.
assertEqual
(
p
[
'mme_addr'
],
enb_param_dict
[
'mme_list'
][
p
[
'mme_addr'
]][
'mme_addr'
])
with
open
(
conf_file
,
'r'
)
as
f
:
for
l
in
f
:
if
l
.
startswith
(
'#define N_RB_DL'
):
self
.
assertIn
(
str
(
enb_param_dict
[
'n_rb_dl'
]),
l
)
def
test_mme_conf
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'mme.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
self
.
assertEqual
(
conf
[
'plmn'
],
epc_param_dict
[
'epc_plmn'
])
class
TestENBParameters
(
ORSTestCase
):
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
(
enb_param_dict
)}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"enb"
def
test_enb_conf
(
self
):
test_enb_conf
(
self
)
class
TestEPCParameters
(
ORSTestCase
):
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
(
epc_param_dict
)}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"epc"
def
test_mme_conf
(
self
):
test_mme_conf
(
self
)
class
TestENBEPCParameters
(
ORSTestCase
):
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
(
dict
(
enb_param_dict
,
**
epc_param_dict
)),
}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"enb-epc"
def
test_enb_conf
(
self
):
test_enb_conf
(
self
)
def
test_mme_conf
(
self
):
test_mme_conf
(
self
)
sim_card_param_dict
=
{
"sim_algo"
:
"milenage"
,
"imsi"
:
"001010000000331"
,
"opc"
:
"000102030405060708090A0B0C0D0E0F"
,
"amf"
:
"0x9001"
,
"sqn"
:
"000000000000"
,
"k"
:
"00112233445566778899AABBCCDDEEFF"
,
"impu"
:
"impu331"
,
"impi"
:
"impi331@amarisoft.com"
,
}
def
test_ue_db
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'ue_db.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
for
n
in
"sim_algo imsi opc sqn impu impi"
.
split
():
self
.
assertEqual
(
conf
[
'ue_db'
][
0
][
n
],
sim_card_param_dict
[
n
])
self
.
assertEqual
(
conf
[
'ue_db'
][
0
][
'K'
],
sim_card_param_dict
[
'k'
])
self
.
assertEqual
(
conf
[
'ue_db'
][
0
][
'amf'
],
int
(
sim_card_param_dict
[
'amf'
],
16
))
def
requestSlaveInstance
(
cls
,
software_type
):
software_url
=
cls
.
getSoftwareURL
()
return
cls
.
slap
.
request
(
software_release
=
software_url
,
partition_reference
=
"SIM-CARD-EPC"
,
partition_parameter_kw
=
{
'_'
:
json
.
dumps
(
sim_card_param_dict
)},
shared
=
True
,
software_type
=
software_type
,
)
class
TestEPCSimCard
(
ORSTestCase
):
@
classmethod
def
requestDefaultInstance
(
cls
,
state
=
'started'
):
default_instance
=
super
(
ORSTestCase
,
cls
).
requestDefaultInstance
(
state
=
state
)
cls
.
requestSlaveInstance
()
return
default_instance
@
classmethod
def
requestSlaveInstance
(
cls
):
requestSlaveInstance
(
cls
,
'epc'
)
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
({
'testing'
:
True
})
}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"epc"
def
test_sim_card
(
self
):
self
.
slap
.
waitForInstance
()
# Wait until publish is done
test_ue_db
(
self
)
class
TestENBEPCSimCard
(
ORSTestCase
):
@
classmethod
def
requestDefaultInstance
(
cls
,
state
=
'started'
):
default_instance
=
super
(
ORSTestCase
,
cls
).
requestDefaultInstance
(
state
=
state
)
cls
.
requestSlaveInstance
()
return
default_instance
@
classmethod
def
requestSlaveInstance
(
cls
):
requestSlaveInstance
(
cls
,
'enb-epc'
)
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
({
'testing'
:
True
})
}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"enb-epc"
def
test_sim_card
(
self
):
self
.
slap
.
waitForInstance
()
# Wait until publish is done
test_ue_db
(
self
)
class
TestGNBEPCSimCard
(
ORSTestCase
):
@
classmethod
def
requestDefaultInstance
(
cls
,
state
=
'started'
):
default_instance
=
super
(
ORSTestCase
,
cls
).
requestDefaultInstance
(
state
=
state
)
cls
.
requestSlaveInstance
()
return
default_instance
@
classmethod
def
requestSlaveInstance
(
cls
):
requestSlaveInstance
(
cls
,
'gnb-epc'
)
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
({
'testing'
:
True
})
}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"gnb-epc"
def
test_sim_card
(
self
):
self
.
slap
.
waitForInstance
()
# Wait until publish is done
test_ue_db
(
self
)
software/ors-amarisoft/test/testTDD1900.py
0 → 100644
View file @
08268cff
##############################################################################
#
# Copyright (c) 2018 Nexedi SA 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
os
import
yaml
import
json
import
glob
from
slapos.testing.testcase
import
makeModuleSetUpAndTestCaseClass
setUpModule
,
ORSTestCase
=
makeModuleSetUpAndTestCaseClass
(
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'..'
,
'software-tdd1900.cfg'
)))
class
TestGNBParameters
(
ORSTestCase
):
param_dict
=
{
'testing'
:
True
,
'nssai'
:
{
'1'
:
{
'sd'
:
'1'
,
'sst'
:
'10'
},
'2'
:
{
'sd'
:
'2'
,
'sst'
:
'20'
},
},
}
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
(
cls
.
param_dict
)}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"gnb"
def
test_gnb_conf
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'gnb.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
for
p
in
conf
[
'nr_cell_default'
][
'plmn_list'
][
0
][
'nssai'
]:
for
n
in
"sd sst"
.
split
():
self
.
assertEqual
(
p
[
n
],
self
.
param_dict
[
'nssai'
][
p
[
'sd'
]][
n
])
class
TestGNBParameters
(
ORSTestCase
):
param_dict
=
{
'testing'
:
True
,
'tx_gain'
:
17
,
'rx_gain'
:
17
,
'dl_nr_arfcn'
:
325320
,
'nr_band'
:
99
,
'nr_bandwidth'
:
50
,
'gnb_id'
:
"0x17"
,
'ssb_pos_bitmap'
:
"10"
,
'pci'
:
250
,
'plmn_list'
:
{
'00101'
:
{
'plmn'
:
'00101'
,
'ranac'
:
1
,
'reserved'
:
True
,
'tac'
:
1
},
'00102'
:
{
'plmn'
:
'00102'
,
'ranac'
:
2
,
'reserved'
:
False
,
'tac'
:
2
},
},
'amf_list'
:
{
'10.0.0.1'
:
{
'amf_addr'
:
'10.0.0.1'
},
'2001:db8::1'
:
{
'amf_addr'
:
'2001:db8::1'
},
},
}
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
(
cls
.
param_dict
)}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"gnb"
def
test_gnb_conf
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'gnb.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
self
.
assertEqual
(
conf
[
'tx_gain'
],
self
.
param_dict
[
'tx_gain'
])
self
.
assertEqual
(
conf
[
'rx_gain'
],
self
.
param_dict
[
'rx_gain'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'dl_nr_arfcn'
],
self
.
param_dict
[
'dl_nr_arfcn'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'band'
],
self
.
param_dict
[
'nr_band'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'ssb_pos_bitmap'
],
self
.
param_dict
[
'ssb_pos_bitmap'
])
self
.
assertEqual
(
conf
[
'nr_cell_default'
][
'n_id_cell'
],
self
.
param_dict
[
'pci'
])
self
.
assertEqual
(
conf
[
'gnb_id'
],
int
(
self
.
param_dict
[
'gnb_id'
],
16
))
for
p
in
conf
[
'nr_cell_default'
][
'plmn_list'
]:
for
n
in
"plmn ranac reserved tac"
.
split
():
self
.
assertEqual
(
p
[
n
],
self
.
param_dict
[
'plmn_list'
][
p
[
'plmn'
]][
n
])
for
p
in
conf
[
'amf_list'
]:
self
.
assertEqual
(
p
[
'amf_addr'
],
self
.
param_dict
[
'amf_list'
][
p
[
'amf_addr'
]][
'amf_addr'
])
with
open
(
conf_file
,
'r'
)
as
f
:
for
l
in
f
:
if
l
.
startswith
(
'#define NR_BANDWIDTH'
):
self
.
assertIn
(
str
(
self
.
param_dict
[
'nr_bandwidth'
]),
l
)
enb_param_dict
=
{
'testing'
:
True
,
'tx_gain'
:
17
,
'rx_gain'
:
17
,
'dl_earfcn'
:
325320
,
'n_rb_dl'
:
50
,
'enb_id'
:
"0x17"
,
'pci'
:
250
,
'plmn_list'
:
{
'00101'
:
{
'attach_without_pdn'
:
True
,
'plmn'
:
'00101'
,
'reserved'
:
True
},
'00102'
:
{
'attach_without_pdn'
:
False
,
'plmn'
:
'00102'
,
'reserved'
:
False
},
},
'mme_list'
:
{
'10.0.0.1'
:
{
'mme_addr'
:
'10.0.0.1'
},
'2001:db8::1'
:
{
'mme_addr'
:
'2001:db8::1'
},
},
}
epc_param_dict
=
{
'testing'
:
True
,
'epc_plmn'
:
'00102'
,
}
def
test_enb_conf
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'enb.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
self
.
assertEqual
(
conf
[
'tx_gain'
],
enb_param_dict
[
'tx_gain'
])
self
.
assertEqual
(
conf
[
'rx_gain'
],
enb_param_dict
[
'rx_gain'
])
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'dl_earfcn'
],
enb_param_dict
[
'dl_earfcn'
])
self
.
assertEqual
(
conf
[
'enb_id'
],
int
(
enb_param_dict
[
'enb_id'
],
16
))
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'n_id_cell'
],
enb_param_dict
[
'pci'
])
for
p
in
conf
[
'cell_list'
][
0
][
'plmn_list'
]:
for
n
in
"plmn attach_without_pdn reserved"
.
split
():
self
.
assertEqual
(
p
[
n
],
enb_param_dict
[
'plmn_list'
][
p
[
'plmn'
]][
n
])
for
p
in
conf
[
'mme_list'
]:
self
.
assertEqual
(
p
[
'mme_addr'
],
enb_param_dict
[
'mme_list'
][
p
[
'mme_addr'
]][
'mme_addr'
])
with
open
(
conf_file
,
'r'
)
as
f
:
for
l
in
f
:
if
l
.
startswith
(
'#define N_RB_DL'
):
self
.
assertIn
(
str
(
enb_param_dict
[
'n_rb_dl'
]),
l
)
def
test_mme_conf
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'mme.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
self
.
assertEqual
(
conf
[
'plmn'
],
epc_param_dict
[
'epc_plmn'
])
class
TestENBParameters
(
ORSTestCase
):
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
(
enb_param_dict
)}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"enb"
def
test_enb_conf
(
self
):
test_enb_conf
(
self
)
class
TestEPCParameters
(
ORSTestCase
):
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
(
epc_param_dict
)}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"epc"
def
test_mme_conf
(
self
):
test_mme_conf
(
self
)
class
TestENBEPCParameters
(
ORSTestCase
):
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
(
dict
(
enb_param_dict
,
**
epc_param_dict
)),
}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"enb-epc"
def
test_enb_conf
(
self
):
test_enb_conf
(
self
)
def
test_mme_conf
(
self
):
test_mme_conf
(
self
)
sim_card_param_dict
=
{
"sim_algo"
:
"milenage"
,
"imsi"
:
"001010000000331"
,
"opc"
:
"000102030405060708090A0B0C0D0E0F"
,
"amf"
:
"0x9001"
,
"sqn"
:
"000000000000"
,
"k"
:
"00112233445566778899AABBCCDDEEFF"
,
"impu"
:
"impu331"
,
"impi"
:
"impi331@amarisoft.com"
,
}
def
test_ue_db
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'ue_db.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
for
n
in
"sim_algo imsi opc sqn impu impi"
.
split
():
self
.
assertEqual
(
conf
[
'ue_db'
][
0
][
n
],
sim_card_param_dict
[
n
])
self
.
assertEqual
(
conf
[
'ue_db'
][
0
][
'K'
],
sim_card_param_dict
[
'k'
])
self
.
assertEqual
(
conf
[
'ue_db'
][
0
][
'amf'
],
int
(
sim_card_param_dict
[
'amf'
],
16
))
def
requestSlaveInstance
(
cls
,
software_type
):
software_url
=
cls
.
getSoftwareURL
()
return
cls
.
slap
.
request
(
software_release
=
software_url
,
partition_reference
=
"SIM-CARD-EPC"
,
partition_parameter_kw
=
{
'_'
:
json
.
dumps
(
sim_card_param_dict
)},
shared
=
True
,
software_type
=
software_type
,
)
class
TestEPCSimCard
(
ORSTestCase
):
@
classmethod
def
requestDefaultInstance
(
cls
,
state
=
'started'
):
default_instance
=
super
(
ORSTestCase
,
cls
).
requestDefaultInstance
(
state
=
state
)
cls
.
requestSlaveInstance
()
return
default_instance
@
classmethod
def
requestSlaveInstance
(
cls
):
requestSlaveInstance
(
cls
,
'epc'
)
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
({
'testing'
:
True
})
}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"epc"
def
test_sim_card
(
self
):
self
.
slap
.
waitForInstance
()
# Wait until publish is done
test_ue_db
(
self
)
class
TestENBEPCSimCard
(
ORSTestCase
):
@
classmethod
def
requestDefaultInstance
(
cls
,
state
=
'started'
):
default_instance
=
super
(
ORSTestCase
,
cls
).
requestDefaultInstance
(
state
=
state
)
cls
.
requestSlaveInstance
()
return
default_instance
@
classmethod
def
requestSlaveInstance
(
cls
):
requestSlaveInstance
(
cls
,
'enb-epc'
)
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
({
'testing'
:
True
})
}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"enb-epc"
def
test_sim_card
(
self
):
self
.
slap
.
waitForInstance
()
# Wait until publish is done
test_ue_db
(
self
)
class
TestGNBEPCSimCard
(
ORSTestCase
):
@
classmethod
def
requestDefaultInstance
(
cls
,
state
=
'started'
):
default_instance
=
super
(
ORSTestCase
,
cls
).
requestDefaultInstance
(
state
=
state
)
cls
.
requestSlaveInstance
()
return
default_instance
@
classmethod
def
requestSlaveInstance
(
cls
):
requestSlaveInstance
(
cls
,
'gnb-epc'
)
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
({
'testing'
:
True
})
}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"gnb-epc"
def
test_sim_card
(
self
):
self
.
slap
.
waitForInstance
()
# Wait until publish is done
test_ue_db
(
self
)
software/ors-amarisoft/test/testTDD2600.py
0 → 100644
View file @
08268cff
##############################################################################
#
# Copyright (c) 2018 Nexedi SA 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
os
import
yaml
import
json
import
glob
from
slapos.testing.testcase
import
makeModuleSetUpAndTestCaseClass
setUpModule
,
ORSTestCase
=
makeModuleSetUpAndTestCaseClass
(
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'..'
,
'software-tdd2600.cfg'
)))
class
TestGNBParameters
(
ORSTestCase
):
param_dict
=
{
'testing'
:
True
,
'nssai'
:
{
'1'
:
{
'sd'
:
'1'
,
'sst'
:
'10'
},
'2'
:
{
'sd'
:
'2'
,
'sst'
:
'20'
},
},
}
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
(
cls
.
param_dict
)}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"gnb"
def
test_gnb_conf
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'gnb.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
for
p
in
conf
[
'nr_cell_default'
][
'plmn_list'
][
0
][
'nssai'
]:
for
n
in
"sd sst"
.
split
():
self
.
assertEqual
(
p
[
n
],
self
.
param_dict
[
'nssai'
][
p
[
'sd'
]][
n
])
class
TestGNBParameters
(
ORSTestCase
):
param_dict
=
{
'testing'
:
True
,
'tx_gain'
:
17
,
'rx_gain'
:
17
,
'dl_nr_arfcn'
:
325320
,
'nr_band'
:
99
,
'nr_bandwidth'
:
50
,
'gnb_id'
:
"0x17"
,
'ssb_pos_bitmap'
:
"10"
,
'pci'
:
250
,
'plmn_list'
:
{
'00101'
:
{
'plmn'
:
'00101'
,
'ranac'
:
1
,
'reserved'
:
True
,
'tac'
:
1
},
'00102'
:
{
'plmn'
:
'00102'
,
'ranac'
:
2
,
'reserved'
:
False
,
'tac'
:
2
},
},
'amf_list'
:
{
'10.0.0.1'
:
{
'amf_addr'
:
'10.0.0.1'
},
'2001:db8::1'
:
{
'amf_addr'
:
'2001:db8::1'
},
},
}
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
(
cls
.
param_dict
)}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"gnb"
def
test_gnb_conf
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'gnb.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
self
.
assertEqual
(
conf
[
'tx_gain'
],
self
.
param_dict
[
'tx_gain'
])
self
.
assertEqual
(
conf
[
'rx_gain'
],
self
.
param_dict
[
'rx_gain'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'dl_nr_arfcn'
],
self
.
param_dict
[
'dl_nr_arfcn'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'band'
],
self
.
param_dict
[
'nr_band'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'ssb_pos_bitmap'
],
self
.
param_dict
[
'ssb_pos_bitmap'
])
self
.
assertEqual
(
conf
[
'nr_cell_default'
][
'n_id_cell'
],
self
.
param_dict
[
'pci'
])
self
.
assertEqual
(
conf
[
'gnb_id'
],
int
(
self
.
param_dict
[
'gnb_id'
],
16
))
for
p
in
conf
[
'nr_cell_default'
][
'plmn_list'
]:
for
n
in
"plmn ranac reserved tac"
.
split
():
self
.
assertEqual
(
p
[
n
],
self
.
param_dict
[
'plmn_list'
][
p
[
'plmn'
]][
n
])
for
p
in
conf
[
'amf_list'
]:
self
.
assertEqual
(
p
[
'amf_addr'
],
self
.
param_dict
[
'amf_list'
][
p
[
'amf_addr'
]][
'amf_addr'
])
with
open
(
conf_file
,
'r'
)
as
f
:
for
l
in
f
:
if
l
.
startswith
(
'#define NR_BANDWIDTH'
):
self
.
assertIn
(
str
(
self
.
param_dict
[
'nr_bandwidth'
]),
l
)
enb_param_dict
=
{
'testing'
:
True
,
'tx_gain'
:
17
,
'rx_gain'
:
17
,
'dl_earfcn'
:
325320
,
'n_rb_dl'
:
50
,
'enb_id'
:
"0x17"
,
'pci'
:
250
,
'plmn_list'
:
{
'00101'
:
{
'attach_without_pdn'
:
True
,
'plmn'
:
'00101'
,
'reserved'
:
True
},
'00102'
:
{
'attach_without_pdn'
:
False
,
'plmn'
:
'00102'
,
'reserved'
:
False
},
},
'mme_list'
:
{
'10.0.0.1'
:
{
'mme_addr'
:
'10.0.0.1'
},
'2001:db8::1'
:
{
'mme_addr'
:
'2001:db8::1'
},
},
}
epc_param_dict
=
{
'testing'
:
True
,
'epc_plmn'
:
'00102'
,
}
def
test_enb_conf
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'enb.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
self
.
assertEqual
(
conf
[
'tx_gain'
],
enb_param_dict
[
'tx_gain'
])
self
.
assertEqual
(
conf
[
'rx_gain'
],
enb_param_dict
[
'rx_gain'
])
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'dl_earfcn'
],
enb_param_dict
[
'dl_earfcn'
])
self
.
assertEqual
(
conf
[
'enb_id'
],
int
(
enb_param_dict
[
'enb_id'
],
16
))
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'n_id_cell'
],
enb_param_dict
[
'pci'
])
for
p
in
conf
[
'cell_list'
][
0
][
'plmn_list'
]:
for
n
in
"plmn attach_without_pdn reserved"
.
split
():
self
.
assertEqual
(
p
[
n
],
enb_param_dict
[
'plmn_list'
][
p
[
'plmn'
]][
n
])
for
p
in
conf
[
'mme_list'
]:
self
.
assertEqual
(
p
[
'mme_addr'
],
enb_param_dict
[
'mme_list'
][
p
[
'mme_addr'
]][
'mme_addr'
])
with
open
(
conf_file
,
'r'
)
as
f
:
for
l
in
f
:
if
l
.
startswith
(
'#define N_RB_DL'
):
self
.
assertIn
(
str
(
enb_param_dict
[
'n_rb_dl'
]),
l
)
def
test_mme_conf
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'mme.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
self
.
assertEqual
(
conf
[
'plmn'
],
epc_param_dict
[
'epc_plmn'
])
class
TestENBParameters
(
ORSTestCase
):
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
(
enb_param_dict
)}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"enb"
def
test_enb_conf
(
self
):
test_enb_conf
(
self
)
class
TestEPCParameters
(
ORSTestCase
):
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
(
epc_param_dict
)}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"epc"
def
test_mme_conf
(
self
):
test_mme_conf
(
self
)
class
TestENBEPCParameters
(
ORSTestCase
):
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
(
dict
(
enb_param_dict
,
**
epc_param_dict
)),
}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"enb-epc"
def
test_enb_conf
(
self
):
test_enb_conf
(
self
)
def
test_mme_conf
(
self
):
test_mme_conf
(
self
)
sim_card_param_dict
=
{
"sim_algo"
:
"milenage"
,
"imsi"
:
"001010000000331"
,
"opc"
:
"000102030405060708090A0B0C0D0E0F"
,
"amf"
:
"0x9001"
,
"sqn"
:
"000000000000"
,
"k"
:
"00112233445566778899AABBCCDDEEFF"
,
"impu"
:
"impu331"
,
"impi"
:
"impi331@amarisoft.com"
,
}
def
test_ue_db
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'ue_db.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
for
n
in
"sim_algo imsi opc sqn impu impi"
.
split
():
self
.
assertEqual
(
conf
[
'ue_db'
][
0
][
n
],
sim_card_param_dict
[
n
])
self
.
assertEqual
(
conf
[
'ue_db'
][
0
][
'K'
],
sim_card_param_dict
[
'k'
])
self
.
assertEqual
(
conf
[
'ue_db'
][
0
][
'amf'
],
int
(
sim_card_param_dict
[
'amf'
],
16
))
def
requestSlaveInstance
(
cls
,
software_type
):
software_url
=
cls
.
getSoftwareURL
()
return
cls
.
slap
.
request
(
software_release
=
software_url
,
partition_reference
=
"SIM-CARD-EPC"
,
partition_parameter_kw
=
{
'_'
:
json
.
dumps
(
sim_card_param_dict
)},
shared
=
True
,
software_type
=
software_type
,
)
class
TestEPCSimCard
(
ORSTestCase
):
@
classmethod
def
requestDefaultInstance
(
cls
,
state
=
'started'
):
default_instance
=
super
(
ORSTestCase
,
cls
).
requestDefaultInstance
(
state
=
state
)
cls
.
requestSlaveInstance
()
return
default_instance
@
classmethod
def
requestSlaveInstance
(
cls
):
requestSlaveInstance
(
cls
,
'epc'
)
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
({
'testing'
:
True
})
}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"epc"
def
test_sim_card
(
self
):
self
.
slap
.
waitForInstance
()
# Wait until publish is done
test_ue_db
(
self
)
class
TestENBEPCSimCard
(
ORSTestCase
):
@
classmethod
def
requestDefaultInstance
(
cls
,
state
=
'started'
):
default_instance
=
super
(
ORSTestCase
,
cls
).
requestDefaultInstance
(
state
=
state
)
cls
.
requestSlaveInstance
()
return
default_instance
@
classmethod
def
requestSlaveInstance
(
cls
):
requestSlaveInstance
(
cls
,
'enb-epc'
)
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
({
'testing'
:
True
})
}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"enb-epc"
def
test_sim_card
(
self
):
self
.
slap
.
waitForInstance
()
# Wait until publish is done
test_ue_db
(
self
)
class
TestGNBEPCSimCard
(
ORSTestCase
):
@
classmethod
def
requestDefaultInstance
(
cls
,
state
=
'started'
):
default_instance
=
super
(
ORSTestCase
,
cls
).
requestDefaultInstance
(
state
=
state
)
cls
.
requestSlaveInstance
()
return
default_instance
@
classmethod
def
requestSlaveInstance
(
cls
):
requestSlaveInstance
(
cls
,
'gnb-epc'
)
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
({
'testing'
:
True
})
}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"gnb-epc"
def
test_sim_card
(
self
):
self
.
slap
.
waitForInstance
()
# Wait until publish is done
test_ue_db
(
self
)
software/ors-amarisoft/test/testTDD3500.py
0 → 100644
View file @
08268cff
##############################################################################
#
# Copyright (c) 2018 Nexedi SA 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
os
import
yaml
import
json
import
glob
from
slapos.testing.testcase
import
makeModuleSetUpAndTestCaseClass
setUpModule
,
ORSTestCase
=
makeModuleSetUpAndTestCaseClass
(
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'..'
,
'software-tdd3500.cfg'
)))
class
TestGNBParameters
(
ORSTestCase
):
param_dict
=
{
'testing'
:
True
,
'nssai'
:
{
'1'
:
{
'sd'
:
'1'
,
'sst'
:
'10'
},
'2'
:
{
'sd'
:
'2'
,
'sst'
:
'20'
},
},
}
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
(
cls
.
param_dict
)}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"gnb"
def
test_gnb_conf
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'gnb.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
for
p
in
conf
[
'nr_cell_default'
][
'plmn_list'
][
0
][
'nssai'
]:
for
n
in
"sd sst"
.
split
():
self
.
assertEqual
(
p
[
n
],
self
.
param_dict
[
'nssai'
][
p
[
'sd'
]][
n
])
class
TestGNBParameters
(
ORSTestCase
):
param_dict
=
{
'testing'
:
True
,
'tx_gain'
:
17
,
'rx_gain'
:
17
,
'dl_nr_arfcn'
:
325320
,
'nr_band'
:
99
,
'nr_bandwidth'
:
50
,
'gnb_id'
:
"0x17"
,
'ssb_pos_bitmap'
:
"10"
,
'pci'
:
250
,
'plmn_list'
:
{
'00101'
:
{
'plmn'
:
'00101'
,
'ranac'
:
1
,
'reserved'
:
True
,
'tac'
:
1
},
'00102'
:
{
'plmn'
:
'00102'
,
'ranac'
:
2
,
'reserved'
:
False
,
'tac'
:
2
},
},
'amf_list'
:
{
'10.0.0.1'
:
{
'amf_addr'
:
'10.0.0.1'
},
'2001:db8::1'
:
{
'amf_addr'
:
'2001:db8::1'
},
},
}
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
(
cls
.
param_dict
)}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"gnb"
def
test_gnb_conf
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'gnb.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
self
.
assertEqual
(
conf
[
'tx_gain'
],
self
.
param_dict
[
'tx_gain'
])
self
.
assertEqual
(
conf
[
'rx_gain'
],
self
.
param_dict
[
'rx_gain'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'dl_nr_arfcn'
],
self
.
param_dict
[
'dl_nr_arfcn'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'band'
],
self
.
param_dict
[
'nr_band'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'ssb_pos_bitmap'
],
self
.
param_dict
[
'ssb_pos_bitmap'
])
self
.
assertEqual
(
conf
[
'nr_cell_default'
][
'n_id_cell'
],
self
.
param_dict
[
'pci'
])
self
.
assertEqual
(
conf
[
'gnb_id'
],
int
(
self
.
param_dict
[
'gnb_id'
],
16
))
for
p
in
conf
[
'nr_cell_default'
][
'plmn_list'
]:
for
n
in
"plmn ranac reserved tac"
.
split
():
self
.
assertEqual
(
p
[
n
],
self
.
param_dict
[
'plmn_list'
][
p
[
'plmn'
]][
n
])
for
p
in
conf
[
'amf_list'
]:
self
.
assertEqual
(
p
[
'amf_addr'
],
self
.
param_dict
[
'amf_list'
][
p
[
'amf_addr'
]][
'amf_addr'
])
with
open
(
conf_file
,
'r'
)
as
f
:
for
l
in
f
:
if
l
.
startswith
(
'#define NR_BANDWIDTH'
):
self
.
assertIn
(
str
(
self
.
param_dict
[
'nr_bandwidth'
]),
l
)
enb_param_dict
=
{
'testing'
:
True
,
'tx_gain'
:
17
,
'rx_gain'
:
17
,
'dl_earfcn'
:
325320
,
'n_rb_dl'
:
50
,
'enb_id'
:
"0x17"
,
'pci'
:
250
,
'plmn_list'
:
{
'00101'
:
{
'attach_without_pdn'
:
True
,
'plmn'
:
'00101'
,
'reserved'
:
True
},
'00102'
:
{
'attach_without_pdn'
:
False
,
'plmn'
:
'00102'
,
'reserved'
:
False
},
},
'mme_list'
:
{
'10.0.0.1'
:
{
'mme_addr'
:
'10.0.0.1'
},
'2001:db8::1'
:
{
'mme_addr'
:
'2001:db8::1'
},
},
}
epc_param_dict
=
{
'testing'
:
True
,
'epc_plmn'
:
'00102'
,
}
def
test_enb_conf
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'enb.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
self
.
assertEqual
(
conf
[
'tx_gain'
],
enb_param_dict
[
'tx_gain'
])
self
.
assertEqual
(
conf
[
'rx_gain'
],
enb_param_dict
[
'rx_gain'
])
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'dl_earfcn'
],
enb_param_dict
[
'dl_earfcn'
])
self
.
assertEqual
(
conf
[
'enb_id'
],
int
(
enb_param_dict
[
'enb_id'
],
16
))
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'n_id_cell'
],
enb_param_dict
[
'pci'
])
for
p
in
conf
[
'cell_list'
][
0
][
'plmn_list'
]:
for
n
in
"plmn attach_without_pdn reserved"
.
split
():
self
.
assertEqual
(
p
[
n
],
enb_param_dict
[
'plmn_list'
][
p
[
'plmn'
]][
n
])
for
p
in
conf
[
'mme_list'
]:
self
.
assertEqual
(
p
[
'mme_addr'
],
enb_param_dict
[
'mme_list'
][
p
[
'mme_addr'
]][
'mme_addr'
])
with
open
(
conf_file
,
'r'
)
as
f
:
for
l
in
f
:
if
l
.
startswith
(
'#define N_RB_DL'
):
self
.
assertIn
(
str
(
enb_param_dict
[
'n_rb_dl'
]),
l
)
def
test_mme_conf
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'mme.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
self
.
assertEqual
(
conf
[
'plmn'
],
epc_param_dict
[
'epc_plmn'
])
class
TestENBParameters
(
ORSTestCase
):
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
(
enb_param_dict
)}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"enb"
def
test_enb_conf
(
self
):
test_enb_conf
(
self
)
class
TestEPCParameters
(
ORSTestCase
):
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
(
epc_param_dict
)}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"epc"
def
test_mme_conf
(
self
):
test_mme_conf
(
self
)
class
TestENBEPCParameters
(
ORSTestCase
):
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
(
dict
(
enb_param_dict
,
**
epc_param_dict
)),
}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"enb-epc"
def
test_enb_conf
(
self
):
test_enb_conf
(
self
)
def
test_mme_conf
(
self
):
test_mme_conf
(
self
)
sim_card_param_dict
=
{
"sim_algo"
:
"milenage"
,
"imsi"
:
"001010000000331"
,
"opc"
:
"000102030405060708090A0B0C0D0E0F"
,
"amf"
:
"0x9001"
,
"sqn"
:
"000000000000"
,
"k"
:
"00112233445566778899AABBCCDDEEFF"
,
"impu"
:
"impu331"
,
"impi"
:
"impi331@amarisoft.com"
,
}
def
test_ue_db
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'ue_db.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
for
n
in
"sim_algo imsi opc sqn impu impi"
.
split
():
self
.
assertEqual
(
conf
[
'ue_db'
][
0
][
n
],
sim_card_param_dict
[
n
])
self
.
assertEqual
(
conf
[
'ue_db'
][
0
][
'K'
],
sim_card_param_dict
[
'k'
])
self
.
assertEqual
(
conf
[
'ue_db'
][
0
][
'amf'
],
int
(
sim_card_param_dict
[
'amf'
],
16
))
def
requestSlaveInstance
(
cls
,
software_type
):
software_url
=
cls
.
getSoftwareURL
()
return
cls
.
slap
.
request
(
software_release
=
software_url
,
partition_reference
=
"SIM-CARD-EPC"
,
partition_parameter_kw
=
{
'_'
:
json
.
dumps
(
sim_card_param_dict
)},
shared
=
True
,
software_type
=
software_type
,
)
class
TestEPCSimCard
(
ORSTestCase
):
@
classmethod
def
requestDefaultInstance
(
cls
,
state
=
'started'
):
default_instance
=
super
(
ORSTestCase
,
cls
).
requestDefaultInstance
(
state
=
state
)
cls
.
requestSlaveInstance
()
return
default_instance
@
classmethod
def
requestSlaveInstance
(
cls
):
requestSlaveInstance
(
cls
,
'epc'
)
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
({
'testing'
:
True
})
}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"epc"
def
test_sim_card
(
self
):
self
.
slap
.
waitForInstance
()
# Wait until publish is done
test_ue_db
(
self
)
class
TestENBEPCSimCard
(
ORSTestCase
):
@
classmethod
def
requestDefaultInstance
(
cls
,
state
=
'started'
):
default_instance
=
super
(
ORSTestCase
,
cls
).
requestDefaultInstance
(
state
=
state
)
cls
.
requestSlaveInstance
()
return
default_instance
@
classmethod
def
requestSlaveInstance
(
cls
):
requestSlaveInstance
(
cls
,
'enb-epc'
)
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
({
'testing'
:
True
})
}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"enb-epc"
def
test_sim_card
(
self
):
self
.
slap
.
waitForInstance
()
# Wait until publish is done
test_ue_db
(
self
)
class
TestGNBEPCSimCard
(
ORSTestCase
):
@
classmethod
def
requestDefaultInstance
(
cls
,
state
=
'started'
):
default_instance
=
super
(
ORSTestCase
,
cls
).
requestDefaultInstance
(
state
=
state
)
cls
.
requestSlaveInstance
()
return
default_instance
@
classmethod
def
requestSlaveInstance
(
cls
):
requestSlaveInstance
(
cls
,
'gnb-epc'
)
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
({
'testing'
:
True
})
}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"gnb-epc"
def
test_sim_card
(
self
):
self
.
slap
.
waitForInstance
()
# Wait until publish is done
test_ue_db
(
self
)
software/ors-amarisoft/test/testTDD3700.py
0 → 100644
View file @
08268cff
##############################################################################
#
# Copyright (c) 2018 Nexedi SA 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
os
import
yaml
import
json
import
glob
from
slapos.testing.testcase
import
makeModuleSetUpAndTestCaseClass
setUpModule
,
ORSTestCase
=
makeModuleSetUpAndTestCaseClass
(
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'..'
,
'software-tdd3700.cfg'
)))
class
TestGNBParameters
(
ORSTestCase
):
param_dict
=
{
'testing'
:
True
,
'nssai'
:
{
'1'
:
{
'sd'
:
'1'
,
'sst'
:
'10'
},
'2'
:
{
'sd'
:
'2'
,
'sst'
:
'20'
},
},
}
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
(
cls
.
param_dict
)}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"gnb"
def
test_gnb_conf
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'gnb.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
for
p
in
conf
[
'nr_cell_default'
][
'plmn_list'
][
0
][
'nssai'
]:
for
n
in
"sd sst"
.
split
():
self
.
assertEqual
(
p
[
n
],
self
.
param_dict
[
'nssai'
][
p
[
'sd'
]][
n
])
class
TestGNBParameters
(
ORSTestCase
):
param_dict
=
{
'testing'
:
True
,
'tx_gain'
:
17
,
'rx_gain'
:
17
,
'dl_nr_arfcn'
:
325320
,
'nr_band'
:
99
,
'nr_bandwidth'
:
50
,
'gnb_id'
:
"0x17"
,
'ssb_pos_bitmap'
:
"10"
,
'pci'
:
250
,
'plmn_list'
:
{
'00101'
:
{
'plmn'
:
'00101'
,
'ranac'
:
1
,
'reserved'
:
True
,
'tac'
:
1
},
'00102'
:
{
'plmn'
:
'00102'
,
'ranac'
:
2
,
'reserved'
:
False
,
'tac'
:
2
},
},
'amf_list'
:
{
'10.0.0.1'
:
{
'amf_addr'
:
'10.0.0.1'
},
'2001:db8::1'
:
{
'amf_addr'
:
'2001:db8::1'
},
},
}
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
(
cls
.
param_dict
)}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"gnb"
def
test_gnb_conf
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'gnb.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
self
.
assertEqual
(
conf
[
'tx_gain'
],
self
.
param_dict
[
'tx_gain'
])
self
.
assertEqual
(
conf
[
'rx_gain'
],
self
.
param_dict
[
'rx_gain'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'dl_nr_arfcn'
],
self
.
param_dict
[
'dl_nr_arfcn'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'band'
],
self
.
param_dict
[
'nr_band'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'ssb_pos_bitmap'
],
self
.
param_dict
[
'ssb_pos_bitmap'
])
self
.
assertEqual
(
conf
[
'nr_cell_default'
][
'n_id_cell'
],
self
.
param_dict
[
'pci'
])
self
.
assertEqual
(
conf
[
'gnb_id'
],
int
(
self
.
param_dict
[
'gnb_id'
],
16
))
for
p
in
conf
[
'nr_cell_default'
][
'plmn_list'
]:
for
n
in
"plmn ranac reserved tac"
.
split
():
self
.
assertEqual
(
p
[
n
],
self
.
param_dict
[
'plmn_list'
][
p
[
'plmn'
]][
n
])
for
p
in
conf
[
'amf_list'
]:
self
.
assertEqual
(
p
[
'amf_addr'
],
self
.
param_dict
[
'amf_list'
][
p
[
'amf_addr'
]][
'amf_addr'
])
with
open
(
conf_file
,
'r'
)
as
f
:
for
l
in
f
:
if
l
.
startswith
(
'#define NR_BANDWIDTH'
):
self
.
assertIn
(
str
(
self
.
param_dict
[
'nr_bandwidth'
]),
l
)
enb_param_dict
=
{
'testing'
:
True
,
'tx_gain'
:
17
,
'rx_gain'
:
17
,
'dl_earfcn'
:
325320
,
'n_rb_dl'
:
50
,
'enb_id'
:
"0x17"
,
'pci'
:
250
,
'plmn_list'
:
{
'00101'
:
{
'attach_without_pdn'
:
True
,
'plmn'
:
'00101'
,
'reserved'
:
True
},
'00102'
:
{
'attach_without_pdn'
:
False
,
'plmn'
:
'00102'
,
'reserved'
:
False
},
},
'mme_list'
:
{
'10.0.0.1'
:
{
'mme_addr'
:
'10.0.0.1'
},
'2001:db8::1'
:
{
'mme_addr'
:
'2001:db8::1'
},
},
}
epc_param_dict
=
{
'testing'
:
True
,
'epc_plmn'
:
'00102'
,
}
def
test_enb_conf
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'enb.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
self
.
assertEqual
(
conf
[
'tx_gain'
],
enb_param_dict
[
'tx_gain'
])
self
.
assertEqual
(
conf
[
'rx_gain'
],
enb_param_dict
[
'rx_gain'
])
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'dl_earfcn'
],
enb_param_dict
[
'dl_earfcn'
])
self
.
assertEqual
(
conf
[
'enb_id'
],
int
(
enb_param_dict
[
'enb_id'
],
16
))
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'n_id_cell'
],
enb_param_dict
[
'pci'
])
for
p
in
conf
[
'cell_list'
][
0
][
'plmn_list'
]:
for
n
in
"plmn attach_without_pdn reserved"
.
split
():
self
.
assertEqual
(
p
[
n
],
enb_param_dict
[
'plmn_list'
][
p
[
'plmn'
]][
n
])
for
p
in
conf
[
'mme_list'
]:
self
.
assertEqual
(
p
[
'mme_addr'
],
enb_param_dict
[
'mme_list'
][
p
[
'mme_addr'
]][
'mme_addr'
])
with
open
(
conf_file
,
'r'
)
as
f
:
for
l
in
f
:
if
l
.
startswith
(
'#define N_RB_DL'
):
self
.
assertIn
(
str
(
enb_param_dict
[
'n_rb_dl'
]),
l
)
def
test_mme_conf
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'mme.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
self
.
assertEqual
(
conf
[
'plmn'
],
epc_param_dict
[
'epc_plmn'
])
class
TestENBParameters
(
ORSTestCase
):
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
(
enb_param_dict
)}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"enb"
def
test_enb_conf
(
self
):
test_enb_conf
(
self
)
class
TestEPCParameters
(
ORSTestCase
):
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
(
epc_param_dict
)}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"epc"
def
test_mme_conf
(
self
):
test_mme_conf
(
self
)
class
TestENBEPCParameters
(
ORSTestCase
):
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
(
dict
(
enb_param_dict
,
**
epc_param_dict
)),
}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"enb-epc"
def
test_enb_conf
(
self
):
test_enb_conf
(
self
)
def
test_mme_conf
(
self
):
test_mme_conf
(
self
)
sim_card_param_dict
=
{
"sim_algo"
:
"milenage"
,
"imsi"
:
"001010000000331"
,
"opc"
:
"000102030405060708090A0B0C0D0E0F"
,
"amf"
:
"0x9001"
,
"sqn"
:
"000000000000"
,
"k"
:
"00112233445566778899AABBCCDDEEFF"
,
"impu"
:
"impu331"
,
"impi"
:
"impi331@amarisoft.com"
,
}
def
test_ue_db
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'ue_db.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
for
n
in
"sim_algo imsi opc sqn impu impi"
.
split
():
self
.
assertEqual
(
conf
[
'ue_db'
][
0
][
n
],
sim_card_param_dict
[
n
])
self
.
assertEqual
(
conf
[
'ue_db'
][
0
][
'K'
],
sim_card_param_dict
[
'k'
])
self
.
assertEqual
(
conf
[
'ue_db'
][
0
][
'amf'
],
int
(
sim_card_param_dict
[
'amf'
],
16
))
def
requestSlaveInstance
(
cls
,
software_type
):
software_url
=
cls
.
getSoftwareURL
()
return
cls
.
slap
.
request
(
software_release
=
software_url
,
partition_reference
=
"SIM-CARD-EPC"
,
partition_parameter_kw
=
{
'_'
:
json
.
dumps
(
sim_card_param_dict
)},
shared
=
True
,
software_type
=
software_type
,
)
class
TestEPCSimCard
(
ORSTestCase
):
@
classmethod
def
requestDefaultInstance
(
cls
,
state
=
'started'
):
default_instance
=
super
(
ORSTestCase
,
cls
).
requestDefaultInstance
(
state
=
state
)
cls
.
requestSlaveInstance
()
return
default_instance
@
classmethod
def
requestSlaveInstance
(
cls
):
requestSlaveInstance
(
cls
,
'epc'
)
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
({
'testing'
:
True
})
}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"epc"
def
test_sim_card
(
self
):
self
.
slap
.
waitForInstance
()
# Wait until publish is done
test_ue_db
(
self
)
class
TestENBEPCSimCard
(
ORSTestCase
):
@
classmethod
def
requestDefaultInstance
(
cls
,
state
=
'started'
):
default_instance
=
super
(
ORSTestCase
,
cls
).
requestDefaultInstance
(
state
=
state
)
cls
.
requestSlaveInstance
()
return
default_instance
@
classmethod
def
requestSlaveInstance
(
cls
):
requestSlaveInstance
(
cls
,
'enb-epc'
)
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
({
'testing'
:
True
})
}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"enb-epc"
def
test_sim_card
(
self
):
self
.
slap
.
waitForInstance
()
# Wait until publish is done
test_ue_db
(
self
)
class
TestGNBEPCSimCard
(
ORSTestCase
):
@
classmethod
def
requestDefaultInstance
(
cls
,
state
=
'started'
):
default_instance
=
super
(
ORSTestCase
,
cls
).
requestDefaultInstance
(
state
=
state
)
cls
.
requestSlaveInstance
()
return
default_instance
@
classmethod
def
requestSlaveInstance
(
cls
):
requestSlaveInstance
(
cls
,
'gnb-epc'
)
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
({
'testing'
:
True
})
}
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
"gnb-epc"
def
test_sim_card
(
self
):
self
.
slap
.
waitForInstance
()
# Wait until publish is done
test_ue_db
(
self
)
software/slapos-sr-testing/software.cfg
View file @
08268cff
...
...
@@ -120,6 +120,11 @@ setup = ${slapos-repository:location}/software/slaprunner/test/
egg = slapos.test.metabase
setup = ${slapos-repository:location}/software/metabase/test/
[slapos.test.ors-amarisoft-setup]
<= setup-develop-egg
egg = slapos.test.ors-amarisoft
setup = ${slapos-repository:location}/software/ors-amarisoft/test/
[slapos.test.fluentd-setup]
<= setup-develop-egg
egg = slapos.test.fluentd
...
...
@@ -281,6 +286,7 @@ extra-eggs =
${slapos.test.kvm-setup:egg}
${slapos.test.matomo-setup:egg}
${slapos.test.metabase-setup:egg}
${slapos.test.ors-amarisoft-setup:egg}
${slapos.test.monitor-setup:egg}
${slapos.test.nextcloud-setup:egg}
${slapos.test.nginx-push-stream-setup:egg}
...
...
@@ -351,6 +357,7 @@ tests =
erp5 ${slapos.test.erp5-setup:setup}
fluentd ${slapos.test.fluentd-setup:setup}
metabase ${slapos.test.metabase-setup:setup}
ors-amarisoft ${slapos.test.ors-amarisoft-setup:setup}
###
${:extra}
...
...
stack/erp5/buildout.hash.cfg
View file @
08268cff
...
...
@@ -30,7 +30,7 @@ md5sum = cee995829fbd138a8c2c9209d72d01a0
[template-kumofs]
filename = instance-kumofs.cfg.in
md5sum =
69954583b5f87aec5ff8449dabaaee56
md5sum =
45cc45510b59ceb730b6e38448b5c0c3
[template-zope-conf]
filename = zope.conf.in
...
...
@@ -78,7 +78,7 @@ md5sum = 3d8f3a440b7423c3b947c6ea4d775c6e
[template-zeo]
filename = instance-zeo.cfg.in
md5sum =
60e5407648c7ce2dd16fb2674ec085d0
md5sum =
d86d6808b745ee66be3a914487b25744
[template-zodb-base]
filename = instance-zodb-base.cfg.in
...
...
stack/erp5/instance-kumofs.cfg.in
View file @
08268cff
...
...
@@ -78,7 +78,7 @@ kumofs-data = ${:srv}/kumofs
[resiliency-exclude-file]
# Generate rdiff exclude file in case of resiliency
recipe = slapos.recipe.template
recipe = slapos.recipe.template
:jinja2
inline = {{ '{{ "**\\n" }}' }}
output = ${directory:srv}/exporter.exclude
...
...
stack/erp5/instance-zeo.cfg.in
View file @
08268cff
...
...
@@ -109,7 +109,7 @@ command = ${tidstorage:repozo-wrapper}
# webrunner resiliency with erp5 inside.
[{{ section("resiliency-exclude-file") }}]
# Generate rdiff exclude file
recipe = slapos.recipe.template
recipe = slapos.recipe.template
:jinja2
inline = {{ '{{ "${directory:zodb}/**\\n${directory:log}/**\\n" }}' }}
output = ${directory:srv}/exporter.exclude
...
...
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