Commit 3bbd22d8 authored by Iztok Juvancic's avatar Iztok Juvancic
Browse files

Merge branch 'develop' of https://forge.etsi.org/gitlab/DIAMETER/DiameterShDh into develop

parents 82df318e 5ee4668b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -167,6 +167,8 @@ module DiameterShDh_PIXITS {
        
        modulepar octetstring PX_DSAI_TAG := '00'O;
        
        modulepar LibDiameter_Types_Base_AVPs.Diameter_Identity PX_HSS_IDENTITY := "hss.etsi.org";
        
    } // End of group DiameterCommonShDhData
    
    group SipParameters {
+65 −17
Original line number Diff line number Diff line
@@ -1647,19 +1647,22 @@ module DiameterShDh_TCFunctions {
                    f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict()); 
                    log("*** " & __SCOPE__ & ": INFO: Preamble done. ***");
    
//                    // TestBody
//                    f_send_SNR(
//                               md_sNR(
//                                      vc_sessionId,
//                                      md_snrBodyAvps(
//                                                     m_vendor_Specific_Appl_Id_Sh,
//                                                     m_specific_user_Identity(m_public_user_identity),
//                                                     vc_originHost,                 // containing an Origin-Host AVP
//                                                     vc_originRealm,                // containing an Origin-Realm AVP
//                                                     vc_destinationRealm            // containing a Destination-Realm AVP
//                                                    )
//                                     )
//                    );
                    // TestBody
                    f_send_SNR(
                               md_sNR(
                                      vc_sessionId,
                                      md_snrBodyAvps(
                                                     vc_originHost,                 // containing an Origin-Host AVP
                                                     vc_originRealm,                // containing an Origin-Realm AVP
                                                     vc_destinationRealm,           // containing a Destination-Realm AVP
                                                     m_msisdn_user_Identity (
                                                                             m_MSISDN_user_identity(char2oct(PX_NotRelatedPrivateIdentity))
                                                     ),
                                                     m_subs_Req_Type(SUBSCRIBE_E),
                                                     m_data_Reference(REPOSITORY_DATA_E)
                                                    )
                                     )
                    );
//
//                    f_awaiting_SNA(
//                                   mdw_sNA( 
@@ -2280,8 +2283,9 @@ module DiameterShDh_TCFunctions {
                                                                    vc_originRealm_IUT,             // containing an Origin-Realm AVP
                                                                                                    // containing a User-Identity AVP
                                                                                                    // containing a Data-Reference AVP
                                                                    mw_redirect_host
                     )));
                                                                    mw_redirect_host(               // containing a Redirect-Host AVP
                                                                                     PX_HSS_IDENTITY//     indicating the HSS identity to be used
                     ))));

                    f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); 

@@ -2375,10 +2379,54 @@ module DiameterShDh_TCFunctions {
                    f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict()); 
                    log("*** " & __SCOPE__ & ": INFO: Preamble done. ***");

                    //TODO TestBody
                    // TestBody
                    // to indicate a user data handling procedure
                    action("The IUT is requested to indicate a user data handling procedure");
                    // Clause 'then': the IUT sends an UD-Request to the SLF
                    f_awaiting_UDR(
                                   mdw_uDR_Header_UDRBody(
                                                          ?,
                                                          ?,                                  // containing a Session-ID AVP
                                                          mdw_udrBodyAvps(
                                                              vc_originHost_IUT,              // containing an Origin-Host AVP
                                                              vc_originRealm_IUT,             // containing an Origin-Realm AVP
                                                              vc_destinationRealm_IUT         // containing a Destination-Realm AVP
                    )));
                    // on receipt of a UD-Answer from the SLF
                    f_send_UDA(
                               md_uDA(
                                      vc_sessionId,                                           // Set in f_awaiting_UDR
                                      md_udaBodyAvps_redirect(
                                                              m_resultCode(DIAMETER_REDIRECT_INDICATION_E),
                                                              vc_originHost,                 // containing an Origin-Host AVP
                                                              vc_originRealm,                // containing an Origin-Realm AVP
                                                              m_redirect_host(               // containing a Redirect-Host AVP
                                                                              PX_HSS_IDENTITY//     indicating the HSS identity to be used
                                                                             )
                              )));
                    f_awaiting_UDR(
                                   mdw_uDR_Header_UDRBody(
                                                          ?,
                                                          ?,                                  // containing a Session-ID AVP
                                                          mdw_udrBodyAvps(
                                                              vc_originHost_IUT,              // containing an Origin-Host AVP
                                                              vc_originRealm_IUT,             // containing an Origin-Realm AVP
                                                              vc_destinationRealm_IUT,        // containing a Destination-Realm AVP
                                                                                              // containing a User-Identity AVP
                                                              m_data_Reference_dummy          // containing a Data-Reference AVP
                                                                                              //     indicating RepositoryData (0)
                    )));
                    
                    f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); 

                    f_send_UDA(
                               md_uDA(
                                      vc_sessionId,                                           // Set in f_awaiting_UDR
                                      md_udaBodyAvps(
                                                     m_resultCode(DIAMETER_SUCCESS_E),
                                                     vc_originHost,
                                                     vc_originRealm
                              )));
                    f_postamble_Dh_SLF();
                    f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict()); 
                    log("*** " & __SCOPE__ & ": INFO: Postamble done. ***");
