Commit 2ad30bb8 authored by pintar's avatar pintar
Browse files

new modules for Gxx TCFunctions and Templates added

TP_VPCRF_HSE_01 implemented
parent 61e33621
Loading
Loading
Loading
Loading
+71 −0
Original line number Diff line number Diff line
/**
 *  @author     STF 466
 *  @version    $Id: DiameterS9_Gxx_TCFunctions.ttcn3 34 2014-02-26 13:10:05Z rennoch $
 *  @desc       This module provides S9 test functions used by the test cases
 *              for IMS-DIAMETER tests.
 */
module DiameterS9_Gxx_TCFunctions {
    // LibCommon
    import from LibCommon_Sync {function f_selfOrClientSyncAndVerdict;
                                const c_prDone, c_tbDone, c_poDone;}
    import from LibCommon_VerdictControl all ;

    // LibDiameter
    import from LibDiameter_Types_Gx_AVPs all;
    import from LibDiameter_TypesAndValues all;
    import from LibDiameter_Templates all;
    import from LibDiameter_Interface all;
    import from LibDiameter_Steps all;
    import from LibDiameter_Types_Base_AVPs all;

    //DiameterS9
    import from DiameterS9_Templates all;
    import from DiameterS9_Gxx_Templates all;
    import from DiameterS9_Steps all;
    import from DiameterS9_PIXITS all;


    group TP_VPCRFRole{ // §5.2.2
        group TP_VPCRFRole_MS{
        }// end group TP_VPCRFRole_MS
        group TP_VPCRFRole_HSE{

            /*
            *  @desc    This is the test case function f_TC_VPCRF_HSE_01_Gxx
            *  @param
            */
            function f_TC_VPCRF_HSE_01_BBERF1()
            runs on DiameterComponent {

                f_preamble_BBERF();

                f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict()); // sync

                f_send_CCR(m_CCR_Gxx_InitialRequest(vc_sessionId,
                                                vc_originHost,
                                                vc_originRealm,
                                                vc_destinationRealm,
                                                f_framedIpAddress4_send(PX_UE1_framedIpAddress),
                                                f_framedIpAddress6_send(PX_UE1_framedIp6Address),
                                                {m_subscription_Id(valueof(m_subscription_Id_Type(END_USER_IMSI_E)),
                                                    valueof(m_subscription_Id_Data(PX_SUBSCRIPTION_ID_DATA)))},
                                                {m_anGwAddress(f_IPAdress(PX_SGW_AGW_ipv4,PX_SGW_AGW_ipv6))},
                                                m_called_Station_Id(PX_CALLED_STATION_ID_PDN)
                                                )
                          );

                f_awaiting_CCA(mw_CCA_Gxx_basic(vc_sessionId, vc_originHost, vc_originRealm));

                f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); // sync

                f_terminate_session_BBERF(); // postamble

                f_postamble_BBERF();

                f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict()); // sync

            } // end function f_TC_VPCRF_HSE_01
        }// end group TP_VPCRFRole_HSE
    } // group TP_VPCRFRole    
    
}// end module DiameterS9_Gxx_TCFunctions
 No newline at end of file
+372 −0

File added.

Preview size limit exceeded, changes collapsed.

+200 −12
Original line number Diff line number Diff line
@@ -251,12 +251,12 @@ module DiameterS9_PIXITS
//         *  The offset between universal time and local time in steps of 15 minutes for the 3GPP-MS-TimeZone AVP for CCR messages
//        */
//        modulepar octetstring  PX_3GPP_MS_TIMEZONE_DATA := '08'O;
//        
//        /** @desc	UTF8String, PIXIT item A-7/20
//         * An Emergency APN for the Called-Station-Id AVP
//        */
//        modulepar UTF8String PX_CALLED_STATION_ID_EMERGENCY_APN := "EmergencyAPN_A";
//        
        
        /** @desc	UTF8String, PIXIT item A-7/20
         * A PDN for the Called-Station-Id AVP
        */
        modulepar UTF8String PX_CALLED_STATION_ID_PDN := "PDN_ID";
        
