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
Lu Xu
slapos
Commits
74f11cdd
Commit
74f11cdd
authored
Jan 16, 2024
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'x/lte-multiru' into xy/lte-multiru
parents
6089e10f
414079a6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
9 deletions
+31
-9
software/ors-amarisoft/buildout.hash.cfg
software/ors-amarisoft/buildout.hash.cfg
+2
-2
software/ors-amarisoft/config/enb.jinja2.cfg
software/ors-amarisoft/config/enb.jinja2.cfg
+25
-1
software/ors-amarisoft/instance-enb.jinja2.cfg
software/ors-amarisoft/instance-enb.jinja2.cfg
+0
-1
software/ors-amarisoft/slapos-render-config.py
software/ors-amarisoft/slapos-render-config.py
+0
-1
software/ors-amarisoft/test/test.py
software/ors-amarisoft/test/test.py
+4
-4
No files found.
software/ors-amarisoft/buildout.hash.cfg
View file @
74f11cdd
...
...
@@ -88,7 +88,7 @@ md5sum = 52da9fe3a569199e35ad89ae1a44c30e
[template-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg
md5sum =
d6b3e494db278d2ecc28ea1a9e4a7826
md5sum =
ebca620d56ccd5d7fb0967da224ea5db
[template-ors-enb]
_update_hash_filename_ = instance-ors-enb.jinja2.cfg
...
...
@@ -112,7 +112,7 @@ md5sum = dcaac06553a3222b14c0013a13f4a149
[enb.jinja2.cfg]
filename = config/enb.jinja2.cfg
md5sum =
d395d9ef1d9631b44f57da271284bf54
md5sum =
a0e06192f4f0f2252696a67c5eb902e2
[drb_lte.jinja2.cfg]
filename = config/drb_lte.jinja2.cfg
...
...
software/ors-amarisoft/config/enb.jinja2.cfg
View file @
74f11cdd
...
...
@@ -99,6 +99,30 @@
15: 75,
20: 100} %}
{{- _[bandwidth] | tojson }}
{%- endmacro %}
{#- jhostport splits address into (host,port) pair. #}
{%- macro jhostport(addr) %}
{%- set _ = namespace() %}
{%- if ':' not in addr %}
{%- set _.host = addr %}
{%- set _.port = None %}
{%- else %}
{%- set head, tail = addr.rsplit(':', 1) %}
{%- if ':' not in head %}
{%- set _.host = head %}
{%- set _.port = tail %}
{%- else %}
{%- if addr.startswith('[') %}
{%- set _.host = addr[1:addr.index(']')] %}
{%- set _.port = tail %}
{%- else %}
{%- set _.host = addr %}
{%- set _.port = None %}
{%- endif %}
{%- endif %}
{%- endif %}
{{- (_.host, _.port) | tojson }}
{%- endmacro -%}
...
...
@@ -163,7 +187,7 @@
{%- set vip = [] %}
{%- for a in vcore %}
{%- set _ = namespace() %}
{%- set _.ip =
urllib.parse.urlparse('z://%s' % a).hostname
%}
{%- set _.ip =
J(jhostport(a))[0]
%}
{%- set _.islo = netaddr.IPAddress(_.ip).is_loopback() %}
{%- do vip.append(_) %}
{%- endfor %}
...
...
software/ors-amarisoft/instance-enb.jinja2.cfg
View file @
74f11cdd
...
...
@@ -197,7 +197,6 @@ context =
raw gtp_addr_v4 {{ lan_ipv4 }}
import xbuildout xbuildout
import netaddr netaddr
import urllib urllib
${:extra-context}
[enb-config]
...
...
software/ors-amarisoft/slapos-render-config.py
View file @
74f11cdd
...
...
@@ -29,7 +29,6 @@ def j2render(src, out, jcfg):
textctx
+=
'import nrarfcn_module nrarfcn
\
n
'
textctx
+=
'import xearfcn_module xlte.earfcn
\
n
'
textctx
+=
'import xnrarfcn_module xlte.nrarfcn
\
n
'
textctx
+=
'import urllib urllib
\
n
'
textctx
+=
'import netaddr netaddr
\
n
'
buildout
=
None
# stub
r
=
jinja2_template
.
Recipe
(
buildout
,
"recipe"
,
{
...
...
software/ors-amarisoft/test/test.py
View file @
74f11cdd
...
...
@@ -275,11 +275,11 @@ class ENBTestCase4(RFTestCase4):
'gnb_id_bits'
:
30
,
'mme_list'
:
{
'1'
:
{
'mme_addr'
:
'1.2.3.4'
},
'2'
:
{
'mme_addr'
:
'[
1234
::1]:78'
},
'2'
:
{
'mme_addr'
:
'[
abcd:5
::1]:78'
},
},
'amf_list'
:
{
'1'
:
{
'amf_addr'
:
'4.3.2.1:77'
},
'2'
:
{
'amf_addr'
:
'
4321
::1'
},
'2'
:
{
'amf_addr'
:
'
dcba:5
::1'
},
},
'plmn_list'
:
{
'1'
:
{
'plmn'
:
'31415'
},
...
...
@@ -318,8 +318,8 @@ class ENBTestCase4(RFTestCase4):
def
test_enb_cfg_basic
(
t
):
assertMatch
(
t
,
t
.
enb_cfg
,
dict
(
enb_id
=
0x17
,
gnb_id
=
0x23
,
gnb_id_bits
=
30
,
mme_list
=
[{
'mme_addr'
:
'1.2.3.4'
},
{
'mme_addr'
:
'[
1234
::1]:78'
}],
amf_list
=
[{
'amf_addr'
:
'4.3.2.1:77'
},
{
'amf_addr'
:
'
4321
::1'
}],
mme_list
=
[{
'mme_addr'
:
'1.2.3.4'
},
{
'mme_addr'
:
'[
abcd:5
::1]:78'
}],
amf_list
=
[{
'amf_addr'
:
'4.3.2.1:77'
},
{
'amf_addr'
:
'
dcba:5
::1'
}],
x2_peers
=
[
'44.1.1.1'
],
xn_peers
=
[
'55.1.1.1'
],
cell_default
=
{
'plmn_list'
:
[
...
...
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