[L] Change in osmo-ttcn3-hacks[master]: smf: Implement smf: Implement f_n11_delete_session()
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43692?usp=email ) Change subject: smf: Implement smf: Implement f_n11_delete_session() ...................................................................... smf: Implement smf: Implement f_n11_delete_session() Change-Id: Ib8be72624330cd944447a2d479360b064b81c28f --- M library/HTTP2_Msg.ttcn M library/TS29502_Nsmf_PDUSession_Templates.ttcn M library/TS29512_Npcf_SMPolicyControl_Templates.ttcn M smf/SMF_Session_CT.ttcn M smf/SMF_Session_CT_5G.ttcn 5 files changed, 296 insertions(+), 36 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved osmith: Looks good to me, but someone else must approve diff --git a/library/HTTP2_Msg.ttcn b/library/HTTP2_Msg.ttcn index 4150c0b..23cb945 100644 --- a/library/HTTP2_Msg.ttcn +++ b/library/HTTP2_Msg.ttcn @@ -102,11 +102,18 @@ template (present) HTTP2_Msg tr_HTTP2_Msg_204_No_Content(template (present) IPL4asp_Types.ConnectionId conn_id := ?, - template (present) integer stream_id := ?, - template HTTP2_header_list headers := *, - template HTTP2_Data_frame body := omit) := + template (present) integer stream_id := ?, + template HTTP2_header_list headers := *, + template HTTP2_Data_frame body := omit) := tr_HTTP2_Msg_Status(conn_id, stream_id, 204, headers, body); +template (value) HTTP2_Msg +ts_HTTP2_Msg_204_No_Content(template (value) IPL4asp_Types.ConnectionId conn_id, + template (value) integer stream_id , + template (omit) HTTP2_header_list headers := omit, + template (omit) HTTP2_Data_frame body := omit) := +ts_HTTP2_Msg_Status(conn_id, stream_id, 204, headers, omit); + function f_HTTP2_Msg_append_hdr_content_length(inout HTTP2_Msg http2_msg) { diff --git a/library/TS29502_Nsmf_PDUSession_Templates.ttcn b/library/TS29502_Nsmf_PDUSession_Templates.ttcn index b89c5c8..208c404 100644 --- a/library/TS29502_Nsmf_PDUSession_Templates.ttcn +++ b/library/TS29502_Nsmf_PDUSession_Templates.ttcn @@ -413,6 +413,30 @@ localOffloadingMgtAllowedInd := localOffloadingMgtAllowedInd } +/* 6.1.6.2.6 */ +template (value) SmContextReleaseData +ts_SmContextReleaseData(template (omit) Cause cause := omit, + template (omit) NgApCause ngApCause := omit, + template (omit) FiveGMmCause fivegMmCauseValue := omit, + template (omit) UserLocation ueLocation := omit, + template (omit) TimeZone ueTimeZone := omit, + template (omit) UserLocation addUeLocation := omit, + template (omit) boolean vsmfReleaseOnly := omit, + template (omit) RefToBinaryData n2SmInfo := omit, + template (omit) N2SmInfoType n2SmInfoType := omit, + template (omit) boolean ismfReleaseOnly := omit) := { + cause := cause, + ngApCause := ngApCause, + fivegMmCauseValue := fivegMmCauseValue, + ueLocation := ueLocation, + ueTimeZone := ueTimeZone, + addUeLocation := addUeLocation, + vsmfReleaseOnly := vsmfReleaseOnly, + n2SmInfo := n2SmInfo, + n2SmInfoType := n2SmInfoType, + ismfReleaseOnly := ismfReleaseOnly +} + template (value) RefToBinaryData ts_RefToBinaryData(template (value) charstring contentId) := { contentId := contentId diff --git a/library/TS29512_Npcf_SMPolicyControl_Templates.ttcn b/library/TS29512_Npcf_SMPolicyControl_Templates.ttcn index 4e12839..194f60d 100644 --- a/library/TS29512_Npcf_SMPolicyControl_Templates.ttcn +++ b/library/TS29512_Npcf_SMPolicyControl_Templates.ttcn @@ -218,6 +218,28 @@ locOffloadInfos := locOffloadInfos, vplmnDlAmbr := vplmnDlAmbr, sessionRecovStatus := sessionRecovStatus - } +} + +type TS29512_Npcf_SMPolicyControl.SmPolicyDeleteData1.ranNasRelCauses RanNasRelCause1List; +type TS29512_Npcf_SMPolicyControl.SmPolicyDeleteData1.accuUsageReports AccuUsageReport1List; + +template (present) SmPolicyDeleteData1 +tr_SmPolicyDeleteData1(template UserLocation1 userLocationInfo := *, + template TimeZone1 ueTimeZone := *, + template PlmnIdNid1 servingNetwork := *, + template DateTime1 userLocationInfoTime := *, + template RanNasRelCause1List ranNasRelCauses := *, + template AccuUsageReport1List accuUsageReports := *, + template PduSessionRelCause1 pduSessRelCause := *, + template SatelliteId1 servSatId := *) := { + userLocationInfo := userLocationInfo, + ueTimeZone := ueTimeZone, + servingNetwork := servingNetwork, + userLocationInfoTime := userLocationInfoTime, + ranNasRelCauses := ranNasRelCauses, + accuUsageReports := accuUsageReports, + pduSessRelCause := pduSessRelCause, + servSatId := servSatId +} } diff --git a/smf/SMF_Session_CT.ttcn b/smf/SMF_Session_CT.ttcn index d0a7aea..c65ef32 100644 --- a/smf/SMF_Session_CT.ttcn +++ b/smf/SMF_Session_CT.ttcn @@ -166,6 +166,10 @@ }; +type record SessionPars_Npcf { + charstring sm_policy_id +}; + type record SessionPars_Nsmf { charstring smContextRef optional }; @@ -209,6 +213,7 @@ PfcpParameters pfcp_pars, SessionPars_Namf namf, + SessionPars_Npcf npcf, SessionPars_Nsmf nsmf, SessionPars_Nudm nudm, SessionPars_NGNAS nas @@ -253,6 +258,9 @@ ue_ip6 := omit, ipv6_interface_id := omit }, + npcf := { + sm_policy_id := f_dec_TBCD(imsi_hex2oct(imsi)) /* imsi_str */ & "-" & int2str(1) + }, nsmf := { smContextRef := omit }, diff --git a/smf/SMF_Session_CT_5G.ttcn b/smf/SMF_Session_CT_5G.ttcn index 5313c54..575306c 100644 --- a/smf/SMF_Session_CT_5G.ttcn +++ b/smf/SMF_Session_CT_5G.ttcn @@ -56,24 +56,28 @@ const charstring SCP_uri_hostport := mp_scp_local_ip & ":" & int2str(mp_scp_local_port); const charstring SCP_uri_prefix := "http://" & SCP_uri_hostport; -/******************************************** - * N11 Nsmf (SBI): Requests towards IUT SMFs - ********************************************/ +/************************************************************ + * N11 Nsmf (SBI): Requests towards IUT SMFs, 3GPP TS 29.502 + ************************************************************/ const charstring Nsmf_uri_hostport := mp_smf_hostname & ":" & int2str(mp_smf_sbi_port); const charstring Nsmf_uri_prefix := "http://" & Nsmf_uri_hostport; const charstring Nsmf_PDUSession_path_api_prefix := "/nsmf-pdusession/v1" const charstring Nsmf_PDUSession_path_sm_contexts := Nsmf_PDUSession_path_api_prefix & "/sm-contexts"; +/* 6.1.3.2 Resource: SM contexts collection */ template (value) charstring ts_Nsmf_PDUSession_path_sm_contexts(template (value) charstring smContextRef) := Nsmf_PDUSession_path_sm_contexts & "/" & valueof(smContextRef); +/* 6.1.3.3 Resource: Individual SM context */ template (present) charstring tr_Nsmf_PDUSession_uri_sm_contexts(template charstring smContextRef := pattern "\d+") := pattern Nsmf_uri_prefix & Nsmf_PDUSession_path_sm_contexts & "/" & smContextRef; template (value) charstring ts_Nsmf_PDUSession_path_sm_context_modify(template (value) charstring smContextRef) := Nsmf_PDUSession_path_sm_contexts & "/" & valueof(smContextRef) & "/modify"; +template (value) charstring ts_Nsmf_PDUSession_path_sm_context_release(template (value) charstring smContextRef) := + Nsmf_PDUSession_path_sm_contexts & "/" & valueof(smContextRef) & "/release"; function f_n11_init() runs on SMF_Session_CT { f_http2_adapter_init(); @@ -253,7 +257,6 @@ /* 3GPP TS 29.502 5.2.2.3 Update SM Context service operation */ function f_n11_update_sm_context() runs on SMF_Session_CT { - var template (value) SmContextUpdateData sm_ctx_update; var octetstring sm_ctx_update_enc; var template (value) octetstring body_enc; @@ -306,9 +309,63 @@ setverdict(pass); } +/* 5.2.2.4 Release SM Context service operation */ function f_n11_delete_session() runs on SMF_Session_CT { - log("f_n11_delete_session(): TODO"); + var template (value) SmContextReleaseData sm_ctx_rel; + var octetstring sm_ctx_rel_enc; + var template (value) octetstring body_enc; + var charstring http2_boundary := "=-0EVVjxcWWFYNd1JXh1OQEg==" + var integer http2_idx; + var integer http2_stream_id := 3; + var template (value) HTTP2_Msg http2_tx; + var HTTP2_Msg http2_rx; + + sm_ctx_rel := ts_SmContextReleaseData(ueLocation := f_ts_UserLocation(), + n2SmInfo := TS29502_Nsmf_PDUSession_Templates.ts_RefToBinaryData("N2SmInfo"), + n2SmInfoType := ts_N2SmInfoType(PDU_RES_SETUP_RSP)); + sm_ctx_rel_enc := f_enc_SmContextReleaseData(valueof(sm_ctx_rel)); + + /* TODO: generate and encode ngap: */ + var octetstring ngap_enc := f_ngap_pdu_gen_PDUSessionResourceSetupResponseTransfer(); + + body_enc := f_http2_encode_body_multipart_json_ngap(sm_ctx_rel_enc, ngap_enc, http2_boundary); + http2_idx := f_http2_adapter_find_free_idx(); + http2_tx := ts_HTTP2_Msg(http2_idx, + http2_stream_id, + hb := { + pseudo_headers := ts_HTTP2_pseudo_headers_Req(method := "POST", + scheme := "http", + authority := Nsmf_uri_hostport, + path := ts_Nsmf_PDUSession_path_sm_context_release(g_pars.nsmf.smContextRef)), + headers := { + ts_HTTP2_Hdr_content_type_multipart(http2_boundary), + ts_HTTP2_Hdr_accept("application/json"), + ts_HTTP2_Hdr_user_agent("ttcn3-amf"), + ts_HTTP2_Hdr_accept_encoding("gzip") + } + }, + body := ts_HTTP2_Data_frame(http2_stream_id, + end_stream_flag := true, + data := body_enc)); + + f_http2_adapter_connect(mp_smf_hostname, mp_smf_sbi_port, mp_amf_local_ip, -1, idx := http2_idx); + f_http2_adapter_send(http2_tx); + + /* SMF deletes PDU Session on UPF: */ + as_pfcp_sess_del_req(); + + /* SMF deletes policy in PCF: */ + as_npcf_smpolicycontrol_post_IndividualSMPOlicyTermination(); + + /* SMF deregisters on UDM: */ + as_nudm_sdm_delete_IndividualSubscription(); + as_nudm_uecm_delete_IndividualSmfRegistration(); + + /* Successful answer with no content: */ + as_http2_adapter_receive(http2_rx, tr_HTTP2_Msg_204_No_Content(), idx := http2_idx); + f_http2_adapter_close(idx := http2_idx); + setverdict(pass); } /************************************** @@ -410,30 +467,41 @@ const charstring Nudm_SDM_path_api_prefix := "/nudm-sdm/v2" /* 6.2.3.5 Resource: IndividualSmfRegistration */ -template (present) charstring tr_Nudm_UECM_path_individual_smf_registration(template (present) charstring imsi := pattern "\d+", - template (present) charstring smf_reg := pattern "\d+") := - pattern Nudm_UECM_path_api_prefix & "/imsi-" & imsi & "/registrations/smf-registrations/" & smf_reg; +template (present) charstring +tr_Nudm_UECM_path_individual_smf_registration(template (present) charstring imsi := pattern "\d+", + template (present) charstring smf_reg := pattern "\d+") +:= pattern Nudm_UECM_path_api_prefix & "/imsi-" & imsi & "/registrations/smf-registrations/" & smf_reg; -template (value) charstring ts_Nudm_UECM_path_individual_smf_registration(template (value) charstring imsi, - template (value) charstring smf_reg) := - Nudm_UECM_path_api_prefix & "/imsi-" & valueof(imsi) & "/registrations/smf-registrations/" & valueof(smf_reg); +template (value) charstring +ts_Nudm_UECM_path_individual_smf_registration(template (value) charstring imsi, + template (value) charstring smf_reg) +:= Nudm_UECM_path_api_prefix & "/imsi-" & valueof(imsi) & "/registrations/smf-registrations/" & valueof(smf_reg); -template (value) charstring ts_Nudm_UECM_uri_individual_smf_registration(template (value) charstring imsi, - template (value) charstring smf_reg) := - Nudm_uri_prefix & valueof(ts_Nudm_UECM_path_individual_smf_registration(imsi, smf_reg)); +template (value) charstring +ts_Nudm_UECM_uri_individual_smf_registration(template (value) charstring imsi, + template (value) charstring smf_reg) +:= Nudm_uri_prefix & valueof(ts_Nudm_UECM_path_individual_smf_registration(imsi, smf_reg)); +/* 6.1.3.3 Resource: SdmSubscriptions (Collection) */ +template (value) charstring +ts_Nudm_SDM_path_sdm_subscriptions(template (value) charstring imsi) +:= Nudm_SDM_path_api_prefix & "/imsi-" & valueof(imsi) & "/sdm-subscriptions"; -template (value) charstring ts_Nudm_SDM_path_sdm_imsi(template (value) charstring imsi) := - Nudm_SDM_path_api_prefix & "/imsi-" & valueof(imsi); +/* 6.1.3.4 Resource: Individual subscription (Document) */ +template (present) charstring +tr_Nudm_SDM_path_individual_subscription(template (present) charstring imsi := pattern "\d+", + template (present) charstring subscr_id := pattern "\d+") +:= pattern Nudm_SDM_path_api_prefix & "/imsi-" & imsi & "/sdm-subscriptions/" & subscr_id; -template (value) charstring ts_Nudm_SDM_path_sdm_imsi_sdm_subscriptions(template (value) charstring imsi) := - Nudm_SDM_path_api_prefix & "/imsi-" & valueof(imsi) & "/sdm-subscriptions"; +template (value) charstring +ts_Nudm_SDM_path_individual_subscription(template (value) charstring imsi, + template (value) charstring subscr_id) +:= valueof(ts_Nudm_SDM_path_sdm_subscriptions(imsi)) & "/" & valueof(subscr_id); -template (value) charstring ts_Nudm_SDM_path_sdm_imsi_sdm_subscriptions_id(template (value) charstring imsi, template (value) charstring subscr_id) := - Nudm_SDM_path_api_prefix & "/imsi-" & valueof(imsi) & "/sdm-subscriptions/" & valueof(subscr_id); - -template (value) charstring ts_Nudm_SDM_uri_sdm_imsi_sdm_subscriptions_id(template (value) charstring imsi, template (value) charstring subscr_id) := - Nudm_uri_prefix & Nudm_SDM_path_api_prefix & "/imsi-" & valueof(imsi) & "/sdm-subscriptions/" & valueof(subscr_id); +template (value) charstring +ts_Nudm_SDM_uri_individual_subscription(template (value) charstring imsi, + template (value) charstring subscr_id) +:= Nudm_uri_prefix & valueof(ts_Nudm_SDM_path_individual_subscription(imsi, subscr_id)); /* 3GPP TS 29.503 6.2.3.5.2.1 */ function f_tr_Nudm_UECM_put_IndividualSmfRegistration() @@ -480,6 +548,44 @@ } } +/* 3GPP TS 29.503 6.2.3.5.2.2 DELETE */ +function f_tr_Nudm_UECM_delete_IndividualSmfRegistration() +runs on SMF_Session_CT return template (present) HTTP2_Msg { + var template (present) HTTP2_Msg http2_msg; + var template (present) HTTP2_header_block hb; + var template (present) HTTP2_pseudo_headers pseudo_headers; + var template HTTP2_header_list headers := *; + + pseudo_headers := tr_HTTP2_pseudo_headers_Req(method := "DELETE", + path := tr_Nudm_UECM_path_individual_smf_registration(g_pars.imsi_str, + g_pars.nudm.smf_subscription_id)); + hb := tr_HTTP2_header_block(pseudo_headers, headers); + http2_msg := tr_HTTP2_Msg(?, ?, + hb := hb, + body := omit); + return http2_msg; +} + +/* 3GPP TS 29.503 5.3.2.4.4 SMF deregistration */ +private altstep as_nudm_uecm_delete_IndividualSmfRegistration() +runs on SMF_Session_CT { + var HTTP2_Msg http2_rx; + [] HTTP2_CONN[HTTP2_CONN_SCP].receive(f_tr_Nudm_UECM_delete_IndividualSmfRegistration()) -> value http2_rx { + var template (value) HTTP2_Msg http2_tx; + + http2_tx := ts_HTTP2_Msg_204_No_Content(http2_rx.conn_id, + http2_rx.stream_id, + headers := { + ts_HTTP2_Hdr_content_type("application/json; charset=utf-8"), + ts_HTTP2_Hdr_location(ts_Nudm_UECM_uri_individual_smf_registration(g_pars.imsi_str, + g_pars.nudm.smf_subscription_id)) + }, + body := omit); + HTTP2_CONN[HTTP2_CONN_SCP].send(http2_tx); + setverdict(pass); + } +} + /* 3GPP TS 29.503: * 5.2.2.2.5 Session Management Subscription Data Retrieval * 6.1.3.8 Resource: SessionManagementSubscriptionData (Document) */ @@ -552,7 +658,7 @@ var template HTTP2_header_list headers := *; pseudo_headers := tr_HTTP2_pseudo_headers_Req(method := "POST", - path := ts_Nudm_SDM_path_sdm_imsi_sdm_subscriptions(g_pars.imsi_str)); + path := ts_Nudm_SDM_path_sdm_subscriptions(g_pars.imsi_str)); hb := tr_HTTP2_header_block(pseudo_headers, headers); http2_msg := tr_HTTP2_Msg(?, ?, hb := hb, @@ -579,7 +685,8 @@ http2_rx.stream_id, headers := { ts_HTTP2_Hdr_content_type("application/json; charset=utf-8"), - ts_HTTP2_Hdr_location(ts_Nudm_SDM_uri_sdm_imsi_sdm_subscriptions_id(g_pars.imsi_str, int2str(1))) + ts_HTTP2_Hdr_location(ts_Nudm_SDM_uri_individual_subscription(g_pars.imsi_str, + g_pars.nudm.smf_subscription_id)) }, body := ts_HTTP2_Data_frame(http2_rx.stream_id, end_stream_flag := true, @@ -589,13 +696,68 @@ } } -/************************************* - * N8 NPcf (SBI): Emulated PCF - *************************************/ + +/* 3GPP TS 29.503: + * 6.1.3.3 Resource: SdmSubscriptions (Collection)*/ +function f_tr_Nudm_SDM_delete_IndividualSubscription() +runs on SMF_Session_CT return template (present) HTTP2_Msg { + var template (present) HTTP2_Msg http2_msg; + var template (present) HTTP2_header_block hb; + var template (present) HTTP2_pseudo_headers pseudo_headers; + var template HTTP2_header_list headers := *; + + pseudo_headers := tr_HTTP2_pseudo_headers_Req(method := "DELETE", + path := tr_Nudm_SDM_path_individual_subscription(g_pars.imsi_str, + g_pars.nudm.smf_subscription_id)); + hb := tr_HTTP2_header_block(pseudo_headers, headers); + http2_msg := tr_HTTP2_Msg(?, ?, + hb := hb, + body := omit); + return http2_msg; +} + +/* 3GPP TS 29.503 5.2.2.3.2 Subscription to notifications of data change */ +private altstep as_nudm_sdm_delete_IndividualSubscription() +runs on SMF_Session_CT { + var HTTP2_Msg http2_rx; + [] HTTP2_CONN[HTTP2_CONN_SCP].receive(f_tr_Nudm_SDM_delete_IndividualSubscription()) -> value http2_rx { + var template (value) HTTP2_Msg http2_tx; + + http2_tx := ts_HTTP2_Msg_204_No_Content(http2_rx.conn_id, + http2_rx.stream_id, + headers := { + ts_HTTP2_Hdr_content_type("application/json; charset=utf-8"), + ts_HTTP2_Hdr_location(ts_Nudm_SDM_uri_individual_subscription(g_pars.imsi_str, + g_pars.nudm.smf_subscription_id)) + }, + body := omit); + HTTP2_CONN[HTTP2_CONN_SCP].send(http2_tx); + setverdict(pass); + } +} + +/********************************************** + * N8 NPcf (SBI): Emulated PCF, 3GPP TS 29.512 + **********************************************/ const charstring Npcf_uri_prefix := SCP_uri_prefix; const charstring Npcf_SMPolicyControl_path_api_prefix := "/npcf-smpolicycontrol/v1" -const charstring Npcf_SMPolicyControl_path__sm_policies := Npcf_SMPolicyControl_path_api_prefix & "/sm-policies"; + +/* 5.3.2 Resource: SM Policies */ +const charstring Npcf_SMPolicyControl_path_sm_policies := Npcf_SMPolicyControl_path_api_prefix & "/sm-policies"; + +/* 5.3.3 Resource: Individual SM Policy */ +template (present) charstring +tr_Npcf_SMPolicyControl_path_individual_sm_policy_delete(template (present) charstring sm_policy_id := pattern "?+") +:= pattern Npcf_SMPolicyControl_path_sm_policies & "/" & sm_policy_id & "/delete"; + +template (value) charstring +ts_Npcf_SMPolicyControl_path_individual_sm_policy(template (value) charstring sm_policy_id) +:= Npcf_SMPolicyControl_path_sm_policies & "/" & valueof(sm_policy_id); + +template (value) charstring +ts_Npcf_SMPolicyControl_uri_individual_sm_policy(template (value) charstring sm_policy_id) +:= Npcf_uri_prefix & valueof(ts_Npcf_SMPolicyControl_path_individual_sm_policy(sm_policy_id)); /* 3GPP TS 29.512: * 5.3.2 Resource: SM Policies */ @@ -607,7 +769,7 @@ var template HTTP2_header_list headers := *; pseudo_headers := tr_HTTP2_pseudo_headers_Req(method := "POST", - path := Npcf_SMPolicyControl_path__sm_policies); + path := Npcf_SMPolicyControl_path_sm_policies); hb := tr_HTTP2_header_block(pseudo_headers, headers); http2_msg := tr_HTTP2_Msg(?, ?, hb := hb, @@ -624,7 +786,6 @@ var template (value) SmPolicyDecision1 smpol_decision; var template (value) HTTP2_Msg http2_tx; var octetstring body_enc; - var integer sessRuleId := 1; f_dec_SmPolicyContextData1(http2_rx.body.data, smpol_ctx_data); // TODO: check returned integer. @@ -635,7 +796,7 @@ http2_rx.stream_id, headers := { ts_HTTP2_Hdr_content_type("application/json; charset=utf-8"), - ts_HTTP2_Hdr_location(Npcf_uri_prefix & Npcf_SMPolicyControl_path_api_prefix & "/sm-policies/imsi-" & g_pars.imsi_str & "-" & int2str(sessRuleId)) + ts_HTTP2_Hdr_location(ts_Npcf_SMPolicyControl_uri_individual_sm_policy(g_pars.npcf.sm_policy_id)) }, body := ts_HTTP2_Data_frame(http2_rx.stream_id, end_stream_flag := true, @@ -645,6 +806,44 @@ } } +/* 3GPP TS 29.503 5.3.3.4.2 Operation: delete */ +function f_tr_SMPolicyControl_post_IndividualSMPolicyTermination() +runs on SMF_Session_CT return template (present) HTTP2_Msg { + var template (present) HTTP2_Msg http2_msg; + var template (present) HTTP2_header_block hb; + var template (present) HTTP2_pseudo_headers pseudo_headers; + var template HTTP2_header_list headers := *; + + pseudo_headers := tr_HTTP2_pseudo_headers_Req(method := "POST", + path := tr_Npcf_SMPolicyControl_path_individual_sm_policy_delete(g_pars.npcf.sm_policy_id)); + hb := tr_HTTP2_header_block(pseudo_headers, headers); + http2_msg := tr_HTTP2_Msg(?, ?, + hb := hb, + body := tr_HTTP2_Data_frame(data := decmatch tr_SmPolicyDeleteData1)); + return http2_msg; +} + +/* 3GPP TS 29.503 4.2.5.2 SM Policy Association termination */ +private altstep as_npcf_smpolicycontrol_post_IndividualSMPOlicyTermination() +runs on SMF_Session_CT { + var HTTP2_Msg http2_rx; + [] HTTP2_CONN[HTTP2_CONN_SCP].receive(f_tr_SMPolicyControl_post_IndividualSMPolicyTermination()) -> value http2_rx { + var SmPolicyDeleteData1 del_data; + var template (value) HTTP2_Msg http2_tx; + + f_dec_SmPolicyDeleteData1(http2_rx.body.data, del_data); + + http2_tx := ts_HTTP2_Msg_204_No_Content(http2_rx.conn_id, + http2_rx.stream_id, + headers := { + ts_HTTP2_Hdr_content_type("application/json; charset=utf-8"), + ts_HTTP2_Hdr_location(ts_Npcf_SMPolicyControl_uri_individual_sm_policy(g_pars.npcf.sm_policy_id)) + }, + body := omit); + HTTP2_CONN[HTTP2_CONN_SCP].send(http2_tx); + setverdict(pass); + } +} /************ * NGAP -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43692?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ib8be72624330cd944447a2d479360b064b81c28f Gerrit-Change-Number: 43692 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: osmith <osmith@sysmocom.de> Gerrit-Reviewer: pespin <pespin@sysmocom.de>
participants (1)
-
pespin