Commit bcfac236 authored by pintar's avatar pintar
Browse files

new configuration for two Gxx connections added

parent 83d23618
Loading
Loading
Loading
Loading
+116 −7
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ module DiameterS9_TestConfiguration
         * @desc Creates test configuration of cf_1S9_vpcrf - H-PCRF is SUT
         * @param p_diameterComponent_vpcrf	v-pcrf component
         */
        function f_cf_1S9__vpcrfUp(out DiameterComponent p_diameterComponent_vpcrf)
        function f_cf_1S9_vpcrfUp(out DiameterComponent p_diameterComponent_vpcrf)
        runs on ServerSyncComp
        {
            //Variables
@@ -58,14 +58,14 @@ module DiameterS9_TestConfiguration
            }

            f_setVerdict(v_ret);
        }//end f_cf_1S9__vpcrfUp
        }//end f_cf_1S9_vpcrfUp

        /**
         *
         * @desc Creates test configuration of CF_1S9_ - V-PCRF is SUT
         * @param p_diameterComponent_hpcrf	h-pcrf component
         */
        function f_cf_1S9__hpcrfUp(out DiameterComponent p_diameterComponent_hpcrf)
        function f_cf_1S9_hpcrfUp(out DiameterComponent p_diameterComponent_hpcrf)
        runs on ServerSyncComp
        {
            //Variables
@@ -84,7 +84,7 @@ module DiameterS9_TestConfiguration
            }

            f_setVerdict(v_ret);
        }//end f_cf_1S9__hpcrfUp
        }//end f_cf_1S9_hpcrfUp

        /**
         *
@@ -156,6 +156,46 @@ module DiameterS9_TestConfiguration
            f_setVerdict(v_ret);
        }//end f_cf_1S9_1Gxx_hpcrfUp

        /**
         *
         * @desc Creates test configuration of CF_1S9_2Gxx - V-PCRF is SUT
         * @param p_diameterComponent_hpcrf h-pcrf component
         * @param p_diameterComponent_bberf1 bberf1 represents old bberf component
         * @param p_diameterComponent_bberf2 bberf2 represents new bberf component
         */
        function f_cf_1S9_2Gxx_hpcrfUp(out DiameterComponent p_diameterComponent_hpcrf, out DiameterComponent p_diameterComponent_bberf1, out DiameterComponent p_diameterComponent_bberf2)
        runs on ServerSyncComp
        {
            //Variables
            var FncRetCode v_ret := e_success;

            //Create
            p_diameterComponent_hpcrf := DiameterComponent.create ;
            if (PX_Gxxsupport) {
                p_diameterComponent_bberf1 := DiameterComponent.create ;
                p_diameterComponent_bberf2 := DiameterComponent.create ;
            }
            //Connect
            connect(p_diameterComponent_hpcrf:syncPort, self:syncPort) ;
            if (PX_Gxxsupport) {
	            connect(p_diameterComponent_bberf1:syncPort, self:syncPort) ;
                connect(p_diameterComponent_bberf2:syncPort, self:syncPort) ;
            }
            //Map
            map(p_diameterComponent_hpcrf:DIAMP, system:H_PCRF_S9);// Diameter Init test Configuration
            if (PX_Gxxsupport) {
	            map(p_diameterComponent_bberf1:DIAMP, system:BBERF_Gxx1);// Diameter Init test Configuration
                map(p_diameterComponent_bberf2:DIAMP, system:BBERF_Gxx2);// Diameter Init test Configuration
            }
            if (PX_DIAM_LLP_ENABLED){
            	map(p_diameterComponent_hpcrf:LLPP, system:LLIMS);// Lower Layer Primitive Init test Configuration
            	map(p_diameterComponent_bberf1:LLPP, system:LLIMS);// Lower Layer Primitive Init test Configuration
                map(p_diameterComponent_bberf2:LLPP, system:LLIMS);// Lower Layer Primitive Init test Configuration
            }

            f_setVerdict(v_ret);
        }//end f_cf_1S9_2Gxx_hpcrfUp

	}//end group cfUp

	group cfDown {
@@ -165,7 +205,7 @@ module DiameterS9_TestConfiguration
        * @desc Deletes configuration of cf_1S9_vpcrf - H-PCRF is SUT
        * @param p_diameterComponent_vpcrf diameter component
        */
        function f_cf_1S9__vpcrfDown(in DiameterComponent p_diameterComponent_vpcrf)
        function f_cf_1S9_vpcrfDown(in DiameterComponent p_diameterComponent_vpcrf)
        runs on ServerSyncComp
        {
            f_serverWaitForAllClientsToStop();
@@ -177,7 +217,7 @@ module DiameterS9_TestConfiguration
            if (PX_DIAM_LLP_ENABLED){
            	unmap(p_diameterComponent_vpcrf:LLPP, system:LLIMS);
            }
        }//end f_cf_1S9__vpcrfDown
        }//end f_cf_1S9_vpcrfDown

        /**
        *
@@ -197,7 +237,7 @@ module DiameterS9_TestConfiguration
            if (PX_DIAM_LLP_ENABLED){
            	unmap(p_diameterComponent_hpcrf:LLPP, system:LLIMS);
            }
        }//end f_cf_1S9__hpcrfDown
        }//end f_cf_1S9_hpcrfDown

        /**
        *
@@ -253,6 +293,36 @@ module DiameterS9_TestConfiguration
            }
        }//end f_cf_1S9_1Gxx_hpcrfDown

        /**
        *
        * @desc Deletes configuration of CF_1S9_2GxxE - V-PCRF is SUT
        * @param p_diameterComponent_hpcrf diameter component
        * @param p_diameterComponent_bberf diameter component
        */
        function f_cf_1S9_2Gxx_hpcrfDown(in DiameterComponent p_diameterComponent_hpcrf, in DiameterComponent p_diameterComponent_bberf1, in DiameterComponent p_diameterComponent_bberf2)
        runs on ServerSyncComp
        {
            f_serverWaitForAllClientsToStop();

            //Disconnect
            disconnect(p_diameterComponent_hpcrf:syncPort, self:syncPort);
            if (PX_Gxxsupport) {
	            disconnect(p_diameterComponent_bberf1:syncPort, self:syncPort);
                disconnect(p_diameterComponent_bberf2:syncPort, self:syncPort);
            }
            //Unmap
            unmap(p_diameterComponent_hpcrf:DIAMP, system:H_PCRF_S9);
            if (PX_Gxxsupport) {
	            unmap(p_diameterComponent_bberf1:DIAMP, system:BBERF_Gxx1);
                unmap(p_diameterComponent_bberf2:DIAMP, system:BBERF_Gxx2);
            }
            if (PX_DIAM_LLP_ENABLED){
            	unmap(p_diameterComponent_hpcrf:LLPP, system:LLIMS);
            	unmap(p_diameterComponent_bberf1:LLPP, system:LLIMS);
                unmap(p_diameterComponent_bberf2:LLPP, system:LLIMS);
            }
        }//end f_cf_1S9_2Gxx_hpcrfDown

	} //end group cfDown

	group syncNoStop // Same functions as in LibCommon but without call of f_serverWaitForAllClientsToStop()