//        /** @desc	UTF8String, PIXIT item A-7/21 
//         * An Emergency address for the Called-Station-Id AVP
//        */
@@ -427,16 +427,204 @@ module DiameterS9_PIXITS
//        */        
//        modulepar charstring PX_APPLICATION_SERVICE_PROVIDER_ID := "GoogleCall";

    } //end group DiameterCommonS9Data
    
    group DiameterCommonGxData{

        /** @desc	boolean indicator, PIXIT item A-X/XX
         * TRUE if the Gx interface is accessible to trigger Diameter events at the S9 interface
        */
        modulepar boolean PX_Gxsupport := false;

       /** @desc	UTF8String, PIXIT item A-7/5
                     
       The Session-Id AVP (AVP Code 263) is of type UTF8String and is used
       to identify a specific session (see Section 8);  All messages
       pertaining to a specific session MUST include only one Session-Id AVP
       and the same value MUST be used throughout the life of a session;
       When present, the Session-Id SHOULD appear immediately following the
       Diameter Header (see Section 3);
    
                    Ref: RFC 3588 section 8-8
        */
        modulepar UTF8String PX_GX_SessionID := "pcscf.etsi.org;1317059245;52;21823490";
   		
    	
        /** @desc	charstring, PIXIT item A-7/6
                     
       The Origin-Host AVP (AVP Code 264) is of type DiameterIdentity, and
       MUST be present in all Diameter messages;  This AVP identifies the
       endpoint that originated the Diameter message;  Relay agents MUST NOT
       modify this AVP;
    
       The value of the Origin-Host AVP is guaranteed to be unique within a
       single host;
    
                    Ref: RFC 3588 section 6-3.
                    NOTE: could be AF or PCRF role:
                        pcscf.example.com
                        pcrf.example.com
        */
        modulepar charstring PX_GX_OriginHost := "origin.etsi.org";
    
    
    	
        /** @desc	charstring, PIXIT item A-7/7
                     
       The Origin-Realm AVP (AVP Code 296) is of type DiameterIdentity;
       This AVP contains the Realm of the originator of any Diameter message
       and MUST be present in all messages;
    
                    Ref: RFC 3588 section 6-4
        */
        modulepar charstring PX_GX_OriginRealm := "etsi.org";
    
    
    	
        /** @desc	charstring, PIXIT item A-7/8 
                     
       The Destination-Host AVP (AVP Code 293) is of type DiameterIdentity;
       This AVP MUST be present in all unsolicited agent initiated messages,
       MAY be present in request messages, and MUST NOT be present in Answer
       messages;
    
                    Ref: RFC 3588 section 6-5.
                    NOTE: could be AF or PCRF role:
                        pcscf.example.com
                        pcrf.example.com
        */
        modulepar charstring PX_GX_DestinationHost := "destination.etsi.org";
    
    
    	
        /** @desc	charstring, PIXIT item A-7/9 
                     
       The Destination-Realm AVP (AVP Code 283) is of type DiameterIdentity,
       and contains the realm the message is to be routed to;  The
       Destination-Realm AVP MUST NOT be present in Answer messages.
       Diameter Clients insert the realm portion of the User-Name AVP;
       Diameter servers initiating a request message use the value of the
       Origin-Realm AVP from a previous message received from the intended
       target host (unless it is known a priori);  When present, the
       Destination-Realm AVP is used to perform message routing decisions;
    
                    Ref: RFC 3588 section 6-6
        */
        modulepar charstring PX_GX_DestinationRealm := "myalupcrf.etsi.org";
    }//end group DiameterCommonGXData
    
    group DiameterCommonGxxData{

        /** @desc	boolean indicator, PIXIT item A-X/XX
         * TRUE if the Gxx interface is accessible to trigger Diameter events at the S9 interface
         * TRUE if the Gx interface is accessible to trigger Diameter events at the S9 interface
        */
        modulepar boolean PX_Gxxsupport := false;

    } //end group DiameterCommonGxData
       /** @desc	UTF8String, PIXIT item A-7/5
                     
       The Session-Id AVP (AVP Code 263) is of type UTF8String and is used
       to identify a specific session (see Section 8);  All messages
       pertaining to a specific session MUST include only one Session-Id AVP
       and the same value MUST be used throughout the life of a session;
       When present, the Session-Id SHOULD appear immediately following the
       Diameter Header (see Section 3);
    
                    Ref: RFC 3588 section 8-8
        */
        modulepar UTF8String PX_GXX_SessionID := "pcscf.etsi.org;1317059245;52;21823490";
   		
    	
        /** @desc	charstring, PIXIT item A-7/6
                     
       The Origin-Host AVP (AVP Code 264) is of type DiameterIdentity, and
       MUST be present in all Diameter messages;  This AVP identifies the
       endpoint that originated the Diameter message;  Relay agents MUST NOT
       modify this AVP;
    
       The value of the Origin-Host AVP is guaranteed to be unique within a
       single host;
    
                    Ref: RFC 3588 section 6-3.
                    NOTE: could be AF or PCRF role:
                        pcscf.example.com
                        pcrf.example.com
        */
        modulepar charstring PX_GXX1_OriginHost := "origin.etsi.org";
    
    
    	
        /** @desc	charstring, PIXIT item A-7/7
                     
       The Origin-Realm AVP (AVP Code 296) is of type DiameterIdentity;
       This AVP contains the Realm of the originator of any Diameter message
       and MUST be present in all messages;
    
                    Ref: RFC 3588 section 6-4
        */
        modulepar charstring PX_GXX1_OriginRealm := "etsi.org";
   		
    	
        /** @desc	charstring, PIXIT item A-7/6
                     
       The Origin-Host AVP (AVP Code 264) is of type DiameterIdentity, and
       MUST be present in all Diameter messages;  This AVP identifies the
       endpoint that originated the Diameter message;  Relay agents MUST NOT
       modify this AVP;
    
       The value of the Origin-Host AVP is guaranteed to be unique within a
       single host;
    
                    Ref: RFC 3588 section 6-3.
                    NOTE: could be AF or PCRF role:
                        pcscf.example.com
                        pcrf.example.com
        */
        modulepar charstring PX_GXX2_OriginHost := "origin.etsi.org";
    
    
    	
        /** @desc	charstring, PIXIT item A-7/7
                     
       The Origin-Realm AVP (AVP Code 296) is of type DiameterIdentity;
       This AVP contains the Realm of the originator of any Diameter message
       and MUST be present in all messages;
    
                    Ref: RFC 3588 section 6-4
        */
        modulepar charstring PX_GXX2_OriginRealm := "etsi.org";
    
    
    	
        /** @desc	charstring, PIXIT item A-7/8 
                     
       The Destination-Host AVP (AVP Code 293) is of type DiameterIdentity;
       This AVP MUST be present in all unsolicited agent initiated messages,
       MAY be present in request messages, and MUST NOT be present in Answer
       messages;
    
                    Ref: RFC 3588 section 6-5.
                    NOTE: could be AF or PCRF role:
                        pcscf.example.com
                        pcrf.example.com
        */
        modulepar charstring PX_GXX_DestinationHost := "destination.etsi.org";
    
    
    	
        /** @desc	charstring, PIXIT item A-7/9 
                     
       The Destination-Realm AVP (AVP Code 283) is of type DiameterIdentity,
       and contains the realm the message is to be routed to;  The
       Destination-Realm AVP MUST NOT be present in Answer messages.
       Diameter Clients insert the realm portion of the User-Name AVP;
       Diameter servers initiating a request message use the value of the
       Origin-Realm AVP from a previous message received from the intended
       target host (unless it is known a priori);  When present, the
       Destination-Realm AVP is used to perform message routing decisions;
    
                    Ref: RFC 3588 section 6-6
        */
        modulepar charstring PX_GXX_DestinationRealm := "myalupcrf.etsi.org";
    }//end group DiameterCommonGxxData

} // end module DiameterS9_PIXITS
 No newline at end of file
