diff --git a/apier/v1/apier_local_test.go b/apier/v1/apier_local_test.go index 525d723eb..15455600d 100644 --- a/apier/v1/apier_local_test.go +++ b/apier/v1/apier_local_test.go @@ -1745,7 +1745,7 @@ func TestApierGetCacheStats3(t *testing.T) { return } var rcvStats *utils.CacheStats - expectedStats := &utils.CacheStats{Destinations: 3, RatingPlans: 3, RatingProfiles: 3, Actions: 6, SharedGroups: 1, RatingAliases: 1, AccountAliases: 1, DerivedChargers: 1} + expectedStats := &utils.CacheStats{Destinations: 4, RatingPlans: 3, RatingProfiles: 8, Actions: 6, SharedGroups: 1, RatingAliases: 1, AccountAliases: 1, DerivedChargers: 1} var args utils.AttrCacheStats if err := rater.Call("ApierV1.GetCacheStats", args, &rcvStats); err != nil { t.Error("Got error on ApierV1.GetCacheStats: ", err.Error()) diff --git a/data/tariffplans/tutorial/CdrStats.csv b/data/tariffplans/tutorial/CdrStats.csv index 74cbf96a7..660d0d7b3 100644 --- a/data/tariffplans/tutorial/CdrStats.csv +++ b/data/tariffplans/tutorial/CdrStats.csv @@ -12,3 +12,13 @@ CDRST_1002,,,ACD,,,,,,,,,,,,,,,,,, CDRST_1002,,,ACC,,,,,,,,,,,,,,,,,, CDRST_1003,,,ASR,,,,,,,cgrates.org,,,,1003,,,default,,,,CDRST3_WARN CDRST_1003,,,ACD,,,,,,,,,,,,,,,,,, +STATS_SUPPL1,,,ACD,,,,,,,,,,,,,supplier1,,,,, +STATS_SUPPL1,,,ASR,,,,,,,,,,,,,supplier1,,,,, +STATS_SUPPL1,,,ACC,,,,,,,,,,,,,supplier1,,,,, +STATS_SUPPL1,,,TCD,,,,,,,,,,,,,supplier1,,,,, +STATS_SUPPL1,,,TCC,,,,,,,,,,,,,supplier1,,,,, +STATS_SUPPL2,,,ACD,,,,,,,,,,,,,supplier2,,,,, +STATS_SUPPL2,,,ASR,,,,,,,,,,,,,supplier2,,,,, +STATS_SUPPL2,,,ACC,,,,,,,,,,,,,supplier2,,,,, +STATS_SUPPL2,,,TCD,,,,,,,,,,,,,supplier2,,,,, +STATS_SUPPL2,,,TCC,,,,,,,,,,,,,supplier2,,,,, diff --git a/data/tariffplans/tutorial/Destinations.csv b/data/tariffplans/tutorial/Destinations.csv index 1c19d97ea..4205c695b 100644 --- a/data/tariffplans/tutorial/Destinations.csv +++ b/data/tariffplans/tutorial/Destinations.csv @@ -2,3 +2,4 @@ DST_1002,1002 DST_1003,1003 DST_FS,10 +DST_2002,2002 diff --git a/data/tariffplans/tutorial/LcrRules.csv b/data/tariffplans/tutorial/LcrRules.csv new file mode 100644 index 000000000..4eb2c4262 --- /dev/null +++ b/data/tariffplans/tutorial/LcrRules.csv @@ -0,0 +1,9 @@ +#Direction,Tenant,Category,Account,Subject,DestinationId,RPCategory,Strategy,StrategyParams,ActivationTime,Weight +*out,cgrates.org,call,1001,*any,DST_2002,lcr_profile1,*static,suppl2;suppl1,2014-01-14T00:00:00Z,10 +*out,cgrates.org,call,1001,*any,*any,lcr_profile1,*static,suppl1;suppl2,2014-01-14T00:00:00Z,10 +*out,cgrates.org,call,1002,*any,DST_2002,lcr_profile1,*highest_cost,,2014-01-14T00:00:00Z,10 +*out,cgrates.org,call,1002,*any,*any,lcr_profile1,*qos,,2014-01-14T00:00:00Z,10 +*out,cgrates.org,call,1003,*any,DST_2002,lcr_profile1,*qos_threshold,20;;2m;;;;;;;,2014-01-14T00:00:00Z,10 +*out,cgrates.org,call,1003,*any,*any,lcr_profile1,*qos_threshold,40;;4m;;;;;;;,2014-01-14T00:00:00Z,10 +*out,cgrates.org,call,*any,*any,DST_2002,lcr_profile2,*lowest_cost,,2014-01-14T00:00:00Z,10 +*out,cgrates.org,call,*any,*any,*any,lcr_profile1,*lowest_cost,,2014-01-14T00:00:00Z,10 \ No newline at end of file diff --git a/data/tariffplans/tutorial/RatingProfiles.csv b/data/tariffplans/tutorial/RatingProfiles.csv index 20097c093..7889626aa 100644 --- a/data/tariffplans/tutorial/RatingProfiles.csv +++ b/data/tariffplans/tutorial/RatingProfiles.csv @@ -2,3 +2,8 @@ *out,cgrates.org,call,*any,2014-01-14T00:00:00Z,RP_RETAIL1,, *out,cgrates.org,call,1001;1006,2014-01-14T00:00:00Z,RP_RETAIL2,, *out,cgrates.org,call,SPECIAL_1002,2014-01-14T00:00:00Z,RP_SPECIAL_1002,, +*out,cgrates.org,lcr_profile1,supplier1,2014-01-14T00:00:00Z,RP_RETAIL1,,STATS_SUPPL1 +*out,cgrates.org,lcr_profile1,supplier2,2014-01-14T00:00:00Z,RP_RETAIL2,,STATS_SUPPL2 +*out,cgrates.org,lcr_profile2,supplier1,2014-01-14T00:00:00Z,RP_RETAIL2,,STATS_SUPPL1 +*out,cgrates.org,lcr_profile2,supplier2,2014-01-14T00:00:00Z,RP_RETAIL1,,STATS_SUPPL2 +*out,cgrates.org,lcr_profile2,supplier3,2014-01-14T00:00:00Z,RP_SPECIAL_1002,, diff --git a/general_tests/tutorial_fs_calls_test.go b/general_tests/tutorial_fs_calls_test.go index 7ec078e64..22e268fd7 100644 --- a/general_tests/tutorial_fs_calls_test.go +++ b/general_tests/tutorial_fs_calls_test.go @@ -139,7 +139,7 @@ func TestTutFsCallsCacheStats(t *testing.T) { return } var rcvStats *utils.CacheStats - expectedStats := &utils.CacheStats{Destinations: 3, RatingPlans: 3, RatingProfiles: 3, Actions: 6, SharedGroups: 1, RatingAliases: 1, AccountAliases: 1, DerivedChargers: 1} + expectedStats := &utils.CacheStats{Destinations: 4, RatingPlans: 3, RatingProfiles: 8, Actions: 6, SharedGroups: 1, RatingAliases: 1, AccountAliases: 1, DerivedChargers: 1} var args utils.AttrCacheStats if err := tutFsCallsRpc.Call("ApierV1.GetCacheStats", args, &rcvStats); err != nil { t.Error("Got error on ApierV1.GetCacheStats: ", err.Error()) @@ -356,7 +356,7 @@ func TestTutFsCallsCdrStats(t *testing.T) { return } var queueIds []string - eQueueIds := []string{"*default", "CDRST1", "CDRST_1001", "CDRST_1002", "CDRST_1003"} + eQueueIds := []string{"*default", "CDRST1", "CDRST_1001", "CDRST_1002", "CDRST_1003", "STATS_SUPPL1", "STATS_SUPPL2"} if err := tutFsCallsRpc.Call("CDRStatsV1.GetQueueIds", "", &queueIds); err != nil { t.Error("Calling CDRStatsV1.GetQueueIds, got error: ", err.Error()) } else if len(eQueueIds) != len(queueIds) { diff --git a/general_tests/tutorial_kam_calls_test.go b/general_tests/tutorial_kam_calls_test.go index 339c701dd..53002da53 100644 --- a/general_tests/tutorial_kam_calls_test.go +++ b/general_tests/tutorial_kam_calls_test.go @@ -137,7 +137,7 @@ func TestTutKamCallsCacheStats(t *testing.T) { return } var rcvStats *utils.CacheStats - expectedStats := &utils.CacheStats{Destinations: 3, RatingPlans: 3, RatingProfiles: 3, Actions: 6, SharedGroups: 1, RatingAliases: 1, AccountAliases: 1, DerivedChargers: 1} + expectedStats := &utils.CacheStats{Destinations: 4, RatingPlans: 3, RatingProfiles: 8, Actions: 6, SharedGroups: 1, RatingAliases: 1, AccountAliases: 1, DerivedChargers: 1} var args utils.AttrCacheStats if err := tutKamCallsRpc.Call("ApierV1.GetCacheStats", args, &rcvStats); err != nil { t.Error("Got error on ApierV1.GetCacheStats: ", err.Error()) @@ -354,7 +354,7 @@ func TestTutKamCallsCdrStats(t *testing.T) { return } var queueIds []string - eQueueIds := []string{"*default", "CDRST1", "CDRST_1001", "CDRST_1002", "CDRST_1003"} + eQueueIds := []string{"*default", "CDRST1", "CDRST_1001", "CDRST_1002", "CDRST_1003", "STATS_SUPPL1", "STATS_SUPPL2"} if err := tutKamCallsRpc.Call("CDRStatsV1.GetQueueIds", "", &queueIds); err != nil { t.Error("Calling CDRStatsV1.GetQueueIds, got error: ", err.Error()) } else if len(eQueueIds) != len(queueIds) {