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

Fix issue for API version (V1 for AMF, SMF, V2 for UDM)

parent 6e294e27
......@@ -71,7 +71,7 @@ class IndividualSMContextApi {
}
void init();
const std::string base = "/nsmf-pdusession/v2";
const std::string base = "/nsmf-pdusession/v1";
private:
void setupRoutes();
......
......@@ -62,7 +62,7 @@ class SMContextsCollectionApi {
}
void init();
const std::string base = "/nsmf-pdusession/v2";
const std::string base = "/nsmf-pdusession/v1";
private:
void setupRoutes();
......
......@@ -292,7 +292,7 @@ void smf_http2_server::create_sm_contexts_handler(
//set api root to be used as location header in HTTP response
sm_context_req_msg.set_api_root(
m_address + ":" + std::to_string(m_port)
+ "/nsmf-pdusession/v2/sm-context");
+ "/nsmf-pdusession/v1/sm-context");
//supi
supi_t supi = { .length = 0 };
......
......@@ -179,14 +179,14 @@ typedef struct qos_profile_s {
} qos_profile_t;
//URL, N1, N2 (may get from configuration file)
#define NAMF_COMMUNICATION_N1N2_MESSAGE_TRANSFER_URL "/namf-comm/v2/ue-contexts/{}/n1-n2-messages" //context id
#define NAMF_COMMUNICATION_N1N2_MESSAGE_TRANSFER_URL "/namf-comm/v1/ue-contexts/{}/n1-n2-messages" //context id
#define NUDM_SDM_GET_SM_DATA_URL "/nudm-sdm/v2/{}/sm-data" //ue Id
#define N1_SM_CONTENT_ID "n1SmMsg"
#define N1N2_MESSAGE_CLASS "SM"
#define N2_SM_CONTENT_ID "n2msg"
#define NSMF_CALLBACK_N1N2_MESSAGE_TRANSFER_FAILURE "/nsmf-pdusession/v2/callback/N1N2MsgTxfrFailureNotification/{}" //UE Id
#define NSMF_PDU_SESSION_SM_CONTEXT_CREATE_URL "/nsmf-pdusession/v2/sm-contexts"
#define NSMF_PDU_SESSION_SM_CONTEXT_UPDATE_URL "/nsmf-pdusession/v2/sm-contexts/"
#define NSMF_CALLBACK_N1N2_MESSAGE_TRANSFER_FAILURE "/nsmf-pdusession/v1/callback/N1N2MsgTxfrFailureNotification/{}" //UE Id
#define NSMF_PDU_SESSION_SM_CONTEXT_CREATE_URL "/nsmf-pdusession/v1/sm-contexts"
#define NSMF_PDU_SESSION_SM_CONTEXT_UPDATE_URL "/nsmf-pdusession/v1/sm-contexts/"
//for CURL
#define AMF_CURL_TIMEOUT_MS 100L
......
......@@ -205,7 +205,7 @@ bool send_pdu_session_establishment_request(uint8_t pid,
url.append(std::string(":"));
url.append(port);
}
url.append(std::string("/nsmf-pdusession/v2/sm-contexts"));
url.append(std::string("/nsmf-pdusession/v1/sm-contexts"));
//Fill the json part
pdu_session_establishment_request["supi"] = "imsi-200000000000001";
......@@ -344,10 +344,10 @@ bool send_pdu_session_update_sm_context_establishment(
url.append(std::string(":"));
url.append(port);
}
url.append(std::string("/nsmf-pdusession/v2/sm-contexts/"));
url.append(std::string("/nsmf-pdusession/v1/sm-contexts/"));
url.append(std::to_string(context_id));
url.append(std::string("/modify"));
// url.append(std::string("/nsmf-pdusession/v2/sm-contexts/1/modify"));
// url.append(std::string("/nsmf-pdusession/v1/sm-contexts/1/modify"));
//Fill the json part
pdu_session_update_request["n2SmInfoType"] = "PDU_RES_SETUP_RSP";
......@@ -502,8 +502,8 @@ void send_pdu_session_modification_request_step1(uint8_t pid,
url.append(std::string(":"));
url.append(port);
}
//url.append(std::string("/nsmf-pdusession/v2/sm-contexts/1/modify"));
url.append(std::string("/nsmf-pdusession/v2/sm-contexts/"));
//url.append(std::string("/nsmf-pdusession/v1/sm-contexts/1/modify"));
url.append(std::string("/nsmf-pdusession/v1/sm-contexts/"));
url.append(std::to_string(context_id));
url.append(std::string("/modify"));
......@@ -627,8 +627,8 @@ void send_pdu_session_modification_request_step2(uint8_t context_id,
url.append(std::string(":"));
url.append(port);
}
// url.append(std::string("/nsmf-pdusession/v2/sm-contexts/1/modify"));
url.append(std::string("/nsmf-pdusession/v2/sm-contexts/"));
// url.append(std::string("/nsmf-pdusession/v1/sm-contexts/1/modify"));
url.append(std::string("/nsmf-pdusession/v1/sm-contexts/"));
url.append(std::to_string(context_id));
url.append(std::string("/modify"));
......@@ -743,8 +743,8 @@ void send_pdu_session_modification_complete(uint8_t pid, uint8_t context_id,
url.append(std::string(":"));
url.append(port);
}
// url.append(std::string("/nsmf-pdusession/v2/sm-contexts/1/modify"));
url.append(std::string("/nsmf-pdusession/v2/sm-contexts/"));
// url.append(std::string("/nsmf-pdusession/v1/sm-contexts/1/modify"));
url.append(std::string("/nsmf-pdusession/v1/sm-contexts/"));
url.append(std::to_string(context_id));
url.append(std::string("/modify"));
......@@ -858,8 +858,8 @@ void send_pdu_session_release_request(uint8_t pid, uint8_t context_id,
url.append(std::string(":"));
url.append(port);
}
//url.append(std::string("/nsmf-pdusession/v2/sm-contexts/1/modify"));
url.append(std::string("/nsmf-pdusession/v2/sm-contexts/"));
//url.append(std::string("/nsmf-pdusession/v1/sm-contexts/1/modify"));
url.append(std::string("/nsmf-pdusession/v1/sm-contexts/"));
url.append(std::to_string(context_id));
url.append(std::string("/modify"));
......@@ -969,8 +969,8 @@ void send_pdu_session_release_resource_release_ack(uint8_t context_id,
url.append(std::string(":"));
url.append(port);
}
// url.append(std::string("/nsmf-pdusession/v2/sm-contexts/1/modify"));
url.append(std::string("/nsmf-pdusession/v2/sm-contexts/"));
// url.append(std::string("/nsmf-pdusession/v1/sm-contexts/1/modify"));
url.append(std::string("/nsmf-pdusession/v1/sm-contexts/"));
url.append(std::to_string(context_id));
url.append(std::string("/modify"));
......@@ -1088,8 +1088,8 @@ void send_pdu_session_release_complete(uint8_t pid, uint8_t context_id,
url.append(std::string(":"));
url.append(port);
}
//url.append(std::string("/nsmf-pdusession/v2/sm-contexts/1/modify"));
url.append(std::string("/nsmf-pdusession/v2/sm-contexts/"));
//url.append(std::string("/nsmf-pdusession/v1/sm-contexts/1/modify"));
url.append(std::string("/nsmf-pdusession/v1/sm-contexts/"));
url.append(std::to_string(context_id));
url.append(std::string("/modify"));
......@@ -1187,8 +1187,8 @@ void send_pdu_session_update_sm_context_ue_service_request(
url.append(std::string(":"));
url.append(port);
}
//url.append(std::string("/nsmf-pdusession/v2/sm-contexts/1/modify"));
url.append(std::string("/nsmf-pdusession/v2/sm-contexts/"));
//url.append(std::string("/nsmf-pdusession/v1/sm-contexts/1/modify"));
url.append(std::string("/nsmf-pdusession/v1/sm-contexts/"));
url.append(std::to_string(context_id));
url.append(std::string("/modify"));
......@@ -1301,8 +1301,8 @@ void send_pdu_session_update_sm_context_ue_service_request_step2(
url.append(std::string(":"));
url.append(port);
}
//url.append(std::string("/nsmf-pdusession/v2/sm-contexts/1/modify"));
url.append(std::string("/nsmf-pdusession/v2/sm-contexts/"));
//url.append(std::string("/nsmf-pdusession/v1/sm-contexts/1/modify"));
url.append(std::string("/nsmf-pdusession/v1/sm-contexts/"));
url.append(std::to_string(context_id));
url.append(std::string("/modify"));
......@@ -1409,8 +1409,8 @@ void send_release_sm_context_request(uint8_t pid, uint8_t context_id,
url.append(std::string(":"));
url.append(port);
}
//url.append(std::string("/nsmf-pdusession/v2/sm-contexts/1/release"));
url.append(std::string("/nsmf-pdusession/v2/sm-contexts/"));
//url.append(std::string("/nsmf-pdusession/v1/sm-contexts/1/release"));
url.append(std::string("/nsmf-pdusession/v1/sm-contexts/"));
url.append(std::to_string(context_id));
url.append(std::string("/release"));
......
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