+15 −3
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ module DiameterS9_S9_TCFunctions {
            function f_TC_HPCRF_HSE_01()
            runs on DiameterComponent {

                //TODO: function have to be declared in S9_steps: f_preamble_VPCRF();
                f_preamble_VPCRF();

                f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict()); // sync

@@ -831,9 +831,21 @@ module DiameterS9_S9_TCFunctions {

                f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict()); // sync

//                f_awaiting_CCR(
                f_awaiting_CCR(mw_CCR_InitialRequest_AnGw(?,
                                                          vc_originHost,
                                                          vc_originRealm,
                                                          vc_destinationRealm,
                                                          mw_cC_Request_Type(INITIAL_REQUEST_E),
                                                          {mw_subscription_Id(mw_subscription_Id_Type(END_USER_IMSI_E),
                                                                              mw_subscription_Id_Data(PX_SUBSCRIPTION_ID_DATA))},
                                                          {mw_anGwAddress(f_IPAdress(PX_SGW_AGW_ipv4,PX_SGW_AGW_ipv6))}
                                                          ));

//                f_send_CCA(
                f_send_CCA(m_CCA_basic(vc_sessionId,
                                       vc_originHost,
                                       vc_originRealm,
                                       m_cC_Request_Type(INITIAL_REQUEST_E),
                                       m_resultCode(m_resultCode_diameterSuccess)));

                f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); // sync

