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
12660a66
Commit
12660a66
authored
Jun 21, 2022
by
Stefan Spettel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(smf): Added DNAI and NwDNAIInstanceList in UPF profile
Signed-off-by:
Stefan Spettel
<
stefan.spettel@eurecom.fr
>
parent
3ae9dafc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
5 deletions
+63
-5
src/api-server/model/DnnUpfInfoItem.cpp
src/api-server/model/DnnUpfInfoItem.cpp
+21
-0
src/api-server/model/DnnUpfInfoItem.h
src/api-server/model/DnnUpfInfoItem.h
+9
-0
src/common/smf.h
src/common/smf.h
+9
-2
src/smf_app/smf_profile.cpp
src/smf_app/smf_profile.cpp
+24
-3
No files found.
src/api-server/model/DnnUpfInfoItem.cpp
View file @
12660a66
...
@@ -35,6 +35,8 @@ void to_json(nlohmann::json& j, const DnnUpfInfoItem& o) {
...
@@ -35,6 +35,8 @@ void to_json(nlohmann::json& j, const DnnUpfInfoItem& o) {
if
(
o
.
dnaiListIsSet
()
||
!
o
.
m_DnaiList
.
empty
())
j
[
"dnaiList"
]
=
o
.
m_DnaiList
;
if
(
o
.
dnaiListIsSet
()
||
!
o
.
m_DnaiList
.
empty
())
j
[
"dnaiList"
]
=
o
.
m_DnaiList
;
if
(
o
.
pduSessionTypesIsSet
()
||
!
o
.
m_PduSessionTypes
.
empty
())
if
(
o
.
pduSessionTypesIsSet
()
||
!
o
.
m_PduSessionTypes
.
empty
())
j
[
"pduSessionTypes"
]
=
o
.
m_PduSessionTypes
;
j
[
"pduSessionTypes"
]
=
o
.
m_PduSessionTypes
;
if
(
o
.
dnaiNwInstanceListIsSet
()
||
!
o
.
m_DnaiNwInstanceList
.
empty
())
j
[
"dnaiNwInstanceList"
]
=
o
.
m_DnaiNwInstanceList
;
}
}
void
from_json
(
const
nlohmann
::
json
&
j
,
DnnUpfInfoItem
&
o
)
{
void
from_json
(
const
nlohmann
::
json
&
j
,
DnnUpfInfoItem
&
o
)
{
...
@@ -47,6 +49,10 @@ void from_json(const nlohmann::json& j, DnnUpfInfoItem& o) {
...
@@ -47,6 +49,10 @@ void from_json(const nlohmann::json& j, DnnUpfInfoItem& o) {
j
.
at
(
"pduSessionTypes"
).
get_to
(
o
.
m_PduSessionTypes
);
j
.
at
(
"pduSessionTypes"
).
get_to
(
o
.
m_PduSessionTypes
);
o
.
m_PduSessionTypesIsSet
=
true
;
o
.
m_PduSessionTypesIsSet
=
true
;
}
}
if
(
j
.
find
(
"dnaiNwInstanceList"
)
!=
j
.
end
())
{
j
.
at
(
"dnaiNwInstanceList"
).
get_to
(
o
.
m_DnaiNwInstanceList
);
o
.
m_DnaiNwInstanceListIsSet
=
true
;
}
}
}
std
::
string
DnnUpfInfoItem
::
getDnn
()
const
{
std
::
string
DnnUpfInfoItem
::
getDnn
()
const
{
...
@@ -83,6 +89,21 @@ void DnnUpfInfoItem::unsetPduSessionTypes() {
...
@@ -83,6 +89,21 @@ void DnnUpfInfoItem::unsetPduSessionTypes() {
m_PduSessionTypesIsSet
=
false
;
m_PduSessionTypesIsSet
=
false
;
}
}
std
::
map
<
std
::
string
,
std
::
string
>&
DnnUpfInfoItem
::
getDnaiNwInstanceList
()
{
return
m_DnaiNwInstanceList
;
}
void
DnnUpfInfoItem
::
setDnaiNwInstanceList
(
std
::
map
<
std
::
string
,
std
::
string
>
const
&
value
)
{
m_DnaiNwInstanceList
=
value
;
m_DnaiNwInstanceListIsSet
=
true
;
}
bool
DnnUpfInfoItem
::
dnaiNwInstanceListIsSet
()
const
{
return
m_DnaiNwInstanceListIsSet
;
}
void
DnnUpfInfoItem
::
unsetDnaiNwInstanceList
()
{
m_DnaiNwInstanceListIsSet
=
false
;
}
}
// namespace model
}
// namespace model
}
// namespace smf_server
}
// namespace smf_server
}
// namespace oai
}
// namespace oai
src/api-server/model/DnnUpfInfoItem.h
View file @
12660a66
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
#include <string>
#include <string>
#include "PduSessionType.h"
#include "PduSessionType.h"
#include <vector>
#include <vector>
#include <map>
#include <nlohmann/json.hpp>
#include <nlohmann/json.hpp>
namespace
oai
{
namespace
oai
{
...
@@ -61,6 +62,11 @@ class DnnUpfInfoItem {
...
@@ -61,6 +62,11 @@ class DnnUpfInfoItem {
bool
pduSessionTypesIsSet
()
const
;
bool
pduSessionTypesIsSet
()
const
;
void
unsetPduSessionTypes
();
void
unsetPduSessionTypes
();
std
::
map
<
std
::
string
,
std
::
string
>&
getDnaiNwInstanceList
();
void
setDnaiNwInstanceList
(
std
::
map
<
std
::
string
,
std
::
string
>
const
&
value
);
bool
dnaiNwInstanceListIsSet
()
const
;
void
unsetDnaiNwInstanceList
();
friend
void
to_json
(
nlohmann
::
json
&
j
,
const
DnnUpfInfoItem
&
o
);
friend
void
to_json
(
nlohmann
::
json
&
j
,
const
DnnUpfInfoItem
&
o
);
friend
void
from_json
(
const
nlohmann
::
json
&
j
,
DnnUpfInfoItem
&
o
);
friend
void
from_json
(
const
nlohmann
::
json
&
j
,
DnnUpfInfoItem
&
o
);
...
@@ -71,6 +77,9 @@ class DnnUpfInfoItem {
...
@@ -71,6 +77,9 @@ class DnnUpfInfoItem {
bool
m_DnaiListIsSet
;
bool
m_DnaiListIsSet
;
std
::
vector
<
PduSessionType
>
m_PduSessionTypes
;
std
::
vector
<
PduSessionType
>
m_PduSessionTypes
;
bool
m_PduSessionTypesIsSet
;
bool
m_PduSessionTypesIsSet
;
std
::
map
<
std
::
string
,
std
::
string
>
m_DnaiNwInstanceList
;
bool
m_DnaiNwInstanceListIsSet
;
};
};
}
// namespace model
}
// namespace model
...
...
src/common/smf.h
View file @
12660a66
...
@@ -27,6 +27,9 @@
...
@@ -27,6 +27,9 @@
#include "3gpp_24.501.h"
#include "3gpp_24.501.h"
#include <nlohmann/json.hpp>
#include <nlohmann/json.hpp>
#include <map>
#include <vector>
typedef
uint64_t
supi64_t
;
typedef
uint64_t
supi64_t
;
#define SUPI_64_FMT "%" SCNu64
#define SUPI_64_FMT "%" SCNu64
...
@@ -336,11 +339,15 @@ typedef struct nf_service_s {
...
@@ -336,11 +339,15 @@ typedef struct nf_service_s {
typedef
struct
dnn_upf_info_item_s
{
typedef
struct
dnn_upf_info_item_s
{
std
::
string
dnn
;
std
::
string
dnn
;
// std::vector<std::string> dnai_list
std
::
vector
<
std
::
string
>
dnai_list
;
// supported from R16.8
std
::
map
<
std
::
string
,
std
::
string
>
dnai_nw_instance_list
;
// std::vector<std::string> pdu_session_types
// std::vector<std::string> pdu_session_types
dnn_upf_info_item_s
&
operator
=
(
const
dnn_upf_info_item_s
&
d
)
{
dnn_upf_info_item_s
&
operator
=
(
const
dnn_upf_info_item_s
&
d
)
{
dnn
=
d
.
dnn
;
dnn
=
d
.
dnn
;
dnai_list
=
d
.
dnai_list
;
dnai_nw_instance_list
=
d
.
dnai_nw_instance_list
;
return
*
this
;
return
*
this
;
}
}
}
dnn_upf_info_item_t
;
}
dnn_upf_info_item_t
;
...
...
src/smf_app/smf_profile.cpp
View file @
12660a66
...
@@ -538,6 +538,16 @@ void upf_profile::display() const {
...
@@ -538,6 +538,16 @@ void upf_profile::display() const {
s
.
snssai
.
sd
);
s
.
snssai
.
sd
);
for
(
auto
d
:
s
.
dnn_upf_info_list
)
{
for
(
auto
d
:
s
.
dnn_upf_info_list
)
{
Logger
::
smf_app
().
debug
(
"
\t\t\t
DNN %s"
,
d
.
dnn
.
c_str
());
Logger
::
smf_app
().
debug
(
"
\t\t\t
DNN %s"
,
d
.
dnn
.
c_str
());
for
(
auto
dnai
:
d
.
dnai_list
)
{
Logger
::
smf_app
().
debug
(
"
\t\t\t\t
DNAI List: %s"
,
dnai
.
c_str
());
}
for
(
auto
nwinstance
:
d
.
dnai_nw_instance_list
)
{
Logger
::
smf_app
().
debug
(
"
\t\t\t\t
DNAI NW Instance List: %s : "
"%s"
,
nwinstance
.
first
.
c_str
(),
nwinstance
.
second
.
c_str
());
}
}
}
}
}
if
(
!
upf_info
.
interface_upf_info_list
.
empty
())
{
if
(
!
upf_info
.
interface_upf_info_list
.
empty
())
{
...
@@ -575,8 +585,10 @@ void upf_profile::to_json(nlohmann::json& data) const {
...
@@ -575,8 +585,10 @@ void upf_profile::to_json(nlohmann::json& data) const {
tmp
[
"sNssai"
][
"sd"
]
=
std
::
to_string
(
s
.
snssai
.
sd
);
tmp
[
"sNssai"
][
"sd"
]
=
std
::
to_string
(
s
.
snssai
.
sd
);
tmp
[
"dnnSmfInfoList"
]
=
nlohmann
::
json
::
array
();
tmp
[
"dnnSmfInfoList"
]
=
nlohmann
::
json
::
array
();
for
(
auto
d
:
s
.
dnn_upf_info_list
)
{
for
(
auto
d
:
s
.
dnn_upf_info_list
)
{
nlohmann
::
json
dnn_json
=
{};
nlohmann
::
json
dnn_json
=
{};
dnn_json
[
"dnn"
]
=
d
.
dnn
;
dnn_json
[
"dnn"
]
=
d
.
dnn
;
dnn_json
[
"dnaiList"
]
=
d
.
dnai_list
;
dnn_json
[
"dnaiNwInstanceList"
]
=
d
.
dnai_nw_instance_list
;
tmp
[
"dnnSmfInfoList"
].
push_back
(
dnn_json
);
tmp
[
"dnnSmfInfoList"
].
push_back
(
dnn_json
);
}
}
data
[
"upfInfo"
][
"sNssaiUpfInfoList"
].
push_back
(
tmp
);
data
[
"upfInfo"
][
"sNssaiUpfInfoList"
].
push_back
(
tmp
);
...
@@ -637,8 +649,17 @@ void upf_profile::from_json(const nlohmann::json& data) {
...
@@ -637,8 +649,17 @@ void upf_profile::from_json(const nlohmann::json& data) {
for
(
auto
d
:
it
[
"dnnUpfInfoList"
])
{
for
(
auto
d
:
it
[
"dnnUpfInfoList"
])
{
if
(
d
.
find
(
"dnn"
)
!=
d
.
end
())
{
if
(
d
.
find
(
"dnn"
)
!=
d
.
end
())
{
dnn_item
.
dnn
=
d
[
"dnn"
].
get
<
std
::
string
>
();
dnn_item
.
dnn
=
d
[
"dnn"
].
get
<
std
::
string
>
();
upf_info_item
.
dnn_upf_info_list
.
push_back
(
dnn_item
);
}
}
if
(
d
.
find
(
"dnaiList"
)
!=
d
.
end
())
{
dnn_item
.
dnai_list
=
d
[
"dnaiList"
].
get
<
std
::
vector
<
std
::
string
>>
();
}
if
(
d
.
find
(
"dnaiNwInstanceList"
)
!=
d
.
end
())
{
dnn_item
.
dnai_nw_instance_list
=
d
[
"dnaiNwInstanceList"
]
.
get
<
std
::
map
<
std
::
string
,
std
::
string
>>
();
}
upf_info_item
.
dnn_upf_info_list
.
push_back
(
dnn_item
);
}
}
}
}
upf_info
.
snssai_upf_info_list
.
push_back
(
upf_info_item
);
upf_info
.
snssai_upf_info_list
.
push_back
(
upf_info_item
);
...
...
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