Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-SMF
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
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-SMF
Commits
759beb9c
Commit
759beb9c
authored
Jan 17, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update CI scripts for supporting NRF
parent
0ecceac7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
6 deletions
+19
-6
ci-scripts/generateConfigFiles.py
ci-scripts/generateConfigFiles.py
+13
-0
etc/smf.conf
etc/smf.conf
+6
-6
No files found.
ci-scripts/generateConfigFiles.py
View file @
759beb9c
...
@@ -38,6 +38,9 @@ class smfConfigGen():
...
@@ -38,6 +38,9 @@ class smfConfigGen():
self
.
udm_ip_addr
=
''
self
.
udm_ip_addr
=
''
self
.
udm_port
=
'80'
self
.
udm_port
=
'80'
self
.
udm_api_version
=
'v2'
self
.
udm_api_version
=
'v2'
self
.
nrf_ip_addr
=
''
self
.
nrf_port
=
'80'
self
.
nrf_api_version
=
'v1'
self
.
upf_ip_addr
=
''
self
.
upf_ip_addr
=
''
self
.
apn
=
'carrier.com'
self
.
apn
=
'carrier.com'
self
.
dns1_ip
=
'192.168.18.129'
self
.
dns1_ip
=
'192.168.18.129'
...
@@ -85,6 +88,9 @@ class smfConfigGen():
...
@@ -85,6 +88,9 @@ class smfConfigGen():
smfFile
.
write
(
'SMF_CONF[@UDM_IPV4_ADDRESS@]=
\'
'
+
self
.
udm_ip_addr
+
'
\'\n
'
)
smfFile
.
write
(
'SMF_CONF[@UDM_IPV4_ADDRESS@]=
\'
'
+
self
.
udm_ip_addr
+
'
\'\n
'
)
smfFile
.
write
(
'SMF_CONF[@UDM_PORT@]='
+
self
.
udm_port
+
'
\n
'
)
smfFile
.
write
(
'SMF_CONF[@UDM_PORT@]='
+
self
.
udm_port
+
'
\n
'
)
smfFile
.
write
(
'SMF_CONF[@UDM_API_VERSION@]=
\'
'
+
self
.
udm_api_version
+
'
\'\n
'
)
smfFile
.
write
(
'SMF_CONF[@UDM_API_VERSION@]=
\'
'
+
self
.
udm_api_version
+
'
\'\n
'
)
smfFile
.
write
(
'SMF_CONF[@NRF_IPV4_ADDRESS@]=
\'
'
+
self
.
nrf_ip_addr
+
'
\'\n
'
)
smfFile
.
write
(
'SMF_CONF[@NRF_PORT@]='
+
self
.
nrf_port
+
'
\n
'
)
smfFile
.
write
(
'SMF_CONF[@NRF_API_VERSION@]=
\'
'
+
self
.
nrf_api_version
+
'
\'\n
'
)
smfFile
.
write
(
'SMF_CONF[@UPF_IPV4_ADDRESS@]=
\'
'
+
self
.
upf_ip_addr
+
'
\'\n
'
)
smfFile
.
write
(
'SMF_CONF[@UPF_IPV4_ADDRESS@]=
\'
'
+
self
.
upf_ip_addr
+
'
\'\n
'
)
smfFile
.
write
(
'
\n
'
)
smfFile
.
write
(
'
\n
'
)
smfFile
.
write
(
'for K in "${!SMF_CONF[@]}"; do
\n
'
)
smfFile
.
write
(
'for K in "${!SMF_CONF[@]}"; do
\n
'
)
...
@@ -111,6 +117,7 @@ def Usage():
...
@@ -111,6 +117,7 @@ def Usage():
print
(
' --n4=[SMF N4 Interface Name]'
)
print
(
' --n4=[SMF N4 Interface Name]'
)
print
(
' --amf_ip_addr=[AMF IP Address]'
)
print
(
' --amf_ip_addr=[AMF IP Address]'
)
print
(
' --udm_ip_addr=[UDM IP Address]'
)
print
(
' --udm_ip_addr=[UDM IP Address]'
)
print
(
' --nrf_ip_addr=[NRF IP Address]'
)
print
(
' --upf_ip_addr=[UPF IP Address]'
)
print
(
' --upf_ip_addr=[UPF IP Address]'
)
print
(
' --from_docker_file'
)
print
(
' --from_docker_file'
)
print
(
'---------------------------------------------------------------------------------------------- SMF Not Mandatory -----'
)
print
(
'---------------------------------------------------------------------------------------------- SMF Not Mandatory -----'
)
...
@@ -144,6 +151,9 @@ while len(argvs) > 1:
...
@@ -144,6 +151,9 @@ while len(argvs) > 1:
elif
re
.
match
(
'^\-\-udm_ip_addr=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
elif
re
.
match
(
'^\-\-udm_ip_addr=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
matchReg
=
re
.
match
(
'^\-\-udm_ip_addr=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
matchReg
=
re
.
match
(
'^\-\-udm_ip_addr=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
mySmfCfg
.
udm_ip_addr
=
matchReg
.
group
(
1
)
mySmfCfg
.
udm_ip_addr
=
matchReg
.
group
(
1
)
elif
re
.
match
(
'^\-\-nrf_ip_addr=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
matchReg
=
re
.
match
(
'^\-\-nrf_ip_addr=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
mySmfCfg
.
nrf_ip_addr
=
matchReg
.
group
(
1
)
elif
re
.
match
(
'^\-\-upf_ip_addr=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
elif
re
.
match
(
'^\-\-upf_ip_addr=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
matchReg
=
re
.
match
(
'^\-\-upf_ip_addr=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
matchReg
=
re
.
match
(
'^\-\-upf_ip_addr=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
mySmfCfg
.
upf_ip_addr
=
matchReg
.
group
(
1
)
mySmfCfg
.
upf_ip_addr
=
matchReg
.
group
(
1
)
...
@@ -179,6 +189,9 @@ if mySmfCfg.kind == 'SMF':
...
@@ -179,6 +189,9 @@ if mySmfCfg.kind == 'SMF':
elif
mySmfCfg
.
udm_ip_addr
==
''
:
elif
mySmfCfg
.
udm_ip_addr
==
''
:
Usage
()
Usage
()
sys
.
exit
(
'missing UDM IP address'
)
sys
.
exit
(
'missing UDM IP address'
)
elif
mySmfCfg
.
nrf_ip_addr
==
''
:
Usage
()
sys
.
exit
(
'missing NRF IP address'
)
elif
mySmfCfg
.
upf_ip_addr
==
''
:
elif
mySmfCfg
.
upf_ip_addr
==
''
:
Usage
()
Usage
()
sys
.
exit
(
'missing UPF IP address'
)
sys
.
exit
(
'missing UPF IP address'
)
...
...
etc/smf.conf
View file @
759beb9c
...
@@ -96,18 +96,18 @@ SMF =
...
@@ -96,18 +96,18 @@ SMF =
PORT
= @
UDM_PORT
@;
# YOUR UDM CONFIG HERE (default: 80)
PORT
= @
UDM_PORT
@;
# YOUR UDM CONFIG HERE (default: 80)
API_VERSION
=
"@UDM_API_VERSION@"
;
# YOUR UDM API VERSION FOR SBI CONFIG HERE
API_VERSION
=
"@UDM_API_VERSION@"
;
# YOUR UDM API VERSION FOR SBI CONFIG HERE
};
};
UPF_LIST
= (
{
IPV4_ADDRESS
=
"@UPF_IPV4_ADDRESS@"
;}
# YOUR UPF CONFIG HERE
);
NRF
:
NRF
:
{
{
IPV4_ADDRESS
=
"@NRF_IPV4_ADDRESS@"
;
# YOUR NRF CONFIG HERE
IPV4_ADDRESS
=
"@NRF_IPV4_ADDRESS@"
;
# YOUR NRF CONFIG HERE
PORT
= @
NRF_PORT
@;
# YOUR NRF CONFIG HERE (default: 80)
PORT
= @
NRF_PORT
@;
# YOUR NRF CONFIG HERE (default: 80)
API_VERSION
=
"@NRF_API_VERSION@"
;
# YOUR NRF API VERSION FOR SBI CONFIG HERE
API_VERSION
=
"@NRF_API_VERSION@"
;
# YOUR NRF API VERSION FOR SBI CONFIG HERE
};
};
UPF_LIST
= (
{
IPV4_ADDRESS
=
"@UPF_IPV4_ADDRESS@"
;}
# YOUR UPF CONFIG HERE
);
LOCAL_CONFIGURATION
:
LOCAL_CONFIGURATION
:
{
{
USE_LOCAL_CONFIGURATION
=
"yes"
;
USE_LOCAL_CONFIGURATION
=
"yes"
;
...
...
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