+31 −4
Original line number Diff line number Diff line
@@ -121,6 +121,12 @@ module DiameterShDh_Templates {
                    aVP_Data := p_aVP_Data
                }

                template (value) Subs_Req_Type_AVP m_subs_Req_Type(
                                                     in template (value) Subs_Req_Ty_Type p_aVP_Data
                ) modifies m_subs_Req_Type_dummy := {
                    aVP_Data := p_aVP_Data
                }
                
                template (value) Server_Name_AVP m_server_name(
                                                               in template (value) UTF8String p_aVP_Data
                ) := {
@@ -135,6 +141,13 @@ module DiameterShDh_Templates {
                    aVP_Data   := p_aVP_Data
                }
                
                template (value) Redirect_Host_AVP m_redirect_host(
                                                                   in template (value) Diameter_Identity p_aVP_Data
                ) := {
                    aVP_Header := mw_aVP_HeaderVid_Mbit1(c_redirect_Host_AVP_Code, ?, ?),
                    aVP_Data   := p_aVP_Data
                }
                
            } // End of group sendingTemplatesForAVPs
            
            group receivingTemplatesForAVPs{
@@ -328,18 +341,20 @@ module DiameterShDh_Templates {
	                                                         template (value) Origin_Realm_AVP p_origin_Realm,
	                                                         template (value) Destination_Realm_AVP p_destination_Realm,
	                                                         template (value) User_Identity_AVP p_user_Identity := m_user_Identity_dummy,
                                                             template (value) Subs_Req_Type_AVP p_subs_Req_Type := m_subs_Req_Type_dummy,
	                                                         template (value) Data_Reference_AVP p_data_Reference := m_data_Reference_dummy
	            ) modifies m_SNR_Body_dummy := {
	                vendor_Specific_Application_Id := m_vendor_Specific_Appl_Id_Sh,//required only in TS129 229
                    auth_Session_State := m_auth_Session_State_dummy,//TODO
                    auth_Session_State := m_auth_Session_State,
                    origin_Host := p_origin_Host,
                    origin_Realm := p_origin_Realm,
                    destination_Realm := p_destination_Realm,
                    user_Identity := p_user_Identity,
                    subs_Req_Type := m_subs_Req_Type_dummy,//TODO
                    data_Reference := {m_data_Reference_dummy}//TODO
                    subs_Req_Type := p_subs_Req_Type,
                    data_Reference := {p_data_Reference}
	            } // End of template md_snrBodyAvps
	            
	            
	        } // End of group snr_msg
            
        } // End of group Sh_request_message_templates_send 
