Commit b4db73b6 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen
Browse files

integrate API server

parent 5c24d6a5
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
......@@ -17,7 +17,7 @@ namespace oai {
namespace nrf {
namespace api {
using namespace org::openapitools::server::helpers;
using namespace oai::nrf::helpers;
using namespace oai::nrf::model;
CompleteStoredSearchDocumentApi::CompleteStoredSearchDocumentApi(std::shared_ptr<Pistache::Rest::Router> rtr) {
......
......@@ -17,7 +17,7 @@ namespace oai {
namespace nrf {
namespace api {
using namespace org::openapitools::server::helpers;
using namespace oai::nrf::helpers;
using namespace oai::nrf::model;
NFInstanceIDDocumentApi::NFInstanceIDDocumentApi(std::shared_ptr<Pistache::Rest::Router> rtr) {
......
This diff is collapsed.
......@@ -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 &quot;&quot;)</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;
};
......
......@@ -17,7 +17,7 @@ namespace oai {
namespace nrf {
namespace api {
using namespace org::openapitools::server::helpers;
using namespace oai::nrf::helpers;
using namespace oai::nrf::model;
StoredSearchDocumentApi::StoredSearchDocumentApi(std::shared_ptr<Pistache::Rest::Router> rtr) {
......
......@@ -17,7 +17,7 @@ namespace oai {
namespace nrf {
namespace api {
using namespace org::openapitools::server::helpers;
using namespace oai::nrf::helpers;
using namespace oai::nrf::model;
SubscriptionIDDocumentApi::SubscriptionIDDocumentApi(std::shared_ptr<Pistache::Rest::Router> rtr) {
......
......@@ -17,7 +17,7 @@ namespace oai {
namespace nrf {
namespace api {
using namespace org::openapitools::server::helpers;
using namespace oai::nrf::helpers;
using namespace oai::nrf::model;
SubscriptionsCollectionApi::SubscriptionsCollectionApi(std::shared_ptr<Pistache::Rest::Router> rtr) {
......
/**
* 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");
}
}
......
......@@ -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
......@@ -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) {
......
......@@ -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
/**
* 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");
}
}
......
......@@ -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
/**
* 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");
}
}
......
......@@ -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
/**
* 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