Commit bf13eab6 authored by garciay's avatar garciay
Browse files

Implemented test case function f_TC_HSS_UL_02()

parent 8650dec9
Loading
Loading
Loading
Loading
+53 −4
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ module DiameterS6a_HSS_TCFunctions {
            // Test Body
            // Clause 'when': the IUT receives a UL-Request
            f_awaiting_ULR(
                md_ULR_TC_01( 
                md_ULR_TCs( 
                    vc_sessionId,                                   // containing a Session-ID AVP
                    md_ulrBodyAvps_TC_01(
                        m_auth_Session_State_noStateMaintained,     // containing an Auth-Session-State AVP indicating NO_STATE_MAINTAINED
@@ -76,7 +76,7 @@ module DiameterS6a_HSS_TCFunctions {
            alt {
                [] MME_S6a.receive( 
                    mw_mmeUpdateLocationRequest(
                        mdw_ULA_TC_01( 
                        mdw_ULA_TCs( 
                            vc_sessionId,                                       // containing a Session-ID AVP
                            mdw_ulaBodyAvps_TC_01( 
                                mw_resultCode(DIAMETER_SUCCESS_E),              // containing a Result-Code AVP indicating DIAMETER_SUCCESS
@@ -103,6 +103,10 @@ module DiameterS6a_HSS_TCFunctions {
            
        } // End of TC function f_TC_HSS_UL_01
        
        /**
         * @desc Verify that the IUT can successfully process all mandatory and optional AVPs in a UL-Request.received due to Update Location procedure
         * @verdict pass on success, fail on error or inconc on timeout only 
         */
        function f_TC_HSS_UL_02() runs on TestAdapter {
            
            // Local variables
@@ -113,9 +117,54 @@ module DiameterS6a_HSS_TCFunctions {
            log("*** " & __SCOPE__ & ": INFO: Preamblue done. ***");
            
            // Test Body
            // Clause 'when'
            // Clause 'when': the IUT receives a UL-Request
            f_awaiting_ULR(
                md_ULR_TCs( 
                    vc_sessionId,                                                // containing a Session-ID AVP
                    md_ulrBodyAvps_TC_02(
                        m_auth_Session_State_noStateMaintained,                  // containing an Auth-Session-State AVP indicating NO_STATE_MAINTAINED
                        vc_originHost,                                           // containing an Origin-Host AVP
                        vc_originRealm,                                          // containing an Origin-Realm AVP
                        vc_destinationRealm,                                     // containing a Destination-Realm AVP
                        m_user_Name(PX_USR_NAME),                                // containing a User-Name AVP
                        m_rAT_Type(PX_RAT_TYPE),                                 // containing a RAT-Type AVP
                        m_ulr_Flags_AVP(PX_ULR_FLAGS_S6a_IND_SET),               // containing a ULR-Flags AVP with S6a-indicator bit set
                        m_visitedPLMNId_dummy,                                   // containing a Visited-PLMN-ID AVP
                        m_homogeneous_Support_AVP(SUPPORTED_E),                  // containing a Homogeneous-Support-of-IMS-Voice-Over-PS-Sessions AVP
                        m_active_APN_AVP_ul_02(                                  // containing an Active-APN AVP
                             m_context_Identifier_AVP(PX_CONTEXT_ID),            //     containing a Context-Identifier AVP
                             m_service_Selection_AVP(PX_SERVICE_SEL),            //     containing Service-Selection AVP
                             m_mip6_Agent_Info_AVP(),                            //     FIXME containing MIP6-Agent-Info AVP
                             m_visited_Network_Identifier_AVP(PX_VISITED_NTW_ID) //     containing Visited-Network-Identifier AVP
                        )
                    ) // End of md_ulrBodyAvps_TC_01
                ) // // End of md_ULR_TC_01
            );
            
            // Clause 'then'
            // Clause 'then': the IUT sends a UL-Answer
            tc_ac.start;
            alt {
                [] MME_S6a.receive( 
                    mw_mmeUpdateLocationRequest(
                        mdw_ULA_TCs( 
                            vc_sessionId,                                       // containing a Session-ID AVP
                            mdw_ulaBodyAvps_TC_02( 
                                mw_resultCode(DIAMETER_SUCCESS_E),              // containing a Result-Code AVP indicating DIAMETER_SUCCESS
                                m_auth_Session_State_noStateMaintained,         // containing an Auth-Session-State AVP indicating NO_STATE_MAINTAINED
                                vc_originHost,                                  // containing an Origin-Host AVP
                                vc_originRealm,                                 // containing an Origin-Realm AVP
                                mw_ula_Flags_AVP(PX_ULA_FLAGS_SEP_IND_SET),     // containing a ULA-Flags AVP with Separation-indicator bit set
                                m_subscriptionData_dummy                        // containing a Subscription-Data AVP
                                                                                // TODO Set some field in Subscription-Data AVP?
                )))) { // Expected ULR-Answer message 
                    f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
                    log("*** " & __SCOPE__ & ": PASS: Unexpected was received. ***");
                }
                [] tc_ac.timeout {
                    f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
                    log("*** " & __SCOPE__ & ": INCONC: Message was not received in due time. ***");
                }
            } // End of 'altstep' statement
            
            // Postamble
            
+17 −0
Original line number Diff line number Diff line
@@ -97,6 +97,23 @@ module DiameterS6a_PIXITS {
         */
        modulepar charstring PX_USR_NAME := "userName";
        
        /**
         * @desc The user name
         * @see  ETSI DTS/INT-094-1 V0.0.3 (2013-11) A.x/x 
         */
        modulepar UInt32 PX_CONTEXT_ID := 1;
        
        /**
         * @desc The user name
         * @see  ETSI DTS/INT-094-1 V0.0.3 (2013-11) A.x/x 
         */
        modulepar charstring PX_SERVICE_SEL := "serviceSel";
        
        /**
         * @desc The user name
         * @see  ETSI DTS/INT-094-1 V0.0.3 (2013-11) A.x/x 
         */
        modulepar octetstring PX_VISITED_NTW_ID := 'CAFEDECA'O;
        
    } // End of group group fieldValues
    
+258 −35
Original line number Diff line number Diff line
@@ -165,6 +165,73 @@ module DiameterS6a_Templates {
                aVP_Data := PX_DSR_FLAGS
            } // End of template m_dSRFlags_dummy
            
            /**
             * @desc Indicates if there is homogeneous support of IMS Voice Over PS Sessions on all the TA/RAs of the serving node, or if the homogeneity of this support is kown to the serving node
             *       Default: NOT_SUPPORTED_E
             */
            template (value) Homogeneous_Support_AVP m_homogeneous_Support_dummy := {
                aVP_Header  := m_aVP_HeaderVid_Mbit1 ( c_homogeneous_Support_of_IMS_Voice_Over_PS_Sessions_AVP_Code, 4, c_vendId3gpp ),
                aVP_Data    := NOT_SUPPORTED_E
            } // End of tempate m_homogeneous_Support_dummy
            
            /**
             * @desc Identifies the per subscriber"s default APN configuration
             */
            template (value) Context_Identifier_AVP m_context_Identifier_AVP_dummy := {
                aVP_Header  := m_aVP_HeaderVid_Mbit1 ( c_context_Identifier_AVP_Code, 4, c_vendId3gpp ),
                aVP_Data    := 0
            } // End of tempate m_context_Identifier_AVP_dummy
            
            /**
             * @desc Contain information about a dynamically established APN on a serving node
             */
            template (value) Active_APN_AVP m_active_APN_AVP_dummy := {
                aVP_Header                      := m_aVP_HeaderVid_Mbit1 ( c_active_APN_AVP_Code, 4, c_vendId3gpp ),
                context_Identifier              := m_context_Identifier_AVP_dummy,
                service_Selection               := omit,
                mip6_Agent_Info                 := omit,
                visited_Network_Identifier      := omit,
                specific_APN_Info               := omit,
                aVP_Type                        := omit
            } // End of tempate m_active_APN_AVP_dummy
            
            
            /**
             * @desc APN for the selected and dynamically allocated PDN GW
             */
            template (value) Service_Selection_AVP m_service_Selection_AVP_dummy := {
                aVP_Header  := m_aVP_HeaderVid_Mbit1 ( c_service_Type_AVP_Code, 4, c_vendId3gpp ),
                aVP_Data    := ""
            } // End of tempate m_service_Selection_AVP_dummy
            
            /**
             * @desc Identity of the selected and dynamically allocated PDN GW for an APN
             */
            template (value) MIP6_Agent_Info_AVP m_mip6_Agent_Info_AVP_dummy := {
                aVP_Header                  := m_aVP_HeaderVid_Mbit1 ( 486, 4, c_vendId3gpp ), // FIXME Confirm AVP code and create the constant
                mip_Home_Agent_Address1     := omit,
                mip_Home_Agent_Address2     := omit,
                mip_Home_Agent_Host         := omit,
                mip6_Home_Link_Prefix       := omit,
                aVP_Type                    := omit
            } // End of tempate m_mip6_Agent_Info_AVP_dummy
            
            /**
             * @desc Identity of the network where the PDN-GW was allocated, in the case of dynamic PDN-GW assignment
             */
            template (value) Visited_Network_Identifier_AVP m_visited_Network_Identifier_AVP_dummy := {
                aVP_Header  := m_aVP_HeaderVid_Mbit1 ( 600, 4, c_vendId3gpp ), // FIXME Confirm AVP code and create the constant
                aVP_Data    := ''O
            } // End of tempate m_visited_Network_Identifier_AVP_dummy
            
            
            
            
            
            
            
            
            
        } // End of group DummyAVPHeaders

        group SpecificAVPHeaders {
@@ -997,6 +1064,66 @@ module DiameterS6a_Templates {
                     aVP_Data := p_aVP_Data
                } // End of tempate m_ulr_Flags_AVP
                
                /**
                 * @desc 
                 * @param p_aVP_Data 
                 */
                template (value) Homogeneous_Support_AVP m_homogeneous_Support_AVP( in Homogeneous_Support_Type p_aVP_Data )
                modifies m_homogeneous_Support_dummy := {
                    aVP_Data := p_aVP_Data
                } // End of tempate m_homogeneous_Support_AVP
                
                /**
                 * @desc Identifies the per subscriber"s default APN configuration
                 * @param p_aVP_Data    TODO
                 */
                template (value) Context_Identifier_AVP m_context_Identifier_AVP( in UInt32 p_aVP_Data )
                modifies m_context_Identifier_AVP_dummy := {
                    aVP_Data := p_aVP_Data
                } // End of template m_context_Identifier_AVP
                
                /**
                 * @desc APN for the selected and dynamically allocated PDN GW
                 * @param p_aVP_Data    TODO
                 */
                template (value) Service_Selection_AVP m_service_Selection_AVP( in charstring p_aVP_Data )
                modifies m_service_Selection_AVP_dummy := {
                    aVP_Data := p_aVP_Data
                } // End of template m_service_Selection_AVP
                
                /**
                 * @desc Identity of the selected and dynamically allocated PDN GW for an APN
                 */
                template (value) MIP6_Agent_Info_AVP m_mip6_Agent_Info_AVP(
                ) modifies m_mip6_Agent_Info_AVP_dummy := {
                }
                
                /**
                 * @desc Identity of the network where the PDN-GW was allocated, in the case of dynamic PDN-GW assignment
                 * @param p_aVP_Data    TODO
                 */
                template (value) Visited_Network_Identifier_AVP m_visited_Network_Identifier_AVP( in octetstring p_aVP_Data )
                modifies m_visited_Network_Identifier_AVP_dummy := {
                    aVP_Data := p_aVP_Data
                }
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
            } // End of group S6aBasic_request_templates_send

            group S9basic_request_templates_receive {
@@ -1040,8 +1167,6 @@ module DiameterS6a_Templates {
                     aVP_Data := p_aVP_Data
                } // End of tempate mw_ula_Flags_AVP
                
            } // End of group t_TC_HSS_UL_01
            
            } // End of group S6aBasic_answer_templates_receive

        } // End of group S6aBase_templates
@@ -1050,20 +1175,23 @@ module DiameterS6a_Templates {
            
            group S6aModified_request_templates_send {
                
                group t_TC_HSS_UL_01 {
                    
                /**
                 * @desc Send template for ULR 
                 * @param p_sessionId   Session identifier
                 * @param p_ulrBody     ULR message body
                 */
                    template (value) ULR_MSG md_ULR_TC_01(
                template (value) ULR_MSG md_ULR_TCs(
                                                      in template (value) Session_Id_AVP p_sessionId, 
                                                      in template (value) ULR_Body_AVP p_ulrBody
                ) modifies m_S6a_ULR_dummy := {
                    session_Id  := p_sessionId,
                    uLR_Body    := p_ulrBody
                    } // End of tempate md_ULR_TC_01
                } // End of tempate md_ULR_TCs
                
                /**
                 * @desc Send emplates for TC_HSS_UL_01
                 */
                group t_TC_HSS_UL_01 {
                    
                    /**
                     * @desc Send template for ULR message body 
@@ -1098,24 +1226,79 @@ module DiameterS6a_Templates {
                    
                } // End of group t_TC_HSS_UL_01
                
                /**
                 * @desc Send templates for TC_HSS_UL_02
                 */
                group t_TC_HSS_UL_02 {
                    
                    /**
                     * @desc Send template for ULR message body 
                     * @param p_auth_Session_State  Specifies if the state is maintained for a particular session
                     * @param p_originHost          Identifies the endpoint that originated the Diameter message
                     * @param p_originRealm         Realm of the originator
                     * @param p_destinationRealm    The realm to which the message is to be routed
                     * @param p_user_Name           User-Name
                     * @param p_rat_Type            Radio access type the UE is using
                     * @param p_ulr_Flags           ULR Bit mask
                     * @param p_visited_PLMN_Id     Concatenation of MCC and MNC
                     * @param p_homogeneous_Support Indicates if there is homogeneous support of IMS Voice Over PS Sessions on all the TA/RAs of the serving node, or if the homogeneity of this support is kown to the serving node
                     * @param p_active_APN          Contains information about a dynamically established APN on a serving node
                     */
                    template (value) ULR_Body_AVP md_ulrBodyAvps_TC_02(
                                                                       in template (value) Auth_Session_State_AVP p_auth_Session_State,
                                                                       in template (value) Origin_Host_AVP p_originHost,
                                                                       in template (value) Origin_Realm_AVP p_originRealm,
                                                                       in template (value) Destination_Realm_AVP p_destinationRealm,
                                                                       in template (value) User_Name_AVP p_user_Name,
                                                                       in template (value) RAT_Type_AVP p_rat_Type,
                                                                       in template (value) ULR_Flags_AVP p_ulr_Flags,
                                                                       in template (value) Visited_PLMN_Id_AVP p_visited_PLMN_Id,
                                                                       in template (value) Homogeneous_Support_AVP p_homogeneous_Support,
                                                                       in template (value) Active_APN_AVP p_active_APN
                    ) modifies md_ulrBodyAvps_TC_01 := {
                        origin_Host         := p_originHost,
                        origin_Realm        := m_originRealm_dummy,
                        destination_Realm   := p_destinationRealm,
                        auth_Session_State  := p_auth_Session_State, 
                        user_Name           := p_user_Name,
                        rat_Type            := p_rat_Type,
                        ulr_Flags           := p_ulr_Flags,
                        visited_PLMN_Id     := p_visited_PLMN_Id,
                        homogeneous_Support := p_homogeneous_Support,
                        active_APN          := p_active_APN
                    } // // End of tempate md_ulrBodyAvps_TC_02
                    
                } // End of group t_TC_HSS_UL_02
                
            } // End of group S6aModified_request_templates_send

            group S6aModified_request_templates_receive {
                
                group t_TC_HSS_UL_01 {
            } // End of group S6aModified_request_templates_receive

            group S6aModified_answer_templates_send {
                
            } // End of group S6aModified_answer_templates_send

            group S6aModified_answer_templates_receive {
                
                /**
                 * @desc Receive template for ULA 
                 * @param p_sessionId   Session identifier
                 * @param p_ulaBody     ULA message body
                 */
                    template (present) ULA_MSG mdw_ULA_TC_01(
                template (present) ULA_MSG mdw_ULA_TCs(
                                                         in template (present) Session_Id_AVP p_sessionId, 
                                                         in template (present) ULA_Body_AVP p_ulaBody
                ) modifies mw_S6a_ULA_dummy := {
                    session_Id  := p_sessionId,
                    uLA_Body    := p_ulaBody
                    } // End of template mdw_ULR_TC_01
                } // End of template mdw_ULA_TCs
                
                /**
                 * @desc Receive templates for TC_HSS_UL_01
                 */
                group t_TC_HSS_UL_01 {
                    
                    /**
                     * @desc Receive template for ULA message body
@@ -1141,12 +1324,52 @@ module DiameterS6a_Templates {
                        subscription_Data   := p_subscription_Data
                    } // End of template mdw_ulrBodyAvps_TC_01
                    
            } // End of group S6aModified_request_templates_receive
                } // End of group t_TC_HSS_UL_01
                
            group S6aModified_answer_templates_send {
            } // End of group S6aModified_answer_templates_send
                group t_TC_HSS_UL_02 {
                    
                    /**
                     * @desc Receive template for ULA message body
                     * @param p_resultCode          Indicates whether a particular request was completed successfully or an error occurred
                     * @param p_auth_Session_State  Specifies if the state is maintained for a particular session
                     * @param p_originHost          Identifies the endpoint that originated the Diameter message
                     * @param p_originRealm         Realm of the originator
                     * @param p_ula_Flags           ULA Bit mask
                     */
                    template (present) ULA_Body_AVP mdw_ulaBodyAvps_TC_02(
                                                                          in template (present) Result_Code_AVP p_resultCode,  
                                                                          in template (present) Auth_Session_State_AVP p_auth_Session_State,
                                                                          in template (present) Origin_Host_AVP p_originHost,
                                                                          in template (present) Origin_Realm_AVP p_originRealm, 
                                                                          in template (present) ULA_Flags_AVP p_ula_Flags,
                                                                          in template (present) Subscription_Data_AVP p_subscription_Data 
                    ) := mdw_ulaBodyAvps_TC_01(
                                               p_resultCode,
                                               p_auth_Session_State,
                                               p_originHost,
                                               m_originRealm_dummy,
                                               p_ula_Flags,
                                               p_subscription_Data
                    ); // End of template mdw_ulrBodyAvps_TC_02
                    
                    /**
                     * @desc Contain information about a dynamically established APN on a serving node
                     */
                    template (value) Active_APN_AVP m_active_APN_AVP_ul_02(
                                                                           in template (value) Context_Identifier_AVP p_context_Identifier,
                                                                           in template (value) Service_Selection_AVP p_service_Selection,
                                                                           in template (value) MIP6_Agent_Info_AVP p_mip6_Agent_Info,
                                                                           in template (value) Visited_Network_Identifier_AVP p_visited_Network_Identifier
                    ) modifies m_active_APN_AVP_dummy := {
                        context_Identifier              := p_context_Identifier,
                        service_Selection               := p_service_Selection,
                        mip6_Agent_Info                 := p_mip6_Agent_Info,
                        visited_Network_Identifier      := p_visited_Network_Identifier
                    } // End of tempate m_active_APN_AVP_ul_02
                    
                    
                } // End of group t_TC_HSS_UL_02
                
            group S6aModified_answer_templates_receive {
            } // End of group S6aModified_answer_templates_receive
            
        } // End of group S6aModified_templates