Commit 2534b061 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Fix issue for NFSubscribeNotify server

parent 2cb98406
......@@ -39,7 +39,7 @@ class NFStatusNotifyApi {
virtual ~NFStatusNotifyApi() {}
void init();
const std::string base = "/nsmf_nfstatus_notify/";
const std::string base = "/nsmf-nfstatus-notify/";
private:
void setupRoutes();
......
......@@ -84,6 +84,7 @@ void SMFApiServer::init(size_t thr) {
m_smContextsCollectionApiImpl->init();
m_individualSubscriptionDocumentApiImpl->init();
m_subscriptionsCollectionApiImpl->init();
m_nfStatusNotifyApiImpl->init();
}
void SMFApiServer::start() {
......
......@@ -49,6 +49,7 @@
#include "SMContextsCollectionApiImpl.h"
#include "IndividualSubscriptionDocumentApiImpl.h"
#include "SubscriptionsCollectionApiImpl.h"
#include "NFStatusNotifyApiImpl.h"
#include "smf_app.hpp"
......@@ -74,6 +75,8 @@ class SMFApiServer {
> (m_router, smf_app_inst, m_address);
m_subscriptionsCollectionApiImpl = std::make_shared
< SubscriptionsCollectionApiImpl > (m_router, smf_app_inst, m_address);
m_nfStatusNotifyApiImpl = std::make_shared
< NFStatusNotifyApiImpl > (m_router, smf_app_inst, m_address);
}
void init(size_t thr = 1);
......@@ -89,6 +92,7 @@ class SMFApiServer {
std::shared_ptr<SMContextsCollectionApiImpl> m_smContextsCollectionApiImpl;
std::shared_ptr<IndividualSubscriptionDocumentApiImpl> m_individualSubscriptionDocumentApiImpl;
std::shared_ptr<SubscriptionsCollectionApiImpl> m_subscriptionsCollectionApiImpl;
std::shared_ptr<NFStatusNotifyApiImpl> m_nfStatusNotifyApiImpl;
std::string m_address;
};
......
......@@ -1957,7 +1957,7 @@ void smf_app::trigger_upf_status_notification_subscribe() {
//TODO: remove hardcoded values
json_data["nfStatusNotificationUri"] =
std::string(inet_ntoa(*((struct in_addr*) &smf_cfg.sbi.addr4))) +
":" + std::to_string(smf_cfg.sbi.port) + "/nsmf_nfstatus_notify/" +
":" + std::to_string(smf_cfg.sbi.port) + "/nsmf-nfstatus-notify/" +
smf_cfg.sbi_api_version + "/subscriptions";
json_data["subscrCond"]["NfTypeCond"]["nfType"] = "UPF";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment