Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
oai
cn5g
oai-cn5g-udr
Commits
5ba269dd
Commit
5ba269dd
authored
Jan 28, 2021
by
yangjian
Browse files
update UDR: logger and SequenceNumber
parent
096a3f97
Changes
20
Hide whitespace changes
Inline
Side-by-side
src/api/AMF3GPPAccessRegistrationDocumentApi.cpp
View file @
5ba269dd
/**
* Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 2.1.2
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
...
...
@@ -12,6 +12,7 @@
#include "AMF3GPPAccessRegistrationDocumentApi.h"
#include "Helpers.h"
#include "logger.hpp"
namespace
org
{
namespace
openapitools
{
...
...
@@ -21,7 +22,7 @@ namespace api {
using
namespace
org
::
openapitools
::
server
::
helpers
;
using
namespace
org
::
openapitools
::
server
::
model
;
AMF3GPPAccessRegistrationDocumentApi
::
AMF3GPPAccessRegistrationDocumentApi
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
rtr
)
{
AMF3GPPAccessRegistrationDocumentApi
::
AMF3GPPAccessRegistrationDocumentApi
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
rtr
)
{
router
=
rtr
;
}
...
...
@@ -41,12 +42,13 @@ void AMF3GPPAccessRegistrationDocumentApi::setupRoutes() {
}
void
AMF3GPPAccessRegistrationDocumentApi
::
amf_context3gpp_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
Logger
::
udr_server
().
info
(
"AMF3GPPAccessRegistration Method: PATCH!"
);
// Getting the path params
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
// Getting the body param
std
::
vector
<
PatchItem
>
patchItem
;
// Getting the query params
auto
supportedFeaturesQuery
=
request
.
query
().
get
(
"supported-features"
);
Pistache
::
Optional
<
std
::
string
>
supportedFeatures
;
...
...
@@ -56,7 +58,7 @@ void AMF3GPPAccessRegistrationDocumentApi::amf_context3gpp_handler(const Pistach
supportedFeatures
=
Pistache
::
Some
(
valueQuery_instance
);
}
}
try
{
nlohmann
::
json
::
parse
(
request
.
body
()).
get_to
(
patchItem
);
this
->
amf_context3gpp
(
ueId
,
patchItem
,
supportedFeatures
,
response
);
...
...
@@ -75,13 +77,14 @@ void AMF3GPPAccessRegistrationDocumentApi::amf_context3gpp_handler(const Pistach
}
void
AMF3GPPAccessRegistrationDocumentApi
::
create_amf_context3gpp_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
Logger
::
udr_server
().
info
(
"AMF3GPPAccessRegistration Method: PUT!"
);
// Getting the path params
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
// Getting the body param
Amf3GppAccessRegistration
amf3GppAccessRegistration
;
try
{
nlohmann
::
json
::
parse
(
request
.
body
()).
get_to
(
amf3GppAccessRegistration
);
this
->
create_amf_context3gpp
(
ueId
,
amf3GppAccessRegistration
,
response
);
...
...
@@ -100,9 +103,10 @@ void AMF3GPPAccessRegistrationDocumentApi::create_amf_context3gpp_handler(const
}
void
AMF3GPPAccessRegistrationDocumentApi
::
query_amf_context3gpp_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
Logger
::
udr_server
().
info
(
"AMF3GPPAccessRegistration Method: GET!"
);
// Getting the path params
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
// Getting the query params
auto
fieldsQuery
=
request
.
query
().
get
(
"fields"
);
Pistache
::
Optional
<
std
::
vector
<
std
::
string
>>
fields
;
...
...
@@ -120,7 +124,7 @@ void AMF3GPPAccessRegistrationDocumentApi::query_amf_context3gpp_handler(const P
supportedFeatures
=
Pistache
::
Some
(
valueQuery_instance
);
}
}
try
{
this
->
query_amf_context3gpp
(
ueId
,
fields
,
supportedFeatures
,
response
);
}
catch
(
nlohmann
::
detail
::
exception
&
e
)
{
...
...
src/api/AccessAndMobilitySubscriptionDataDocumentApi.cpp
View file @
5ba269dd
/**
* Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 2.1.2
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
...
...
@@ -12,6 +12,7 @@
#include "AccessAndMobilitySubscriptionDataDocumentApi.h"
#include "Helpers.h"
#include "logger.hpp"
namespace
org
{
namespace
openapitools
{
...
...
@@ -21,7 +22,7 @@ namespace api {
using
namespace
org
::
openapitools
::
server
::
helpers
;
using
namespace
org
::
openapitools
::
server
::
model
;
AccessAndMobilitySubscriptionDataDocumentApi
::
AccessAndMobilitySubscriptionDataDocumentApi
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
rtr
)
{
AccessAndMobilitySubscriptionDataDocumentApi
::
AccessAndMobilitySubscriptionDataDocumentApi
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
rtr
)
{
router
=
rtr
;
}
...
...
@@ -39,12 +40,13 @@ void AccessAndMobilitySubscriptionDataDocumentApi::setupRoutes() {
}
void
AccessAndMobilitySubscriptionDataDocumentApi
::
query_am_data_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
Logger
::
udr_server
().
info
(
"AccessAndMobilitySubscriptionData Method: GET!"
);
// Getting the path params
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
auto
servingPlmnId
=
request
.
param
(
":servingPlmnId"
).
as
<
std
::
string
>
();
//std::cout<<"********* servingPlmnId ********* "<<servingPlmnId<<std::endl;
// Getting the query params
auto
fieldsQuery
=
request
.
query
().
get
(
"fields"
);
Pistache
::
Optional
<
std
::
vector
<
std
::
string
>>
fields
;
...
...
@@ -62,7 +64,7 @@ void AccessAndMobilitySubscriptionDataDocumentApi::query_am_data_handler(const P
supportedFeatures
=
Pistache
::
Some
(
valueQuery_instance
);
}
}
// Getting the header params
auto
ifNoneMatch
=
request
.
headers
().
tryGetRaw
(
"If-None-Match"
);
auto
ifModifiedSince
=
request
.
headers
().
tryGetRaw
(
"If-Modified-Since"
);
...
...
src/api/AuthenticationStatusDocumentApi.cpp
View file @
5ba269dd
/**
* Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 2.1.2
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
...
...
@@ -12,6 +12,7 @@
#include "AuthenticationStatusDocumentApi.h"
#include "Helpers.h"
#include "logger.hpp"
namespace
org
{
namespace
openapitools
{
...
...
@@ -21,7 +22,7 @@ namespace api {
using
namespace
org
::
openapitools
::
server
::
helpers
;
using
namespace
org
::
openapitools
::
server
::
model
;
AuthenticationStatusDocumentApi
::
AuthenticationStatusDocumentApi
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
rtr
)
{
AuthenticationStatusDocumentApi
::
AuthenticationStatusDocumentApi
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
rtr
)
{
router
=
rtr
;
}
...
...
@@ -34,7 +35,7 @@ void AuthenticationStatusDocumentApi::setupRoutes() {
Routes
::
Put
(
*
router
,
base
+
"/subscription-data/:ueId/authentication-data/authentication-status"
,
Routes
::
bind
(
&
AuthenticationStatusDocumentApi
::
create_authentication_status_handler
,
this
));
Routes
::
Delete
(
*
router
,
base
+
"/subscription-data/:ueId/authentication-data/authentication-status"
,
Routes
::
bind
(
&
AuthenticationStatusDocumentApi
::
delete_authentication_status_handler
,
this
));
Routes
::
Get
(
*
router
,
base
+
"/subscription-data/:ueId/authentication-data/authentication-status"
,
Routes
::
bind
(
&
AuthenticationStatusDocumentApi
::
query_authentication_status_handler
,
this
));
...
...
@@ -42,18 +43,19 @@ void AuthenticationStatusDocumentApi::setupRoutes() {
router
->
addCustomHandler
(
Routes
::
bind
(
&
AuthenticationStatusDocumentApi
::
authentication_status_document_api_default_handler
,
this
));
}
void
AuthenticationStatusDocumentApi
::
create_authentication_status_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
void
AuthenticationStatusDocumentApi
::
create_authentication_status_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
Logger
::
udr_server
().
info
(
"AuthenticationStatus Method: PUT!"
);
// Getting the path params
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
// Getting the body param
AuthEvent
authEvent
;
//std::cout << request.body() << std::endl;
try
{
nlohmann
::
json
::
parse
(
request
.
body
()).
get_to
(
authEvent
);
this
->
create_authentication_status
(
ueId
,
authEvent
,
response
);
...
...
@@ -72,11 +74,12 @@ void AuthenticationStatusDocumentApi::create_authentication_status_handler(const
}
void
AuthenticationStatusDocumentApi
::
delete_authentication_status_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
void
AuthenticationStatusDocumentApi
::
delete_authentication_status_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
Logger
::
udr_server
().
info
(
"AuthenticationStatus Method: DELETE!"
);
// Getting the path params
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
try
{
this
->
delete_authentication_status
(
ueId
,
response
);
}
catch
(
nlohmann
::
detail
::
exception
&
e
)
{
...
...
@@ -93,11 +96,12 @@ void AuthenticationStatusDocumentApi::delete_authentication_status_handler(const
}
}
void
AuthenticationStatusDocumentApi
::
query_authentication_status_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
void
AuthenticationStatusDocumentApi
::
query_authentication_status_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
Logger
::
udr_server
().
info
(
"AuthenticationStatus Method: GET!"
);
// Getting the path params
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
// Getting the query params
auto
fieldsQuery
=
request
.
query
().
get
(
"fields"
);
Pistache
::
Optional
<
std
::
vector
<
std
::
string
>>
fields
;
...
...
@@ -115,7 +119,7 @@ void AuthenticationStatusDocumentApi::query_authentication_status_handler(const
supportedFeatures
=
Pistache
::
Some
(
valueQuery_instance
);
}
}
try
{
this
->
query_authentication_status
(
ueId
,
fields
,
supportedFeatures
,
response
);
}
catch
(
nlohmann
::
detail
::
exception
&
e
)
{
...
...
src/api/SDMSubscriptionDocumentApi.cpp
View file @
5ba269dd
/**
* Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 2.1.2
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
...
...
@@ -12,6 +12,7 @@
#include "SDMSubscriptionDocumentApi.h"
#include "Helpers.h"
#include "logger.hpp"
namespace
org
{
namespace
openapitools
{
...
...
@@ -21,7 +22,7 @@ namespace api {
using
namespace
org
::
openapitools
::
server
::
helpers
;
using
namespace
org
::
openapitools
::
server
::
model
;
SDMSubscriptionDocumentApi
::
SDMSubscriptionDocumentApi
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
rtr
)
{
SDMSubscriptionDocumentApi
::
SDMSubscriptionDocumentApi
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
rtr
)
{
router
=
rtr
;
}
...
...
@@ -42,13 +43,15 @@ void SDMSubscriptionDocumentApi::setupRoutes() {
}
void
SDMSubscriptionDocumentApi
::
modifysdm_subscription_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
Logger
::
udr_server
().
info
(
"SDMSubscription Method: PATCH!"
);
// Getting the path params
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
auto
subsId
=
request
.
param
(
":subsId"
).
as
<
std
::
string
>
();
// Getting the body param
std
::
vector
<
PatchItem
>
patchItem
;
// Getting the query params
auto
supportedFeaturesQuery
=
request
.
query
().
get
(
"supported-features"
);
Pistache
::
Optional
<
std
::
string
>
supportedFeatures
;
...
...
@@ -58,7 +61,7 @@ void SDMSubscriptionDocumentApi::modifysdm_subscription_handler(const Pistache::
supportedFeatures
=
Pistache
::
Some
(
valueQuery_instance
);
}
}
try
{
nlohmann
::
json
::
parse
(
request
.
body
()).
get_to
(
patchItem
);
this
->
modifysdm_subscription
(
ueId
,
subsId
,
patchItem
,
supportedFeatures
,
response
);
...
...
@@ -77,10 +80,12 @@ void SDMSubscriptionDocumentApi::modifysdm_subscription_handler(const Pistache::
}
void
SDMSubscriptionDocumentApi
::
querysdm_subscription_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
Logger
::
udr_server
().
info
(
"SDMSubscription Method: GET!"
);
// Getting the path params
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
auto
subsId
=
request
.
param
(
":subsId"
).
as
<
std
::
string
>
();
try
{
this
->
querysdm_subscription
(
ueId
,
subsId
,
response
);
}
catch
(
nlohmann
::
detail
::
exception
&
e
)
{
...
...
@@ -98,10 +103,12 @@ void SDMSubscriptionDocumentApi::querysdm_subscription_handler(const Pistache::R
}
void
SDMSubscriptionDocumentApi
::
removesdm_subscriptions_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
Logger
::
udr_server
().
info
(
"SDMSubscription Method: DELETE!"
);
// Getting the path params
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
auto
subsId
=
request
.
param
(
":subsId"
).
as
<
std
::
string
>
();
try
{
this
->
removesdm_subscriptions
(
ueId
,
subsId
,
response
);
}
catch
(
nlohmann
::
detail
::
exception
&
e
)
{
...
...
@@ -119,14 +126,16 @@ void SDMSubscriptionDocumentApi::removesdm_subscriptions_handler(const Pistache:
}
void
SDMSubscriptionDocumentApi
::
updatesdmsubscriptions_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
Logger
::
udr_server
().
info
(
"SDMSubscription Method: PUT!"
);
// Getting the path params
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
auto
subsId
=
request
.
param
(
":subsId"
).
as
<
std
::
string
>
();
// Getting the body param
SdmSubscription
sdmSubscription
;
try
{
nlohmann
::
json
::
parse
(
request
.
body
()).
get_to
(
sdmSubscription
);
this
->
updatesdmsubscriptions
(
ueId
,
subsId
,
sdmSubscription
,
response
);
...
...
src/api/SDMSubscriptionsCollectionApi.cpp
View file @
5ba269dd
/**
* Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 2.1.2
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
...
...
@@ -12,6 +12,7 @@
#include "SDMSubscriptionsCollectionApi.h"
#include "Helpers.h"
#include "logger.hpp"
namespace
org
{
namespace
openapitools
{
...
...
@@ -21,7 +22,7 @@ namespace api {
using
namespace
org
::
openapitools
::
server
::
helpers
;
using
namespace
org
::
openapitools
::
server
::
model
;
SDMSubscriptionsCollectionApi
::
SDMSubscriptionsCollectionApi
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
rtr
)
{
SDMSubscriptionsCollectionApi
::
SDMSubscriptionsCollectionApi
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
rtr
)
{
router
=
rtr
;
}
...
...
@@ -40,13 +41,15 @@ void SDMSubscriptionsCollectionApi::setupRoutes() {
}
void
SDMSubscriptionsCollectionApi
::
create_sdm_subscriptions_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
Logger
::
udr_server
().
info
(
"SDMSubscriptions Method: POST!"
);
// Getting the path params
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
// Getting the body param
SdmSubscription
sdmSubscription
;
try
{
nlohmann
::
json
::
parse
(
request
.
body
()).
get_to
(
sdmSubscription
);
this
->
create_sdm_subscriptions
(
ueId
,
sdmSubscription
,
response
);
...
...
@@ -65,9 +68,11 @@ void SDMSubscriptionsCollectionApi::create_sdm_subscriptions_handler(const Pista
}
void
SDMSubscriptionsCollectionApi
::
querysdmsubscriptions_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
Logger
::
udr_server
().
info
(
"SDMSubscriptions Method: GET!"
);
// Getting the path params
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
// Getting the query params
auto
supportedFeaturesQuery
=
request
.
query
().
get
(
"supported-features"
);
Pistache
::
Optional
<
std
::
string
>
supportedFeatures
;
...
...
@@ -77,7 +82,7 @@ void SDMSubscriptionsCollectionApi::querysdmsubscriptions_handler(const Pistache
supportedFeatures
=
Pistache
::
Some
(
valueQuery_instance
);
}
}
try
{
this
->
querysdmsubscriptions
(
ueId
,
supportedFeatures
,
response
);
}
catch
(
nlohmann
::
detail
::
exception
&
e
)
{
...
...
src/api/SMFRegistrationDocumentApi.cpp
View file @
5ba269dd
/**
* Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 2.1.2
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
...
...
@@ -12,6 +12,7 @@
#include "SMFRegistrationDocumentApi.h"
#include "Helpers.h"
#include "logger.hpp"
namespace
org
{
namespace
openapitools
{
...
...
@@ -21,7 +22,7 @@ namespace api {
using
namespace
org
::
openapitools
::
server
::
helpers
;
using
namespace
org
::
openapitools
::
server
::
model
;
SMFRegistrationDocumentApi
::
SMFRegistrationDocumentApi
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
rtr
)
{
SMFRegistrationDocumentApi
::
SMFRegistrationDocumentApi
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
rtr
)
{
router
=
rtr
;
}
...
...
@@ -41,14 +42,16 @@ void SMFRegistrationDocumentApi::setupRoutes() {
}
void
SMFRegistrationDocumentApi
::
create_smf_context_non3gpp_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
Logger
::
udr_server
().
info
(
"SMFRegistration Method: PUT!"
);
// Getting the path params
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
auto
pduSessionId
=
request
.
param
(
":pduSessionId"
).
as
<
int32_t
>
();
// Getting the body param
SmfRegistration
smfRegistration
;
try
{
nlohmann
::
json
::
parse
(
request
.
body
()).
get_to
(
smfRegistration
);
this
->
create_smf_context_non3gpp
(
ueId
,
pduSessionId
,
smfRegistration
,
response
);
...
...
@@ -67,10 +70,12 @@ void SMFRegistrationDocumentApi::create_smf_context_non3gpp_handler(const Pistac
}
void
SMFRegistrationDocumentApi
::
delete_smf_context_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
Logger
::
udr_server
().
info
(
"SMFRegistration Method: DELETE!"
);
// Getting the path params
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
auto
pduSessionId
=
request
.
param
(
":pduSessionId"
).
as
<
int32_t
>
();
try
{
this
->
delete_smf_context
(
ueId
,
pduSessionId
,
response
);
}
catch
(
nlohmann
::
detail
::
exception
&
e
)
{
...
...
@@ -88,10 +93,12 @@ void SMFRegistrationDocumentApi::delete_smf_context_handler(const Pistache::Rest
}
void
SMFRegistrationDocumentApi
::
query_smf_registration_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
Logger
::
udr_server
().
info
(
"SMFRegistration Method: GET!"
);
// Getting the path params
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
auto
pduSessionId
=
request
.
param
(
":pduSessionId"
).
as
<
int32_t
>
();
// Getting the query params
auto
fieldsQuery
=
request
.
query
().
get
(
"fields"
);
Pistache
::
Optional
<
std
::
vector
<
std
::
string
>>
fields
;
...
...
@@ -109,7 +116,7 @@ void SMFRegistrationDocumentApi::query_smf_registration_handler(const Pistache::
supportedFeatures
=
Pistache
::
Some
(
valueQuery_instance
);
}
}
try
{
this
->
query_smf_registration
(
ueId
,
pduSessionId
,
fields
,
supportedFeatures
,
response
);
}
catch
(
nlohmann
::
detail
::
exception
&
e
)
{
...
...
src/api/SMFRegistrationsCollectionApi.cpp
View file @
5ba269dd
/**
* Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 2.1.2
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
...
...
@@ -12,6 +12,7 @@
#include "SMFRegistrationsCollectionApi.h"
#include "Helpers.h"
#include "logger.hpp"
namespace
org
{
namespace
openapitools
{
...
...
@@ -21,7 +22,7 @@ namespace api {
using
namespace
org
::
openapitools
::
server
::
helpers
;
using
namespace
org
::
openapitools
::
server
::
model
;
SMFRegistrationsCollectionApi
::
SMFRegistrationsCollectionApi
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
rtr
)
{
SMFRegistrationsCollectionApi
::
SMFRegistrationsCollectionApi
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
rtr
)
{
router
=
rtr
;
}
...
...
@@ -39,9 +40,10 @@ void SMFRegistrationsCollectionApi::setupRoutes() {
}
void
SMFRegistrationsCollectionApi
::
query_smf_reg_list_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
Logger
::
udr_server
().
info
(
"SMFRegistrations Method: GET!"
);
// Getting the path params
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
// Getting the query params
auto
supportedFeaturesQuery
=
request
.
query
().
get
(
"supported-features"
);
Pistache
::
Optional
<
std
::
string
>
supportedFeatures
;
...
...
@@ -51,7 +53,7 @@ void SMFRegistrationsCollectionApi::query_smf_reg_list_handler(const Pistache::R
supportedFeatures
=
Pistache
::
Some
(
valueQuery_instance
);
}
}
try
{
this
->
query_smf_reg_list
(
ueId
,
supportedFeatures
,
response
);
}
catch
(
nlohmann
::
detail
::
exception
&
e
)
{
...
...
src/api/SMFSelectionSubscriptionDataDocumentApi.cpp
View file @
5ba269dd
/**
* Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 2.1.2
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
...
...
@@ -12,6 +12,7 @@
#include "SMFSelectionSubscriptionDataDocumentApi.h"
#include "Helpers.h"
#include "logger.hpp"
namespace
org
{
namespace
openapitools
{
...
...
@@ -21,7 +22,7 @@ namespace api {
using
namespace
org
::
openapitools
::
server
::
helpers
;
using
namespace
org
::
openapitools
::
server
::
model
;
SMFSelectionSubscriptionDataDocumentApi
::
SMFSelectionSubscriptionDataDocumentApi
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
rtr
)
{
SMFSelectionSubscriptionDataDocumentApi
::
SMFSelectionSubscriptionDataDocumentApi
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
rtr
)
{
router
=
rtr
;
}
...
...
@@ -39,10 +40,11 @@ void SMFSelectionSubscriptionDataDocumentApi::setupRoutes() {
}
void
SMFSelectionSubscriptionDataDocumentApi
::
query_smf_select_data_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
Logger
::
udr_server
().
info
(
"SMFSelectionSubscriptionData Method: GET!"
);
// Getting the path params
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
auto
servingPlmnId
=
request
.
param
(
":servingPlmnId"
).
as
<
std
::
string
>
();
// Getting the query params
auto
fieldsQuery
=
request
.
query
().
get
(
"fields"
);
Pistache
::
Optional
<
std
::
vector
<
std
::
string
>>
fields
;
...
...
@@ -60,7 +62,7 @@ void SMFSelectionSubscriptionDataDocumentApi::query_smf_select_data_handler(cons
supportedFeatures
=
Pistache
::
Some
(
valueQuery_instance
);
}
}
// Getting the header params
auto
ifNoneMatch
=
request
.
headers
().
tryGetRaw
(
"If-None-Match"
);
auto
ifModifiedSince
=
request
.
headers
().
tryGetRaw
(
"If-Modified-Since"
);
...
...
src/api/SessionManagementSubscriptionDataApi.cpp
View file @
5ba269dd
/**
* Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 2.1.2
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
...
...
@@ -12,6 +12,7 @@
#include "SessionManagementSubscriptionDataApi.h"
#include "Helpers.h"
#include "logger.hpp"
namespace
org
{
namespace
openapitools
{
...
...
@@ -21,7 +22,7 @@ namespace api {
using
namespace
org
::
openapitools
::
server
::
helpers
;
using
namespace
org
::
openapitools
::
server
::
model
;