Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-AMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
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-AMF
Commits
6d9342a0
Commit
6d9342a0
authored
Jun 24, 2022
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue with redundant profile IEs
parent
95b02ac8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
0 deletions
+24
-0
src/amf-app/amf_app.cpp
src/amf-app/amf_app.cpp
+2
-0
src/amf-app/amf_profile.cpp
src/amf-app/amf_profile.cpp
+10
-0
src/amf-app/amf_profile.hpp
src/amf-app/amf_profile.hpp
+12
-0
No files found.
src/amf-app/amf_app.cpp
View file @
6d9342a0
...
@@ -1017,6 +1017,7 @@ void amf_app::generate_amf_profile() {
...
@@ -1017,6 +1017,7 @@ void amf_app::generate_amf_profile() {
nf_instance_profile
.
set_nf_heartBeat_timer
(
50
);
nf_instance_profile
.
set_nf_heartBeat_timer
(
50
);
nf_instance_profile
.
set_nf_priority
(
1
);
nf_instance_profile
.
set_nf_priority
(
1
);
nf_instance_profile
.
set_nf_capacity
(
100
);
nf_instance_profile
.
set_nf_capacity
(
100
);
nf_instance_profile
.
delete_nf_ipv4_addresses
();
nf_instance_profile
.
add_nf_ipv4_addresses
(
amf_cfg
.
n11
.
addr4
);
nf_instance_profile
.
add_nf_ipv4_addresses
(
amf_cfg
.
n11
.
addr4
);
// NF services
// NF services
...
@@ -1036,6 +1037,7 @@ void amf_app::generate_amf_profile() {
...
@@ -1036,6 +1037,7 @@ void amf_app::generate_amf_profile() {
endpoint
.
port
=
amf_cfg
.
n11
.
port
;
endpoint
.
port
=
amf_cfg
.
n11
.
port
;
nf_service
.
ip_endpoints
.
push_back
(
endpoint
);
nf_service
.
ip_endpoints
.
push_back
(
endpoint
);
nf_instance_profile
.
delete_nf_services
();
nf_instance_profile
.
add_nf_service
(
nf_service
);
nf_instance_profile
.
add_nf_service
(
nf_service
);
// TODO: custom info
// TODO: custom info
...
...
src/amf-app/amf_profile.cpp
View file @
6d9342a0
...
@@ -151,6 +151,7 @@ void nf_profile::get_nf_snssais(std::vector<snssai_t>& s) const {
...
@@ -151,6 +151,7 @@ void nf_profile::get_nf_snssais(std::vector<snssai_t>& s) const {
void
nf_profile
::
add_snssai
(
const
snssai_t
&
s
)
{
void
nf_profile
::
add_snssai
(
const
snssai_t
&
s
)
{
snssais
.
push_back
(
s
);
snssais
.
push_back
(
s
);
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
nf_profile
::
set_nf_ipv4_addresses
(
const
std
::
vector
<
struct
in_addr
>&
a
)
{
void
nf_profile
::
set_nf_ipv4_addresses
(
const
std
::
vector
<
struct
in_addr
>&
a
)
{
ipv4_addresses
=
a
;
ipv4_addresses
=
a
;
...
@@ -165,6 +166,10 @@ void nf_profile::get_nf_ipv4_addresses(std::vector<struct in_addr>& a) const {
...
@@ -165,6 +166,10 @@ void nf_profile::get_nf_ipv4_addresses(std::vector<struct in_addr>& a) const {
a
=
ipv4_addresses
;
a
=
ipv4_addresses
;
}
}
//------------------------------------------------------------------------------
void
nf_profile
::
delete_nf_ipv4_addresses
()
{
ipv4_addresses
.
clear
();
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
nf_profile
::
display
()
const
{
void
nf_profile
::
display
()
const
{
Logger
::
amf_app
().
debug
(
"NF instance info"
);
Logger
::
amf_app
().
debug
(
"NF instance info"
);
...
@@ -296,6 +301,11 @@ void amf_profile::get_nf_services(std::vector<nf_service_t>& n) const {
...
@@ -296,6 +301,11 @@ void amf_profile::get_nf_services(std::vector<nf_service_t>& n) const {
n
=
nf_services
;
n
=
nf_services
;
}
}
//------------------------------------------------------------------------------
void
amf_profile
::
delete_nf_services
()
{
nf_services
.
clear
();
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
amf_profile
::
set_custom_info
(
const
nlohmann
::
json
&
c
)
{
void
amf_profile
::
set_custom_info
(
const
nlohmann
::
json
&
c
)
{
custom_info
=
c
;
custom_info
=
c
;
...
...
src/amf-app/amf_profile.hpp
View file @
6d9342a0
...
@@ -267,6 +267,12 @@ class nf_profile : public std::enable_shared_from_this<nf_profile> {
...
@@ -267,6 +267,12 @@ class nf_profile : public std::enable_shared_from_this<nf_profile> {
*/
*/
void
get_nf_ipv4_addresses
(
std
::
vector
<
struct
in_addr
>&
a
)
const
;
void
get_nf_ipv4_addresses
(
std
::
vector
<
struct
in_addr
>&
a
)
const
;
/*
* Remove all NF instance ipv4_addresses
* @param void
* @return void:
*/
void
delete_nf_ipv4_addresses
();
/*
/*
* Print related-information for NF profile
* Print related-information for NF profile
* @param void
* @param void
...
@@ -349,6 +355,12 @@ class amf_profile : public nf_profile {
...
@@ -349,6 +355,12 @@ class amf_profile : public nf_profile {
*/
*/
void
get_nf_services
(
std
::
vector
<
nf_service_t
>&
n
)
const
;
void
get_nf_services
(
std
::
vector
<
nf_service_t
>&
n
)
const
;
/*
* Delete all NF services
* @param void
* @return void:
*/
void
delete_nf_services
();
/*
/*
* Set custom info
* Set custom info
* @param [const nlohmann::json &] c: custom info to be set
* @param [const nlohmann::json &] c: custom info to be set
...
...
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