Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-NRF
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-NRF
Commits
2f1e8ef3
Commit
2f1e8ef3
authored
Jun 17, 2021
by
Raphael Defosseux
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'add_debug_info' into 'develop'
Add debug info See merge request oai/cn5g/oai-cn5g-nrf!6
parents
4982e0da
836fd33b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
8 deletions
+20
-8
src/api-server/model/AccessTokenClaims.h
src/api-server/model/AccessTokenClaims.h
+1
-0
src/api-server/model/SubscriptionData.h
src/api-server/model/SubscriptionData.h
+1
-0
src/common/3gpp_29.510.h
src/common/3gpp_29.510.h
+2
-0
src/nrf_app/nrf_app.cpp
src/nrf_app/nrf_app.cpp
+12
-8
src/nrf_app/nrf_jwt.cpp
src/nrf_app/nrf_jwt.cpp
+4
-0
No files found.
src/api-server/model/AccessTokenClaims.h
View file @
2f1e8ef3
...
...
@@ -71,6 +71,7 @@ typedef struct audience_s {
// TODO:
}
}
return
*
this
;
// TODO:
}
...
...
src/api-server/model/SubscriptionData.h
View file @
2f1e8ef3
...
...
@@ -86,6 +86,7 @@ typedef struct subscription_condition_api_s {
subscription_condition_api_s
&
operator
=
(
subscription_condition_api_s
&
s
)
{
// TODO:
return
*
this
;
}
friend
void
to_json
(
...
...
src/common/3gpp_29.510.h
View file @
2f1e8ef3
...
...
@@ -191,6 +191,7 @@ typedef struct subscription_condition_s {
// TODO:
}
}
return
*
this
;
// TODO:
}
...
...
@@ -258,6 +259,7 @@ typedef struct nf_service_version_s {
nf_service_version_s
&
operator
=
(
const
nf_service_version_s
&
s
)
{
api_version_in_uri
=
s
.
api_version_in_uri
;
api_full_version
=
s
.
api_full_version
;
return
*
this
;
}
std
::
string
to_string
()
const
{
...
...
src/nrf_app/nrf_app.cpp
View file @
2f1e8ef3
...
...
@@ -80,12 +80,15 @@ nrf_app::nrf_app(const std::string& config_file, nrf_event& ev)
Logger
::
nrf_app
().
startup
(
"Started"
);
}
//------------------------------------------------------------------------------
nrf_app
::~
nrf_app
()
{
Logger
::
nrf_app
().
debug
(
"Delete NRF_APP instance..."
);
for
(
auto
i
:
connections
)
{
if
(
i
.
connected
())
i
.
disconnect
();
}
if
(
nrf_client_inst
)
delete
nrf_client_inst
;
if
(
nrf_jwt_inst
)
delete
nrf_jwt_inst
;
}
//------------------------------------------------------------------------------
...
...
@@ -106,7 +109,7 @@ void nrf_app::handle_register_nf_instance(
// Check if nfInstanceID is a valid UUID (version 4)
if
(
!
api_conv
::
validate_uuid
(
nf_instance_id
))
{
http_code
=
HTTP_STATUS_CODE_400_BAD_REQUEST
;
Logger
::
nrf_app
().
debug
(
Logger
::
nrf_app
().
info
(
"Bad UUID format for NF Instance ID (%s)"
,
nf_instance_id
.
c_str
());
problem_details
.
setCause
(
protocol_application_error_e2str
[
MANDATORY_QUERY_PARAM_INCORRECT
]);
...
...
@@ -148,7 +151,8 @@ void nrf_app::handle_register_nf_instance(
http_code
=
HTTP_STATUS_CODE_201_CREATED
;
// add to the DB
add_nf_profile
(
nf_instance_id
,
sn
);
Logger
::
nrf_app
().
debug
(
"Added/Updated NF Profile to the DB"
);
Logger
::
nrf_app
().
info
(
"Added/Updated NF Profile (ID %s) to the DB"
,
nf_instance_id
.
c_str
());
// Heartbeart management for this NF profile
// get current time
...
...
@@ -210,7 +214,7 @@ void nrf_app::handle_update_nf_instance(
case
PATCH_OP_REPLACE
:
{
if
(
path
.
compare
(
"nfStatus"
)
==
0
)
{
is_heartbeart_procedure
=
true
;
Logger
::
nrf_app
().
debug
(
"NF Heart-Beat procedure!"
);
Logger
::
nrf_app
().
info
(
"NF Heart-Beat procedure!"
);
}
if
(
sn
.
get
()
->
replace_profile_info
(
path
,
p
.
getValue
()))
{
update_nf_profile
(
nf_instance_id
,
sn
);
...
...
@@ -352,7 +356,7 @@ void nrf_app::handle_get_nf_instance(
profile
=
find_nf_profile
(
nf_instance_id
);
if
(
profile
.
get
()
==
nullptr
)
{
Logger
::
nrf_app
().
debug
(
Logger
::
nrf_app
().
info
(
"Profile with profile ID %s not found"
,
nf_instance_id
.
c_str
());
http_code
=
HTTP_STATUS_CODE_404_NOT_FOUND
;
problem_details
.
setCause
(
...
...
@@ -383,7 +387,7 @@ void nrf_app::handle_deregister_nf_instance(
m_event_sub
.
nf_status_deregistered
(
profile
);
// from nrf_app
if
(
remove_nf_profile
(
nf_instance_id
))
{
Logger
::
nrf_app
().
debug
(
Logger
::
nrf_app
().
info
(
"Removed NF profile with profile ID %s"
,
nf_instance_id
.
c_str
());
http_code
=
HTTP_STATUS_CODE_204_NO_CONTENT
;
return
;
...
...
@@ -394,7 +398,7 @@ void nrf_app::handle_deregister_nf_instance(
return
;
}
}
else
{
Logger
::
nrf_app
().
debug
(
Logger
::
nrf_app
().
info
(
"Profile with profile ID %s not found"
,
nf_instance_id
.
c_str
());
http_code
=
HTTP_STATUS_CODE_404_NOT_FOUND
;
problem_details
.
setCause
(
...
...
@@ -1017,7 +1021,7 @@ void nrf_app::handle_nf_status_profile_changed(const std::string& profile_id) {
void
nrf_app
::
get_subscription_list
(
const
std
::
string
&
profile_id
,
const
uint8_t
&
notification_type
,
std
::
vector
<
std
::
string
>&
uris
)
const
{
Logger
::
nrf_app
().
debug
(
Logger
::
nrf_app
().
info
(
"
\t
Get the list of subscriptions related to this profile, profile id %s"
,
profile_id
.
c_str
());
...
...
@@ -1074,7 +1078,7 @@ void nrf_app::get_subscription_list(
std
::
string
nf_type
=
nf_type_e2str
[
profile
.
get
()
->
get_nf_type
()];
if
(
nf_type
.
compare
(
condition
.
nf_type
)
==
0
)
{
uris
.
push_back
(
uri
);
Logger
::
nrf_app
().
debug
(
Logger
::
nrf_app
().
info
(
"
\t
Subscription id %s, uri %s"
,
s
.
first
.
c_str
(),
uri
.
c_str
());
}
}
break
;
...
...
src/nrf_app/nrf_jwt.cpp
View file @
2f1e8ef3
...
...
@@ -54,6 +54,7 @@ bool nrf_jwt::generate_signature(
// Get the encoded string/assertion
signature
=
obj
.
signature
();
return
true
;
}
//------------------------------------------------------------------------------
...
...
@@ -75,6 +76,7 @@ bool nrf_jwt::generate_signature(
// Get the encoded string/assertion
signature
=
obj
.
signature
();
return
true
;
}
//------------------------------------------------------------------------------
...
...
@@ -83,6 +85,7 @@ bool nrf_jwt::get_secret_key(
const
std
::
string
&
target_nf_type
,
std
::
string
&
key
)
const
{
// TODO:
key
=
"secret"
;
return
true
;
}
//------------------------------------------------------------------------------
...
...
@@ -91,6 +94,7 @@ bool nrf_jwt::get_secret_key(
std
::
string
&
key
)
const
{
// TODO:
key
=
"secret"
;
return
true
;
}
//------------------------------------------------------------------------------
...
...
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