Commit dd7486ea authored by rennoch's avatar rennoch
Browse files

TC_PCRF_IPS_02/03 added

parent 7b8cbb04
Loading
Loading
Loading
Loading
+33 −6
Original line number Diff line number Diff line
@@ -490,15 +490,12 @@ module DiameterRx_Rx_TCFunctions {
                    							m_mediaComponentDescription_flowStatus(m_flowStatus(ENABLED_E)),
                    							m_mspIdentifier, // MPS_Identifier_AVP
                    							m_ServiceInfoStatus(FNAL_SERVICE_INFORMATION_E), // Service_Info_Status_AVP
                    							omit, // Sponsored_Connectivity_Data_AVP
                    							omit // Setof_Specific_Action_AVP
                    							m_sponsoredConnectivityData_SI_ASPI_GSU(m_SponsorIdentity("1234"),m_ApplicationServiceProviderIdentity("1234"),m_GrantedServiceUnit), // Sponsored_Connectivity_Data_AVP
                    							{m_specificAction(USAGE_REPORT_E)} // Setof_Specific_Action_AVP
                    							)                    							
                    			);
                    
                    f_awaiting_AAA(mw_AAA_modified_ResultCode_ANCA(?, ?, ?,
																   mw_resultCode
																   (mw_resultCode_diameterSuccess)
																   , ?)); // ANCA-AVP present
                    f_awaiting_AAA(mw_AAA_dummy); // any AAA acceptable
				
                    f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); // sync

