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
03c5e7b5
Unverified
Commit
03c5e7b5
authored
Sep 03, 2021
by
kharade
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add config parameter for nrf http version
parent
49a3ced2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
0 deletions
+12
-0
etc/smf.conf
etc/smf.conf
+1
-0
scripts/entrypoint.sh
scripts/entrypoint.sh
+1
-0
src/smf_app/smf_config.cpp
src/smf_app/smf_config.cpp
+8
-0
src/smf_app/smf_config.hpp
src/smf_app/smf_config.hpp
+2
-0
No files found.
etc/smf.conf
View file @
03c5e7b5
...
@@ -111,6 +111,7 @@ SMF =
...
@@ -111,6 +111,7 @@ SMF =
{
{
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)
HTTP_VERSION
= @
HTTP_VERSION
@;
# YOUR NRF CONFIG HERE (default: 1)
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
FQDN
=
"@NRF_FQDN@"
# YOUR NRF FQDN CONFIG HERE
FQDN
=
"@NRF_FQDN@"
# YOUR NRF FQDN CONFIG HERE
};
};
...
...
scripts/entrypoint.sh
View file @
03c5e7b5
...
@@ -11,6 +11,7 @@ if [[ ${USE_FQDN_DNS} == "yes" ]];then
...
@@ -11,6 +11,7 @@ if [[ ${USE_FQDN_DNS} == "yes" ]];then
UPF_IPV4_ADDRESS
=
${
UPF_IPV4_ADDRESS
:-
0
.0.0.0
}
UPF_IPV4_ADDRESS
=
${
UPF_IPV4_ADDRESS
:-
0
.0.0.0
}
UDM_IPV4_ADDRESS
=
${
UDM_IPV4_ADDRESS
:-
0
.0.0.0
}
UDM_IPV4_ADDRESS
=
${
UDM_IPV4_ADDRESS
:-
0
.0.0.0
}
fi
fi
HTTP_VERSION
=
${
HTTP_VERSION
:-
1
}
for
c
in
${
CONFIG_DIR
}
/
*
.conf
;
do
for
c
in
${
CONFIG_DIR
}
/
*
.conf
;
do
# grep variable names (format: ${VAR}) from template to be rendered
# grep variable names (format: ${VAR}) from template to be rendered
...
...
src/smf_app/smf_config.cpp
View file @
03c5e7b5
...
@@ -760,8 +760,16 @@ int smf_config::load(const string& config_file) {
...
@@ -760,8 +760,16 @@ int smf_config::load(const string& config_file) {
const
Setting
&
nrf_cfg
=
smf_cfg
[
SMF_CONFIG_STRING_NRF
];
const
Setting
&
nrf_cfg
=
smf_cfg
[
SMF_CONFIG_STRING_NRF
];
struct
in_addr
nrf_ipv4_addr
=
{};
struct
in_addr
nrf_ipv4_addr
=
{};
unsigned
int
nrf_port
=
{
0
};
unsigned
int
nrf_port
=
{
0
};
unsigned
int
httpVersion
=
{
0
};
std
::
string
nrf_api_version
=
{};
std
::
string
nrf_api_version
=
{};
if
(
!
(
nrf_cfg
.
lookupValue
(
SMF_CONFIG_STRING_NRF_HTTP_VERSION
,
httpVersion
)))
{
Logger
::
smf_app
().
error
(
SMF_CONFIG_STRING_NRF_HTTP_VERSION
"failed"
);
throw
(
SMF_CONFIG_STRING_NRF_HTTP_VERSION
"failed"
);
}
nrf_addr
.
http_version
=
httpVersion
;
if
(
!
use_fqdn_dns
)
{
if
(
!
use_fqdn_dns
)
{
nrf_cfg
.
lookupValue
(
SMF_CONFIG_STRING_NRF_IPV4_ADDRESS
,
astring
);
nrf_cfg
.
lookupValue
(
SMF_CONFIG_STRING_NRF_IPV4_ADDRESS
,
astring
);
IPV4_STR_ADDR_TO_INADDR
(
IPV4_STR_ADDR_TO_INADDR
(
...
...
src/smf_app/smf_config.hpp
View file @
03c5e7b5
...
@@ -110,6 +110,7 @@
...
@@ -110,6 +110,7 @@
#define SMF_CONFIG_STRING_NRF "NRF"
#define SMF_CONFIG_STRING_NRF "NRF"
#define SMF_CONFIG_STRING_NRF_IPV4_ADDRESS "IPV4_ADDRESS"
#define SMF_CONFIG_STRING_NRF_IPV4_ADDRESS "IPV4_ADDRESS"
#define SMF_CONFIG_STRING_NRF_PORT "PORT"
#define SMF_CONFIG_STRING_NRF_PORT "PORT"
#define SMF_CONFIG_STRING_NRF_HTTP_VERSION "HTTP_VERSION"
#define SMF_CONFIG_STRING_LOCAL_CONFIGURATION "LOCAL_CONFIGURATION"
#define SMF_CONFIG_STRING_LOCAL_CONFIGURATION "LOCAL_CONFIGURATION"
#define SMF_CONFIG_STRING_SESSION_MANAGEMENT_SUBSCRIPTION_LIST \
#define SMF_CONFIG_STRING_SESSION_MANAGEMENT_SUBSCRIPTION_LIST \
...
@@ -241,6 +242,7 @@ class smf_config {
...
@@ -241,6 +242,7 @@ class smf_config {
struct
{
struct
{
struct
in_addr
ipv4_addr
;
struct
in_addr
ipv4_addr
;
unsigned
int
port
;
unsigned
int
port
;
unsigned
int
http_version
;
std
::
string
api_version
;
std
::
string
api_version
;
std
::
string
fqdn
;
std
::
string
fqdn
;
}
nrf_addr
;
}
nrf_addr
;
...
...
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