Commit 94376ca4 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

For testing with dsTester

parent d3f9851b
...@@ -160,7 +160,7 @@ void amf_n11::handle_itti_message(itti_nsmf_pdusession_update_sm_context &itti_m ...@@ -160,7 +160,7 @@ void amf_n11::handle_itti_message(itti_nsmf_pdusession_update_sm_context &itti_m
smf_selection_from_context(smf_addr); smf_selection_from_context(smf_addr);
} }
//TODO:Remove hardcoded value (1 - SCID) //TODO:Remove hardcoded value (1 - SCID)
std::string remote_uri = smf_addr + "/nsmf-pdusession/v2/sm-contexts/" + "1" + "/modify"; //scid std::string remote_uri = smf_addr + "/nsmf-pdusession/v1/sm-contexts/" + "imsi-208950000000031-1" + "/modify"; //scid
nlohmann::json pdu_session_update_request; nlohmann::json pdu_session_update_request;
pdu_session_update_request["n2SmInfoType"] = "PDU_RES_SETUP_RSP"; pdu_session_update_request["n2SmInfoType"] = "PDU_RES_SETUP_RSP";
pdu_session_update_request["n2SmInfo"]["contentId"] = "n2SmMsg"; pdu_session_update_request["n2SmInfo"]["contentId"] = "n2SmMsg";
...@@ -229,7 +229,7 @@ void amf_n11::handle_itti_message(itti_smf_services_consumer &smf) { ...@@ -229,7 +229,7 @@ void amf_n11::handle_itti_message(itti_smf_services_consumer &smf) {
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void amf_n11::handle_pdu_session_initial_request(std::string supi, std::shared_ptr<pdu_session_context> psc, std::string smf_addr, bstring sm_msg, std::string dnn) { void amf_n11::handle_pdu_session_initial_request(std::string supi, std::shared_ptr<pdu_session_context> psc, std::string smf_addr, bstring sm_msg, std::string dnn) {
//TODO: Remove hardcoded values //TODO: Remove hardcoded values
std::string remote_uri = smf_addr + "/nsmf-pdusession/v2/sm-contexts"; std::string remote_uri = smf_addr + "/nsmf-pdusession/v1/sm-contexts";
nlohmann::json pdu_session_establishment_request; nlohmann::json pdu_session_establishment_request;
pdu_session_establishment_request["supi"] = supi.c_str(); pdu_session_establishment_request["supi"] = supi.c_str();
pdu_session_establishment_request["pei"] = "imei-200000000000001"; pdu_session_establishment_request["pei"] = "imei-200000000000001";
...@@ -377,7 +377,7 @@ void amf_n11::curl_http_client(std::string remoteUri, std::string jsonData, std: ...@@ -377,7 +377,7 @@ void amf_n11::curl_http_client(std::string remoteUri, std::string jsonData, std:
//TODO: free curl before returning //TODO: free curl before returning
return; return;
} }
if (httpCode != 200 && httpCode != 201) { if (httpCode != 200 && httpCode != 201 && httpCode != 204) {
is_response_ok = false; is_response_ok = false;
//TODO: error if there's no content in the response //TODO: error if there's no content in the response
if (!(multipart_parser(response, jsonData, n1sm, n2sm))) { if (!(multipart_parser(response, jsonData, n1sm, n2sm))) {
......
...@@ -64,7 +64,7 @@ if (!Options::parse(argc, argv)) { ...@@ -64,7 +64,7 @@ if (!Options::parse(argc, argv)) {
amf_app_inst->allRegistredModulesInit(modules); amf_app_inst->allRegistredModulesInit(modules);
Logger::amf_app().debug("Initiating AMF server endpoints"); Logger::amf_app().debug("Initiating AMF server endpoints");
Pistache::Address addr(std::string(inet_ntoa (*((struct in_addr *)&amf_cfg.n2.addr4))) , Pistache::Port(8282)); Pistache::Address addr(std::string(inet_ntoa (*((struct in_addr *)&amf_cfg.n2.addr4))) , Pistache::Port(80));
AMFApiServer amfApiServer(addr, amf_app_inst); AMFApiServer amfApiServer(addr, amf_app_inst);
amfApiServer.init(2); amfApiServer.init(2);
std::thread amf_api_manager(&AMFApiServer::start, amfApiServer); std::thread amf_api_manager(&AMFApiServer::start, amfApiServer);
......
...@@ -44,7 +44,7 @@ public: ...@@ -44,7 +44,7 @@ public:
virtual ~N1N2MessageCollectionDocumentApi() {} virtual ~N1N2MessageCollectionDocumentApi() {}
void init(); void init();
const std::string base = "/namf-comm/v2"; const std::string base = "/namf-comm/v1";
private: private:
void setupRoutes(); void setupRoutes();
......
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