@@ -508,6 +505,36 @@ module DiameterRx_Rx_TCFunctions {

                } // end function f_TC_PCRF_IPS_02                

        /*
        *  @desc	This is the test case function TC_PCRF_IPS_03
        *  @param	
        */
                function f_TC_PCRF_IPS_03()
                runs on DiameterComponent {
				
                    f_preamble_AF();
				
                    f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict()); //     sync
                                           
                    f_send_AAR(m_AAR_SC(vc_sessionId, vc_originHost,
												vc_originRealm,
                    							vc_destinationRealm,
   												vc_destinationHost,
                    							m_sponsoredConnectivityData_SI_ASPI(m_SponsorIdentity("1234"),m_ApplicationServiceProviderIdentity("1234")) // Sponsored_Connectivity_Data_AVP
                    							)                    							
                    			);
                    
                    f_awaiting_AAA(mw_AAA_modified_Experimental_Result(?, ?, ?,
									mw_ExperimentalResult(mw_ExperimentalResultCode(REQUESTED_SERVICE_NOT_AUTHORIZED_E)))); // experimental result present
				
                    f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); // sync

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

                } // end function f_TC_PCRF_IPS_03

        /*
        *  @desc	This is the test case function TC_PCRF_ST_01
        *  @param	
+100 −1
Original line number Diff line number Diff line
@@ -407,7 +407,66 @@ module DiameterRx_Templates {
                 aVP_Type := omit
            }
    
            template Sponsored_Connectivity_Data_AVP m_sponsoredConnectivityData_SI_ASPI_GSU
    		  (template Sponsor_Identity_AVP p_sponsorIdentity,
    		   template Application_Service_Provider_Identity_AVP p_applicationServiceProviderId,
    		   template Granted_Service_Unit_AVP p_grantedServiceUnit) := 
    		   {
    			  aVP_Header := m_aVP_HeaderVid(c_vendIdSponsored_Connectivity_Data_AVP,
    			  				12 // len of this template
    			  				+8+lengthof(p_sponsorIdentity.aVP_Data) // len of 1st subfield
    			  				+8+lengthof(p_applicationServiceProviderId.aVP_Data) // len of 2nd subfield
    			  				+8, // len of 3rd subfield
    			  				omit),
    			  sponsor_Identity := p_sponsorIdentity,
    			  application_service_provider_Id := p_applicationServiceProviderId,
    			  granted_Service_Unit := p_grantedServiceUnit,
    			  used_service_unit := omit,
    			  aVP_Type := omit
    		}
    		
    		template Sponsored_Connectivity_Data_AVP m_sponsoredConnectivityData_SI_ASPI
    		  (template Sponsor_Identity_AVP p_sponsorIdentity,
    		   template Application_Service_Provider_Identity_AVP p_applicationServiceProviderId) := 
    		   {
    			  aVP_Header := m_aVP_HeaderVid(c_vendIdSponsored_Connectivity_Data_AVP,
    			  				12 // len of this template
    			  				+8+lengthof(p_sponsorIdentity.aVP_Data) // len of 1st subfield
    			  				+8+lengthof(p_applicationServiceProviderId.aVP_Data), // len of 2nd subfield
    			  				omit),
    			  sponsor_Identity := p_sponsorIdentity,
    			  application_service_provider_Id := p_applicationServiceProviderId,
    			  granted_Service_Unit := omit,
    			  used_service_unit := omit,
    			  aVP_Type := omit
    		}
    		
    		                                
            template Sponsor_Identity_AVP m_SponsorIdentity(template UTF8String p_aVP_Data) := {
             //Ref: ETSI TS 129 214 Sponsor_Identity AVP
    			 aVP_Header := m_aVP_HeaderVid(c_vendIdSponsor_Identity_AVP,8+lengthof(p_aVP_Data), omit),
                 aVP_Data := p_aVP_Data
             };     
             
             
            template Application_Service_Provider_Identity_AVP m_ApplicationServiceProviderIdentity(template UTF8String p_aVP_Data) := {
                //Ref: ETSI TS 129 214 Application_Service_Provider_Identity AVP
                 aVP_Header := m_aVP_HeaderVid(c_vendIdApplication_Service_Provider_Identity_AVP,8+lengthof(p_aVP_Data), omit),
                 aVP_Data := p_aVP_Data
            };   
            
            template Granted_Service_Unit_AVP m_GrantedServiceUnit := {
				//	Ref: RFC4006 8.17.  Granted-Service-Unit AVP
                 	aVP_Header := m_aVP_HeaderVid(c_vendIdGranted_Service_Unit_AVP,8, omit),
                	tariff_Time_Change  := omit,
					cC_Time  := omit,
					cC_Money  := omit,
					cC_Total_Octets  := omit,
					cC_Input_Octets  := omit,
					cC_Output_Octets  := omit,
					cC_Service_Specific_Units := omit,
					aVP := omit				
				}
       
            template Sponsored_Connectivity_Data_AVP mw_sponsoredConnectivityData
    		  (template Sponsor_Identity_AVP p_sponsorIdentity,
@@ -428,6 +487,23 @@ module DiameterRx_Templates {
                m_specificAction(INDICATION_OF_LOSS_OF_BEARER_E)
          	}
          	
          	
          	
          	template Experimental_Result_Code_AVP mw_ExperimentalResultCode(template Experimental_Result_Type p_aVP_Data) := {
				//	Ref: 3GPP TS 29.229	6.2 Result-Code AVP values
					aVP_Header := ?,
					aVP_Data := p_aVP_Data
				}

			template Experimental_Result_AVP mw_ExperimentalResult(template Experimental_Result_Code_AVP p_ExperimentalResultCode) := {
					aVP_Header := ?,
					vendor_Id := ?,
					experimental_Result_Code := p_ExperimentalResultCode		
				}
          	
          	
          	
            
        } //end group SpecificAVPHeaders
    } //end group HeaderFieldTemplates
	
@@ -1020,6 +1096,19 @@ module DiameterRx_Templates {
                  specific_Action := p_specificAction
              }
              
              template
              AAR_MSG m_AAR_SC(template Session_Id_AVP p_sessionId,
                                        template Origin_Host_AVP p_originHost,
                                        template Origin_Realm_AVP p_originRealm,
                                        template Destination_Realm_AVP p_destinationRealm,
                                        template Destination_Host_AVP p_destinationHost,
                                        template Sponsored_Connectivity_Data_AVP p_sponsored_Connectivity_Data                                    
                                        )
                  modifies m_AAR_basic := 
              {
                  sponsored_Connectivity_Data := p_sponsored_Connectivity_Data
              }              

              template RAR_MSG m_RAR_SpecificAction(template Session_Id_AVP p_sessionId,
                                           template Origin_Host_AVP p_originHost,
                                           template Origin_Realm_AVP p_originRealm,
@@ -1110,6 +1199,16 @@ module DiameterRx_Templates {
    			  access_network_chrging_address := p_accessNetworkChargingAddress
    		  }
    		  
    		 template AAA_MSG mw_AAA_modified_Experimental_Result
    		  (template Session_Id_AVP p_sessionId,
    		   template Origin_Host_AVP p_originHost,
    		   template Origin_Realm_AVP p_originRealm,
    		   template Experimental_Result_AVP p_ExperimentalResult) 
    		   	modifies mw_AAA_basic := 
    		  {
    			  experimental_result := p_ExperimentalResult
    		  }
    
          } // end group Rxmodified_answer_templates_receive
          
	  } //end group Rxmodified_templates