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
3fc77fde
Commit
3fc77fde
authored
Feb 08, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prepare to test AMF with NRF
parent
3d4eec0c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
src/amf-app/amf_n11.cpp
src/amf-app/amf_n11.cpp
+7
-7
No files found.
src/amf-app/amf_n11.cpp
View file @
3fc77fde
...
...
@@ -721,18 +721,14 @@ void amf_n11::curl_http_client(
free_wrapper
((
void
**
)
&
body_data
);
}
//-----------------------------------------------------------------------------------------------------
bool
amf_n11
::
discover_smf
(
std
::
string
&
smf_addr
,
std
::
string
&
smf_api_version
,
const
snssai_t
snssai
,
const
plmn_t
plmn
,
const
std
::
string
dnn
)
{
Logger
::
amf_n11
().
debug
(
"Send NFDiscovery to NRF to discover the available SMF"
);
"Send NFDiscovery to NRF to discover the available SMF
s
"
);
bool
result
=
true
;
// curl -X GET
// "http://192.168.1.23/nnrf-disc/v1/nf-instances?target-nf-type=SMF&requester-nf-type=AMF"
// ADD NRF to AMF conf
nlohmann
::
json
json_data
=
{};
// TODO: remove hardcoded values
std
::
string
url
=
...
...
@@ -782,8 +778,8 @@ bool amf_n11::discover_smf(
Logger
::
amf_n11
().
debug
(
"NFDiscovery, response from NRF, json data:
\n
%s"
,
response_data
.
dump
().
c_str
());
// Process data to obtain SMF info
// Process data to obtain SMF info
if
(
response_data
.
find
(
"nfInstances"
)
!=
response_data
.
end
())
{
for
(
auto
&
it
:
response_data
[
"nfInstances"
].
items
())
{
nlohmann
::
json
instance_json
=
it
.
value
();
...
...
@@ -818,6 +814,10 @@ bool amf_n11::discover_smf(
result
=
false
;
}
Logger
::
amf_n11
().
debug
(
"NFDiscovery, SMF Addr: %s, SMF Api Version: %s"
,
smf_addr
.
c_str
(),
smf_api_version
.
c_str
());
curl_slist_free_all
(
headers
);
curl_easy_cleanup
(
curl
);
}
...
...
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