+176 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
    //DiameterS9
    import from DiameterS9_PIXITS all;
    import from DiameterS9_Templates all;
    import from DiameterS9_Gxx_Templates all;
    import from DiameterS9_TestConfiguration all;

    group GlobalSteps {
@@ -64,6 +65,117 @@

        } // end function f_DiameterS9_init

        /*
        *  @desc    This is a test step that init global variables
        *  @param   
        */
        function f_DiameterGx_init()
        runs on DiameterComponent {

            //Defaults
            vc_def_catchSyncStop_diameter := activate(a_diameter_catchSyncStop());
            vc_default_diameter := activate (a_diameter_default());

            //Base LibDiameter init function if there will be any base initialisation
            f_Diameter_Init_Component();

            vc_ETS_address := PX_DIAMETER_GX_ETS_IPADDR;
            vc_ETS_port    := PX_DIAMETER_GX_ETS_PORT;
            vc_SUT_address := PX_DIAMETER_GX_SUT_IPADDR;
            vc_SUT_port    := PX_DIAMETER_GX_SUT_PORT;

            vc_sessionId := m_sessionId(PX_GX_SessionID);

            vc_originHost := m_originHost(PX_GX_OriginHost);
            vc_originRealm := m_originRealm(PX_GX_OriginRealm); // realm of the originator (TS)

            vc_originHost_IUT := m_originHost(PX_GX_DestinationHost);
            vc_originRealm_IUT := m_originRealm(PX_GX_DestinationRealm); // realm of the originator (TS)

            vc_destinationHost := m_destinationHost(PX_GX_DestinationHost);
            vc_destinationRealm := m_destinationRealm(PX_GX_DestinationRealm);

            vc_hostIPAddress := valueof(f_IPV4or6_String2Address (PX_DIAMETER_GX_ETS_IPADDR));

            vc_send_hopid:=hex2int('00000100'H);
            vc_send_endid:=hex2int('01000000'H);

        } // end function f_DiameterGx_init

        /*
        *  @desc    This is a test step that init global variables
        *  @param   
        */
        function f_DiameterGxx1_init()
        runs on DiameterComponent {

            //Defaults
            vc_def_catchSyncStop_diameter := activate(a_diameter_catchSyncStop());
            vc_default_diameter := activate (a_diameter_default());

            //Base LibDiameter init function if there will be any base initialisation
            f_Diameter_Init_Component();

            vc_ETS_address := PX_DIAMETER_GXX1_ETS_IPADDR;
            vc_ETS_port    := PX_DIAMETER_GXX1_ETS_PORT;
            vc_SUT_address := PX_DIAMETER_GXX_SUT_IPADDR;
            vc_SUT_port    := PX_DIAMETER_GXX_SUT_PORT;

            vc_sessionId := m_sessionId(PX_GXX_SessionID);

            vc_originHost := m_originHost(PX_GXX1_OriginHost);
            vc_originRealm := m_originRealm(PX_GXX1_OriginRealm); // realm of the originator (TS)

            vc_originHost_IUT := m_originHost(PX_GXX_DestinationHost);
            vc_originRealm_IUT := m_originRealm(PX_GXX_DestinationRealm); // realm of the originator (TS)

            vc_destinationHost := m_destinationHost(PX_GXX_DestinationHost);
            vc_destinationRealm := m_destinationRealm(PX_GXX_DestinationRealm);

            vc_hostIPAddress := valueof(f_IPV4or6_String2Address (PX_DIAMETER_GXX1_ETS_IPADDR));

            vc_send_hopid:=hex2int('00000100'H);
            vc_send_endid:=hex2int('01000000'H);

        } // end function f_DiameterGxx1_init

        /*
        *  @desc    This is a test step that init global variables
        *  @param   
        */
        function f_DiameterGxx2_init()
        runs on DiameterComponent {

            //Defaults
            vc_def_catchSyncStop_diameter := activate(a_diameter_catchSyncStop());
            vc_default_diameter := activate (a_diameter_default());

            //Base LibDiameter init function if there will be any base initialisation
            f_Diameter_Init_Component();

            vc_ETS_address := PX_DIAMETER_GXX2_ETS_IPADDR;
            vc_ETS_port    := PX_DIAMETER_GXX2_ETS_PORT;
            vc_SUT_address := PX_DIAMETER_GXX_SUT_IPADDR;
            vc_SUT_port    := PX_DIAMETER_GXX_SUT_PORT;

            vc_sessionId := m_sessionId(PX_GXX_SessionID);

            vc_originHost := m_originHost(PX_GXX2_OriginHost);
            vc_originRealm := m_originRealm(PX_GXX2_OriginRealm); // realm of the originator (TS)

            vc_originHost_IUT := m_originHost(PX_GXX_DestinationHost);
            vc_originRealm_IUT := m_originRealm(PX_GXX_DestinationRealm); // realm of the originator (TS)

            vc_destinationHost := m_destinationHost(PX_GXX_DestinationHost);
            vc_destinationRealm := m_destinationRealm(PX_GXX_DestinationRealm);

            vc_hostIPAddress := valueof(f_IPV4or6_String2Address (PX_DIAMETER_GXX2_ETS_IPADDR));

            vc_send_hopid:=hex2int('00000100'H);
            vc_send_endid:=hex2int('01000000'H);

        } // end function f_DiameterGxx2_init



    } // end group GlobalSteps
