Commit 42d76895 authored by xiangwan's avatar xiangwan

add plmn procecc for SMFSelectionSubscriptionDataRetrieval and...

add plmn procecc for SMFSelectionSubscriptionDataRetrieval and SliceSelectionSubscriptionDataRetrieval
parent 55ccf1c6
......@@ -13,6 +13,7 @@
#include "SMFSelectionSubscriptionDataRetrievalApi.h"
#include "Helpers.h"
#include "conversions.hpp"
namespace oai {
namespace udm {
......@@ -62,13 +63,14 @@ void SMFSelectionSubscriptionDataRetrievalApi::get_smf_sel_data_handler(
}
auto plmnIdQuery = request.query().get("plmn-id");
Pistache::Optional<PlmnId> plmnId;
/* if(!plmnIdQuery.isEmpty()){
if(!plmnIdQuery.isEmpty()){
PlmnId value;
if(fromStringValue(plmnIdQuery.get(), value)){
std::string valueplmnIdQuery= plmnIdQuery.get();
std::string valuechange = conv::UrlDecode(valueplmnIdQuery);
nlohmann::json::parse(valuechange).get_to(value);
plmnId = Pistache::Some(value);
}
}
*/
// Getting the header params
auto ifNoneMatch = request.headers().tryGetRaw("If-None-Match");
auto ifModifiedSince = request.headers().tryGetRaw("If-Modified-Since");
......
......@@ -13,6 +13,7 @@
#include "SliceSelectionSubscriptionDataRetrievalApi.h"
#include "Helpers.h"
#include "conversions.hpp"
namespace oai {
namespace udm {
......@@ -62,13 +63,15 @@ void SliceSelectionSubscriptionDataRetrievalApi::get_nssai_handler(
}
auto plmnIdQuery = request.query().get("plmn-id");
Pistache::Optional<PlmnId> plmnId;
/* if(!plmnIdQuery.isEmpty()){
if(!plmnIdQuery.isEmpty()){
PlmnId value;
if(fromStringValue(plmnIdQuery.get(), value)){
std::string valueplmnIdQuery= plmnIdQuery.get();
std::string valuechange = conv::UrlDecode(valueplmnIdQuery);
nlohmann::json::parse(valuechange).get_to(value);
plmnId = Pistache::Some(value);
}
}
*/
// Getting the header params
auto ifNoneMatch = request.headers().tryGetRaw("If-None-Match");
auto ifModifiedSince = request.headers().tryGetRaw("If-Modified-Since");
......
......@@ -42,7 +42,6 @@ void AccessAndMobilitySubscriptionDataRetrievalApiImpl::get_am_data(
// 1. populate remote uri for udp request
std::string udr_ip = std::string(inet_ntoa(*((struct in_addr *)&udm_cfg.nudr.addr4)));
std::string udr_port = std::to_string(udm_cfg.nudr.port);
//std::string remote_uri = udr_ip + ":" + udr_port + "/nudr-dr/v2/subscription-data/"+supi+plmnId+"/provisioned-data/am-data";
std::string remote_uri = udr_ip + ":" + udr_port + "/nudr-dr/v2/subscription-data/"+supi+"/"+plmnId.get().getMcc() +plmnId.get().getMnc()+"/provisioned-data/am-data";
std::string method("GET");
......
......@@ -43,8 +43,7 @@ void SMFSelectionSubscriptionDataRetrievalApiImpl::get_smf_sel_data(
// 1. populate remote uri for udp request
std::string udr_ip = std::string(inet_ntoa(*((struct in_addr *)&udm_cfg.nudr.addr4)));
std::string udr_port = std::to_string(udm_cfg.nudr.port);
//std::string remote_uri = udr_ip + ":" + udr_port + "/nudr-dr/v2/subscription-data/"+supi+plmnId+"/provisioned-data/am-data";
std::string remote_uri = udr_ip + ":" + udr_port + "/nudr-dr/v2/subscription-data/"+supi+"/456789/provisioned-data/smf-selection-subscription-data";
std::string remote_uri = udr_ip + ":" + udr_port + "/nudr-dr/v2/subscription-data/"+supi+"/"+plmnId.get().getMcc() +plmnId.get().getMnc()+"/provisioned-data/smf-selection-subscription-data";
std::string method("GET");
std::string body("");
......
......@@ -40,8 +40,7 @@ void SliceSelectionSubscriptionDataRetrievalApiImpl::get_nssai(
// 1. populate remote uri for udp request
std::string udr_ip = std::string(inet_ntoa(*((struct in_addr *)&udm_cfg.nudr.addr4)));
std::string udr_port = std::to_string(udm_cfg.nudr.port);
//std::string remote_uri = udr_ip + ":" + udr_port + "/nudr-dr/v2/subscription-data/"+supi+plmnId+"/provisioned-data/am-data";
std::string remote_uri = udr_ip + ":" + udr_port + "/nudr-dr/v2/subscription-data/"+supi+"/456789/provisioned-data/sm-data";
std::string remote_uri = udr_ip + ":" + udr_port + "/nudr-dr/v2/subscription-data/"+supi+"/"+plmnId.get().getMcc() +plmnId.get().getMnc()+"/provisioned-data/sm-data";
std::string method("GET");
std::string body("");
......
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