@@ -309,5 +379,44 @@ module DiameterS9_TestConfiguration
			f_serverSyncClientsTimed(1,p_syncPointIds[i], PX_TSYNC_TIME_LIMIT);
		}
	}

    /* @desc	Implements synchronization of 2 clients from server side
     *          on one or more synchronization points.
     *			If problem occurs, then server sends STOP to all clients.
     *			Waits for PX_TSYNC_TIME_LIMIT to let clients
     *			finish executing their behavior until this
     *			synchronization point.
     * @remark	The use of this function requires prior connection  of
     *			the server sync ports!
     * @param   p_syncPointIds list of synchronization point name/ids
     * @return  execution status
     */
    function f_serverSync2Clients( in SyncPointList p_syncPointIds )
    runs on ServerSyncComp {
        var integer i, v_noOfSyncIds := sizeof(p_syncPointIds);
        for ( i := 0; i < v_noOfSyncIds; i := i+1 ) {
            f_serverSyncClientsTimed(2,p_syncPointIds[i], PX_TSYNC_TIME_LIMIT);
        }
    }

    /* @desc	Implements synchronization of 3 clients from server side
     *          on one or more synchronization points.
     *			If problem occurs, then server sends STOP to all clients.
     *			Waits for PX_TSYNC_TIME_LIMIT to let clients
     *			finish executing their behavior until this
     *			synchronization point.
     * @remark	The use of this function requires prior connection  of
     *			the server sync ports!
     * @param   p_syncPointIds list of synchronization point name/ids
     * @return  execution status
     */
    function f_serverSync3Clients( in SyncPointList p_syncPointIds )
    runs on ServerSyncComp {
        var integer i, v_noOfSyncIds := sizeof(p_syncPointIds);
        for ( i := 0; i < v_noOfSyncIds; i := i+1 ) {
            f_serverSyncClientsTimed(3,p_syncPointIds[i], PX_TSYNC_TIME_LIMIT);
        }
    }
    
	} //end group syncNoStop
} // end module DiameterS9_TestConfiguration