@@ -90,6 +202,36 @@
            f_preambleDiameterBaseServer(c_applIdS9);
        }

        function f_preamble_BBERF() runs on DiameterComponent
        {
            if(PX_DIAM_LLP_ENABLED)
            {
                f_preambleClient();
            }
            f_DiameterGxx1_init();
            f_preambleDiameterBaseClient(c_applIdGxx);
        }

        function f_preamble_BBERF2() runs on DiameterComponent
        {
            if(PX_DIAM_LLP_ENABLED)
            {
                f_preambleClient();
            }
            f_DiameterGxx2_init();
            f_preambleDiameterBaseClient(c_applIdGxx);
        }

        function f_preamble_PCEF() runs on DiameterComponent
        {
            if(PX_DIAM_LLP_ENABLED)
            {
                f_preambleClient();
            }
            f_DiameterGx_init();
            f_preambleDiameterBaseClient(c_applIdGx);
        }

        /*
        *  @desc    This is a test step that initiate communication with H-PCRF
        *  @param   
@@ -134,6 +276,30 @@

        }

        function f_postamble_BBERF() runs on DiameterComponent
        {

            f_postambleDiameterBase();

            if(PX_DIAM_LLP_ENABLED)
            {
                f_postambleDisconnect();
            }

        }

        function f_postamble_PCEF() runs on DiameterComponent
        {

            f_postambleDiameterBase();

            if(PX_DIAM_LLP_ENABLED)
            {
                f_postambleDisconnect();
            }

        }

        /**
         * 
         * @desc 
@@ -183,6 +349,16 @@
            }
        }

        /**
         * 
         * @desc 
         */
        function f_terminate_session_BBERF() runs on DiameterComponent
        {
            f_send_CCR(m_CCR_Gxx_TerminationRequest(vc_sessionId, vc_originHost, vc_originRealm, vc_destinationRealm));
            f_awaiting_CCA(mw_CCA_Gxx_basic(vc_sessionId, vc_originHost_IUT, vc_originRealm_IUT));
        }

        function f_ConfigRun_HPCRF_BBERF(DiameterComponent p_diameterComponent_hpcrf,
                                          DiameterComponent p_diameterComponent_bberf) runs on ServerSyncComp
        {
Loading