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
ff92e538
Commit
ff92e538
authored
Jun 23, 2022
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanup
parent
c8356911
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
2 additions
and
35 deletions
+2
-35
src/amf-app/amf_app.cpp
src/amf-app/amf_app.cpp
+2
-1
src/sbi/amf_server/api/AMFConfigurationApi.cpp
src/sbi/amf_server/api/AMFConfigurationApi.cpp
+0
-24
src/sbi/amf_server/api/AMFConfigurationApi.h
src/sbi/amf_server/api/AMFConfigurationApi.h
+0
-5
src/sbi/amf_server/impl/AMFConfigurationApiImpl.cpp
src/sbi/amf_server/impl/AMFConfigurationApiImpl.cpp
+0
-3
src/sbi/amf_server/impl/AMFConfigurationApiImpl.h
src/sbi/amf_server/impl/AMFConfigurationApiImpl.h
+0
-2
No files found.
src/amf-app/amf_app.cpp
View file @
ff92e538
...
...
@@ -755,6 +755,7 @@ void amf_app::handle_itti_message(itti_sbi_update_amf_configuration& itti_msg) {
Logger
::
amf_app
().
debug
(
"AMF configuration:
\n
%s"
,
response_data
[
"content"
].
dump
().
c_str
());
response_data
[
"httpResponseCode"
]
=
200
;
// TODO:
// TODO: Send message to update AMF profile at NRF
}
else
{
response_data
[
"httpResponseCode"
]
=
400
;
// TODO:
oai
::
amf
::
model
::
ProblemDetails
problem_details
=
{};
...
...
@@ -983,7 +984,7 @@ void amf_app::generate_amf_profile() {
// generate UUID
generate_uuid
();
nf_instance_profile
.
set_nf_instance_id
(
amf_instance_id
);
nf_instance_profile
.
set_nf_instance_name
(
"OAI-AMF"
);
nf_instance_profile
.
set_nf_instance_name
(
amf_cfg
.
amf_name
);
nf_instance_profile
.
set_nf_type
(
"AMF"
);
nf_instance_profile
.
set_nf_status
(
"REGISTERED"
);
nf_instance_profile
.
set_nf_heartBeat_timer
(
50
);
...
...
src/sbi/amf_server/api/AMFConfigurationApi.cpp
View file @
ff92e538
...
...
@@ -49,10 +49,6 @@ void AMFConfigurationApi::setupRoutes() {
*
router
,
base
+
amf_cfg
.
sbi_api_version
+
"/configuration/"
,
Routes
::
bind
(
&
AMFConfigurationApi
::
update_configuration_handler
,
this
));
Routes
::
Put
(
*
router
,
base
+
amf_cfg
.
sbi_api_version
+
"/configuration/nssai"
,
Routes
::
bind
(
&
AMFConfigurationApi
::
create_nssai_handler
,
this
));
// Default handler, called when a route is not found
router
->
addCustomHandler
(
Routes
::
bind
(
&
AMFConfigurationApi
::
configuration_api_default_handler
,
this
));
...
...
@@ -97,26 +93,6 @@ void AMFConfigurationApi::update_configuration_handler(
}
}
void
AMFConfigurationApi
::
create_nssai_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
try
{
auto
json_data
=
nlohmann
::
json
::
parse
(
request
.
body
());
this
->
create_nssai
(
json_data
,
response
);
}
catch
(
nlohmann
::
detail
::
exception
&
e
)
{
// send a 400 error
response
.
send
(
Pistache
::
Http
::
Code
::
Bad_Request
,
e
.
what
());
return
;
}
catch
(
Pistache
::
Http
::
HttpError
&
e
)
{
response
.
send
(
static_cast
<
Pistache
::
Http
::
Code
>
(
e
.
code
()),
e
.
what
());
return
;
}
catch
(
std
::
exception
&
e
)
{
// send a 500 error
response
.
send
(
Pistache
::
Http
::
Code
::
Internal_Server_Error
,
e
.
what
());
return
;
}
}
void
AMFConfigurationApi
::
configuration_api_default_handler
(
const
Pistache
::
Rest
::
Request
&
,
Pistache
::
Http
::
ResponseWriter
response
)
{
response
.
send
(
...
...
src/sbi/amf_server/api/AMFConfigurationApi.h
View file @
ff92e538
...
...
@@ -48,9 +48,6 @@ class AMFConfigurationApi {
void
update_configuration_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
);
void
create_nssai_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
);
void
configuration_api_default_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
);
...
...
@@ -61,8 +58,6 @@ class AMFConfigurationApi {
virtual
void
update_configuration
(
nlohmann
::
json
&
configuration_info
,
Pistache
::
Http
::
ResponseWriter
&
response
)
=
0
;
virtual
void
create_nssai
(
nlohmann
::
json
&
json_data
,
Pistache
::
Http
::
ResponseWriter
&
response
)
=
0
;
};
}
// namespace oai::amf::api
...
...
src/sbi/amf_server/impl/AMFConfigurationApiImpl.cpp
View file @
ff92e538
...
...
@@ -173,7 +173,4 @@ void AMFConfigurationApiImpl::update_configuration(
}
}
void
AMFConfigurationApiImpl
::
create_nssai
(
nlohmann
::
json
&
json_data
,
Pistache
::
Http
::
ResponseWriter
&
response
)
{}
}
// namespace oai::amf::api
src/sbi/amf_server/impl/AMFConfigurationApiImpl.h
View file @
ff92e538
...
...
@@ -44,8 +44,6 @@ class AMFConfigurationApiImpl : public oai::amf::api::AMFConfigurationApi {
void
update_configuration
(
nlohmann
::
json
&
configuration_info
,
Pistache
::
Http
::
ResponseWriter
&
response
);
void
create_nssai
(
nlohmann
::
json
&
json_data
,
Pistache
::
Http
::
ResponseWriter
&
response
);
};
}
// namespace oai::amf::api
...
...
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