@@ -555,6 +570,18 @@ module DiameterShDh_Templates {
                    origin_Realm                := p_originRealm
                } // End of template md_udaBodyAvps 
                
                template (omit) UDA_Body_AVP md_udaBodyAvps_redirect(
                                                                     in template (value) Result_Code_AVP              p_resultCode,
                                                                     in template (value) Origin_Host_AVP              p_originHost,
                                                                     in template (value) Origin_Realm_AVP             p_originRealm,
                                                                     in template (value) Redirect_Host_AVP            p_redirect_host
                ) modifies md_udaBodyAvps := {
                    result_Code                 := p_resultCode,
                    origin_Host                 := p_originHost,
                    origin_Realm                := p_originRealm,
                    aVP_Type                    := { AVP_Type: {p_redirect_Host_AVP.aVP_Header, { cHARSTRING := p_redirect_Host_AVP.aVP_Data } } }
                } // End of template md_udaBodyAvps 
                
            } // End of group uda_msg 
            
            group pna_msg {
@@ -663,7 +690,7 @@ module DiameterShDh_Templates {
                    experimental_Result         := omit,
                    origin_Host                 := p_originHost,
                    origin_Realm                := p_originRealm,
                    aVP_Type                    := superset(AVP_Type: {p_redirect_Host_AVP.aVP_Header, ?})
                    aVP_Type                    := superset(AVP_Type: {p_redirect_Host_AVP.aVP_Header, { cHARSTRING := p_redirect_Host_AVP.aVP_Data }})
                } // End of template mdw_udaBodyAvps_redirect

                template (present) Experimental_Result_AVP mw_experimentalResult(
+60 −4
Original line number Diff line number Diff line
@@ -3029,7 +3029,7 @@ module DiameterShDh_TestCases {
                 */
                testcase TC_DH_SLF_UD_01() runs on DiameterShDh system TestAdapter { 
                    // Local variables
                    var DiameterShDh v_diameterSh_slf; 
                    var DiameterShDh v_diameterSh_as; 
                        
                    // Test control
                    if (not PICS_SLF_IUT) {
@@ -3038,15 +3038,15 @@ module DiameterShDh_TestCases {
                    }
                    
                    // Test component configuration
                    f_cf_1Dh_slfUp(v_diameterSh_slf);
                    f_cf_1Dh_asUp(v_diameterSh_as);
                    
                    // Start
                    v_diameterSh_slf.start(f_TC_DH_SLF_UD_01()); 
                    v_diameterSh_as.start(f_TC_DH_SLF_UD_01()); 
                        
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                        
                    f_cf_1Dh_slfDown(v_diameterSh_slf);
                    f_cf_1Dh_asDown(v_diameterSh_as);
                        
                } // End of testcase TC_DH_SLF_UD_01 
                
@@ -3070,6 +3070,62 @@ module DiameterShDh_TestCases {
            //} // End of group TP_ASRole_MessageSyntax

            group TP_ASRole_UserData{
                
                /**
                 * @desc    Verify that the IUT for user data handling procedure sends a UD-Request to the SLF and after reception of a UD-Answer forwards a UD-Request to the HSS.
                 * <pre>
                 * Pics Selection: PICS_AS_IUT
                 * Initial conditions: 
                 *     with {
                 *        
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *        when {
                 *            to indicate a user data handling procedure
                 *        }
                 *        then {
                 *            the IUT sends a UD-Request to the SLF
                 *            on receipt of a UD-Answer from the SLF
                 *                containing a Redirect-Host AVP
                 *                    indicating the HSS identity to be used
                 *                not containing an Experimental-Result AVP
                 *                containing a Result-Code AVP
                 *                    indicating DIAMETER_REDIRECT_INDICATION (3006)
                 *            sends a UD-Request to the HSS
                 *                containing a Destination-Host AVP
                 *                containing a Destination-Realm AVP.
                 *        }
                 *     }
                 * </pre>
                 * 
                 * @version    0.0.6
                 * @see        ETSI TS 103 571-2 TP_DH_AS_UD_01
                 */
                testcase TC_DH_AS_UD_01() runs on DiameterShDh system TestAdapter { 
                    // Local variables
                    var DiameterShDh v_diameterSh_slf; 
                        
                    // Test control
                    if (not PICS_AS_IUT) {
                        log("*** " & __SCOPE__ & ": ERROR: 'PICS_AS_IUT' required for executing the TC. ***"); 
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf_1Dh_slfUp(v_diameterSh_slf);
                    
                    // Start
                    v_diameterSh_slf.start(f_TC_DH_AS_UD_01()); 
                        
                    // synchronize PTC on 1 sychronization points
                    f_serverSyncNClientsAndStop(f_NrofComps(), {c_prDone, c_tbDone, c_poDone});
                        
                    f_cf_1Dh_slfDown(v_diameterSh_slf);
                        
                } // End of testcase TC_DH_AS_UD_01 
                
            
            } // End of group TP_ASRole_UserData

            group TP_ASRole_ProfileUpdate{