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
b4db73b6
Commit
b4db73b6
authored
Dec 05, 2020
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
integrate API server
parent
5c24d6a5
Changes
46
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
46 changed files
with
808 additions
and
335 deletions
+808
-335
src/api-server/CMakeLists.txt
src/api-server/CMakeLists.txt
+40
-36
src/api-server/api/CompleteStoredSearchDocumentApi.cpp
src/api-server/api/CompleteStoredSearchDocumentApi.cpp
+1
-1
src/api-server/api/NFInstanceIDDocumentApi.cpp
src/api-server/api/NFInstanceIDDocumentApi.cpp
+1
-1
src/api-server/api/NFInstancesStoreApi.cpp
src/api-server/api/NFInstancesStoreApi.cpp
+75
-61
src/api-server/api/NFInstancesStoreApi.h
src/api-server/api/NFInstancesStoreApi.h
+3
-3
src/api-server/api/StoredSearchDocumentApi.cpp
src/api-server/api/StoredSearchDocumentApi.cpp
+1
-1
src/api-server/api/SubscriptionIDDocumentApi.cpp
src/api-server/api/SubscriptionIDDocumentApi.cpp
+1
-1
src/api-server/api/SubscriptionsCollectionApi.cpp
src/api-server/api/SubscriptionsCollectionApi.cpp
+1
-1
src/api-server/impl/CompleteStoredSearchDocumentApiImpl.cpp
src/api-server/impl/CompleteStoredSearchDocumentApiImpl.cpp
+21
-15
src/api-server/impl/CompleteStoredSearchDocumentApiImpl.h
src/api-server/impl/CompleteStoredSearchDocumentApiImpl.h
+17
-8
src/api-server/impl/NFInstanceIDDocumentApiImpl.cpp
src/api-server/impl/NFInstanceIDDocumentApiImpl.cpp
+5
-2
src/api-server/impl/NFInstanceIDDocumentApiImpl.h
src/api-server/impl/NFInstanceIDDocumentApiImpl.h
+8
-3
src/api-server/impl/NFInstancesStoreApiImpl.cpp
src/api-server/impl/NFInstancesStoreApiImpl.cpp
+68
-15
src/api-server/impl/NFInstancesStoreApiImpl.h
src/api-server/impl/NFInstancesStoreApiImpl.h
+12
-6
src/api-server/impl/StoredSearchDocumentApiImpl.cpp
src/api-server/impl/StoredSearchDocumentApiImpl.cpp
+21
-15
src/api-server/impl/StoredSearchDocumentApiImpl.h
src/api-server/impl/StoredSearchDocumentApiImpl.h
+8
-3
src/api-server/impl/SubscriptionIDDocumentApiImpl.cpp
src/api-server/impl/SubscriptionIDDocumentApiImpl.cpp
+26
-17
src/api-server/impl/SubscriptionIDDocumentApiImpl.h
src/api-server/impl/SubscriptionIDDocumentApiImpl.h
+8
-3
src/api-server/impl/SubscriptionsCollectionApiImpl.cpp
src/api-server/impl/SubscriptionsCollectionApiImpl.cpp
+22
-15
src/api-server/impl/SubscriptionsCollectionApiImpl.h
src/api-server/impl/SubscriptionsCollectionApiImpl.h
+8
-3
src/api-server/model/Atom.cpp
src/api-server/model/Atom.cpp
+2
-2
src/api-server/model/Atom.h
src/api-server/model/Atom.h
+4
-4
src/api-server/model/ChangeItem.cpp
src/api-server/model/ChangeItem.cpp
+4
-4
src/api-server/model/ChangeItem.h
src/api-server/model/ChangeItem.h
+7
-7
src/api-server/model/Helpers.cpp
src/api-server/model/Helpers.cpp
+44
-3
src/api-server/model/Helpers.h
src/api-server/model/Helpers.h
+24
-5
src/api-server/model/NFProfile.cpp
src/api-server/model/NFProfile.cpp
+16
-12
src/api-server/model/NFProfile.h
src/api-server/model/NFProfile.h
+11
-11
src/api-server/model/NfTypeCond.cpp
src/api-server/model/NfTypeCond.cpp
+2
-2
src/api-server/model/NfTypeCond.h
src/api-server/model/NfTypeCond.h
+5
-4
src/api-server/model/PatchItem.cpp
src/api-server/model/PatchItem.cpp
+2
-2
src/api-server/model/PatchItem.h
src/api-server/model/PatchItem.h
+4
-4
src/api-server/model/SubscriptionData.cpp
src/api-server/model/SubscriptionData.cpp
+14
-5
src/api-server/model/SubscriptionData.h
src/api-server/model/SubscriptionData.h
+52
-8
src/api-server/nrf-api-server.cpp
src/api-server/nrf-api-server.cpp
+97
-0
src/api-server/nrf-api-server.h
src/api-server/nrf-api-server.h
+83
-0
src/common/CMakeLists.txt
src/common/CMakeLists.txt
+0
-3
src/common/logger.cpp
src/common/logger.cpp
+1
-8
src/common/logger.hpp
src/common/logger.hpp
+3
-32
src/common/utils/get_gateway_netlink.cpp
src/common/utils/get_gateway_netlink.cpp
+2
-2
src/nrf_app/nrf_app.cpp
src/nrf_app/nrf_app.cpp
+32
-0
src/nrf_app/nrf_app.hpp
src/nrf_app/nrf_app.hpp
+41
-0
src/nrf_app/nrf_config.cpp
src/nrf_app/nrf_config.cpp
+1
-1
src/nrf_app/nrf_config.hpp
src/nrf_app/nrf_config.hpp
+4
-2
src/oai-nrf/CMakeLists.txt
src/oai-nrf/CMakeLists.txt
+1
-1
src/oai-nrf/main.cpp
src/oai-nrf/main.cpp
+5
-3
No files found.
src/api-server/CMakeLists.txt
View file @
b4db73b6
cmake_minimum_required
(
VERSION 3.2
)
project
(
api-server
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-std=c++14 -pg -g3"
)
include
(
ExternalProject
)
set
(
EXTERNAL_INSTALL_LOCATION
${
CMAKE_CURRENT_SOURCE_DIR
}
/external
)
ExternalProject_Add
(
PISTACHE
GIT_REPOSITORY https://github.com/oktal/pistache.git
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=
${
EXTERNAL_INSTALL_LOCATION
}
)
ExternalProject_Add
(
NLOHMANN
GIT_REPOSITORY https://github.com/nlohmann/json.git
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=
${
EXTERNAL_INSTALL_LOCATION
}
)
include_directories
(
${
EXTERNAL_INSTALL_LOCATION
}
/include
)
link_directories
(
${
EXTERNAL_INSTALL_LOCATION
}
/lib
)
include_directories
(
model
)
include_directories
(
api
)
include_directories
(
impl
)
file
(
GLOB SRCS
${
CMAKE_CURRENT_SOURCE_DIR
}
/api/*.cpp
${
CMAKE_CURRENT_SOURCE_DIR
}
/impl/*.cpp
${
CMAKE_CURRENT_SOURCE_DIR
}
/model/*.cpp
${
CMAKE_CURRENT_SOURCE_DIR
}
/*.cpp
################################################################################
# Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The OpenAirInterface Software Alliance licenses this file to You under
# the OAI Public License, Version 1.1 (the "License"); you may not use this file
# except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.openairinterface.org/?page_id=698
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#-------------------------------------------------------------------------------
# For more information about the OpenAirInterface (OAI) Software Alliance:
# contact@openairinterface.org
################################################################################
set
(
NRF_API_SERVER_DIR
"
${
SRC_TOP_DIR
}
/api-server"
)
include_directories
(
${
NRF_API_SERVER_DIR
}
/api
)
include_directories
(
${
NRF_API_SERVER_DIR
}
/impl
)
include_directories
(
${
NRF_API_SERVER_DIR
}
/model
)
include_directories
(
${
NRF_API_SERVER_DIR
}
/
)
include_directories
(
${
SRC_TOP_DIR
}
/nrf_app
)
include_directories
(
${
SRC_TOP_DIR
}
/common
)
include_directories
(
${
SRC_TOP_DIR
}
/common/utils
)
include_directories
(
${
SRC_TOP_DIR
}
/../build/ext/spdlog/include
)
file
(
GLOB NRF_API_SERVER_src_files
${
NRF_API_SERVER_DIR
}
/nrf-api-server.cpp
${
NRF_API_SERVER_DIR
}
/model/*.cpp
${
NRF_API_SERVER_DIR
}
/api/*.cpp
${
NRF_API_SERVER_DIR
}
/impl/*.cpp
)
add_executable
(
${
PROJECT_NAME
}
${
SRCS
}
)
add_dependencies
(
${
PROJECT_NAME
}
PISTACHE NLOHMANN
)
target_link_libraries
(
${
PROJECT_NAME
}
pistache pthread
)
add_library
(
NRF_API STATIC
${
NRF_API_SERVER_src_files
}
)
\ No newline at end of file
src/api-server/api/CompleteStoredSearchDocumentApi.cpp
View file @
b4db73b6
...
...
@@ -17,7 +17,7 @@ namespace oai {
namespace
nrf
{
namespace
api
{
using
namespace
o
rg
::
openapitools
::
server
::
helpers
;
using
namespace
o
ai
::
nrf
::
helpers
;
using
namespace
oai
::
nrf
::
model
;
CompleteStoredSearchDocumentApi
::
CompleteStoredSearchDocumentApi
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
rtr
)
{
...
...
src/api-server/api/NFInstanceIDDocumentApi.cpp
View file @
b4db73b6
...
...
@@ -17,7 +17,7 @@ namespace oai {
namespace
nrf
{
namespace
api
{
using
namespace
o
rg
::
openapitools
::
server
::
helpers
;
using
namespace
o
ai
::
nrf
::
helpers
;
using
namespace
oai
::
nrf
::
model
;
NFInstanceIDDocumentApi
::
NFInstanceIDDocumentApi
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
rtr
)
{
...
...
src/api-server/api/NFInstancesStoreApi.cpp
View file @
b4db73b6
This diff is collapsed.
Click to expand it.
src/api-server/api/NFInstancesStoreApi.h
View file @
b4db73b6
...
...
@@ -32,7 +32,7 @@
#include "EventId.h"
#include "Guami.h"
#include "Ipv6Prefix.h"
#include "NFType.h"
//
#include "NFType.h"
#include "NwdafEvent.h"
#include "PduSessionType.h"
#include "PlmnId.h"
...
...
@@ -40,10 +40,10 @@
#include "ProblemDetails.h"
#include "SearchResult.h"
#include "ServiceName.h"
#include "Set.h"
#include "Snssai.h"
#include "Tai.h"
#include <string>
#include <set>
namespace
oai
{
namespace
nrf
{
...
...
@@ -120,7 +120,7 @@ private:
/// <param name="atsssCapability">ATSSS Capability (optional, default to AtsssCapability())</param>
/// <param name="upfUeIpAddrInd">UPF supporting allocating UE IP addresses/prefixes (optional, default to false)</param>
/// <param name="ifNoneMatch">Validator for conditional requests, as described in IETF RFC 7232, 3.2 (optional, default to "")</param>
virtual
void
search_nf_instances
(
const
Pistache
::
Optional
<
NFType
>
&
targetNfType
,
const
Pistache
::
Optional
<
NFType
>
&
requesterNfType
,
const
Pistache
::
Optional
<
std
::
string
>
&
requesterNfInstanceId
,
const
Pistache
::
Optional
<
Set
<
ServiceName
>>
&
serviceNames
,
const
Pistache
::
Optional
<
std
::
string
>
&
requesterNfInstanceFqdn
,
const
Pistache
::
Optional
<
std
::
vector
<
PlmnId
>>
&
targetPlmnList
,
const
Pistache
::
Optional
<
std
::
vector
<
PlmnId
>>
&
requesterPlmnList
,
const
Pistache
::
Optional
<
std
::
string
>
&
targetNfInstanceId
,
const
Pistache
::
Optional
<
std
::
string
>
&
targetNfFqdn
,
const
Pistache
::
Optional
<
std
::
string
>
&
hnrfUri
,
const
Pistache
::
Optional
<
std
::
vector
<
Snssai
>>
&
snssais
,
const
Pistache
::
Optional
<
std
::
vector
<
Snssai
>>
&
requesterSnssais
,
const
Pistache
::
Optional
<
std
::
vector
<
PlmnSnssai
>>
&
plmnSpecificSnssaiList
,
const
Pistache
::
Optional
<
std
::
string
>
&
dnn
,
const
Pistache
::
Optional
<
std
::
vector
<
std
::
string
>>
&
nsiList
,
const
Pistache
::
Optional
<
std
::
string
>
&
smfServingArea
,
const
Pistache
::
Optional
<
Tai
>
&
tai
,
const
Pistache
::
Optional
<
std
::
string
>
&
amfRegionId
,
const
Pistache
::
Optional
<
std
::
string
>
&
amfSetId
,
const
Pistache
::
Optional
<
Guami
>
&
guami
,
const
Pistache
::
Optional
<
std
::
string
>
&
supi
,
const
Pistache
::
Optional
<
std
::
string
>
&
ueIpv4Address
,
const
Pistache
::
Optional
<
std
::
string
>
&
ipDomain
,
const
Pistache
::
Optional
<
Ipv6Prefix
>
&
ueIpv6Prefix
,
const
Pistache
::
Optional
<
bool
>
&
pgwInd
,
const
Pistache
::
Optional
<
std
::
string
>
&
pgw
,
const
Pistache
::
Optional
<
std
::
string
>
&
gpsi
,
const
Pistache
::
Optional
<
std
::
string
>
&
externalGroupIdentity
,
const
Pistache
::
Optional
<
DataSetId
>
&
dataSet
,
const
Pistache
::
Optional
<
std
::
string
>
&
routingIndicator
,
const
Pistache
::
Optional
<
std
::
vector
<
std
::
string
>>
&
groupIdList
,
const
Pistache
::
Optional
<
std
::
vector
<
std
::
string
>>
&
dnaiList
,
const
Pistache
::
Optional
<
std
::
vector
<
PduSessionType
>>
&
pduSessionTypes
,
const
Pistache
::
Optional
<
std
::
vector
<
EventId
>>
&
eventIdList
,
const
Pistache
::
Optional
<
std
::
vector
<
NwdafEvent
>>
&
nwdafEventList
,
const
Pistache
::
Optional
<
std
::
string
>
&
supportedFeatures
,
const
Pistache
::
Optional
<
bool
>
&
upfIwkEpsInd
,
const
Pistache
::
Optional
<
PlmnId
>
&
chfSupportedPlmn
,
const
Pistache
::
Optional
<
std
::
string
>
&
preferredLocality
,
const
Pistache
::
Optional
<
AccessType
>
&
accessType
,
const
Pistache
::
Optional
<
int32_t
>
&
limit
,
const
Pistache
::
Optional
<
std
::
vector
<
std
::
string
>>
&
requiredFeatures
,
const
Pistache
::
Optional
<
ComplexQuery
>
&
complexQuery
,
const
Pistache
::
Optional
<
int32_t
>
&
maxPayloadSize
,
const
Pistache
::
Optional
<
AtsssCapability
>
&
atsssCapability
,
const
Pistache
::
Optional
<
bool
>
&
upfUeIpAddrInd
,
const
Pistache
::
Optional
<
Pistache
::
Http
::
Header
::
Raw
>
&
ifNoneMatch
,
Pistache
::
Http
::
ResponseWriter
&
response
)
=
0
;
virtual
void
search_nf_instances
(
const
Pistache
::
Optional
<
std
::
string
>
&
targetNfType
,
const
Pistache
::
Optional
<
std
::
string
>
&
requesterNfType
,
const
Pistache
::
Optional
<
std
::
string
>
&
requesterNfInstanceId
,
const
Pistache
::
Optional
<
std
::
vector
<
ServiceName
>>
&
serviceNames
,
const
Pistache
::
Optional
<
std
::
string
>
&
requesterNfInstanceFqdn
,
const
Pistache
::
Optional
<
std
::
vector
<
PlmnId
>>
&
targetPlmnList
,
const
Pistache
::
Optional
<
std
::
vector
<
PlmnId
>>
&
requesterPlmnList
,
const
Pistache
::
Optional
<
std
::
string
>
&
targetNfInstanceId
,
const
Pistache
::
Optional
<
std
::
string
>
&
targetNfFqdn
,
const
Pistache
::
Optional
<
std
::
string
>
&
hnrfUri
,
const
Pistache
::
Optional
<
std
::
vector
<
Snssai
>>
&
snssais
,
const
Pistache
::
Optional
<
std
::
vector
<
Snssai
>>
&
requesterSnssais
,
const
Pistache
::
Optional
<
std
::
vector
<
PlmnSnssai
>>
&
plmnSpecificSnssaiList
,
const
Pistache
::
Optional
<
std
::
string
>
&
dnn
,
const
Pistache
::
Optional
<
std
::
vector
<
std
::
string
>>
&
nsiList
,
const
Pistache
::
Optional
<
std
::
string
>
&
smfServingArea
,
const
Pistache
::
Optional
<
Tai
>
&
tai
,
const
Pistache
::
Optional
<
std
::
string
>
&
amfRegionId
,
const
Pistache
::
Optional
<
std
::
string
>
&
amfSetId
,
const
Pistache
::
Optional
<
Guami
>
&
guami
,
const
Pistache
::
Optional
<
std
::
string
>
&
supi
,
const
Pistache
::
Optional
<
std
::
string
>
&
ueIpv4Address
,
const
Pistache
::
Optional
<
std
::
string
>
&
ipDomain
,
const
Pistache
::
Optional
<
Ipv6Prefix
>
&
ueIpv6Prefix
,
const
Pistache
::
Optional
<
bool
>
&
pgwInd
,
const
Pistache
::
Optional
<
std
::
string
>
&
pgw
,
const
Pistache
::
Optional
<
std
::
string
>
&
gpsi
,
const
Pistache
::
Optional
<
std
::
string
>
&
externalGroupIdentity
,
const
Pistache
::
Optional
<
DataSetId
>
&
dataSet
,
const
Pistache
::
Optional
<
std
::
string
>
&
routingIndicator
,
const
Pistache
::
Optional
<
std
::
vector
<
std
::
string
>>
&
groupIdList
,
const
Pistache
::
Optional
<
std
::
vector
<
std
::
string
>>
&
dnaiList
,
const
Pistache
::
Optional
<
std
::
vector
<
PduSessionType
>>
&
pduSessionTypes
,
const
Pistache
::
Optional
<
std
::
vector
<
EventId
>>
&
eventIdList
,
const
Pistache
::
Optional
<
std
::
vector
<
NwdafEvent
>>
&
nwdafEventList
,
const
Pistache
::
Optional
<
std
::
string
>
&
supportedFeatures
,
const
Pistache
::
Optional
<
bool
>
&
upfIwkEpsInd
,
const
Pistache
::
Optional
<
PlmnId
>
&
chfSupportedPlmn
,
const
Pistache
::
Optional
<
std
::
string
>
&
preferredLocality
,
const
Pistache
::
Optional
<
AccessType
>
&
accessType
,
const
Pistache
::
Optional
<
int32_t
>
&
limit
,
const
Pistache
::
Optional
<
std
::
vector
<
std
::
string
>>
&
requiredFeatures
,
const
Pistache
::
Optional
<
ComplexQuery
>
&
complexQuery
,
const
Pistache
::
Optional
<
int32_t
>
&
maxPayloadSize
,
const
Pistache
::
Optional
<
AtsssCapability
>
&
atsssCapability
,
const
Pistache
::
Optional
<
bool
>
&
upfUeIpAddrInd
,
const
Pistache
::
Optional
<
Pistache
::
Http
::
Header
::
Raw
>
&
ifNoneMatch
,
Pistache
::
Http
::
ResponseWriter
&
response
)
=
0
;
};
...
...
src/api-server/api/StoredSearchDocumentApi.cpp
View file @
b4db73b6
...
...
@@ -17,7 +17,7 @@ namespace oai {
namespace
nrf
{
namespace
api
{
using
namespace
o
rg
::
openapitools
::
server
::
helpers
;
using
namespace
o
ai
::
nrf
::
helpers
;
using
namespace
oai
::
nrf
::
model
;
StoredSearchDocumentApi
::
StoredSearchDocumentApi
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
rtr
)
{
...
...
src/api-server/api/SubscriptionIDDocumentApi.cpp
View file @
b4db73b6
...
...
@@ -17,7 +17,7 @@ namespace oai {
namespace
nrf
{
namespace
api
{
using
namespace
o
rg
::
openapitools
::
server
::
helpers
;
using
namespace
o
ai
::
nrf
::
helpers
;
using
namespace
oai
::
nrf
::
model
;
SubscriptionIDDocumentApi
::
SubscriptionIDDocumentApi
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
rtr
)
{
...
...
src/api-server/api/SubscriptionsCollectionApi.cpp
View file @
b4db73b6
...
...
@@ -17,7 +17,7 @@ namespace oai {
namespace
nrf
{
namespace
api
{
using
namespace
o
rg
::
openapitools
::
server
::
helpers
;
using
namespace
o
ai
::
nrf
::
helpers
;
using
namespace
oai
::
nrf
::
model
;
SubscriptionsCollectionApi
::
SubscriptionsCollectionApi
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
rtr
)
{
...
...
src/api-server/impl/CompleteStoredSearchDocumentApiImpl.cpp
View file @
b4db73b6
/**
* NRF NFDiscovery Service
* NRF NFDiscovery Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
* NRF NFDiscovery Service
* NRF NFDiscovery Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "CompleteStoredSearchDocumentApiImpl.h"
...
...
@@ -18,12 +18,18 @@ namespace api {
using
namespace
oai
::
nrf
::
model
;
CompleteStoredSearchDocumentApiImpl
::
CompleteStoredSearchDocumentApiImpl
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
rtr
)
:
CompleteStoredSearchDocumentApi
(
rtr
)
{
}
CompleteStoredSearchDocumentApiImpl
::
CompleteStoredSearchDocumentApiImpl
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
rtr
,
nrf
::
nrf_app
*
nrf_app_inst
,
std
::
string
address
)
:
CompleteStoredSearchDocumentApi
(
rtr
),
m_nrf_app
(
nrf_app_inst
),
m_address
(
address
)
{
}
void
CompleteStoredSearchDocumentApiImpl
::
retrieve_complete_search
(
const
std
::
string
&
searchId
,
Pistache
::
Http
::
ResponseWriter
&
response
)
{
response
.
send
(
Pistache
::
Http
::
Code
::
Ok
,
"Do some magic
\n
"
);
void
CompleteStoredSearchDocumentApiImpl
::
retrieve_complete_search
(
const
std
::
string
&
searchId
,
Pistache
::
Http
::
ResponseWriter
&
response
)
{
response
.
send
(
Pistache
::
Http
::
Code
::
Ok
,
"Do some magic
\n
"
);
}
}
...
...
src/api-server/impl/CompleteStoredSearchDocumentApiImpl.h
View file @
b4db73b6
...
...
@@ -30,21 +30,30 @@
#include <pistache/optional.h>
#include "StoredSearchResult.h"
#include "nrf_app.hpp"
#include <string>
namespace
oai
{
namespace
nrf
{
namespace
api
{
using
namespace
oai
::
nrf
::
model
;
class
CompleteStoredSearchDocumentApiImpl
:
public
oai
::
nrf
::
api
::
CompleteStoredSearchDocumentApi
{
public:
CompleteStoredSearchDocumentApiImpl
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
);
~
CompleteStoredSearchDocumentApiImpl
()
{}
void
retrieve_complete_search
(
const
std
::
string
&
searchId
,
Pistache
::
Http
::
ResponseWriter
&
response
);
class
CompleteStoredSearchDocumentApiImpl
:
public
oai
::
nrf
::
api
::
CompleteStoredSearchDocumentApi
{
public:
CompleteStoredSearchDocumentApiImpl
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
,
oai
::
nrf
::
nrf_app
*
nrf_app_inst
,
std
::
string
address
);
~
CompleteStoredSearchDocumentApiImpl
()
{
}
void
retrieve_complete_search
(
const
std
::
string
&
searchId
,
Pistache
::
Http
::
ResponseWriter
&
response
);
private:
oai
::
nrf
::
nrf_app
*
m_nrf_app
;
std
::
string
m_address
;
};
}
...
...
@@ -53,4 +62,4 @@ public:
#endif
\ No newline at end of file
#endif
src/api-server/impl/NFInstanceIDDocumentApiImpl.cpp
View file @
b4db73b6
...
...
@@ -18,8 +18,11 @@ namespace api {
using
namespace
oai
::
nrf
::
model
;
NFInstanceIDDocumentApiImpl
::
NFInstanceIDDocumentApiImpl
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
rtr
)
:
NFInstanceIDDocumentApi
(
rtr
)
NFInstanceIDDocumentApiImpl
::
NFInstanceIDDocumentApiImpl
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
rtr
,
oai
::
nrf
::
nrf_app
*
nrf_app_inst
,
std
::
string
address
)
:
NFInstanceIDDocumentApi
(
rtr
),
m_nrf_app
(
nrf_app_inst
),
m_address
(
address
)
{
}
void
NFInstanceIDDocumentApiImpl
::
deregister_nf_instance
(
const
std
::
string
&
nfInstanceID
,
Pistache
::
Http
::
ResponseWriter
&
response
)
{
...
...
src/api-server/impl/NFInstanceIDDocumentApiImpl.h
View file @
b4db73b6
...
...
@@ -32,6 +32,7 @@
#include "NFProfile.h"
#include "PatchItem.h"
#include "ProblemDetails.h"
#include "nrf_app.hpp"
#include <string>
#include <vector>
...
...
@@ -43,14 +44,18 @@ using namespace oai::nrf::model;
class
NFInstanceIDDocumentApiImpl
:
public
oai
::
nrf
::
api
::
NFInstanceIDDocumentApi
{
public:
NFInstanceIDDocumentApiImpl
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
);
NFInstanceIDDocumentApiImpl
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
,
oai
::
nrf
::
nrf_app
*
nrf_app_inst
,
std
::
string
address
);
~
NFInstanceIDDocumentApiImpl
()
{}
void
deregister_nf_instance
(
const
std
::
string
&
nfInstanceID
,
Pistache
::
Http
::
ResponseWriter
&
response
);
void
get_nf_instance
(
const
std
::
string
&
nfInstanceID
,
Pistache
::
Http
::
ResponseWriter
&
response
);
void
register_nf_instance
(
const
std
::
string
&
nfInstanceID
,
const
NFProfile
&
nFProfile
,
const
Pistache
::
Optional
<
Pistache
::
Http
::
Header
::
Raw
>
&
contentEncoding
,
Pistache
::
Http
::
ResponseWriter
&
response
);
void
update_nf_instance
(
const
std
::
string
&
nfInstanceID
,
const
std
::
vector
<
PatchItem
>
&
patchItem
,
Pistache
::
Http
::
ResponseWriter
&
response
);
private:
oai
::
nrf
::
nrf_app
*
m_nrf_app
;
std
::
string
m_address
;
};
}
...
...
@@ -59,4 +64,4 @@ public:
#endif
\ No newline at end of file
#endif
src/api-server/impl/NFInstancesStoreApiImpl.cpp
View file @
b4db73b6
/**
* NRF NFDiscovery Service
* NRF NFDiscovery Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
* NRF NFDiscovery Service
* NRF NFDiscovery Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "NFInstancesStoreApiImpl.h"
...
...
@@ -18,12 +18,65 @@ namespace api {
using
namespace
oai
::
nrf
::
model
;
NFInstancesStoreApiImpl
::
NFInstancesStoreApiImpl
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
rtr
)
:
NFInstancesStoreApi
(
rtr
)
{
}
NFInstancesStoreApiImpl
::
NFInstancesStoreApiImpl
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
rtr
,
oai
::
nrf
::
nrf_app
*
nrf_app_inst
,
std
::
string
address
)
:
NFInstancesStoreApi
(
rtr
),
m_nrf_app
(
nrf_app_inst
),
m_address
(
address
)
{
}
void
NFInstancesStoreApiImpl
::
search_nf_instances
(
const
Pistache
::
Optional
<
NFType
>
&
targetNfType
,
const
Pistache
::
Optional
<
NFType
>
&
requesterNfType
,
const
Pistache
::
Optional
<
std
::
string
>
&
requesterNfInstanceId
,
const
Pistache
::
Optional
<
Set
<
ServiceName
>>
&
serviceNames
,
const
Pistache
::
Optional
<
std
::
string
>
&
requesterNfInstanceFqdn
,
const
Pistache
::
Optional
<
std
::
vector
<
PlmnId
>>
&
targetPlmnList
,
const
Pistache
::
Optional
<
std
::
vector
<
PlmnId
>>
&
requesterPlmnList
,
const
Pistache
::
Optional
<
std
::
string
>
&
targetNfInstanceId
,
const
Pistache
::
Optional
<
std
::
string
>
&
targetNfFqdn
,
const
Pistache
::
Optional
<
std
::
string
>
&
hnrfUri
,
const
Pistache
::
Optional
<
std
::
vector
<
Snssai
>>
&
snssais
,
const
Pistache
::
Optional
<
std
::
vector
<
Snssai
>>
&
requesterSnssais
,
const
Pistache
::
Optional
<
std
::
vector
<
PlmnSnssai
>>
&
plmnSpecificSnssaiList
,
const
Pistache
::
Optional
<
std
::
string
>
&
dnn
,
const
Pistache
::
Optional
<
std
::
vector
<
std
::
string
>>
&
nsiList
,
const
Pistache
::
Optional
<
std
::
string
>
&
smfServingArea
,
const
Pistache
::
Optional
<
Tai
>
&
tai
,
const
Pistache
::
Optional
<
std
::
string
>
&
amfRegionId
,
const
Pistache
::
Optional
<
std
::
string
>
&
amfSetId
,
const
Pistache
::
Optional
<
Guami
>
&
guami
,
const
Pistache
::
Optional
<
std
::
string
>
&
supi
,
const
Pistache
::
Optional
<
std
::
string
>
&
ueIpv4Address
,
const
Pistache
::
Optional
<
std
::
string
>
&
ipDomain
,
const
Pistache
::
Optional
<
Ipv6Prefix
>
&
ueIpv6Prefix
,
const
Pistache
::
Optional
<
bool
>
&
pgwInd
,
const
Pistache
::
Optional
<
std
::
string
>
&
pgw
,
const
Pistache
::
Optional
<
std
::
string
>
&
gpsi
,
const
Pistache
::
Optional
<
std
::
string
>
&
externalGroupIdentity
,
const
Pistache
::
Optional
<
DataSetId
>
&
dataSet
,
const
Pistache
::
Optional
<
std
::
string
>
&
routingIndicator
,
const
Pistache
::
Optional
<
std
::
vector
<
std
::
string
>>
&
groupIdList
,
const
Pistache
::
Optional
<
std
::
vector
<
std
::
string
>>
&
dnaiList
,
const
Pistache
::
Optional
<
std
::
vector
<
PduSessionType
>>
&
pduSessionTypes
,
const
Pistache
::
Optional
<
std
::
vector
<
EventId
>>
&
eventIdList
,
const
Pistache
::
Optional
<
std
::
vector
<
NwdafEvent
>>
&
nwdafEventList
,
const
Pistache
::
Optional
<
std
::
string
>
&
supportedFeatures
,
const
Pistache
::
Optional
<
bool
>
&
upfIwkEpsInd
,
const
Pistache
::
Optional
<
PlmnId
>
&
chfSupportedPlmn
,
const
Pistache
::
Optional
<
std
::
string
>
&
preferredLocality
,
const
Pistache
::
Optional
<
AccessType
>
&
accessType
,
const
Pistache
::
Optional
<
int32_t
>
&
limit
,
const
Pistache
::
Optional
<
std
::
vector
<
std
::
string
>>
&
requiredFeatures
,
const
Pistache
::
Optional
<
ComplexQuery
>
&
complexQuery
,
const
Pistache
::
Optional
<
int32_t
>
&
maxPayloadSize
,
const
Pistache
::
Optional
<
AtsssCapability
>
&
atsssCapability
,
const
Pistache
::
Optional
<
bool
>
&
upfUeIpAddrInd
,
const
Pistache
::
Optional
<
Pistache
::
Http
::
Header
::
Raw
>
&
ifNoneMatch
,
Pistache
::
Http
::
ResponseWriter
&
response
)
{
response
.
send
(
Pistache
::
Http
::
Code
::
Ok
,
"Do some magic
\n
"
);
void
NFInstancesStoreApiImpl
::
search_nf_instances
(
const
Pistache
::
Optional
<
std
::
string
>
&
targetNfType
,
const
Pistache
::
Optional
<
std
::
string
>
&
requesterNfType
,
const
Pistache
::
Optional
<
std
::
string
>
&
requesterNfInstanceId
,
const
Pistache
::
Optional
<
std
::
vector
<
ServiceName
>>
&
serviceNames
,
const
Pistache
::
Optional
<
std
::
string
>
&
requesterNfInstanceFqdn
,
const
Pistache
::
Optional
<
std
::
vector
<
PlmnId
>>
&
targetPlmnList
,
const
Pistache
::
Optional
<
std
::
vector
<
PlmnId
>>
&
requesterPlmnList
,
const
Pistache
::
Optional
<
std
::
string
>
&
targetNfInstanceId
,
const
Pistache
::
Optional
<
std
::
string
>
&
targetNfFqdn
,
const
Pistache
::
Optional
<
std
::
string
>
&
hnrfUri
,
const
Pistache
::
Optional
<
std
::
vector
<
Snssai
>>
&
snssais
,
const
Pistache
::
Optional
<
std
::
vector
<
Snssai
>>
&
requesterSnssais
,
const
Pistache
::
Optional
<
std
::
vector
<
PlmnSnssai
>>
&
plmnSpecificSnssaiList
,
const
Pistache
::
Optional
<
std
::
string
>
&
dnn
,
const
Pistache
::
Optional
<
std
::
vector
<
std
::
string
>>
&
nsiList
,
const
Pistache
::
Optional
<
std
::
string
>
&
smfServingArea
,
const
Pistache
::
Optional
<
Tai
>
&
tai
,
const
Pistache
::
Optional
<
std
::
string
>
&
amfRegionId
,
const
Pistache
::
Optional
<
std
::
string
>
&
amfSetId
,
const
Pistache
::
Optional
<
Guami
>
&
guami
,
const
Pistache
::
Optional
<
std
::
string
>
&
supi
,
const
Pistache
::
Optional
<
std
::
string
>
&
ueIpv4Address
,
const
Pistache
::
Optional
<
std
::
string
>
&
ipDomain
,
const
Pistache
::
Optional
<
Ipv6Prefix
>
&
ueIpv6Prefix
,
const
Pistache
::
Optional
<
bool
>
&
pgwInd
,
const
Pistache
::
Optional
<
std
::
string
>
&
pgw
,
const
Pistache
::
Optional
<
std
::
string
>
&
gpsi
,
const
Pistache
::
Optional
<
std
::
string
>
&
externalGroupIdentity
,
const
Pistache
::
Optional
<
DataSetId
>
&
dataSet
,
const
Pistache
::
Optional
<
std
::
string
>
&
routingIndicator
,
const
Pistache
::
Optional
<
std
::
vector
<
std
::
string
>>
&
groupIdList
,
const
Pistache
::
Optional
<
std
::
vector
<
std
::
string
>>
&
dnaiList
,
const
Pistache
::
Optional
<
std
::
vector
<
PduSessionType
>>
&
pduSessionTypes
,
const
Pistache
::
Optional
<
std
::
vector
<
EventId
>>
&
eventIdList
,
const
Pistache
::
Optional
<
std
::
vector
<
NwdafEvent
>>
&
nwdafEventList
,
const
Pistache
::
Optional
<
std
::
string
>
&
supportedFeatures
,
const
Pistache
::
Optional
<
bool
>
&
upfIwkEpsInd
,
const
Pistache
::
Optional
<
PlmnId
>
&
chfSupportedPlmn
,
const
Pistache
::
Optional
<
std
::
string
>
&
preferredLocality
,
const
Pistache
::
Optional
<
AccessType
>
&
accessType
,
const
Pistache
::
Optional
<
int32_t
>
&
limit
,
const
Pistache
::
Optional
<
std
::
vector
<
std
::
string
>>
&
requiredFeatures
,
const
Pistache
::
Optional
<
ComplexQuery
>
&
complexQuery
,
const
Pistache
::
Optional
<
int32_t
>
&
maxPayloadSize
,
const
Pistache
::
Optional
<
AtsssCapability
>
&
atsssCapability
,
const
Pistache
::
Optional
<
bool
>
&
upfUeIpAddrInd
,
const
Pistache
::
Optional
<
Pistache
::
Http
::
Header
::
Raw
>
&
ifNoneMatch
,
Pistache
::
Http
::
ResponseWriter
&
response
)
{
response
.
send
(
Pistache
::
Http
::
Code
::
Ok
,
"Do some magic
\n
"
);
}
}
...
...
src/api-server/impl/NFInstancesStoreApiImpl.h
View file @
b4db73b6
...
...
@@ -36,7 +36,7 @@
#include "EventId.h"
#include "Guami.h"
#include "Ipv6Prefix.h"
#include "NFType.h"
//
#include "NFType.h"
#include "NwdafEvent.h"
#include "PduSessionType.h"
#include "PlmnId.h"
...
...
@@ -44,10 +44,12 @@
#include "ProblemDetails.h"
#include "SearchResult.h"
#include "ServiceName.h"
#include "Set.h"
#include "Snssai.h"
#include "Tai.h"
#include "nrf_app.hpp"
#include <string>
#include <set>
namespace
oai
{
namespace
nrf
{
...
...
@@ -57,11 +59,15 @@ using namespace oai::nrf::model;
class
NFInstancesStoreApiImpl
:
public
oai
::
nrf
::
api
::
NFInstancesStoreApi
{
public:
NFInstancesStoreApiImpl
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
);
NFInstancesStoreApiImpl
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
,
oai
::
nrf
::
nrf_app
*
nrf_app_inst
,
std
::
string
address
);
~
NFInstancesStoreApiImpl
()
{}
void
search_nf_instances
(
const
Pistache
::
Optional
<
NFType
>
&
targetNfType
,
const
Pistache
::
Optional
<
NFType
>
&
requesterNfType
,
const
Pistache
::
Optional
<
std
::
string
>
&
requesterNfInstanceId
,
const
Pistache
::
Optional
<
Set
<
ServiceName
>>
&
serviceNames
,
const
Pistache
::
Optional
<
std
::
string
>
&
requesterNfInstanceFqdn
,
const
Pistache
::
Optional
<
std
::
vector
<
PlmnId
>>
&
targetPlmnList
,
const
Pistache
::
Optional
<
std
::
vector
<
PlmnId
>>
&
requesterPlmnList
,
const
Pistache
::
Optional
<
std
::
string
>
&
targetNfInstanceId
,
const
Pistache
::
Optional
<
std
::
string
>
&
targetNfFqdn
,
const
Pistache
::
Optional
<
std
::
string
>
&
hnrfUri
,
const
Pistache
::
Optional
<
std
::
vector
<
Snssai
>>
&
snssais
,
const
Pistache
::
Optional
<
std
::
vector
<
Snssai
>>
&
requesterSnssais
,
const
Pistache
::
Optional
<
std
::
vector
<
PlmnSnssai
>>
&
plmnSpecificSnssaiList
,
const
Pistache
::
Optional
<
std
::
string
>
&
dnn
,
const
Pistache
::
Optional
<
std
::
vector
<
std
::
string
>>
&
nsiList
,
const
Pistache
::
Optional
<
std
::
string
>
&
smfServingArea
,
const
Pistache
::
Optional
<
Tai
>
&
tai
,
const
Pistache
::
Optional
<
std
::
string
>
&
amfRegionId
,
const
Pistache
::
Optional
<
std
::
string
>
&
amfSetId
,
const
Pistache
::
Optional
<
Guami
>
&
guami
,
const
Pistache
::
Optional
<
std
::
string
>
&
supi
,
const
Pistache
::
Optional
<
std
::
string
>
&
ueIpv4Address
,
const
Pistache
::
Optional
<
std
::
string
>
&
ipDomain
,
const
Pistache
::
Optional
<
Ipv6Prefix
>
&
ueIpv6Prefix
,
const
Pistache
::
Optional
<
bool
>
&
pgwInd
,
const
Pistache
::
Optional
<
std
::
string
>
&
pgw
,
const
Pistache
::
Optional
<
std
::
string
>
&
gpsi
,
const
Pistache
::
Optional
<
std
::
string
>
&
externalGroupIdentity
,
const
Pistache
::
Optional
<
DataSetId
>
&
dataSet
,
const
Pistache
::
Optional
<
std
::
string
>
&
routingIndicator
,
const
Pistache
::
Optional
<
std
::
vector
<
std
::
string
>>
&
groupIdList
,
const
Pistache
::
Optional
<
std
::
vector
<
std
::
string
>>
&
dnaiList
,
const
Pistache
::
Optional
<
std
::
vector
<
PduSessionType
>>
&
pduSessionTypes
,
const
Pistache
::
Optional
<
std
::
vector
<
EventId
>>
&
eventIdList
,
const
Pistache
::
Optional
<
std
::
vector
<
NwdafEvent
>>
&
nwdafEventList
,
const
Pistache
::
Optional
<
std
::
string
>
&
supportedFeatures
,
const
Pistache
::
Optional
<
bool
>
&
upfIwkEpsInd
,
const
Pistache
::
Optional
<
PlmnId
>
&
chfSupportedPlmn
,
const
Pistache
::
Optional
<
std
::
string
>
&
preferredLocality
,
const
Pistache
::
Optional
<
AccessType
>
&
accessType
,
const
Pistache
::
Optional
<
int32_t
>
&
limit
,
const
Pistache
::
Optional
<
std
::
vector
<
std
::
string
>>
&
requiredFeatures
,
const
Pistache
::
Optional
<
ComplexQuery
>
&
complexQuery
,
const
Pistache
::
Optional
<
int32_t
>
&
maxPayloadSize
,
const
Pistache
::
Optional
<
AtsssCapability
>
&
atsssCapability
,
const
Pistache
::
Optional
<
bool
>
&
upfUeIpAddrInd
,
const
Pistache
::
Optional
<
Pistache
::
Http
::
Header
::
Raw
>
&
ifNoneMatch
,
Pistache
::
Http
::
ResponseWriter
&
response
);
void
search_nf_instances
(
const
Pistache
::
Optional
<
std
::
string
>
&
targetNfType
,
const
Pistache
::
Optional
<
std
::
string
>
&
requesterNfType
,
const
Pistache
::
Optional
<
std
::
string
>
&
requesterNfInstanceId
,
const
Pistache
::
Optional
<
std
::
vector
<
ServiceName
>>
&
serviceNames
,
const
Pistache
::
Optional
<
std
::
string
>
&
requesterNfInstanceFqdn
,
const
Pistache
::
Optional
<
std
::
vector
<
PlmnId
>>
&
targetPlmnList
,
const
Pistache
::
Optional
<
std
::
vector
<
PlmnId
>>
&
requesterPlmnList
,
const
Pistache
::
Optional
<
std
::
string
>
&
targetNfInstanceId
,
const
Pistache
::
Optional
<
std
::
string
>
&
targetNfFqdn
,
const
Pistache
::
Optional
<
std
::
string
>
&
hnrfUri
,
const
Pistache
::
Optional
<
std
::
vector
<
Snssai
>>
&
snssais
,
const
Pistache
::
Optional
<
std
::
vector
<
Snssai
>>
&
requesterSnssais
,
const
Pistache
::
Optional
<
std
::
vector
<
PlmnSnssai
>>
&
plmnSpecificSnssaiList
,
const
Pistache
::
Optional
<
std
::
string
>
&
dnn
,
const
Pistache
::
Optional
<
std
::
vector
<
std
::
string
>>
&
nsiList
,
const
Pistache
::
Optional
<
std
::
string
>
&
smfServingArea
,
const
Pistache
::
Optional
<
Tai
>
&
tai
,
const
Pistache
::
Optional
<
std
::
string
>
&
amfRegionId
,
const
Pistache
::
Optional
<
std
::
string
>
&
amfSetId
,
const
Pistache
::
Optional
<
Guami
>
&
guami
,
const
Pistache
::
Optional
<
std
::
string
>
&
supi
,
const
Pistache
::
Optional
<
std
::
string
>
&
ueIpv4Address
,
const
Pistache
::
Optional
<
std
::
string
>
&
ipDomain
,
const
Pistache
::
Optional
<
Ipv6Prefix
>
&
ueIpv6Prefix
,
const
Pistache
::
Optional
<
bool
>
&
pgwInd
,
const
Pistache
::
Optional
<
std
::
string
>
&
pgw
,
const
Pistache
::
Optional
<
std
::
string
>
&
gpsi
,
const
Pistache
::
Optional
<
std
::
string
>
&
externalGroupIdentity
,
const
Pistache
::
Optional
<
DataSetId
>
&
dataSet
,
const
Pistache
::
Optional
<
std
::
string
>
&
routingIndicator
,
const
Pistache
::
Optional
<
std
::
vector
<
std
::
string
>>
&
groupIdList
,
const
Pistache
::
Optional
<
std
::
vector
<
std
::
string
>>
&
dnaiList
,
const
Pistache
::
Optional
<
std
::
vector
<
PduSessionType
>>
&
pduSessionTypes
,
const
Pistache
::
Optional
<
std
::
vector
<
EventId
>>
&
eventIdList
,
const
Pistache
::
Optional
<
std
::
vector
<
NwdafEvent
>>
&
nwdafEventList
,
const
Pistache
::
Optional
<
std
::
string
>
&
supportedFeatures
,
const
Pistache
::
Optional
<
bool
>
&
upfIwkEpsInd
,
const
Pistache
::
Optional
<
PlmnId
>
&
chfSupportedPlmn
,
const
Pistache
::
Optional
<
std
::
string
>
&
preferredLocality
,
const
Pistache
::
Optional
<
AccessType
>
&
accessType
,
const
Pistache
::
Optional
<
int32_t
>
&
limit
,
const
Pistache
::
Optional
<
std
::
vector
<
std
::
string
>>
&
requiredFeatures
,
const
Pistache
::
Optional
<
ComplexQuery
>
&
complexQuery
,
const
Pistache
::
Optional
<
int32_t
>
&
maxPayloadSize
,
const
Pistache
::
Optional
<
AtsssCapability
>
&
atsssCapability
,
const
Pistache
::
Optional
<
bool
>
&
upfUeIpAddrInd
,
const
Pistache
::
Optional
<
Pistache
::
Http
::
Header
::
Raw
>
&
ifNoneMatch
,
Pistache
::
Http
::
ResponseWriter
&
response
);
private:
oai
::
nrf
::
nrf_app
*
m_nrf_app
;
std
::
string
m_address
;
};
}
...
...
@@ -70,4 +76,4 @@ public:
#endif
\ No newline at end of file
#endif
src/api-server/impl/StoredSearchDocumentApiImpl.cpp
View file @
b4db73b6
/**
* NRF NFDiscovery Service
* NRF NFDiscovery Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
* NRF NFDiscovery Service
* NRF NFDiscovery Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "StoredSearchDocumentApiImpl.h"
...
...
@@ -18,12 +18,18 @@ namespace api {
using
namespace
oai
::
nrf
::
model
;
StoredSearchDocumentApiImpl
::
StoredSearchDocumentApiImpl
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
rtr
)
:
StoredSearchDocumentApi
(
rtr
)
{
}
StoredSearchDocumentApiImpl
::
StoredSearchDocumentApiImpl
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
rtr
,
oai
::
nrf
::
nrf_app
*
nrf_app_inst
,
std
::
string
address
)
:
StoredSearchDocumentApi
(
rtr
),
m_nrf_app
(
nrf_app_inst
),
m_address
(
address
)
{
}
void
StoredSearchDocumentApiImpl
::
retrieve_stored_search
(
const
std
::
string
&
searchId
,
Pistache
::
Http
::
ResponseWriter
&
response
)
{
response
.
send
(
Pistache
::
Http
::
Code
::
Ok
,
"Do some magic
\n
"
);
void
StoredSearchDocumentApiImpl
::
retrieve_stored_search
(
const
std
::
string
&
searchId
,
Pistache
::
Http
::
ResponseWriter
&
response
)
{
response
.
send
(
Pistache
::
Http
::
Code
::
Ok
,
"Do some magic
\n
"
);
}
}
...
...
src/api-server/impl/StoredSearchDocumentApiImpl.h
View file @
b4db73b6
...
...
@@ -30,6 +30,7 @@
#include <pistache/optional.h>
#include "StoredSearchResult.h"
#include "nrf_app.hpp"
#include <string>
namespace
oai
{
...
...
@@ -40,11 +41,15 @@ using namespace oai::nrf::model;
class
StoredSearchDocumentApiImpl
:
public
oai
::
nrf
::
api
::
StoredSearchDocumentApi
{
public:
StoredSearchDocumentApiImpl
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
);
StoredSearchDocumentApiImpl
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
,
oai
::
nrf
::
nrf_app
*
nrf_app_inst
,
std
::
string
address
);
~
StoredSearchDocumentApiImpl
()
{}
void
retrieve_stored_search
(
const
std
::
string
&
searchId
,
Pistache
::
Http
::
ResponseWriter
&
response
);
private:
oai
::
nrf
::
nrf_app
*
m_nrf_app
;
std
::
string
m_address
;
};
}
...
...
@@ -53,4 +58,4 @@ public:
#endif
\ No newline at end of file
#endif
src/api-server/impl/SubscriptionIDDocumentApiImpl.cpp
View file @
b4db73b6
/**
* NRF NFManagement Service
* NRF NFManagement Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
* NRF NFManagement Service
* NRF NFManagement Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "SubscriptionIDDocumentApiImpl.h"
...
...
@@ -18,15 +18,24 @@ namespace api {
using
namespace
oai
::
nrf
::
model
;
SubscriptionIDDocumentApiImpl
::
SubscriptionIDDocumentApiImpl
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
rtr
)
:
SubscriptionIDDocumentApi
(
rtr
)
{
}
SubscriptionIDDocumentApiImpl
::
SubscriptionIDDocumentApiImpl
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
rtr
,
oai
::
nrf
::
nrf_app
*
nrf_app_inst
,
std
::
string
address
)
:
SubscriptionIDDocumentApi
(
rtr
),
m_nrf_app
(
nrf_app_inst
),
m_address
(
address
)
{
}
void
SubscriptionIDDocumentApiImpl
::
remove_subscription
(
const
std
::
string
&
subscriptionID
,
Pistache
::
Http
::
ResponseWriter
&
response
)
{
response
.
send
(
Pistache
::
Http
::
Code
::
Ok
,
"Do some magic
\n
"
);
void
SubscriptionIDDocumentApiImpl
::
remove_subscription
(
const
std
::
string
&
subscriptionID
,
Pistache
::
Http
::
ResponseWriter
&
response
)
{
response
.
send
(
Pistache
::
Http
::
Code
::
Ok
,
"Do some magic
\n
"
);
}
void
SubscriptionIDDocumentApiImpl
::
update_subscription
(
const
std
::
string
&
subscriptionID
,
const
std
::
vector
<
PatchItem
>
&
patchItem
,
Pistache
::
Http
::
ResponseWriter
&
response
)
{
response
.
send
(
Pistache
::
Http
::
Code
::
Ok
,
"Do some magic
\n
"
);
void
SubscriptionIDDocumentApiImpl
::
update_subscription
(
const
std
::
string
&
subscriptionID
,
const
std
::
vector
<
PatchItem
>
&
patchItem
,
Pistache
::
Http
::
ResponseWriter
&
response
)
{
response
.
send
(
Pistache
::
Http
::
Code
::
Ok
,
"Do some magic
\n
"
);
}
}
...
...
src/api-server/impl/SubscriptionIDDocumentApiImpl.h
View file @
b4db73b6
...
...
@@ -32,6 +32,7 @@
#include "PatchItem.h"
#include "ProblemDetails.h"
#include "SubscriptionData.h"
#include "nrf_app.hpp"
#include <string>
#include <vector>
...
...
@@ -43,12 +44,16 @@ using namespace oai::nrf::model;
class
SubscriptionIDDocumentApiImpl
:
public
oai
::
nrf
::
api
::
SubscriptionIDDocumentApi
{
public:
SubscriptionIDDocumentApiImpl
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
);
SubscriptionIDDocumentApiImpl
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
,
oai
::
nrf
::
nrf_app
*
nrf_app_inst
,
std
::
string
address
);
~
SubscriptionIDDocumentApiImpl
()
{}
void
remove_subscription
(
const
std
::
string
&
subscriptionID
,
Pistache
::
Http
::
ResponseWriter
&
response
);
void
update_subscription
(
const
std
::
string
&
subscriptionID
,
const
std
::
vector
<
PatchItem
>
&
patchItem
,
Pistache
::
Http
::
ResponseWriter
&
response
);
private:
oai
::
nrf
::
nrf_app
*
m_nrf_app
;
std
::
string
m_address
;
};
}
...
...
@@ -57,4 +62,4 @@ public:
#endif
\ No newline at end of file
#endif
src/api-server/impl/SubscriptionsCollectionApiImpl.cpp
View file @
b4db73b6
/**
* NRF NFManagement Service
* NRF NFManagement Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
* NRF NFManagement Service
* NRF NFManagement Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "SubscriptionsCollectionApiImpl.h"
...
...
@@ -18,12 +18,19 @@ namespace api {
using
namespace
oai
::
nrf
::
model
;
SubscriptionsCollectionApiImpl
::
SubscriptionsCollectionApiImpl
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
rtr
)
:
SubscriptionsCollectionApi
(
rtr
)
{
}
SubscriptionsCollectionApiImpl
::
SubscriptionsCollectionApiImpl
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
rtr
,
oai
::
nrf
::
nrf_app
*
nrf_app_inst
,
std
::
string
address
)
:
SubscriptionsCollectionApi
(
rtr
),
m_nrf_app
(
nrf_app_inst
),
m_address
(
address
)
{
}
void
SubscriptionsCollectionApiImpl
::
create_subscription
(
const
SubscriptionData
&
subscriptionData
,
Pistache
::
Http
::
ResponseWriter
&
response
)
{
response
.
send
(
Pistache
::
Http
::
Code
::
Ok
,
"Do some magic
\n
"
);
void
SubscriptionsCollectionApiImpl
::
create_subscription
(
const
SubscriptionData
&
subscriptionData
,
Pistache
::
Http
::
ResponseWriter
&
response
)
{
response
.
send
(
Pistache
::
Http
::
Code
::
Ok
,
"Do some magic
\n
"
);
}
}
...
...
src/api-server/impl/SubscriptionsCollectionApiImpl.h
View file @
b4db73b6
...
...
@@ -31,6 +31,7 @@
#include "ProblemDetails.h"
#include "SubscriptionData.h"
#include "nrf_app.hpp"
namespace
oai
{
namespace
nrf
{
...
...
@@ -40,11 +41,15 @@ using namespace oai::nrf::model;
class
SubscriptionsCollectionApiImpl
:
public
oai
::
nrf
::
api
::
SubscriptionsCollectionApi
{
public:
SubscriptionsCollectionApiImpl
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
);
SubscriptionsCollectionApiImpl
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
,
oai
::
nrf
::
nrf_app
*
nrf_app_inst
,
std
::
string
address
);
~
SubscriptionsCollectionApiImpl
()
{}
void
create_subscription
(
const
SubscriptionData
&
subscriptionData
,
Pistache
::
Http
::
ResponseWriter
&
response
);
private:
oai
::
nrf
::
nrf_app
*
m_nrf_app
;
std
::
string
m_address
;
};
}
...
...
@@ -53,4 +58,4 @@ public:
#endif
\ No newline at end of file
#endif
src/api-server/model/Atom.cpp
View file @
b4db73b6
...
...
@@ -62,11 +62,11 @@ void Atom::setAttr(std::string const& value)
{
m_Attr
=
value
;
}
AnyType
Atom
::
getValue
()
const
std
::
string
Atom
::
getValue
()
const
{
return
m_Value
;
}
void
Atom
::
setValue
(
AnyType
const
&
value
)
void
Atom
::
setValue
(
std
::
string
const
&
value
)
{
m_Value
=
value
;
}
...
...
src/api-server/model/Atom.h
View file @
b4db73b6
...
...
@@ -20,7 +20,7 @@
#include <string>
#include "AnyType.h"
//
#include "AnyType.h"
#include <nlohmann/json.hpp>
namespace
oai
{
...
...
@@ -49,8 +49,8 @@ public:
/// <summary>
///
/// </summary>
AnyType
getValue
()
const
;
void
setValue
(
AnyType
const
&
value
);
std
::
string
getValue
()
const
;
void
setValue
(
std
::
string
const
&
value
);
/// <summary>
///
/// </summary>
...
...
@@ -64,7 +64,7 @@ public:
protected:
std
::
string
m_Attr
;
AnyType
m_Value
;
std
::
string
m_Value
;
bool
m_Negative
;
bool
m_NegativeIsSet
;
...
...
src/api-server/model/ChangeItem.cpp
View file @
b4db73b6
...
...
@@ -103,11 +103,11 @@ void ChangeItem::unsetFrom()
{
m_FromIsSet
=
false
;
}
AnyType
ChangeItem
::
getOrigValue
()
const
std
::
string
ChangeItem
::
getOrigValue
()
const
{
return
m_OrigValue
;
}
void
ChangeItem
::
setOrigValue
(
AnyType
const
&
value
)
void
ChangeItem
::
setOrigValue
(
std
::
string
const
&
value
)
{
m_OrigValue
=
value
;
m_OrigValueIsSet
=
true
;
...
...
@@ -120,11 +120,11 @@ void ChangeItem::unsetOrigValue()
{
m_OrigValueIsSet
=
false
;
}
AnyType
ChangeItem
::
getNewValue
()
const
std
::
string
ChangeItem
::
getNewValue
()
const
{
return
m_NewValue
;
}
void
ChangeItem
::
setNewValue
(
AnyType
const
&
value
)
void
ChangeItem
::
setNewValue
(
std
::
string
const
&
value
)
{
m_NewValue
=
value
;
m_NewValueIsSet
=
true
;
...
...
src/api-server/model/ChangeItem.h
View file @
b4db73b6
...
...
@@ -21,7 +21,7 @@
#include "ChangeType.h"
#include <string>
#include "AnyType.h"
//
#include "AnyType.h"
#include <nlohmann/json.hpp>
namespace
oai
{
...
...
@@ -62,15 +62,15 @@ public:
/// <summary>
///
/// </summary>
AnyType
getOrigValue
()
const
;
void
setOrigValue
(
AnyType
const
&
value
);
std
::
string
getOrigValue
()
const
;
void
setOrigValue
(
std
::
string
const
&
value
);
bool
origValueIsSet
()
const
;
void
unsetOrigValue
();
/// <summary>
///
/// </summary>
AnyType
getNewValue
()
const
;
void
setNewValue
(
AnyType
const
&
value
);
std
::
string
getNewValue
()
const
;
void
setNewValue
(
std
::
string
const
&
value
);
bool
newValueIsSet
()
const
;
void
unsetNewValue
();
...
...
@@ -83,9 +83,9 @@ protected:
std
::
string
m_From
;
bool
m_FromIsSet
;
AnyType
m_OrigValue
;
std
::
string
m_OrigValue
;
bool
m_OrigValueIsSet
;
AnyType
m_NewValue
;
std
::
string
m_NewValue
;
bool
m_NewValueIsSet
;
};
...
...
src/api-server/model/Helpers.cpp
View file @
b4db73b6
...
...
@@ -11,9 +11,8 @@
*/
#include "Helpers.h"
namespace
org
{
namespace
openapitools
{
namespace
server
{
namespace
oai
{
namespace
nrf
{
namespace
helpers
{
...
...
@@ -92,7 +91,49 @@ bool fromStringValue(const std::string &inStr, double &value){
return
true
;
}
bool
fromStringValue
(
const
std
::
string
&
inStr
,
oai
::
nrf
::
model
::
ServiceName
&
value
)
{
//TODO
return
true
;
}
bool
fromStringValue
(
const
std
::
string
&
inStr
,
oai
::
nrf
::
model
::
PlmnId
&
value
){
//TODO
return
true
;
}
bool
fromStringValue
(
const
std
::
string
&
inStr
,
oai
::
nrf
::
model
::
Snssai
&
value
){
//TODO
return
true
;
}
bool
fromStringValue
(
const
std
::
string
&
inStr
,
oai
::
nrf
::
model
::
PlmnSnssai
&
value
){
//TODO
return
true
;
}
bool
fromStringValue
(
const
std
::
string
&
inStr
,
oai
::
nrf
::
model
::
PduSessionType
&
value
){
//TODO
return
true
;
}
bool
fromStringValue
(
const
std
::
string
&
inStr
,
oai
::
nrf
::
model
::
EventId
&
value
){
//TODO
return
true
;
}
bool
fromStringValue
(
const
std
::
string
&
inStr
,
oai
::
nrf
::
model
::
NwdafEvent
&
value
){
//TODO
return
true
;
}
bool
fromStringValue
(
const
std
::
string
&
inStr
,
oai
::
nrf
::
model
::
AccessType
&
value
){
//TODO
return
true
;
}
bool
fromStringValue
(
const
std
::
string
&
inStr
,
oai
::
nrf
::
model
::
ComplexQuery
&
value
){
//TODO
return
true
;
}
bool
fromStringValue
(
const
std
::
string
&
inStr
,
oai
::
nrf
::
model
::
AtsssCapability
&
value
){
//TODO
return
true
;
}
}
}
}
src/api-server/model/Helpers.h
View file @
b4db73b6
...
...
@@ -23,10 +23,19 @@
#include <sstream>
#include <vector>
#include <map>
#include "ServiceName.h"
#include "PlmnId.h"
#include "Snssai.h"
#include "PlmnSnssai.h"
#include "PduSessionType.h"
#include "EventId.h"
#include "NwdafEvent.h"
#include "AccessType.h"
#include "ComplexQuery.h"
#include "AtsssCapability.h"
namespace
org
{
namespace
openapitools
{
namespace
server
{
namespace
oai
{
namespace
nrf
{
namespace
helpers
{
std
::
string
toStringValue
(
const
std
::
string
&
value
);
...
...
@@ -42,6 +51,17 @@ namespace helpers {
bool
fromStringValue
(
const
std
::
string
&
inStr
,
bool
&
value
);
bool
fromStringValue
(
const
std
::
string
&
inStr
,
float
&
value
);
bool
fromStringValue
(
const
std
::
string
&
inStr
,
double
&
value
);
bool
fromStringValue
(
const
std
::
string
&
inStr
,
oai
::
nrf
::
model
::
ServiceName
&
value
);
bool
fromStringValue
(
const
std
::
string
&
inStr
,
oai
::
nrf
::
model
::
PlmnId
&
value
);
bool
fromStringValue
(
const
std
::
string
&
inStr
,
oai
::
nrf
::
model
::
Snssai
&
value
);
bool
fromStringValue
(
const
std
::
string
&
inStr
,
oai
::
nrf
::
model
::
PlmnSnssai
&
value
);
bool
fromStringValue
(
const
std
::
string
&
inStr
,
oai
::
nrf
::
model
::
PduSessionType
&
value
);
bool
fromStringValue
(
const
std
::
string
&
inStr
,
oai
::
nrf
::
model
::
EventId
&
value
);
bool
fromStringValue
(
const
std
::
string
&
inStr
,
oai
::
nrf
::
model
::
NwdafEvent
&
value
);
bool
fromStringValue
(
const
std
::
string
&
inStr
,
oai
::
nrf
::
model
::
AccessType
&
value
);
bool
fromStringValue
(
const
std
::
string
&
inStr
,
oai
::
nrf
::
model
::
ComplexQuery
&
value
);
bool
fromStringValue
(
const
std
::
string
&
inStr
,
oai
::
nrf
::
model
::
AtsssCapability
&
value
);
template
<
typename
T
>
bool
fromStringValue
(
const
std
::
vector
<
std
::
string
>
&
inStr
,
std
::
vector
<
T
>
&
value
){
try
{
...
...
@@ -71,6 +91,5 @@ namespace helpers {
}
}
}
}
#endif // Helpers_H_
\ No newline at end of file
#endif // Helpers_H_
src/api-server/model/NFProfile.cpp
View file @
b4db73b6
...
...
@@ -57,7 +57,7 @@ NFProfile::NFProfile()
m_ChfInfoIsSet
=
false
;
m_ChfInfoExtIsSet
=
false
;
m_NwdafInfoIsSet
=
false
;
m_CustomInfoIsSet
=
false
;
//
m_CustomInfoIsSet = false;
m_RecoveryTime
=
""
;
m_RecoveryTimeIsSet
=
false
;
m_NfServicePersistence
=
false
;
...
...
@@ -144,8 +144,8 @@ void to_json(nlohmann::json& j, const NFProfile& o)
j
[
"chfInfoExt"
]
=
o
.
m_ChfInfoExt
;
if
(
o
.
nwdafInfoIsSet
())
j
[
"nwdafInfo"
]
=
o
.
m_NwdafInfo
;
if
(
o
.
customInfoIsSet
())
j
[
"customInfo"
]
=
o
.
m_CustomInfo
;
//
if(o.customInfoIsSet())
//
j["customInfo"] = o.m_CustomInfo;
if
(
o
.
recoveryTimeIsSet
())
j
[
"recoveryTime"
]
=
o
.
m_RecoveryTime
;
if
(
o
.
nfServicePersistenceIsSet
())
...
...
@@ -316,11 +316,11 @@ void from_json(const nlohmann::json& j, NFProfile& o)
j
.
at
(
"nwdafInfo"
).
get_to
(
o
.
m_NwdafInfo
);
o
.
m_NwdafInfoIsSet
=
true
;
}
if
(
j
.
find
(
"customInfo"
)
!=
j
.
end
())
/*
if(j.find("customInfo") != j.end())
{
j.at("customInfo").get_to(o.m_CustomInfo);
o.m_CustomInfoIsSet = true;
}
}
*/
if
(
j
.
find
(
"recoveryTime"
)
!=
j
.
end
())
{
j
.
at
(
"recoveryTime"
).
get_to
(
o
.
m_RecoveryTime
);
...
...
@@ -368,11 +368,11 @@ void NFProfile::unsetNfInstanceName()
{
m_NfInstanceNameIsSet
=
false
;
}
NFType
NFProfile
::
getNfType
()
const
std
::
string
NFProfile
::
getNfType
()
const
{
return
m_NfType
;
}
void
NFProfile
::
setNfType
(
NFType
const
&
value
)
void
NFProfile
::
setNfType
(
std
::
string
const
&
value
)
{
m_NfType
=
value
;
}
...
...
@@ -894,23 +894,27 @@ void NFProfile::unsetNwdafInfo()
{
m_NwdafInfoIsSet
=
false
;
}
Object
NFProfile
::
getCustomInfo
()
const
/*
Object NFProfile::getCustomInfo() const
{
return m_CustomInfo;
}
*/
/*
void NFProfile::setCustomInfo(Object const& value)
{
m_CustomInfo = value;
m_CustomInfoIsSet = true;
}
bool
NFProfile
::
customInfoIsSet
()
const
}
*/
/*
bool NFProfile::customInfoIsSet() const
{
return m_CustomInfoIsSet;
}
}*/
/*
void NFProfile::unsetCustomInfo()
{
m_CustomInfoIsSet = false;
}
}*/
std
::
string
NFProfile
::
getRecoveryTime
()
const
{
return
m_RecoveryTime
;
...
...
src/api-server/model/NFProfile.h
View file @
b4db73b6
...
...
@@ -35,8 +35,8 @@
#include <vector>
#include "AmfInfo.h"
#include "UdrInfo.h"
#include "NFType.h"
#include "Object.h"
//
#include "NFType.h"
//
#include "Object.h"
#include "PlmnSnssai.h"
#include "AusfInfo.h"
#include "NwdafInfo.h"
...
...
@@ -75,8 +75,8 @@ public:
/// <summary>
///
/// </summary>
NFType
getNfType
()
const
;
void
setNfType
(
NFType
const
&
value
);
std
::
string
getNfType
()
const
;
void
setNfType
(
std
::
string
const
&
value
);
/// <summary>
///
/// </summary>
...
...
@@ -295,10 +295,10 @@ public:
/// <summary>
///
/// </summary>
Object
getCustomInfo
()
const
;
void
setCustomInfo
(
Object
const
&
value
);
bool
customInfoIsSet
()
const
;
void
unsetCustomInfo
();
//
Object getCustomInfo() const;
//
void setCustomInfo(Object const& value);
//
bool customInfoIsSet() const;
//
void unsetCustomInfo();
/// <summary>
///
/// </summary>
...
...
@@ -335,7 +335,7 @@ protected:
std
::
string
m_NfInstanceName
;
bool
m_NfInstanceNameIsSet
;
NFType
m_NfType
;
std
::
string
m_NfType
;
NFStatus
m_NfStatus
;
...
...
@@ -399,8 +399,8 @@ protected:
bool
m_ChfInfoExtIsSet
;
NwdafInfo
m_NwdafInfo
;
bool
m_NwdafInfoIsSet
;
Object
m_CustomInfo
;
bool
m_CustomInfoIsSet
;
//
Object m_CustomInfo;
//
bool m_CustomInfoIsSet;
std
::
string
m_RecoveryTime
;
bool
m_RecoveryTimeIsSet
;
bool
m_NfServicePersistence
;
...
...
src/api-server/model/NfTypeCond.cpp
View file @
b4db73b6
...
...
@@ -42,11 +42,11 @@ void from_json(const nlohmann::json& j, NfTypeCond& o)
j
.
at
(
"nfType"
).
get_to
(
o
.
m_NfType
);
}
NFType
NfTypeCond
::
getNfType
()
const
std
::
string
NfTypeCond
::
getNfType
()
const
{
return
m_NfType
;
}
void
NfTypeCond
::
setNfType
(
NFType
const
&
value
)
void
NfTypeCond
::
setNfType
(
std
::
string
const
&
value
)
{
m_NfType
=
value
;
}
...
...
src/api-server/model/NfTypeCond.h
View file @
b4db73b6
...
...
@@ -19,7 +19,8 @@
#define NfTypeCond_H_
#include "NFType.h"
//#include "NFType.h"
#include <string>
#include <nlohmann/json.hpp>
namespace
oai
{
...
...
@@ -43,13 +44,13 @@ public:
/// <summary>
///
/// </summary>
NFType
getNfType
()
const
;
void
setNfType
(
NFType
const
&
value
);
std
::
string
getNfType
()
const
;
void
setNfType
(
std
::
string
const
&
value
);
friend
void
to_json
(
nlohmann
::
json
&
j
,
const
NfTypeCond
&
o
);
friend
void
from_json
(
const
nlohmann
::
json
&
j
,
NfTypeCond
&
o
);
protected:
NFType
m_NfType
;
std
::
string
m_NfType
;
};
...
...
src/api-server/model/PatchItem.cpp
View file @
b4db73b6
...
...
@@ -95,11 +95,11 @@ void PatchItem::unsetFrom()
{
m_FromIsSet
=
false
;
}
AnyType
PatchItem
::
getValue
()
const
std
::
string
PatchItem
::
getValue
()
const
{
return
m_Value
;
}
void
PatchItem
::
setValue
(
AnyType
const
&
value
)
void
PatchItem
::
setValue
(
std
::
string
const
&
value
)
{
m_Value
=
value
;
m_ValueIsSet
=
true
;
...
...
src/api-server/model/PatchItem.h
View file @
b4db73b6
...
...
@@ -21,7 +21,7 @@
#include <string>
#include "PatchOperation.h"
#include "AnyType.h"
//
#include "AnyType.h"
#include <nlohmann/json.hpp>
namespace
oai
{
...
...
@@ -62,8 +62,8 @@ public:
/// <summary>
///
/// </summary>
AnyType
getValue
()
const
;
void
setValue
(
AnyType
const
&
value
);
std
::
string
getValue
()
const
;
void
setValue
(
std
::
string
const
&
value
);
bool
valueIsSet
()
const
;
void
unsetValue
();
...
...
@@ -76,7 +76,7 @@ protected:
std
::
string
m_From
;
bool
m_FromIsSet
;
AnyType
m_Value
;
std
::
string
m_Value
;
bool
m_ValueIsSet
;
};
...
...
src/api-server/model/SubscriptionData.cpp
View file @
b4db73b6
...
...
@@ -33,6 +33,7 @@ SubscriptionData::SubscriptionData()
m_ReqNfFqdn
=
""
;
m_ReqNfFqdnIsSet
=
false
;
m_ReqSnssaisIsSet
=
false
;
//m_SubscrCond;
}
...
...
@@ -51,8 +52,9 @@ void to_json(nlohmann::json& j, const SubscriptionData& o)
j
[
"nfStatusNotificationUri"
]
=
o
.
m_NfStatusNotificationUri
;
if
(
o
.
reqNfInstanceIdIsSet
())
j
[
"reqNfInstanceId"
]
=
o
.
m_ReqNfInstanceId
;
if
(
o
.
subscrCondIsSet
())
/*
if(o.subscrCondIsSet())
j["subscrCond"] = o.m_SubscrCond;
*/
j
[
"subscriptionId"
]
=
o
.
m_SubscriptionId
;
if
(
o
.
validityTimeIsSet
())
j
[
"validityTime"
]
=
o
.
m_ValidityTime
;
...
...
@@ -78,11 +80,13 @@ void from_json(const nlohmann::json& j, SubscriptionData& o)
j
.
at
(
"reqNfInstanceId"
).
get_to
(
o
.
m_ReqNfInstanceId
);
o
.
m_ReqNfInstanceIdIsSet
=
true
;
}
/*
if(j.find("subscrCond") != j.end())
{
j.at("subscrCond").get_to(o.m_SubscrCond);
o.m_SubscrCondIsSet = true;
}
*/
j
.
at
(
"subscriptionId"
).
get_to
(
o
.
m_SubscriptionId
);
if
(
j
.
find
(
"validityTime"
)
!=
j
.
end
())
{
...
...
@@ -146,15 +150,20 @@ void SubscriptionData::unsetReqNfInstanceId()
{
m_ReqNfInstanceIdIsSet
=
false
;
}
OneOfNfInstanceIdCondNfTypeCondServiceNameCondAmfCondGuamiListCondNetworkSliceCondNfGroupCond
SubscriptionData
::
getSubscrCond
()
const
/*
m_SubscrCond SubscriptionData::getSubscrCond() const
{
return m_SubscrCond;
}
void
SubscriptionData
::
setSubscrCond
(
OneOfNfInstanceIdCondNfTypeCondServiceNameCondAmfCondGuamiListCondNetworkSliceCondNfGroupCond
const
&
value
)
*/
/*
void SubscriptionData::setSubscrCond(m_SubscrCond const& value)
{
m_SubscrCond = value;
m_SubscrCondIsSet = true;
}
*/
bool
SubscriptionData
::
subscrCondIsSet
()
const
{
return
m_SubscrCondIsSet
;
...
...
@@ -239,11 +248,11 @@ void SubscriptionData::unsetNotifCondition()
{
m_NotifConditionIsSet
=
false
;
}
NFType
SubscriptionData
::
getReqNfType
()
const
std
::
string
SubscriptionData
::
getReqNfType
()
const
{
return
m_ReqNfType
;
}
void
SubscriptionData
::
setReqNfType
(
NFType
const
&
value
)
void
SubscriptionData
::
setReqNfType
(
std
::
string
const
&
value
)
{
m_ReqNfType
=
value
;
m_ReqNfTypeIsSet
=
true
;
...
...
src/api-server/model/SubscriptionData.h
View file @
b4db73b6
...
...
@@ -19,8 +19,7 @@
#define SubscriptionData_H_
#include "OneOfNfInstanceIdCondNfTypeCondServiceNameCondAmfCondGuamiListCondNetworkSliceCondNfGroupCond.h"
#include "NFType.h"
//#include "OneOfNfInstanceIdCondNfTypeCondServiceNameCondAmfCondGuamiListCondNetworkSliceCondNfGroupCond.h"
#include <string>
#include "NotificationEventType.h"
#include "PlmnId.h"
...
...
@@ -29,10 +28,51 @@
#include "NotifCondition.h"
#include <nlohmann/json.hpp>
#include "NfInstanceIdCond.h"
#include "NfTypeCond.h"
#include "ServiceNameCond.h"
#include "AmfCond.h"
#include "GuamiListCond.h"
#include "NetworkSliceCond.h"
#include "NfGroupCond.h"
namespace
oai
{
namespace
nrf
{
namespace
model
{
typedef
struct
subscription_condition_s
{
uint8_t
type
;
union
{
NfInstanceIdCond
nfInstanceIdCond
;
NfTypeCond
nfTypeCond
;
ServiceNameCond
serviceNameCond
;
AmfCond
amfCond
;
GuamiListCond
guamiListCond
;
NetworkSliceCond
networkSliceCond
;
NfGroupCond
nfGroupCond
;
};
subscription_condition_s
()
:
type
(
0
)
{
}
subscription_condition_s
(
uint8_t
t
)
:
type
(
t
)
{
}
bool
operator
==
(
const
struct
subscription_condition_s
&
s
)
const
{
return
(
s
.
type
==
type
);
}
//------------------------------------------------------------------------------
bool
operator
==
(
const
uint8_t
&
t
)
const
{
return
(
t
==
type
);
}
virtual
~
subscription_condition_s
()
{};
}
subscription_condition_t
;
/// <summary>
///
/// </summary>
...
...
@@ -62,8 +102,11 @@ public:
/// <summary>
///
/// </summary>
OneOfNfInstanceIdCondNfTypeCondServiceNameCondAmfCondGuamiListCondNetworkSliceCondNfGroupCond
getSubscrCond
()
const
;
void
setSubscrCond
(
OneOfNfInstanceIdCondNfTypeCondServiceNameCondAmfCondGuamiListCondNetworkSliceCondNfGroupCond
const
&
value
);
//OneOfNfInstanceIdCondNfTypeCondServiceNameCondAmfCondGuamiListCondNetworkSliceCondNfGroupCond getSubscrCond() const;
subscription_condition_t
getSubscrCond
()
const
;
void
setSubscrCond
(
subscription_condition_t
const
&
value
);
bool
subscrCondIsSet
()
const
;
void
unsetSubscrCond
();
/// <summary>
...
...
@@ -102,8 +145,8 @@ public:
/// <summary>
///
/// </summary>
NFType
getReqNfType
()
const
;
void
setReqNfType
(
NFType
const
&
value
);
std
::
string
getReqNfType
()
const
;
void
setReqNfType
(
std
::
string
const
&
value
);
bool
reqNfTypeIsSet
()
const
;
void
unsetReqNfType
();
/// <summary>
...
...
@@ -128,7 +171,8 @@ protected:
std
::
string
m_ReqNfInstanceId
;
bool
m_ReqNfInstanceIdIsSet
;
OneOfNfInstanceIdCondNfTypeCondServiceNameCondAmfCondGuamiListCondNetworkSliceCondNfGroupCond
m_SubscrCond
;
//OneOfNfInstanceIdCondNfTypeCondServiceNameCondAmfCondGuamiListCondNetworkSliceCondNfGroupCond m_SubscrCond;
subscription_condition_t
m_SubscrCond
;
bool
m_SubscrCondIsSet
;
std
::
string
m_SubscriptionId
;
...
...
@@ -140,7 +184,7 @@ protected:
bool
m_PlmnIdIsSet
;
NotifCondition
m_NotifCondition
;
bool
m_NotifConditionIsSet
;
NFType
m_ReqNfType
;
std
::
string
m_ReqNfType
;
bool
m_ReqNfTypeIsSet
;
std
::
string
m_ReqNfFqdn
;
bool
m_ReqNfFqdnIsSet
;
...
...
src/api-server/nrf-api-server.cpp
0 → 100644
View file @
b4db73b6
/**
* RNI API
* The ETSI MEC ISG MEC012 Radio Network Information API described using OpenAPI
*
* OpenAPI spec version: 1.1.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include "nrf-api-server.h"
#include "logger.hpp"
#include "pistache/endpoint.h"
#include "pistache/http.h"
#include "pistache/router.h"
#ifdef __linux__
#include <vector>
#include <signal.h>
#include <unistd.h>
#endif
#define PISTACHE_SERVER_MAX_PAYLOAD 32768
#ifdef __linux__
void
sigHandler
(
int
sig
)
{
switch
(
sig
)
{
case
SIGINT
:
case
SIGQUIT
:
case
SIGTERM
:
case
SIGHUP
:
default:
break
;
}
exit
(
0
);
}
void
setUpUnixSignals
(
std
::
vector
<
int
>
quitSignals
)
{
sigset_t
blocking_mask
;
sigemptyset
(
&
blocking_mask
);
for
(
auto
sig
:
quitSignals
)
sigaddset
(
&
blocking_mask
,
sig
);
struct
sigaction
sa
;
sa
.
sa_handler
=
sigHandler
;
sa
.
sa_mask
=
blocking_mask
;
sa
.
sa_flags
=
0
;
for
(
auto
sig
:
quitSignals
)
sigaction
(
sig
,
&
sa
,
nullptr
);
}
#endif
using
namespace
oai
::
nrf
::
api
;
void
NRFApiServer
::
init
(
size_t
thr
)
{
auto
opts
=
Pistache
::
Http
::
Endpoint
::
options
().
threads
(
thr
);
opts
.
flags
(
Pistache
::
Tcp
::
Options
::
ReuseAddr
);
opts
.
maxRequestSize
(
PISTACHE_SERVER_MAX_PAYLOAD
);
m_httpEndpoint
->
init
(
opts
);
m_completeStoredSearchDocumentApiImpl
->
init
();
m_nfInstancesStoreApiImpl
->
init
();
m_storedSearchDocumentApiImpl
->
init
();
}
void
NRFApiServer
::
start
()
{
Logger
::
nrf_sbi
().
info
(
"HTTP1 server started"
);
m_httpEndpoint
->
setHandler
(
m_router
->
handler
());
m_httpEndpoint
->
serve
();
}
void
NRFApiServer
::
shutdown
()
{
m_httpEndpoint
->
shutdown
();
}
src/api-server/nrf-api-server.h
0 → 100644
View file @
b4db73b6
/**
* RNI API
* The ETSI MEC ISG MEC012 Radio Network Information API described using OpenAPI
*
* OpenAPI spec version: 1.1.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef FILE_NRF_API_SERVER_SEEN
#define FILE_NRF_API_SERVER_SEEN
#include "pistache/endpoint.h"
#include "pistache/http.h"
#include "pistache/router.h"
#ifdef __linux__
#include <vector>
#include <signal.h>
#include <unistd.h>
#endif
#include "CompleteStoredSearchDocumentApiImpl.h"
#include "NFInstancesStoreApiImpl.h"
#include "StoredSearchDocumentApiImpl.h"
#include "nrf_app.hpp"
using
namespace
oai
::
nrf
::
api
;
class
NRFApiServer
{
public:
NRFApiServer
(
Pistache
::
Address
address
,
oai
::
nrf
::
nrf_app
*
nrf_app_inst
)
:
m_httpEndpoint
(
std
::
make_shared
<
Pistache
::
Http
::
Endpoint
>
(
address
))
{
m_router
=
std
::
make_shared
<
Pistache
::
Rest
::
Router
>
();
m_address
=
address
.
host
()
+
":"
+
(
address
.
port
()).
toString
();
m_completeStoredSearchDocumentApiImpl
=
std
::
make_shared
<
CompleteStoredSearchDocumentApiImpl
>
(
m_router
,
nrf_app_inst
,
m_address
);
m_nfInstancesStoreApiImpl
=
std
::
make_shared
<
NFInstancesStoreApiImpl
>
(
m_router
,
nrf_app_inst
,
m_address
);
m_storedSearchDocumentApiImpl
=
std
::
make_shared
<
StoredSearchDocumentApiImpl
>
(
m_router
,
nrf_app_inst
,
m_address
);
}
void
init
(
size_t
thr
=
1
);
void
start
();
void
shutdown
();
private:
std
::
shared_ptr
<
Pistache
::
Http
::
Endpoint
>
m_httpEndpoint
;
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
m_router
;
std
::
shared_ptr
<
CompleteStoredSearchDocumentApiImpl
>
m_completeStoredSearchDocumentApiImpl
;
std
::
shared_ptr
<
NFInstancesStoreApiImpl
>
m_nfInstancesStoreApiImpl
;
std
::
shared_ptr
<
StoredSearchDocumentApiImpl
>
m_storedSearchDocumentApiImpl
;
std
::
string
m_address
;
};
#endif
src/common/CMakeLists.txt
View file @
b4db73b6
...
...
@@ -20,9 +20,6 @@
################################################################################
include_directories
(
${
CMAKE_CURRENT_SOURCE_DIR
}
)
include_directories
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/msg
)
include_directories
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/nas
)
include_directories
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/ngap
)
include_directories
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/common/utils
)
include_directories
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/..
)
include_directories
(
${
SRC_TOP_DIR
}
/../build/ext/spdlog/include
)
...
...
src/common/logger.cpp
View file @
b4db73b6
...
...
@@ -59,15 +59,8 @@ void Logger::_init(const char *app, const bool log_stdout,
m_itti
=
new
_Logger
(
"itti "
,
m_sinks
,
ss
.
str
().
c_str
());
m_smf_app
=
new
_Logger
(
"smf_app"
,
m_sinks
,
ss
.
str
().
c_str
());
m_system
=
new
_Logger
(
"system "
,
m_sinks
,
ss
.
str
().
c_str
());
m_udp
=
new
_Logger
(
"udp "
,
m_sinks
,
ss
.
str
().
c_str
());
m_pfcp
=
new
_Logger
(
"pfcp "
,
m_sinks
,
ss
.
str
().
c_str
());
m_pfcp_switch
=
new
_Logger
(
"pfcp_sw "
,
m_sinks
,
ss
.
str
().
c_str
());
m_smf_n1
=
new
_Logger
(
"smf_n1 "
,
m_sinks
,
ss
.
str
().
c_str
());
m_smf_n2
=
new
_Logger
(
"smf_n2 "
,
m_sinks
,
ss
.
str
().
c_str
());
m_smf_n4
=
new
_Logger
(
"smf_n4 "
,
m_sinks
,
ss
.
str
().
c_str
());
m_smf_n10
=
new
_Logger
(
"smf_n10"
,
m_sinks
,
ss
.
str
().
c_str
());
m_smf_n11
=
new
_Logger
(
"smf_n11"
,
m_sinks
,
ss
.
str
().
c_str
());
m_
smf_api_server
=
new
_Logger
(
"sbi_srv"
,
m_sinks
,
ss
.
str
().
c_str
());
m_
nrf_sbi
=
new
_Logger
(
"sbi_srv"
,
m_sinks
,
ss
.
str
().
c_str
());
}
////////////////////////////////////////////////////////////////////////////////
...
...
src/common/logger.hpp
View file @
b4db73b6
...
...
@@ -98,33 +98,11 @@ class Logger {
static
_Logger
&
system
()
{
return
*
singleton
().
m_system
;
}
static
_Logger
&
udp
()
{
return
*
singleton
().
m_udp
;
}
static
_Logger
&
pfcp
()
{
return
*
singleton
().
m_pfcp
;
}
static
_Logger
&
pfcp_switch
()
{
return
*
singleton
().
m_pfcp_switch
;
}
static
_Logger
&
smf_n1
()
{
return
*
singleton
().
m_smf_n1
;
}
static
_Logger
&
smf_n2
()
{
return
*
singleton
().
m_smf_n2
;
}
static
_Logger
&
smf_n4
()
{
return
*
singleton
().
m_smf_n4
;
}
static
_Logger
&
smf_n10
()
{
return
*
singleton
().
m_smf_n10
;
}
static
_Logger
&
smf_n11
()
{
return
*
singleton
().
m_smf_n11
;
}
static
_Logger
&
smf_api_server
()
{
return
*
singleton
().
m_
smf_api_server
;
static
_Logger
&
nrf_sbi
()
{
return
*
singleton
().
m_
nrf_sbi
;
}
private:
...
...
@@ -150,15 +128,8 @@ class Logger {
_Logger
*
m_itti
;
_Logger
*
m_smf_app
;
_Logger
*
m_system
;
_Logger
*
m_udp
;
_Logger
*
m_pfcp
;
_Logger
*
m_pfcp_switch
;
_Logger
*
m_smf_n1
;
_Logger
*
m_smf_n2
;
_Logger
*
m_smf_n4
;
_Logger
*
m_smf_n10
;
_Logger
*
m_smf_n11
;
_Logger
*
m_
smf_api_server
;
_Logger
*
m_
nrf_sbi
;
};
#endif // __LOGGER_H
src/common/utils/get_gateway_netlink.cpp
View file @
b4db73b6
...
...
@@ -43,8 +43,8 @@ bool util::get_iface_l2_addr(const std::string &iface, std::string &mac) {
char
wb
[
32
];
mac_address_in
.
get
(
wb
,
32
);
mac
.
assign
(
wb
);
Logger
::
pfcp_switch
().
error
(
"Found IFace %s MAC %s"
,
iface
.
c_str
(),
mac
.
c_str
());
//
Logger::pfcp_switch().error("Found IFace %s MAC %s", iface.c_str(),
//
mac.c_str());
mac
.
erase
(
std
::
remove
(
mac
.
begin
(),
mac
.
end
(),
':'
),
mac
.
end
());
return
true
;
// ifr = {};
...
...
src/nrf_app/nrf_app.cpp
0 → 100755
View file @
b4db73b6
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file smf_app.cpp
\brief
\author Lionel GAUTHIER, Tien-Thinh NGUYEN
\company Eurecom
\date 2019
\email: lionel.gauthier@eurecom.fr, tien-thinh.nguyen@eurecom.fr
*/
#include "nrf_app.hpp"
src/nrf_app/nrf_app.hpp
0 → 100644
View file @
b4db73b6
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file smf_app.hpp
\brief
\author Lionel GAUTHIER, Tien-Thinh NGUYEN
\company Eurecom
\date 2019
\email: lionel.gauthier@eurecom.fr, tien-thinh.nguyen@eurecom.fr
*/
#ifndef FILE_NRF_APP_HPP_SEEN
#define FILE_NRF_APP_HPP_SEEN
namespace
oai
{
namespace
nrf
{
class
nrf_app
{
};
}
}
#include "nrf_config.hpp"
#endif
/* FILE_SMF_APP_HPP_SEEN */
src/nrf_app/nrf_config.cpp
View file @
b4db73b6
...
...
@@ -49,7 +49,7 @@
using
namespace
std
;
//using namespace libconfig;
using
namespace
nrf
;
using
namespace
oai
::
nrf
;
//extern smf_config smf_cfg;
...
...
src/nrf_app/nrf_config.hpp
View file @
b4db73b6
...
...
@@ -39,8 +39,10 @@
#include <vector>
//#include "thread_sched.hpp"
namespace
oai
{
namespace
nrf
{
namespace
nrf
{}
// namespace nrf
}
// namespace nrf
}
#endif
/* FILE_NRF_CONFIG_HPP_SEEN */
src/oai-nrf/CMakeLists.txt
View file @
b4db73b6
...
...
@@ -314,5 +314,5 @@ IF(STATIC_LINKING)
ENDIF
(
STATIC_LINKING
)
target_link_libraries
(
nrf
${
ASAN
}
-Wl,--start-group NRF 3GPP_COMMON_TYPES CN_UTILS -lnettle
${
NETTLE_LIBRARIES
}
${
CRYPTO_LIBRARIES
}
-lnghttp2_asio -lboost_system -lboost_thread -lssl -lcrypto gflags glog dl double-conversion folly -Wl,--end-group pthread m rt config++ event boost_system pistache curl
)
-Wl,--start-group NRF 3GPP_COMMON_TYPES
NRF_API
CN_UTILS -lnettle
${
NETTLE_LIBRARIES
}
${
CRYPTO_LIBRARIES
}
-lnghttp2_asio -lboost_system -lboost_thread -lssl -lcrypto gflags glog dl double-conversion folly -Wl,--end-group pthread m rt config++ event boost_system pistache curl
)
\ No newline at end of file
src/oai-nrf/main.cpp
View file @
b4db73b6
...
...
@@ -31,7 +31,9 @@
#include <stdlib.h> // srand
#include <unistd.h> // get_pid(), pause()
//using namespace smf;
#include "logger.hpp"
//using namespace nrf;
//using namespace util;
using
namespace
std
;
//using namespace oai::smf_server::api;
...
...
@@ -94,9 +96,9 @@ int main(int argc, char **argv)
}
// Logger
//
Logger::init( "smf" , Options::getlogStdout() , Options::getlogRotFilelog());
Logger
::
init
(
"smf"
,
Options
::
getlogStdout
()
,
Options
::
getlogRotFilelog
());
//
Logger::smf_app().startup( "Options parsed" );
Logger
::
smf_app
().
startup
(
"Options parsed"
);
struct
sigaction
sigIntHandler
;
sigIntHandler
.
sa_handler
=
my_app_signal_handler
;
...
...
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