diff --git a/apier/v1/apier.go b/apier/v1/apier.go index cace1f4f3..b116d56ba 100644 --- a/apier/v1/apier.go +++ b/apier/v1/apier.go @@ -1225,18 +1225,18 @@ type AttrRemoveRatingProfile struct { func (arrp *AttrRemoveRatingProfile) GetId() (result string) { result = utils.META_OUT + utils.CONCATENATED_KEY_SEP - if arrp.Tenant != "" && arrp.Tenant != utils.ANY { + if arrp.Tenant != "" && arrp.Tenant != utils.MetaAny { result += arrp.Tenant + utils.CONCATENATED_KEY_SEP } else { return } - if arrp.Category != "" && arrp.Category != utils.ANY { + if arrp.Category != "" && arrp.Category != utils.MetaAny { result += arrp.Category + utils.CONCATENATED_KEY_SEP } else { return } - if arrp.Subject != "" && arrp.Subject != utils.ANY { + if arrp.Subject != "" && arrp.Subject != utils.MetaAny { result += arrp.Subject } return diff --git a/apier/v1/apier2_it_test.go b/apier/v1/apier2_it_test.go index adf4fd7ea..b280f2d22 100644 --- a/apier/v1/apier2_it_test.go +++ b/apier/v1/apier2_it_test.go @@ -458,7 +458,7 @@ func testAPIerLoadRatingPlan(t *testing.T) { rp := &utils.TPRatingPlan{TPid: "TP_SAMPLE", ID: "RPl_SAMPLE_RATING_PLAN", RatingPlanBindings: []*utils.TPRatingPlanBinding{ - {DestinationRatesId: "DR_SAMPLE_DESTINATION_RATE", TimingId: utils.META_ANY, + {DestinationRatesId: "DR_SAMPLE_DESTINATION_RATE", TimingId: utils.MetaAny, Weight: 10}, }} @@ -497,7 +497,7 @@ func testAPIerLoadRatingPlan2(t *testing.T) { rp := &utils.TPRatingPlan{TPid: "TP_SAMPLE", ID: "RPL_WITH_ERROR", RatingPlanBindings: []*utils.TPRatingPlanBinding{ - {DestinationRatesId: "DR_WITH_ERROR", TimingId: utils.META_ANY, + {DestinationRatesId: "DR_WITH_ERROR", TimingId: utils.MetaAny, Weight: 10}, }} @@ -521,7 +521,7 @@ func testAPIerLoadRatingProfile(t *testing.T) { LoadId: "TP_SAMPLE", Tenant: "cgrates.org", Category: "call", - Subject: utils.META_ANY, + Subject: utils.MetaAny, RatingPlanActivations: []*utils.TPRatingActivation{{ ActivationTime: "2012-01-01T00:00:00Z", RatingPlanId: "RPl_SAMPLE_RATING_PLAN", @@ -543,7 +543,7 @@ func testAPIerLoadRatingProfile(t *testing.T) { // verify if was added correctly var rpl engine.RatingProfile attrGetRatingPlan := &utils.AttrGetRatingProfile{ - Tenant: "cgrates.org", Category: "call", Subject: utils.META_ANY} + Tenant: "cgrates.org", Category: "call", Subject: utils.MetaAny} actTime, err := utils.ParseTimeDetectLayout("2012-01-01T00:00:00Z", utils.EmptyString) if err != nil { t.Error(err) @@ -566,7 +566,7 @@ func testAPIerLoadRatingProfile(t *testing.T) { // add new RatingPlan rp := &utils.TPRatingPlan{TPid: "TP_SAMPLE", ID: "RPl_SAMPLE_RATING_PLAN2", RatingPlanBindings: []*utils.TPRatingPlanBinding{ - {DestinationRatesId: "DR_SAMPLE_DESTINATION_RATE", TimingId: utils.META_ANY, + {DestinationRatesId: "DR_SAMPLE_DESTINATION_RATE", TimingId: utils.MetaAny, Weight: 10}, }} @@ -588,7 +588,7 @@ func testAPIerLoadRatingProfile(t *testing.T) { LoadId: "TP_SAMPLE", Tenant: "cgrates.org", Category: "call", - Subject: utils.META_ANY, + Subject: utils.MetaAny, RatingPlanActivations: []*utils.TPRatingActivation{ { ActivationTime: "2012-01-01T00:00:00Z", diff --git a/apier/v1/apier_it_test.go b/apier/v1/apier_it_test.go index f9576dbfa..3eadae307 100644 --- a/apier/v1/apier_it_test.go +++ b/apier/v1/apier_it_test.go @@ -221,10 +221,10 @@ func testApierTPTiming(t *testing.T) { // ALWAYS,*any,*any,*any,*any,00:00:00 tmAlways := &utils.ApierTPTiming{TPid: utils.TEST_SQL, ID: "ALWAYS", - Years: utils.META_ANY, - Months: utils.META_ANY, - MonthDays: utils.META_ANY, - WeekDays: utils.META_ANY, + Years: utils.MetaAny, + Months: utils.MetaAny, + MonthDays: utils.MetaAny, + WeekDays: utils.MetaAny, Time: "00:00:00", } tmAlways2 := new(utils.ApierTPTiming) @@ -233,10 +233,10 @@ func testApierTPTiming(t *testing.T) { tmAsap := &utils.ApierTPTiming{ TPid: utils.TEST_SQL, ID: "ASAP", - Years: utils.META_ANY, - Months: utils.META_ANY, - MonthDays: utils.META_ANY, - WeekDays: utils.META_ANY, + Years: utils.MetaAny, + Months: utils.MetaAny, + MonthDays: utils.MetaAny, + WeekDays: utils.MetaAny, Time: "*asap", } var reply string @@ -503,7 +503,7 @@ func testApierTPRatingProfile(t *testing.T) { LoadId: utils.TEST_SQL, Tenant: "cgrates.org", Category: "call", - Subject: utils.META_ANY, + Subject: utils.MetaAny, RatingPlanActivations: []*utils.TPRatingActivation{{ ActivationTime: "2012-01-01T00:00:00Z", RatingPlanId: "RETAIL1", @@ -561,7 +561,7 @@ func testApierTPActions(t *testing.T) { ID: "PREPAID_10", Actions: []*utils.TPAction{ {Identifier: "*topup_reset", BalanceType: utils.MONETARY, Units: "10", ExpiryTime: "*unlimited", - DestinationIds: utils.META_ANY, BalanceWeight: "10", Weight: 10}, + DestinationIds: utils.MetaAny, BalanceWeight: "10", Weight: 10}, }} actWarn := &utils.TPActions{TPid: utils.TEST_SQL, ID: "WARN_VIA_HTTP", Actions: []*utils.TPAction{ {Identifier: "*http_post", ExtraParameters: "http://localhost:8000", Weight: 10}, @@ -1235,7 +1235,7 @@ func testApierAddTriggeredAction(t *testing.T) { } // Add balance to a previously known account attrsAddTrigger := &AttrAddActionTrigger{Tenant: "cgrates.org", Account: "dan32", BalanceType: utils.MONETARY, - ThresholdType: "*min_balance", ThresholdValue: 2, BalanceDestinationIds: utils.META_ANY, Weight: 10, ActionsId: "WARN_VIA_HTTP"} + ThresholdType: "*min_balance", ThresholdValue: 2, BalanceDestinationIds: utils.MetaAny, Weight: 10, ActionsId: "WARN_VIA_HTTP"} if err := rater.Call(utils.APIerSv1AddTriggeredAction, attrsAddTrigger, &reply); err != nil { t.Error("Got error on APIerSv1.AddTriggeredAction: ", err.Error()) } else if reply != utils.OK { diff --git a/apier/v1/attributes_it_test.go b/apier/v1/attributes_it_test.go index e7a2d4e6e..cee692c88 100644 --- a/apier/v1/attributes_it_test.go +++ b/apier/v1/attributes_it_test.go @@ -309,7 +309,7 @@ func testAttributeSGetAttributeForEventWithMetaAnyContext(t *testing.T) { Tenant: ev.Tenant, ID: "ATTR_2", FilterIDs: []string{"*string:~*req.Account:dan"}, - Contexts: []string{utils.META_ANY}, + Contexts: []string{utils.MetaAny}, ActivationInterval: &utils.ActivationInterval{ ActivationTime: time.Date(2014, 1, 14, 0, 0, 0, 0, time.UTC)}, Attributes: []*engine.Attribute{ diff --git a/apier/v1/config_it_test.go b/apier/v1/config_it_test.go index 66ca88974..b963649f1 100644 --- a/apier/v1/config_it_test.go +++ b/apier/v1/config_it_test.go @@ -160,7 +160,7 @@ func testConfigSSetConfigSessionS(t *testing.T) { "stats_conns": []interface{}{}, "min_dur_low_balance": "0", "stir": map[string]interface{}{ - "allowed_attest": []interface{}{utils.META_ANY}, + "allowed_attest": []interface{}{utils.MetaAny}, "default_attest": "A", "payload_maxduration": "-1", "privatekey_path": "", @@ -194,7 +194,7 @@ func testConfigSSetConfigSessionS(t *testing.T) { "min_dur_low_balance": "0", "alterable_fields": empty, "stir": map[string]interface{}{ - "allowed_attest": []string{utils.META_ANY}, + "allowed_attest": []string{utils.MetaAny}, "default_attest": "A", "payload_maxduration": "-1", "privatekey_path": "", @@ -240,7 +240,7 @@ func testConfigSv1GetJSONSectionWithoutTenant(t *testing.T) { "min_dur_low_balance": "0", "alterable_fields": []interface{}{}, "stir": map[string]interface{}{ - "allowed_attest": []interface{}{utils.META_ANY}, + "allowed_attest": []interface{}{utils.MetaAny}, "default_attest": "A", "payload_maxduration": "-1", "privatekey_path": "", @@ -272,7 +272,7 @@ func testConfigSv1GetJSONSectionWithoutTenant(t *testing.T) { "min_dur_low_balance": "0", "alterable_fields": empty, "stir": map[string]interface{}{ - "allowed_attest": []string{utils.META_ANY}, + "allowed_attest": []string{utils.MetaAny}, "default_attest": "A", "payload_maxduration": "-1", "privatekey_path": "", diff --git a/apier/v1/dispatchersv1_it_test.go b/apier/v1/dispatchersv1_it_test.go index 68b949502..71eb30138 100644 --- a/apier/v1/dispatchersv1_it_test.go +++ b/apier/v1/dispatchersv1_it_test.go @@ -141,14 +141,14 @@ func testDspDspv1GetProfileForEvent(t *testing.T) { }, }, Opts: map[string]interface{}{ - utils.Subsys: utils.META_ANY, + utils.Subsys: utils.MetaAny, }, } var reply engine.DispatcherProfile expected := engine.DispatcherProfile{ Tenant: "cgrates.org", ID: "EVENT1", - Subsystems: []string{utils.META_ANY}, + Subsystems: []string{utils.MetaAny}, FilterIDs: []string{"*string:~*req.EventName:Event1"}, StrategyParams: make(map[string]interface{}), Strategy: utils.MetaWeight, @@ -189,7 +189,7 @@ func testDspDspv1GetProfileForEvent(t *testing.T) { }, }, Opts: map[string]interface{}{ - utils.Subsys: utils.META_ANY, + utils.Subsys: utils.MetaAny, }, } expected.Hosts.Sort() @@ -210,7 +210,7 @@ func testDspDspv1GetProfileForEventWithMethod(t *testing.T) { Event: map[string]interface{}{}, }, Opts: map[string]interface{}{ - utils.Subsys: utils.META_ANY, + utils.Subsys: utils.MetaAny, utils.OptsDispatcherMethod: utils.DispatcherSv1GetProfileForEvent, }, } @@ -218,7 +218,7 @@ func testDspDspv1GetProfileForEventWithMethod(t *testing.T) { expected := engine.DispatcherProfile{ Tenant: "cgrates.org", ID: "EVENT6", - Subsystems: []string{utils.META_ANY}, + Subsystems: []string{utils.MetaAny}, FilterIDs: []string{"*string:~*opts.*method:DispatcherSv1.GetProfileForEvent"}, StrategyParams: make(map[string]interface{}), Strategy: utils.MetaWeight, diff --git a/apier/v1/filter_indexes_it_test.go b/apier/v1/filter_indexes_it_test.go index f824b0ca4..5dd384106 100644 --- a/apier/v1/filter_indexes_it_test.go +++ b/apier/v1/filter_indexes_it_test.go @@ -1358,7 +1358,7 @@ func testV1FIdxComputeWithAnotherContext(t *testing.T) { if err := tFIdxRpc.Call(utils.APIerSv1ComputeFilterIndexes, &utils.ArgsComputeFilterIndexes{ Tenant: tenant, - Context: utils.META_ANY, + Context: utils.MetaAny, AttributeS: true, }, &result); err != nil { t.Error(err) @@ -1370,7 +1370,7 @@ func testV1FIdxComputeWithAnotherContext(t *testing.T) { ItemType: utils.MetaAttributes, Tenant: tenant, FilterType: utils.MetaString, - Context: utils.META_ANY}, &indexes); err == nil || + Context: utils.MetaAny}, &indexes); err == nil || err.Error() != utils.ErrNotFound.Error() { t.Error(err) t.Error(indexes) diff --git a/apier/v1/libapier.go b/apier/v1/libapier.go index dc150dfd5..e68e0dcdd 100644 --- a/apier/v1/libapier.go +++ b/apier/v1/libapier.go @@ -81,7 +81,7 @@ func (apierSv1 *APIerSv1) composeArgsReload(tnt, cacheID, itemID string, filterI // popultate the indexes idxCacheID := utils.CacheInstanceToArg[utils.CacheInstanceToCacheIndex[cacheID]] if len(*filterIDs) == 0 { // in case we do not have any filters reload the *none filter indexes - indxID := utils.ConcatenatedKey(utils.MetaNone, utils.META_ANY, utils.META_ANY) + indxID := utils.ConcatenatedKey(utils.MetaNone, utils.MetaAny, utils.MetaAny) if cacheID != utils.CacheAttributeProfiles && cacheID != utils.CacheDispatcherProfiles { rpl.ArgsCache[idxCacheID] = []string{utils.ConcatenatedKey(tnt, indxID)} diff --git a/apier/v2/cdrs_it_test.go b/apier/v2/cdrs_it_test.go index 2311dd0ff..7356a3c91 100644 --- a/apier/v2/cdrs_it_test.go +++ b/apier/v2/cdrs_it_test.go @@ -418,7 +418,7 @@ func testV2CDRsDifferentTenants(t *testing.T) { AttributeProfile: &engine.AttributeProfile{ Tenant: "cgrates.com", ID: "ATTR_Tenant", - Contexts: []string{utils.META_ANY}, + Contexts: []string{utils.MetaAny}, FilterIDs: []string{"*string:~*req.Tenant:cgrates.com"}, ActivationInterval: &utils.ActivationInterval{ ActivationTime: time.Date(2014, 7, 14, 14, 35, 0, 0, time.UTC), @@ -535,7 +535,7 @@ func testV2CDRsRemoveRatingProfiles(t *testing.T) { if err := cdrsRpc.Call(utils.APIerSv1RemoveRatingProfile, &v1.AttrRemoveRatingProfile{ Tenant: "cgrates.org", Category: utils.CALL, - Subject: utils.ANY, + Subject: utils.MetaAny, }, &reply); err != nil { t.Error(err) } else if reply != utils.OK { @@ -652,7 +652,7 @@ func testV2CDRsRateCDRsWithRatingPlan(t *testing.T) { rpf = &utils.AttrSetRatingProfile{ Tenant: "cgrates.org", Category: "call", - Subject: utils.ANY, + Subject: utils.MetaAny, RatingPlanActivations: []*utils.TPRatingActivation{ { ActivationTime: "2018-01-01T00:00:00Z", diff --git a/config/config_it_test.go b/config/config_it_test.go index 3359f555f..d106fbf5c 100644 --- a/config/config_it_test.go +++ b/config/config_it_test.go @@ -472,7 +472,7 @@ func testCGRConfigReloadSessionS(t *testing.T) { TerminateAttempts: 5, AlterableFields: utils.NewStringSet([]string{}), STIRCfg: &STIRcfg{ - AllowedAttest: utils.NewStringSet([]string{utils.META_ANY}), + AllowedAttest: utils.NewStringSet([]string{utils.MetaAny}), PayloadMaxduration: -1, DefaultAttest: "A", }, @@ -838,7 +838,7 @@ func testCGRConfigReloadConfigFromJSONSessionS(t *testing.T) { TerminateAttempts: 5, AlterableFields: utils.NewStringSet([]string{}), STIRCfg: &STIRcfg{ - AllowedAttest: utils.NewStringSet([]string{utils.META_ANY}), + AllowedAttest: utils.NewStringSet([]string{utils.MetaAny}), PayloadMaxduration: -1, DefaultAttest: "A", }, @@ -888,7 +888,7 @@ func testCGRConfigReloadConfigFromStringSessionS(t *testing.T) { TerminateAttempts: 5, AlterableFields: utils.NewStringSet([]string{}), STIRCfg: &STIRcfg{ - AllowedAttest: utils.NewStringSet([]string{utils.META_ANY}), + AllowedAttest: utils.NewStringSet([]string{utils.MetaAny}), PayloadMaxduration: -1, DefaultAttest: "A", }, @@ -940,7 +940,7 @@ func testCGRConfigReloadAll(t *testing.T) { TerminateAttempts: 5, AlterableFields: utils.NewStringSet([]string{}), STIRCfg: &STIRcfg{ - AllowedAttest: utils.NewStringSet([]string{utils.META_ANY}), + AllowedAttest: utils.NewStringSet([]string{utils.MetaAny}), PayloadMaxduration: -1, DefaultAttest: "A", }, diff --git a/config/config_json_test.go b/config/config_json_test.go index 467d2f33b..c0898ebdc 100644 --- a/config/config_json_test.go +++ b/config/config_json_test.go @@ -652,16 +652,16 @@ func TestDfRalsJsonCfg(t *testing.T) { Rp_subject_prefix_matching: utils.BoolPointer(false), Remove_expired: utils.BoolPointer(true), Max_computed_usage: &map[string]string{ - utils.ANY: "189h", - utils.VOICE: "72h", - utils.DATA: "107374182400", - utils.SMS: "10000", - utils.MMS: "10000", + utils.MetaAny: "189h", + utils.VOICE: "72h", + utils.DATA: "107374182400", + utils.SMS: "10000", + utils.MMS: "10000", }, Max_increments: utils.IntPointer(1000000), Balance_rating_subject: &map[string]string{ - utils.ANY: "*zero1ns", - utils.VOICE: "*zero1s", + utils.MetaAny: "*zero1ns", + utils.VOICE: "*zero1s", }, Dynaprepaid_actionplans: &[]string{}, } @@ -743,7 +743,7 @@ func TestSmgJsonCfg(t *testing.T) { Terminate_attempts: utils.IntPointer(5), Alterable_fields: &[]string{}, Stir: &STIRJsonCfg{ - Allowed_attest: &[]string{utils.META_ANY}, + Allowed_attest: &[]string{utils.MetaAny}, Payload_maxduration: utils.StringPointer("-1"), Default_attest: utils.StringPointer("A"), Privatekey_path: utils.StringPointer(""), diff --git a/config/config_test.go b/config/config_test.go index 48b2c3c2a..c5602ed5e 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -403,11 +403,11 @@ func TestCgrCfgJSONDefaultsRALs(t *testing.T) { t.Errorf("Expecting: false , received: %+v", cgrCfg.RalsCfg().RpSubjectPrefixMatching) } eMaxCU := map[string]time.Duration{ - utils.ANY: 189 * time.Hour, - utils.VOICE: 72 * time.Hour, - utils.DATA: 107374182400, - utils.SMS: 10000, - utils.MMS: 10000, + utils.MetaAny: 189 * time.Hour, + utils.VOICE: 72 * time.Hour, + utils.DATA: 107374182400, + utils.SMS: 10000, + utils.MMS: 10000, } if !reflect.DeepEqual(eMaxCU, cgrCfg.RalsCfg().MaxComputedUsage) { t.Errorf("Expecting: %+v , received: %+v", eMaxCU, cgrCfg.RalsCfg().MaxComputedUsage) @@ -416,8 +416,8 @@ func TestCgrCfgJSONDefaultsRALs(t *testing.T) { t.Errorf("Expecting: 1000000 , received: %+v", cgrCfg.RalsCfg().MaxIncrements) } eBalRatingSbj := map[string]string{ - utils.ANY: "*zero1ns", - utils.VOICE: "*zero1s", + utils.MetaAny: "*zero1ns", + utils.VOICE: "*zero1s", } if !reflect.DeepEqual(eBalRatingSbj, cgrCfg.RalsCfg().BalanceRatingSubject) { t.Errorf("Expecting: %+v , received: %+v", eBalRatingSbj, cgrCfg.RalsCfg().BalanceRatingSubject) @@ -505,7 +505,7 @@ func TestCgrCfgJSONDefaultsSMGenericCfg(t *testing.T) { TerminateAttempts: 5, AlterableFields: utils.NewStringSet([]string{}), STIRCfg: &STIRcfg{ - AllowedAttest: utils.NewStringSet([]string{utils.META_ANY}), + AllowedAttest: utils.NewStringSet([]string{utils.MetaAny}), PayloadMaxduration: -1, DefaultAttest: "A", }, @@ -2179,7 +2179,7 @@ func TestSessionSConfig(t *testing.T) { AlterableFields: utils.StringSet{}, SchedulerConns: []string{}, STIRCfg: &STIRcfg{ - AllowedAttest: utils.StringSet{utils.META_ANY: {}}, + AllowedAttest: utils.StringSet{utils.MetaAny: {}}, PayloadMaxduration: -1, DefaultAttest: "A", PrivateKeyPath: "", diff --git a/config/ralscfg.go b/config/ralscfg.go index 91f0d0bd7..de61c9c4e 100644 --- a/config/ralscfg.go +++ b/config/ralscfg.go @@ -150,7 +150,7 @@ func (ralsCfg *RalsCfg) AsMapInterface() (initialMP map[string]interface{}) { } maxComputed := make(map[string]interface{}) for key, item := range ralsCfg.MaxComputedUsage { - if key == utils.ANY || key == utils.VOICE { + if key == utils.MetaAny || key == utils.VOICE { maxComputed[key] = item.String() } else { maxComputed[key] = strconv.Itoa(int(item)) diff --git a/config/ralscfg_test.go b/config/ralscfg_test.go index d9533334f..27130ce1b 100644 --- a/config/ralscfg_test.go +++ b/config/ralscfg_test.go @@ -34,15 +34,15 @@ func TestRalsCfgFromJsonCfgCase1(t *testing.T) { Rp_subject_prefix_matching: utils.BoolPointer(true), Remove_expired: utils.BoolPointer(true), Max_computed_usage: &map[string]string{ - utils.ANY: "189h0m0s", - utils.VOICE: "72h0m0s", - utils.DATA: "107374182400", - utils.SMS: "5000", - utils.MMS: "10000", + utils.MetaAny: "189h0m0s", + utils.VOICE: "72h0m0s", + utils.DATA: "107374182400", + utils.SMS: "5000", + utils.MMS: "10000", }, Max_increments: utils.IntPointer(1000000), Balance_rating_subject: &map[string]string{ - utils.META_ANY: "*zero1ns", + utils.MetaAny: "*zero1ns", utils.META_VOICE: "*zero1s", }, Dynaprepaid_actionplans: &[]string{"randomPlans"}, @@ -55,15 +55,15 @@ func TestRalsCfgFromJsonCfgCase1(t *testing.T) { RpSubjectPrefixMatching: true, RemoveExpired: true, MaxComputedUsage: map[string]time.Duration{ - utils.ANY: 189 * time.Hour, - utils.VOICE: 72 * time.Hour, - utils.DATA: 107374182400, - utils.SMS: 5000, - utils.MMS: 10000, + utils.MetaAny: 189 * time.Hour, + utils.VOICE: 72 * time.Hour, + utils.DATA: 107374182400, + utils.SMS: 5000, + utils.MMS: 10000, }, MaxIncrements: 1000000, BalanceRatingSubject: map[string]string{ - utils.META_ANY: "*zero1ns", + utils.MetaAny: "*zero1ns", utils.META_VOICE: "*zero1s", }, DynaprepaidActionPlans: []string{"randomPlans"}, @@ -79,7 +79,7 @@ func TestRalsCfgFromJsonCfgCase1(t *testing.T) { func TestRalsCfgFromJsonCfgCase2(t *testing.T) { cfgJSON := &RalsJsonCfg{ Max_computed_usage: &map[string]string{ - utils.ANY: "189hh", + utils.MetaAny: "189hh", }, } expected := "time: unknown unit \"hh\" in duration \"189hh\"" @@ -175,15 +175,15 @@ func TestRalsCfgClone(t *testing.T) { RpSubjectPrefixMatching: true, RemoveExpired: true, MaxComputedUsage: map[string]time.Duration{ - utils.ANY: 189 * time.Hour, - utils.VOICE: 72 * time.Hour, - utils.DATA: 107374182400, - utils.SMS: 5000, - utils.MMS: 10000, + utils.MetaAny: 189 * time.Hour, + utils.VOICE: 72 * time.Hour, + utils.DATA: 107374182400, + utils.SMS: 5000, + utils.MMS: 10000, }, MaxIncrements: 1000000, BalanceRatingSubject: map[string]string{ - utils.META_ANY: "*zero1ns", + utils.MetaAny: "*zero1ns", utils.META_VOICE: "*zero1s", }, DynaprepaidActionPlans: []string{"randomPlans"}, @@ -201,10 +201,10 @@ func TestRalsCfgClone(t *testing.T) { if rcv.CacheSConns[1] = ""; ban.CacheSConns[1] != "*conn1" { t.Errorf("Expected clone to not modify the cloned") } - if rcv.MaxComputedUsage[utils.ANY] = 0; ban.MaxComputedUsage[utils.ANY] != 189*time.Hour { + if rcv.MaxComputedUsage[utils.MetaAny] = 0; ban.MaxComputedUsage[utils.MetaAny] != 189*time.Hour { t.Errorf("Expected clone to not modify the cloned") } - if rcv.BalanceRatingSubject[utils.META_ANY] = ""; ban.BalanceRatingSubject[utils.META_ANY] != "*zero1ns" { + if rcv.BalanceRatingSubject[utils.MetaAny] = ""; ban.BalanceRatingSubject[utils.MetaAny] != "*zero1ns" { t.Errorf("Expected clone to not modify the cloned") } } diff --git a/config/sessionscfg_test.go b/config/sessionscfg_test.go index a3923b417..11dc627ab 100644 --- a/config/sessionscfg_test.go +++ b/config/sessionscfg_test.go @@ -85,7 +85,7 @@ func TestSessionSCfgloadFromJsonCfgCase1(t *testing.T) { Min_dur_low_balance: utils.StringPointer("1"), Scheduler_conns: &[]string{utils.MetaInternal, "*conn1"}, Stir: &STIRJsonCfg{ - Allowed_attest: &[]string{utils.META_ANY}, + Allowed_attest: &[]string{utils.MetaAny}, Payload_maxduration: utils.StringPointer("-1"), Default_attest: utils.StringPointer("A"), Publickey_path: utils.StringPointer("randomPath"), @@ -115,7 +115,7 @@ func TestSessionSCfgloadFromJsonCfgCase1(t *testing.T) { MinDurLowBalance: 1, SchedulerConns: []string{utils.ConcatenatedKey(utils.MetaInternal, utils.MetaScheduler), "*conn1"}, STIRCfg: &STIRcfg{ - AllowedAttest: utils.StringSet{utils.META_ANY: {}}, + AllowedAttest: utils.StringSet{utils.MetaAny: {}}, PayloadMaxduration: -1, DefaultAttest: "A", PrivateKeyPath: "randomPath", @@ -247,7 +247,7 @@ func TestSessionSCfgloadFromJsonCfgCase10(t *testing.T) { MinDurLowBalance: 0, SchedulerConns: []string{}, STIRCfg: &STIRcfg{ - AllowedAttest: utils.StringSet{utils.META_ANY: {}}, + AllowedAttest: utils.StringSet{utils.MetaAny: {}}, PayloadMaxduration: -1, DefaultAttest: "A", PrivateKeyPath: "", @@ -839,7 +839,7 @@ func TestSessionSCfgClone(t *testing.T) { SessionTTLUsage: utils.DurationPointer(time.Second), SessionTTLLastUsage: utils.DurationPointer(time.Second), STIRCfg: &STIRcfg{ - AllowedAttest: utils.StringSet{utils.META_ANY: {}}, + AllowedAttest: utils.StringSet{utils.MetaAny: {}}, PayloadMaxduration: -1, DefaultAttest: "A", PrivateKeyPath: "randomPath", diff --git a/dispatchers/dispatchers.go b/dispatchers/dispatchers.go index b9b061aa1..5353a7438 100755 --- a/dispatchers/dispatchers.go +++ b/dispatchers/dispatchers.go @@ -107,7 +107,7 @@ func (dS *DispatcherService) authorize(method, tenant string, apiKey string, evT func (dS *DispatcherService) dispatcherProfileForEvent(tnt string, ev *utils.CGREventWithOpts, subsys string) (dPrlf *engine.DispatcherProfile, err error) { // find out the matching profiles - anyIdxPrfx := utils.ConcatenatedKey(tnt, utils.META_ANY) + anyIdxPrfx := utils.ConcatenatedKey(tnt, utils.MetaAny) idxKeyPrfx := anyIdxPrfx if subsys != "" { idxKeyPrfx = utils.ConcatenatedKey(tnt, subsys) @@ -149,7 +149,7 @@ func (dS *DispatcherService) dispatcherProfileForEvent(tnt string, ev *utils.CGR } continue } - if !(len(prfl.Subsystems) == 1 && prfl.Subsystems[0] == utils.META_ANY) && + if !(len(prfl.Subsystems) == 1 && prfl.Subsystems[0] == utils.MetaAny) && !utils.IsSliceMember(prfl.Subsystems, subsys) { continue } diff --git a/engine/account.go b/engine/account.go index bea61d5ec..5661529da 100644 --- a/engine/account.go +++ b/engine/account.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -304,7 +304,7 @@ func (acc *Account) getBalancesForPrefix(prefix, category, tor, } b.account = acc - if len(b.DestinationIDs) > 0 && b.DestinationIDs[utils.ANY] == false { + if len(b.DestinationIDs) > 0 && b.DestinationIDs[utils.MetaAny] == false { for _, p := range utils.SplitPrefix(prefix, MIN_PREFIX_MATCH) { if destIDs, err := dm.GetReverseDestination(p, true, true, utils.NonTransactional); err == nil { foundResult := false diff --git a/engine/account_test.go b/engine/account_test.go index 6631a2579..7b5ad4657 100644 --- a/engine/account_test.go +++ b/engine/account_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/action.go b/engine/action.go index 6c7d66b7a..109544156 100644 --- a/engine/action.go +++ b/engine/action.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/action_plan.go b/engine/action_plan.go index 9f8e889e4..0ffcdf951 100644 --- a/engine/action_plan.go +++ b/engine/action_plan.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/action_plan_test.go b/engine/action_plan_test.go index b3db2f6f7..149c6872b 100644 --- a/engine/action_plan_test.go +++ b/engine/action_plan_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/action_trigger.go b/engine/action_trigger.go index 06ffd8600..f9e12ba99 100644 --- a/engine/action_trigger.go +++ b/engine/action_trigger.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/action_trigger_test.go b/engine/action_trigger_test.go index f03185f0c..44111f2c6 100644 --- a/engine/action_trigger_test.go +++ b/engine/action_trigger_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/actionprofile.go b/engine/actionprofile.go index 2982c9686..fe0e93759 100644 --- a/engine/actionprofile.go +++ b/engine/actionprofile.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/actionprofile_test.go b/engine/actionprofile_test.go index ca165d72d..87f4f739a 100644 --- a/engine/actionprofile_test.go +++ b/engine/actionprofile_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/actions_test.go b/engine/actions_test.go index 6430dc359..d4e6131e5 100644 --- a/engine/actions_test.go +++ b/engine/actions_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/attributes.go b/engine/attributes.go index e55aa869f..738d0208d 100644 --- a/engine/attributes.go +++ b/engine/attributes.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -81,7 +81,7 @@ func (alS *AttributeService) attributeProfileForEvent(tnt string, ctx *string, a alS.cgrcfg.AttributeSCfg().PrefixIndexedFields, alS.cgrcfg.AttributeSCfg().SuffixIndexedFields, alS.dm, utils.CacheAttributeFilterIndexes, - utils.ConcatenatedKey(tnt, utils.META_ANY), + utils.ConcatenatedKey(tnt, utils.MetaAny), alS.cgrcfg.AttributeSCfg().IndexedSelects, alS.cgrcfg.AttributeSCfg().NestedFields); err != nil { return nil, err @@ -97,7 +97,7 @@ func (alS *AttributeService) attributeProfileForEvent(tnt string, ctx *string, a } return nil, err } - if !(len(aPrfl.Contexts) == 1 && aPrfl.Contexts[0] == utils.META_ANY) && + if !(len(aPrfl.Contexts) == 1 && aPrfl.Contexts[0] == utils.MetaAny) && !utils.IsSliceMember(aPrfl.Contexts, contextVal) { continue } diff --git a/engine/balance_filter.go b/engine/balance_filter.go index de2ccbec7..952c2d21a 100644 --- a/engine/balance_filter.go +++ b/engine/balance_filter.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/balance_filter_test.go b/engine/balance_filter_test.go index 1f308bb0d..4da0fecbc 100644 --- a/engine/balance_filter_test.go +++ b/engine/balance_filter_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/balances.go b/engine/balances.go index 13f90de91..3bb76ed04 100644 --- a/engine/balances.go +++ b/engine/balances.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -52,10 +52,10 @@ type Balance struct { func (b *Balance) Equal(o *Balance) bool { if len(b.DestinationIDs) == 0 { - b.DestinationIDs = utils.StringMap{utils.ANY: true} + b.DestinationIDs = utils.StringMap{utils.MetaAny: true} } if len(o.DestinationIDs) == 0 { - o.DestinationIDs = utils.StringMap{utils.ANY: true} + o.DestinationIDs = utils.StringMap{utils.MetaAny: true} } return b.Uuid == o.Uuid && b.ID == o.ID && @@ -149,7 +149,7 @@ func (b *Balance) MatchCategory(category string) bool { } func (b *Balance) HasDestination() bool { - return len(b.DestinationIDs) > 0 && b.DestinationIDs[utils.ANY] == false + return len(b.DestinationIDs) > 0 && b.DestinationIDs[utils.MetaAny] == false } func (b *Balance) MatchDestination(destinationID string) bool { @@ -186,7 +186,7 @@ func (b *Balance) Clone() *Balance { } func (b *Balance) getMatchingPrefixAndDestID(dest string) (prefix, destID string) { - if len(b.DestinationIDs) != 0 && b.DestinationIDs[utils.ANY] == false { + if len(b.DestinationIDs) != 0 && b.DestinationIDs[utils.MetaAny] == false { for _, p := range utils.SplitPrefix(dest, MIN_PREFIX_MATCH) { if destIDs, err := dm.GetReverseDestination(p, true, true, utils.NonTransactional); err == nil { for _, dID := range destIDs { @@ -328,7 +328,7 @@ func (b *Balance) debitUnits(cd *CallDescriptor, ub *Account, moneyBalances Bala prefix = cd.Destination } if destid == "" { - destid = utils.ANY + destid = utils.MetaAny } ts.setRatingInfo(&RatingInfo{ MatchedSubject: b.Uuid, diff --git a/engine/balances_test.go b/engine/balances_test.go index b512abddb..624d9690a 100644 --- a/engine/balances_test.go +++ b/engine/balances_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/caches.go b/engine/caches.go index 28bd29e8d..28e4c83b8 100644 --- a/engine/caches.go +++ b/engine/caches.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/callcost.go b/engine/callcost.go index f51dfc587..369ce3fe0 100644 --- a/engine/callcost.go +++ b/engine/callcost.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/callcost_test.go b/engine/callcost_test.go index f352fd8b7..f8cfc91e3 100644 --- a/engine/callcost_test.go +++ b/engine/callcost_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -187,7 +187,7 @@ func TestCallCostToDataCostError(t *testing.T) { Category: "data", Tenant: "cgrates.org", Subject: "rif", - Destination: utils.ANY, + Destination: utils.MetaAny, TimeStart: time.Date(2014, 3, 4, 6, 0, 0, 0, time.UTC), TimeEnd: time.Date(2014, 3, 4, 6, 1, 5, 0, time.UTC), ToR: utils.VOICE, diff --git a/engine/calldesc.go b/engine/calldesc.go index 71998806e..dbad74519 100644 --- a/engine/calldesc.go +++ b/engine/calldesc.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -34,7 +34,7 @@ const ( // these might be better in the confs under optimizations section RECURSION_MAX_DEPTH = 3 MIN_PREFIX_MATCH = 1 - FALLBACK_SUBJECT = utils.ANY + FALLBACK_SUBJECT = utils.MetaAny ) var ( diff --git a/engine/calldesc_test.go b/engine/calldesc_test.go index 3c1fe0450..fc9918fbf 100644 --- a/engine/calldesc_test.go +++ b/engine/calldesc_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -1579,7 +1579,7 @@ func TestCDGetCostANY(t *testing.T) { Category: "data", Tenant: "cgrates.org", Subject: "rif", - Destination: utils.ANY, + Destination: utils.MetaAny, TimeStart: time.Date(2014, 3, 4, 6, 0, 0, 0, time.UTC), TimeEnd: time.Date(2014, 3, 4, 6, 0, 1, 0, time.UTC), ToR: utils.DATA, @@ -1595,7 +1595,7 @@ func TestCDSplitInDataSlots(t *testing.T) { Category: "data", Tenant: "cgrates.org", Subject: "rif", - Destination: utils.ANY, + Destination: utils.MetaAny, TimeStart: time.Date(2014, 3, 4, 6, 0, 0, 0, time.UTC), TimeEnd: time.Date(2014, 3, 4, 6, 1, 5, 0, time.UTC), ToR: utils.DATA, @@ -1614,7 +1614,7 @@ func TestCDDataGetCost(t *testing.T) { Category: "data", Tenant: "cgrates.org", Subject: "rif", - Destination: utils.ANY, + Destination: utils.MetaAny, TimeStart: time.Date(2014, 3, 4, 6, 0, 0, 0, time.UTC), TimeEnd: time.Date(2014, 3, 4, 6, 1, 5, 0, time.UTC), ToR: utils.DATA, diff --git a/engine/caps.go b/engine/caps.go index eb184b004..0fe6b4dbb 100644 --- a/engine/caps.go +++ b/engine/caps.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/caps_test.go b/engine/caps_test.go index d7af7ec42..cf1f705ca 100644 --- a/engine/caps_test.go +++ b/engine/caps_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/cdr.go b/engine/cdr.go index 64d27330e..4f06d94ee 100644 --- a/engine/cdr.go +++ b/engine/cdr.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/cdr_test.go b/engine/cdr_test.go index dfce9e791..8cf17a22a 100644 --- a/engine/cdr_test.go +++ b/engine/cdr_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/cdrs.go b/engine/cdrs.go index 2105b3472..43eb56801 100644 --- a/engine/cdrs.go +++ b/engine/cdrs.go @@ -6,7 +6,7 @@ it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License diff --git a/engine/cgrsafev.go b/engine/cgrsafev.go index 2aab02c4f..96522aa9c 100644 --- a/engine/cgrsafev.go +++ b/engine/cgrsafev.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOev. See the GNU General Public License for more details. diff --git a/engine/chargers.go b/engine/chargers.go index 54d971239..3ef37d82c 100644 --- a/engine/chargers.go +++ b/engine/chargers.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/chargers_test.go b/engine/chargers_test.go index 5d1ed7ae9..7bb101c10 100755 --- a/engine/chargers_test.go +++ b/engine/chargers_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/connmanager.go b/engine/connmanager.go index a5c63ae62..e5046f754 100644 --- a/engine/connmanager.go +++ b/engine/connmanager.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/datadbmock.go b/engine/datadbmock.go index ad1ab14ae..3a96341ff 100644 --- a/engine/datadbmock.go +++ b/engine/datadbmock.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/datamanager.go b/engine/datamanager.go index 6cdc28bb2..8cea625bf 100644 --- a/engine/datamanager.go +++ b/engine/datamanager.go @@ -6,7 +6,7 @@ it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License diff --git a/engine/destinations.go b/engine/destinations.go index 2be937a54..9a1e2a8cd 100644 --- a/engine/destinations.go +++ b/engine/destinations.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/destinations_test.go b/engine/destinations_test.go index 1f2650410..e2afe16fc 100644 --- a/engine/destinations_test.go +++ b/engine/destinations_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/dispatcherprfl.go b/engine/dispatcherprfl.go index d52926dee..27613cc30 100644 --- a/engine/dispatcherprfl.go +++ b/engine/dispatcherprfl.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/dispatcherprfl_test.go b/engine/dispatcherprfl_test.go index 38772212e..f7f1ac1e8 100644 --- a/engine/dispatcherprfl_test.go +++ b/engine/dispatcherprfl_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/dynamicdp.go b/engine/dynamicdp.go index 9972facad..9f61d99ad 100644 --- a/engine/dynamicdp.go +++ b/engine/dynamicdp.go @@ -6,7 +6,7 @@ it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License diff --git a/engine/eventcost.go b/engine/eventcost.go index cfb10c5dd..15b1613fe 100644 --- a/engine/eventcost.go +++ b/engine/eventcost.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/eventcost_test.go b/engine/eventcost_test.go index 4b5d9c69f..95aadbd3a 100644 --- a/engine/eventcost_test.go +++ b/engine/eventcost_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -1559,7 +1559,7 @@ func TestECMergeGT(t *testing.T) { }, RatingFilters: RatingFilters{ "216b0a5": RatingMatchedFilters{ - "DestinationID": utils.META_ANY, + "DestinationID": utils.MetaAny, "DestinationPrefix": "42502", "RatingPlanID": utils.MetaNone, "Subject": "9a767726-fe69-4940-b7bd-f43de9f0f8a5", @@ -1617,7 +1617,7 @@ func TestECMergeGT(t *testing.T) { }, RatingFilters: RatingFilters{ "17f7216": RatingMatchedFilters{ - "DestinationID": utils.META_ANY, + "DestinationID": utils.MetaAny, "DestinationPrefix": "42502", "RatingPlanID": utils.MetaNone, "Subject": "9a767726-fe69-4940-b7bd-f43de9f0f8a5", @@ -1676,7 +1676,7 @@ func TestECMergeGT(t *testing.T) { }, RatingFilters: RatingFilters{ "216b0a5": RatingMatchedFilters{ - "DestinationID": utils.META_ANY, + "DestinationID": utils.MetaAny, "DestinationPrefix": "42502", "RatingPlanID": utils.MetaNone, "Subject": "9a767726-fe69-4940-b7bd-f43de9f0f8a5", @@ -1731,7 +1731,7 @@ func TestECAppendCIlFromEC(t *testing.T) { }, RatingFilters: RatingFilters{ "216b0a5": RatingMatchedFilters{ - "DestinationID": utils.META_ANY, + "DestinationID": utils.MetaAny, "DestinationPrefix": "42502", "RatingPlanID": utils.MetaNone, "Subject": "9a767726-fe69-4940-b7bd-f43de9f0f8a5", @@ -1775,7 +1775,7 @@ func TestECAppendCIlFromEC(t *testing.T) { }, RatingFilters: RatingFilters{ "17f7216": RatingMatchedFilters{ - "DestinationID": utils.META_ANY, + "DestinationID": utils.MetaAny, "DestinationPrefix": "42502", "RatingPlanID": utils.MetaNone, "Subject": "9a767726-fe69-4940-b7bd-f43de9f0f8a5", @@ -1820,7 +1820,7 @@ func TestECAppendCIlFromEC(t *testing.T) { }, RatingFilters: RatingFilters{ "216b0a5": RatingMatchedFilters{ - "DestinationID": utils.META_ANY, + "DestinationID": utils.MetaAny, "DestinationPrefix": "42502", "RatingPlanID": utils.MetaNone, "Subject": "9a767726-fe69-4940-b7bd-f43de9f0f8a5", @@ -1869,7 +1869,7 @@ func TestECAppendCIlFromEC(t *testing.T) { }, RatingFilters: RatingFilters{ "216b0a5": RatingMatchedFilters{ - "DestinationID": utils.META_ANY, + "DestinationID": utils.MetaAny, "DestinationPrefix": "42502", "RatingPlanID": utils.MetaNone, "Subject": "9a767726-fe69-4940-b7bd-f43de9f0f8a5", @@ -1913,7 +1913,7 @@ func TestECAppendCIlFromEC(t *testing.T) { }, RatingFilters: RatingFilters{ "17f7216": RatingMatchedFilters{ - "DestinationID": utils.META_ANY, + "DestinationID": utils.MetaAny, "DestinationPrefix": "42502", "RatingPlanID": utils.MetaNone, "Subject": "9a767726-fe69-4940-b7bd-f43de9f0f8a5", @@ -1969,7 +1969,7 @@ func TestECAppendCIlFromEC(t *testing.T) { }, RatingFilters: RatingFilters{ "216b0a5": RatingMatchedFilters{ - "DestinationID": utils.META_ANY, + "DestinationID": utils.MetaAny, "DestinationPrefix": "42502", "RatingPlanID": utils.MetaNone, "Subject": "9a767726-fe69-4940-b7bd-f43de9f0f8a5", @@ -2029,7 +2029,7 @@ func TestECAppendCIlFromEC(t *testing.T) { }, RatingFilters: RatingFilters{ "216b0a5": RatingMatchedFilters{ - "DestinationID": utils.META_ANY, + "DestinationID": utils.MetaAny, "DestinationPrefix": "42502", "RatingPlanID": utils.MetaNone, "Subject": "9a767726-fe69-4940-b7bd-f43de9f0f8a5", @@ -2078,7 +2078,7 @@ func TestECAppendCIlFromEC(t *testing.T) { }, RatingFilters: RatingFilters{ "17f7216": RatingMatchedFilters{ - "DestinationID": utils.META_ANY, + "DestinationID": utils.MetaAny, "DestinationPrefix": "42502", "RatingPlanID": utils.MetaNone, "Subject": "9a767726-fe69-4940-b7bd-f43de9f0f8a5", @@ -2161,7 +2161,7 @@ func TestECAppendCIlFromEC(t *testing.T) { }, RatingFilters: RatingFilters{ "216b0a5": RatingMatchedFilters{ - "DestinationID": utils.META_ANY, + "DestinationID": utils.MetaAny, "DestinationPrefix": "42502", "RatingPlanID": utils.MetaNone, "Subject": "9a767726-fe69-4940-b7bd-f43de9f0f8a5", @@ -2210,7 +2210,7 @@ func TestECAppendCIlFromEC(t *testing.T) { }, RatingFilters: RatingFilters{ "216b0a5": RatingMatchedFilters{ - "DestinationID": utils.META_ANY, + "DestinationID": utils.MetaAny, "DestinationPrefix": "42502", "RatingPlanID": utils.MetaNone, "Subject": "9a767726-fe69-4940-b7bd-f43de9f0f8a5", @@ -2254,7 +2254,7 @@ func TestECAppendCIlFromEC(t *testing.T) { }, RatingFilters: RatingFilters{ "17f7216": RatingMatchedFilters{ - "DestinationID": utils.META_ANY, + "DestinationID": utils.MetaAny, "DestinationPrefix": "42502", "RatingPlanID": utils.MetaNone, "Subject": "9a767726-fe69-4940-b7bd-f43de9f0f8a5", @@ -2299,7 +2299,7 @@ func TestECAppendCIlFromEC(t *testing.T) { }, RatingFilters: RatingFilters{ "216b0a5": RatingMatchedFilters{ - "DestinationID": utils.META_ANY, + "DestinationID": utils.MetaAny, "DestinationPrefix": "42502", "RatingPlanID": utils.MetaNone, "Subject": "9a767726-fe69-4940-b7bd-f43de9f0f8a5", diff --git a/engine/filterhelpers.go b/engine/filterhelpers.go index a58099e5c..62f4d0654 100644 --- a/engine/filterhelpers.go +++ b/engine/filterhelpers.go @@ -28,7 +28,7 @@ import ( // MatchingItemIDsForEvent returns the list of item IDs matching fieldName/fieldValue for an event // fieldIDs limits the fields which are checked against indexes -// helper on top of dataDB.GetIndexes, adding utils.ANY to list of fields queried +// helper on top of dataDB.GetIndexes, adding utils.MetaAny to list of fields queried func MatchingItemIDsForEvent(ev utils.MapStorage, stringFldIDs, prefixFldIDs, suffixFldIDs *[]string, dm *DataManager, cacheID, itemIDPrefix string, indexedSelects, nestedFields bool) (itemIDs utils.StringSet, err error) { itemIDs = make(utils.StringSet) @@ -51,9 +51,9 @@ func MatchingItemIDsForEvent(ev utils.MapStorage, stringFldIDs, prefixFldIDs, su itemIDs = utils.NewStringSet(sliceIDs) return } - stringFieldVals := map[string]string{utils.ANY: utils.ANY} // cache here field string values, start with default one + stringFieldVals := map[string]string{utils.MetaAny: utils.MetaAny} // cache here field string values, start with default one filterIndexTypes := []string{utils.MetaString, utils.MetaPrefix, utils.MetaSuffix, utils.MetaNone} // the MetaNone is used for all items that do not have filters - for i, fieldIDs := range []*[]string{stringFldIDs, prefixFldIDs, suffixFldIDs, {utils.ANY}} { // same routine for both string and prefix filter types + for i, fieldIDs := range []*[]string{stringFldIDs, prefixFldIDs, suffixFldIDs, {utils.MetaAny}} { // same routine for both string and prefix filter types if fieldIDs == nil { fieldIDs = &allFieldIDs } diff --git a/engine/filters.go b/engine/filters.go index 38f94254f..e62356c3e 100644 --- a/engine/filters.go +++ b/engine/filters.go @@ -6,7 +6,7 @@ it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License diff --git a/engine/filters_test.go b/engine/filters_test.go index 322d064aa..21bef94c6 100644 --- a/engine/filters_test.go +++ b/engine/filters_test.go @@ -6,7 +6,7 @@ it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License diff --git a/engine/fscdr.go b/engine/fscdr.go index a4b4db6bf..90fc22585 100644 --- a/engine/fscdr.go +++ b/engine/fscdr.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/fscdr_test.go b/engine/fscdr_test.go index 9e1707210..5cb65da8e 100644 --- a/engine/fscdr_test.go +++ b/engine/fscdr_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/globalvars.go b/engine/globalvars.go index d2a19f379..001a90513 100644 --- a/engine/globalvars.go +++ b/engine/globalvars.go @@ -6,7 +6,7 @@ it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License diff --git a/engine/globalvars_test.go b/engine/globalvars_test.go index 98e23291e..44d98d101 100644 --- a/engine/globalvars_test.go +++ b/engine/globalvars_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/lib_test.go b/engine/lib_test.go index 30dbcdfd9..e19f061ed 100644 --- a/engine/lib_test.go +++ b/engine/lib_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/libattributes.go b/engine/libattributes.go index 960cb5510..c35edc11d 100644 --- a/engine/libattributes.go +++ b/engine/libattributes.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -137,7 +137,7 @@ func NewAttributeFromInline(tenant, inlnRule string) (attr *AttributeProfile, er attr = &AttributeProfile{ Tenant: tenant, ID: inlnRule, - Contexts: []string{utils.META_ANY}, + Contexts: []string{utils.MetaAny}, } for _, rule := range strings.Split(inlnRule, utils.INFIELD_SEP) { ruleSplt := strings.SplitN(rule, utils.InInFieldSep, 3) diff --git a/engine/libattributes_test.go b/engine/libattributes_test.go index f3840b1d6..13c578c25 100644 --- a/engine/libattributes_test.go +++ b/engine/libattributes_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -127,7 +127,7 @@ func TestNewAttributeFromInline(t *testing.T) { expAttrPrf1 := &AttributeProfile{ Tenant: config.CgrConfig().GeneralCfg().DefaultTenant, ID: attrID, - Contexts: []string{utils.META_ANY}, + Contexts: []string{utils.MetaAny}, Attributes: []*Attribute{{ Path: utils.MetaReq + utils.NestingSep + "Field2", Type: utils.MetaSum, @@ -147,7 +147,7 @@ func TestNewAttributeFromInlineWithMultipleRuns(t *testing.T) { expAttrPrf1 := &AttributeProfile{ Tenant: config.CgrConfig().GeneralCfg().DefaultTenant, ID: attrID, - Contexts: []string{utils.META_ANY}, + Contexts: []string{utils.MetaAny}, Attributes: []*Attribute{{ Path: utils.MetaReq + utils.NestingSep + "RequestType", Type: utils.META_CONSTANT, diff --git a/engine/libcdre.go b/engine/libcdre.go index 0b1c98c80..247023fd1 100644 --- a/engine/libcdre.go +++ b/engine/libcdre.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/libcdre_test.go b/engine/libcdre_test.go index fb93f3df8..a1ebdda12 100644 --- a/engine/libcdre_test.go +++ b/engine/libcdre_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/libchargers.go b/engine/libchargers.go index ec1b379f2..3943d3a18 100644 --- a/engine/libchargers.go +++ b/engine/libchargers.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/libengine.go b/engine/libengine.go index acabe6755..df69bad7d 100644 --- a/engine/libengine.go +++ b/engine/libengine.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/libeventcost.go b/engine/libeventcost.go index d98c8028e..8ae0d59e1 100644 --- a/engine/libeventcost.go +++ b/engine/libeventcost.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/libeventcost_test.go b/engine/libeventcost_test.go index 4f25e2b42..5e67f9771 100755 --- a/engine/libeventcost_test.go +++ b/engine/libeventcost_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/libindex.go b/engine/libindex.go index 96d2df79e..63ff9b6b7 100644 --- a/engine/libindex.go +++ b/engine/libindex.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -40,7 +40,7 @@ func newFilterIndex(dm *DataManager, idxItmType, tnt, ctx, itemID string, filter } indexes = make(map[string]utils.StringSet) if len(filterIDs) == 0 { // in case of None - idxKey := utils.ConcatenatedKey(utils.MetaNone, utils.META_ANY, utils.META_ANY) + idxKey := utils.ConcatenatedKey(utils.MetaNone, utils.MetaAny, utils.MetaAny) var rcvIndx map[string]utils.StringSet if rcvIndx, err = dm.GetIndexes(idxItmType, tntCtx, idxKey, diff --git a/engine/libroutes.go b/engine/libroutes.go index 8950d9283..675cde400 100644 --- a/engine/libroutes.go +++ b/engine/libroutes.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/libroutes_test.go b/engine/libroutes_test.go index 153c347cb..4d61165bd 100644 --- a/engine/libroutes_test.go +++ b/engine/libroutes_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/libstats.go b/engine/libstats.go index 9d4c68388..a2fcb2dc1 100644 --- a/engine/libstats.go +++ b/engine/libstats.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/libstats_test.go b/engine/libstats_test.go index d4b4270b9..872fa366a 100644 --- a/engine/libstats_test.go +++ b/engine/libstats_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/libtest.go b/engine/libtest.go index b220adc3a..31745a89f 100644 --- a/engine/libtest.go +++ b/engine/libtest.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/loader_csv_test.go b/engine/loader_csv_test.go index f46141d0a..185750887 100644 --- a/engine/loader_csv_test.go +++ b/engine/loader_csv_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -597,7 +597,7 @@ func TestLoadRatingPlans(t *testing.T) { t.Errorf("Expecting:\n%s\nReceived:\n%s", utils.ToIJSON(expected.Ratings), utils.ToIJSON(rplan.Ratings)) } anyTiming := &RITiming{ - ID: utils.ANY, + ID: utils.MetaAny, Years: utils.Years{}, Months: utils.Months{}, MonthDays: utils.MonthDays{}, @@ -605,7 +605,7 @@ func TestLoadRatingPlans(t *testing.T) { StartTime: "00:00:00", EndTime: "", cronString: "", - tag: utils.ANY, + tag: utils.MetaAny, } if !reflect.DeepEqual(csvr.ratingPlans["ANY_PLAN"].Timings["b9b78731"], anyTiming) { diff --git a/engine/mapevent.go b/engine/mapevent.go index 3b1f3a8d4..f59c1daed 100644 --- a/engine/mapevent.go +++ b/engine/mapevent.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/mapevent_test.go b/engine/mapevent_test.go index ed0a6c6db..fcc1e53d0 100644 --- a/engine/mapevent_test.go +++ b/engine/mapevent_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or56 (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/model_helpers.go b/engine/model_helpers.go index 3403e8f8c..a6601eaf3 100644 --- a/engine/model_helpers.go +++ b/engine/model_helpers.go @@ -9,7 +9,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/model_helpers_test.go b/engine/model_helpers_test.go index dc2102b9c..15a1d34dc 100644 --- a/engine/model_helpers_test.go +++ b/engine/model_helpers_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or56 (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/models.go b/engine/models.go index a7d6e1870..1dfb19c49 100644 --- a/engine/models.go +++ b/engine/models.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/models_test.go b/engine/models_test.go index 7b889f262..2c5775eb2 100644 --- a/engine/models_test.go +++ b/engine/models_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or56 (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/poster_test.go b/engine/poster_test.go index 4d9c69b69..38bd94d5a 100644 --- a/engine/poster_test.go +++ b/engine/poster_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/pstr_amqp.go b/engine/pstr_amqp.go index e70a452a6..217a8fadf 100644 --- a/engine/pstr_amqp.go +++ b/engine/pstr_amqp.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/pstr_amqpv1.go b/engine/pstr_amqpv1.go index 85b6305e5..d3122b961 100644 --- a/engine/pstr_amqpv1.go +++ b/engine/pstr_amqpv1.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/pstr_http.go b/engine/pstr_http.go index 1644c6def..f9b1edc7f 100644 --- a/engine/pstr_http.go +++ b/engine/pstr_http.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/pstr_kafka.go b/engine/pstr_kafka.go index fdcadfacb..024d8b6dd 100644 --- a/engine/pstr_kafka.go +++ b/engine/pstr_kafka.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/pstr_s3.go b/engine/pstr_s3.go index 4589a1121..4d17ae077 100644 --- a/engine/pstr_s3.go +++ b/engine/pstr_s3.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/pstr_sqs.go b/engine/pstr_sqs.go index e840c1975..be1cac127 100644 --- a/engine/pstr_sqs.go +++ b/engine/pstr_sqs.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/rateinterval.go b/engine/rateinterval.go index 2b8f7efb7..e7d45057d 100644 --- a/engine/rateinterval.go +++ b/engine/rateinterval.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/rateinterval_test.go b/engine/rateinterval_test.go index d39e995f7..f73a8c573 100644 --- a/engine/rateinterval_test.go +++ b/engine/rateinterval_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/rateprofile.go b/engine/rateprofile.go index 8999b4221..da2d1c63a 100644 --- a/engine/rateprofile.go +++ b/engine/rateprofile.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/rateprofile_test.go b/engine/rateprofile_test.go index 13ec1c646..6e9f454d1 100644 --- a/engine/rateprofile_test.go +++ b/engine/rateprofile_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/ratingplan_test.go b/engine/ratingplan_test.go index 988704175..81103202b 100644 --- a/engine/ratingplan_test.go +++ b/engine/ratingplan_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/ratingprofile.go b/engine/ratingprofile.go index 844fe68bd..70050d266 100644 --- a/engine/ratingprofile.go +++ b/engine/ratingprofile.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -169,12 +169,12 @@ func (rpf *RatingProfile) GetRatingPlansForPrefix(cd *CallDescriptor) (err error prefix := "" destinationID := "" var rps RateIntervalList - if cd.Destination == utils.ANY || cd.Destination == "" { - cd.Destination = utils.ANY - if _, ok := rpl.DestinationRates[utils.ANY]; ok { - rps = rpl.RateIntervalList(utils.ANY) - prefix = utils.ANY - destinationID = utils.ANY + if cd.Destination == utils.MetaAny || cd.Destination == "" { + cd.Destination = utils.MetaAny + if _, ok := rpl.DestinationRates[utils.MetaAny]; ok { + rps = rpl.RateIntervalList(utils.MetaAny) + prefix = utils.MetaAny + destinationID = utils.MetaAny } } else { for _, p := range utils.SplitPrefix(cd.Destination, MIN_PREFIX_MATCH) { @@ -208,10 +208,10 @@ func (rpf *RatingProfile) GetRatingPlansForPrefix(cd *CallDescriptor) (err error } } if rps == nil { // fallback on *any destination - if _, ok := rpl.DestinationRates[utils.ANY]; ok { - rps = rpl.RateIntervalList(utils.ANY) - prefix = utils.ANY - destinationID = utils.ANY + if _, ok := rpl.DestinationRates[utils.MetaAny]; ok { + rps = rpl.RateIntervalList(utils.MetaAny) + prefix = utils.MetaAny + destinationID = utils.MetaAny } } } @@ -260,7 +260,7 @@ type TenantRatingSubject struct { } func RatingProfileSubjectPrefixMatching(key string) (rp *RatingProfile, err error) { - if !getRpSubjectPrefixMatching() || strings.HasSuffix(key, utils.ANY) { + if !getRpSubjectPrefixMatching() || strings.HasSuffix(key, utils.MetaAny) { return dm.GetRatingProfile(key, false, utils.NonTransactional) } if rp, err = dm.GetRatingProfile(key, false, utils.NonTransactional); err == nil && rp != nil { // rp nil represents cached no-result diff --git a/engine/ratingprofile_test.go b/engine/ratingprofile_test.go index 0df479a81..4fab4953b 100644 --- a/engine/ratingprofile_test.go +++ b/engine/ratingprofile_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/resources.go b/engine/resources.go index 9c191a2fb..36f1d832a 100644 --- a/engine/resources.go +++ b/engine/resources.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/responder.go b/engine/responder.go index fa2652653..8cb8f690d 100644 --- a/engine/responder.go +++ b/engine/responder.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -53,7 +53,7 @@ func (rs *Responder) usageAllowed(tor string, reqUsage time.Duration) (allowed b rs.maxComputedUsageMutex.RLock() mcu, has := rs.MaxComputedUsage[tor] if !has { - mcu = rs.MaxComputedUsage[utils.ANY] + mcu = rs.MaxComputedUsage[utils.MetaAny] } rs.maxComputedUsageMutex.RUnlock() if reqUsage <= mcu { diff --git a/engine/responder_test.go b/engine/responder_test.go index 1e01710a6..b84d0d816 100644 --- a/engine/responder_test.go +++ b/engine/responder_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -127,8 +127,8 @@ func TestResponderGobSMCost(t *testing.T) { func TestResponderUsageAllow(t *testing.T) { rsp := &Responder{ MaxComputedUsage: map[string]time.Duration{ - utils.ANY: 10 * time.Second, - utils.VOICE: 20 * time.Second, + utils.MetaAny: 10 * time.Second, + utils.VOICE: 20 * time.Second, }, } if allow := rsp.usageAllowed(utils.VOICE, 17*time.Second); !allow { @@ -147,8 +147,8 @@ func TestResponderUsageAllow(t *testing.T) { func TestResponderGetCostMaxUsageANY(t *testing.T) { rsponder.MaxComputedUsage = map[string]time.Duration{ - utils.ANY: 10 * time.Second, - utils.VOICE: 20 * time.Second, + utils.MetaAny: 10 * time.Second, + utils.VOICE: 20 * time.Second, } tStart, _ := utils.ParseTimeDetectLayout("2013-08-07T17:30:00Z", "") tEnd, _ := utils.ParseTimeDetectLayout("2013-08-07T17:31:11Z", "") @@ -157,7 +157,7 @@ func TestResponderGetCostMaxUsageANY(t *testing.T) { Category: "call", Tenant: "cgrates.org", Subject: "dan", - ToR: utils.ANY, + ToR: utils.MetaAny, Account: "dan", Destination: "+4917621621391", DurationIndex: 9, @@ -174,8 +174,8 @@ func TestResponderGetCostMaxUsageANY(t *testing.T) { func TestResponderGetCostMaxUsageVOICE(t *testing.T) { rsponder.MaxComputedUsage = map[string]time.Duration{ - utils.ANY: 10 * time.Second, - utils.VOICE: 20 * time.Second, + utils.MetaAny: 10 * time.Second, + utils.VOICE: 20 * time.Second, } tStart, _ := utils.ParseTimeDetectLayout("2013-08-07T17:30:00Z", "") tEnd, _ := utils.ParseTimeDetectLayout("2013-08-07T17:31:21Z", "") @@ -201,8 +201,8 @@ func TestResponderGetCostMaxUsageVOICE(t *testing.T) { func TestResponderDebitMaxUsageANY(t *testing.T) { rsponder.MaxComputedUsage = map[string]time.Duration{ - utils.ANY: 10 * time.Second, - utils.VOICE: 20 * time.Second, + utils.MetaAny: 10 * time.Second, + utils.VOICE: 20 * time.Second, } tStart, _ := utils.ParseTimeDetectLayout("2013-08-07T17:30:00Z", "") tEnd, _ := utils.ParseTimeDetectLayout("2013-08-07T17:31:11Z", "") @@ -211,7 +211,7 @@ func TestResponderDebitMaxUsageANY(t *testing.T) { Category: "call", Tenant: "cgrates.org", Subject: "dan", - ToR: utils.ANY, + ToR: utils.MetaAny, Account: "dan", Destination: "+4917621621391", DurationIndex: 9, @@ -228,8 +228,8 @@ func TestResponderDebitMaxUsageANY(t *testing.T) { func TestResponderDebitMaxUsageVOICE(t *testing.T) { rsponder.MaxComputedUsage = map[string]time.Duration{ - utils.ANY: 10 * time.Second, - utils.VOICE: 20 * time.Second, + utils.MetaAny: 10 * time.Second, + utils.VOICE: 20 * time.Second, } tStart, _ := utils.ParseTimeDetectLayout("2013-08-07T17:30:00Z", "") tEnd, _ := utils.ParseTimeDetectLayout("2013-08-07T17:31:21Z", "") @@ -255,8 +255,8 @@ func TestResponderDebitMaxUsageVOICE(t *testing.T) { func TestResponderMaxDebitMaxUsageANY(t *testing.T) { rsponder.MaxComputedUsage = map[string]time.Duration{ - utils.ANY: 10 * time.Second, - utils.VOICE: 20 * time.Second, + utils.MetaAny: 10 * time.Second, + utils.VOICE: 20 * time.Second, } tStart, _ := utils.ParseTimeDetectLayout("2013-08-07T17:30:00Z", "") tEnd, _ := utils.ParseTimeDetectLayout("2013-08-07T17:31:11Z", "") @@ -265,7 +265,7 @@ func TestResponderMaxDebitMaxUsageANY(t *testing.T) { Category: "call", Tenant: "cgrates.org", Subject: "dan", - ToR: utils.ANY, + ToR: utils.MetaAny, Account: "dan", Destination: "+4917621621391", DurationIndex: 9, @@ -282,8 +282,8 @@ func TestResponderMaxDebitMaxUsageANY(t *testing.T) { func TestResponderMaxDebitMaxUsageVOICE(t *testing.T) { rsponder.MaxComputedUsage = map[string]time.Duration{ - utils.ANY: 10 * time.Second, - utils.VOICE: 20 * time.Second, + utils.MetaAny: 10 * time.Second, + utils.VOICE: 20 * time.Second, } tStart, _ := utils.ParseTimeDetectLayout("2013-08-07T17:30:00Z", "") tEnd, _ := utils.ParseTimeDetectLayout("2013-08-07T17:31:21Z", "") @@ -309,8 +309,8 @@ func TestResponderMaxDebitMaxUsageVOICE(t *testing.T) { func TestResponderRefundIncrementsMaxUsageANY(t *testing.T) { rsponder.MaxComputedUsage = map[string]time.Duration{ - utils.ANY: 10 * time.Second, - utils.VOICE: 20 * time.Second, + utils.MetaAny: 10 * time.Second, + utils.VOICE: 20 * time.Second, } tStart, _ := utils.ParseTimeDetectLayout("2013-08-07T17:30:00Z", "") tEnd, _ := utils.ParseTimeDetectLayout("2013-08-07T17:31:11Z", "") @@ -319,7 +319,7 @@ func TestResponderRefundIncrementsMaxUsageANY(t *testing.T) { Category: "call", Tenant: "cgrates.org", Subject: "dan", - ToR: utils.ANY, + ToR: utils.MetaAny, Account: "dan", Destination: "+4917621621391", DurationIndex: 9, @@ -336,8 +336,8 @@ func TestResponderRefundIncrementsMaxUsageANY(t *testing.T) { func TestResponderRefundIncrementsMaxUsageVOICE(t *testing.T) { rsponder.MaxComputedUsage = map[string]time.Duration{ - utils.ANY: 10 * time.Second, - utils.VOICE: 20 * time.Second, + utils.MetaAny: 10 * time.Second, + utils.VOICE: 20 * time.Second, } tStart, _ := utils.ParseTimeDetectLayout("2013-08-07T17:30:00Z", "") tEnd, _ := utils.ParseTimeDetectLayout("2013-08-07T17:31:21Z", "") @@ -363,8 +363,8 @@ func TestResponderRefundIncrementsMaxUsageVOICE(t *testing.T) { func TestResponderRefundRoundingMaxUsageANY(t *testing.T) { rsponder.MaxComputedUsage = map[string]time.Duration{ - utils.ANY: 10 * time.Second, - utils.VOICE: 20 * time.Second, + utils.MetaAny: 10 * time.Second, + utils.VOICE: 20 * time.Second, } tStart, _ := utils.ParseTimeDetectLayout("2013-08-07T17:30:00Z", "") tEnd, _ := utils.ParseTimeDetectLayout("2013-08-07T17:31:11Z", "") @@ -373,7 +373,7 @@ func TestResponderRefundRoundingMaxUsageANY(t *testing.T) { Category: "call", Tenant: "cgrates.org", Subject: "dan", - ToR: utils.ANY, + ToR: utils.MetaAny, Account: "dan", Destination: "+4917621621391", DurationIndex: 9, @@ -390,8 +390,8 @@ func TestResponderRefundRoundingMaxUsageANY(t *testing.T) { func TestResponderRefundRoundingMaxUsageVOICE(t *testing.T) { rsponder.MaxComputedUsage = map[string]time.Duration{ - utils.ANY: 10 * time.Second, - utils.VOICE: 20 * time.Second, + utils.MetaAny: 10 * time.Second, + utils.VOICE: 20 * time.Second, } tStart, _ := utils.ParseTimeDetectLayout("2013-08-07T17:30:00Z", "") tEnd, _ := utils.ParseTimeDetectLayout("2013-08-07T17:31:21Z", "") @@ -417,8 +417,8 @@ func TestResponderRefundRoundingMaxUsageVOICE(t *testing.T) { func TestResponderGetMaxSessionTimeMaxUsageANY(t *testing.T) { rsponder.MaxComputedUsage = map[string]time.Duration{ - utils.ANY: 10 * time.Second, - utils.VOICE: 20 * time.Second, + utils.MetaAny: 10 * time.Second, + utils.VOICE: 20 * time.Second, } tStart, _ := utils.ParseTimeDetectLayout("2013-08-07T17:30:00Z", "") tEnd, _ := utils.ParseTimeDetectLayout("2013-08-07T17:31:11Z", "") @@ -427,7 +427,7 @@ func TestResponderGetMaxSessionTimeMaxUsageANY(t *testing.T) { Category: "call", Tenant: "cgrates.org", Subject: "dan", - ToR: utils.ANY, + ToR: utils.MetaAny, Account: "dan", Destination: "+4917621621391", DurationIndex: 9, @@ -444,8 +444,8 @@ func TestResponderGetMaxSessionTimeMaxUsageANY(t *testing.T) { func TestResponderGetMaxSessionTimeMaxUsageVOICE(t *testing.T) { rsponder.MaxComputedUsage = map[string]time.Duration{ - utils.ANY: 10 * time.Second, - utils.VOICE: 20 * time.Second, + utils.MetaAny: 10 * time.Second, + utils.VOICE: 20 * time.Second, } tStart, _ := utils.ParseTimeDetectLayout("2013-08-07T17:30:00Z", "") tEnd, _ := utils.ParseTimeDetectLayout("2013-08-07T17:31:21Z", "") diff --git a/engine/route_highestcost.go b/engine/route_highestcost.go index 96553fb22..1226dc6b8 100755 --- a/engine/route_highestcost.go +++ b/engine/route_highestcost.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/route_leastcost.go b/engine/route_leastcost.go index a0c47b9bc..44944595c 100644 --- a/engine/route_leastcost.go +++ b/engine/route_leastcost.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/route_load_distribution.go b/engine/route_load_distribution.go index 9ad377355..aa131c1dc 100644 --- a/engine/route_load_distribution.go +++ b/engine/route_load_distribution.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/route_qos.go b/engine/route_qos.go index 3ebba1a85..029bbeba4 100755 --- a/engine/route_qos.go +++ b/engine/route_qos.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/route_reas.go b/engine/route_reas.go index 724c79072..5320d4eaf 100644 --- a/engine/route_reas.go +++ b/engine/route_reas.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/route_reds.go b/engine/route_reds.go index a381d80ea..4f25e16ea 100644 --- a/engine/route_reds.go +++ b/engine/route_reds.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/route_weight.go b/engine/route_weight.go index 9e36fc4b1..cc8f95a57 100755 --- a/engine/route_weight.go +++ b/engine/route_weight.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/routes.go b/engine/routes.go index ab57bc1b0..24772978c 100644 --- a/engine/routes.go +++ b/engine/routes.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/routes_test.go b/engine/routes_test.go index 63d6b9874..5cbc9a0d7 100644 --- a/engine/routes_test.go +++ b/engine/routes_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/safevent.go b/engine/safevent.go index 76fe0b28b..9c40ccec8 100644 --- a/engine/safevent.go +++ b/engine/safevent.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/safevent_test.go b/engine/safevent_test.go index 92ec420fb..3a32ef1e1 100644 --- a/engine/safevent_test.go +++ b/engine/safevent_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/sharedgroup.go b/engine/sharedgroup.go index 66778f608..b554b5a87 100644 --- a/engine/sharedgroup.go +++ b/engine/sharedgroup.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -88,7 +88,7 @@ func (sp *SharingParameters) Clone() *SharingParameters { } func (sg *SharedGroup) SortBalancesByStrategy(myBalance *Balance, bc Balances) Balances { - sharingParameters := sg.AccountParameters[utils.ANY] + sharingParameters := sg.AccountParameters[utils.MetaAny] if sp, hasParamsForAccount := sg.AccountParameters[myBalance.account.ID]; hasParamsForAccount { sharingParameters = sp } diff --git a/engine/sharedgroup_test.go b/engine/sharedgroup_test.go index d939c4184..21cd16654 100644 --- a/engine/sharedgroup_test.go +++ b/engine/sharedgroup_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/statmetrics.go b/engine/statmetrics.go index c2347b39f..90d9abaaf 100644 --- a/engine/statmetrics.go +++ b/engine/statmetrics.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/statmetrics_test.go b/engine/statmetrics_test.go index b5e486b45..be927b2f5 100644 --- a/engine/statmetrics_test.go +++ b/engine/statmetrics_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/stats.go b/engine/stats.go index 40cac0244..8261da4c5 100644 --- a/engine/stats.go +++ b/engine/stats.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/stats_test.go b/engine/stats_test.go index 2ad9d3c8a..2db2dab12 100644 --- a/engine/stats_test.go +++ b/engine/stats_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/storage_csv.go b/engine/storage_csv.go index 4fbe883f6..e59d16e5f 100644 --- a/engine/storage_csv.go +++ b/engine/storage_csv.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/storage_interface.go b/engine/storage_interface.go index 032d19c70..bd5c290d3 100644 --- a/engine/storage_interface.go +++ b/engine/storage_interface.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/storage_internal_datadb.go b/engine/storage_internal_datadb.go index d28d31c51..68e54f638 100644 --- a/engine/storage_internal_datadb.go +++ b/engine/storage_internal_datadb.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/storage_internal_stordb.go b/engine/storage_internal_stordb.go index c3701a8ee..0b7afafcd 100644 --- a/engine/storage_internal_stordb.go +++ b/engine/storage_internal_stordb.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/storage_mongo_datadb.go b/engine/storage_mongo_datadb.go index dcc59027c..be24af651 100644 --- a/engine/storage_mongo_datadb.go +++ b/engine/storage_mongo_datadb.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/storage_mongo_stordb.go b/engine/storage_mongo_stordb.go index ae12472ae..2ca3583e9 100644 --- a/engine/storage_mongo_stordb.go +++ b/engine/storage_mongo_stordb.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/storage_mysql.go b/engine/storage_mysql.go index ff6eaf70b..5abcaa6e7 100644 --- a/engine/storage_mysql.go +++ b/engine/storage_mysql.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/storage_postgres.go b/engine/storage_postgres.go index 1fa2c410f..23d479888 100644 --- a/engine/storage_postgres.go +++ b/engine/storage_postgres.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/storage_redis.go b/engine/storage_redis.go index 94b218f4c..95602dc02 100644 --- a/engine/storage_redis.go +++ b/engine/storage_redis.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/storage_sql.go b/engine/storage_sql.go index 1e1f315cc..decb254ba 100644 --- a/engine/storage_sql.go +++ b/engine/storage_sql.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/storage_test.go b/engine/storage_test.go index a283b6c80..15181e63f 100644 --- a/engine/storage_test.go +++ b/engine/storage_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/storage_utils.go b/engine/storage_utils.go index ad0b18978..8b35af58a 100644 --- a/engine/storage_utils.go +++ b/engine/storage_utils.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/suretax.go b/engine/suretax.go index 82d90f063..a0065c41e 100644 --- a/engine/suretax.go +++ b/engine/suretax.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/suretax_test.go b/engine/suretax_test.go index 0fd42ac4a..9a02ccce3 100644 --- a/engine/suretax_test.go +++ b/engine/suretax_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/task.go b/engine/task.go index c79725139..1a98e0ba1 100644 --- a/engine/task.go +++ b/engine/task.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/task_test.go b/engine/task_test.go index 1d515adad..58a722dd2 100644 --- a/engine/task_test.go +++ b/engine/task_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/thresholds.go b/engine/thresholds.go index 6f02e90ca..84533ff20 100644 --- a/engine/thresholds.go +++ b/engine/thresholds.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/thresholds_test.go b/engine/thresholds_test.go index 10bca7c90..ed07f2c3a 100644 --- a/engine/thresholds_test.go +++ b/engine/thresholds_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/timespans.go b/engine/timespans.go index 3403b0ec8..6869a13ef 100644 --- a/engine/timespans.go +++ b/engine/timespans.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/timespans_test.go b/engine/timespans_test.go index 9e42f245d..d9f0899ce 100644 --- a/engine/timespans_test.go +++ b/engine/timespans_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/tpexporter.go b/engine/tpexporter.go index e0ed0206c..7dcf55704 100644 --- a/engine/tpexporter.go +++ b/engine/tpexporter.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/tpimporter_csv.go b/engine/tpimporter_csv.go index 53c8e0aba..af3dc7f0b 100644 --- a/engine/tpimporter_csv.go +++ b/engine/tpimporter_csv.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/tpreader.go b/engine/tpreader.go index 6edbff0e6..a1243a1d7 100644 --- a/engine/tpreader.go +++ b/engine/tpreader.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -190,7 +190,7 @@ func (tpr *TpReader) LoadDestinationRates() (err error) { return fmt.Errorf("could not find rate for tag %v", dr.RateId) } dr.Rate = rate - destinationExists := dr.DestinationId == utils.ANY + destinationExists := dr.DestinationId == utils.MetaAny if !destinationExists { _, destinationExists = tpr.destinations[dr.DestinationId] } @@ -255,7 +255,7 @@ func (tpr *TpReader) LoadRatingPlansFiltered(tag string) (bool, error) { drate.Rate = rt[drate.RateId] ratingPlan.AddRateInterval(drate.DestinationId, GetRateInterval(rp, drate)) - if drate.DestinationId == utils.ANY { + if drate.DestinationId == utils.MetaAny { continue // no need of loading the destinations in this case } @@ -462,14 +462,14 @@ func (tpr *TpReader) LoadActions() (err error) { Filter: tpact.Filter, Balance: &BalanceFilter{}, } - if tpact.BalanceId != "" && tpact.BalanceId != utils.ANY { + if tpact.BalanceId != "" && tpact.BalanceId != utils.MetaAny { acts[idx].Balance.ID = utils.StringPointer(tpact.BalanceId) } - if tpact.BalanceType != "" && tpact.BalanceType != utils.ANY { + if tpact.BalanceType != "" && tpact.BalanceType != utils.MetaAny { acts[idx].Balance.Type = utils.StringPointer(tpact.BalanceType) } - if tpact.Units != "" && tpact.Units != utils.ANY { + if tpact.Units != "" && tpact.Units != utils.MetaAny { vf, err := utils.ParseBalanceFilterValue(tpact.BalanceType, tpact.Units) if err != nil { return err @@ -477,7 +477,7 @@ func (tpr *TpReader) LoadActions() (err error) { acts[idx].Balance.Value = vf } - if tpact.BalanceWeight != "" && tpact.BalanceWeight != utils.ANY { + if tpact.BalanceWeight != "" && tpact.BalanceWeight != utils.MetaAny { u, err := strconv.ParseFloat(tpact.BalanceWeight, 64) if err != nil { return err @@ -485,30 +485,30 @@ func (tpr *TpReader) LoadActions() (err error) { acts[idx].Balance.Weight = utils.Float64Pointer(u) } - if tpact.RatingSubject != "" && tpact.RatingSubject != utils.ANY { + if tpact.RatingSubject != "" && tpact.RatingSubject != utils.MetaAny { acts[idx].Balance.RatingSubject = utils.StringPointer(tpact.RatingSubject) } - if tpact.Categories != "" && tpact.Categories != utils.ANY { + if tpact.Categories != "" && tpact.Categories != utils.MetaAny { acts[idx].Balance.Categories = utils.StringMapPointer(utils.ParseStringMap(tpact.Categories)) } - if tpact.DestinationIds != "" && tpact.DestinationIds != utils.ANY { + if tpact.DestinationIds != "" && tpact.DestinationIds != utils.MetaAny { acts[idx].Balance.DestinationIDs = utils.StringMapPointer(utils.ParseStringMap(tpact.DestinationIds)) } - if tpact.SharedGroups != "" && tpact.SharedGroups != utils.ANY { + if tpact.SharedGroups != "" && tpact.SharedGroups != utils.MetaAny { acts[idx].Balance.SharedGroups = utils.StringMapPointer(utils.ParseStringMap(tpact.SharedGroups)) } - if tpact.TimingTags != "" && tpact.TimingTags != utils.ANY { + if tpact.TimingTags != "" && tpact.TimingTags != utils.MetaAny { acts[idx].Balance.TimingIDs = utils.StringMapPointer(utils.ParseStringMap(tpact.TimingTags)) } - if tpact.BalanceBlocker != "" && tpact.BalanceBlocker != utils.ANY { + if tpact.BalanceBlocker != "" && tpact.BalanceBlocker != utils.MetaAny { u, err := strconv.ParseBool(tpact.BalanceBlocker) if err != nil { return err } acts[idx].Balance.Blocker = utils.BoolPointer(u) } - if tpact.BalanceDisabled != "" && tpact.BalanceDisabled != utils.ANY { + if tpact.BalanceDisabled != "" && tpact.BalanceDisabled != utils.MetaAny { u, err := strconv.ParseBool(tpact.BalanceDisabled) if err != nil { return err @@ -632,52 +632,52 @@ func (tpr *TpReader) LoadActionTriggers() (err error) { Weight: atr.Weight, ActionsID: atr.ActionsId, } - if atr.BalanceId != "" && atr.BalanceId != utils.ANY { + if atr.BalanceId != "" && atr.BalanceId != utils.MetaAny { atrs[idx].Balance.ID = utils.StringPointer(atr.BalanceId) } - if atr.BalanceType != "" && atr.BalanceType != utils.ANY { + if atr.BalanceType != "" && atr.BalanceType != utils.MetaAny { atrs[idx].Balance.Type = utils.StringPointer(atr.BalanceType) } - if atr.BalanceWeight != "" && atr.BalanceWeight != utils.ANY { + if atr.BalanceWeight != "" && atr.BalanceWeight != utils.MetaAny { u, err := strconv.ParseFloat(atr.BalanceWeight, 64) if err != nil { return err } atrs[idx].Balance.Weight = utils.Float64Pointer(u) } - if atr.BalanceExpirationDate != "" && atr.BalanceExpirationDate != utils.ANY && atr.ExpirationDate != utils.UNLIMITED { + if atr.BalanceExpirationDate != "" && atr.BalanceExpirationDate != utils.MetaAny && atr.ExpirationDate != utils.UNLIMITED { u, err := utils.ParseTimeDetectLayout(atr.BalanceExpirationDate, tpr.timezone) if err != nil { return err } atrs[idx].Balance.ExpirationDate = utils.TimePointer(u) } - if atr.BalanceRatingSubject != "" && atr.BalanceRatingSubject != utils.ANY { + if atr.BalanceRatingSubject != "" && atr.BalanceRatingSubject != utils.MetaAny { atrs[idx].Balance.RatingSubject = utils.StringPointer(atr.BalanceRatingSubject) } - if atr.BalanceCategories != "" && atr.BalanceCategories != utils.ANY { + if atr.BalanceCategories != "" && atr.BalanceCategories != utils.MetaAny { atrs[idx].Balance.Categories = utils.StringMapPointer(utils.ParseStringMap(atr.BalanceCategories)) } - if atr.BalanceDestinationIds != "" && atr.BalanceDestinationIds != utils.ANY { + if atr.BalanceDestinationIds != "" && atr.BalanceDestinationIds != utils.MetaAny { atrs[idx].Balance.DestinationIDs = utils.StringMapPointer(utils.ParseStringMap(atr.BalanceDestinationIds)) } - if atr.BalanceSharedGroups != "" && atr.BalanceSharedGroups != utils.ANY { + if atr.BalanceSharedGroups != "" && atr.BalanceSharedGroups != utils.MetaAny { atrs[idx].Balance.SharedGroups = utils.StringMapPointer(utils.ParseStringMap(atr.BalanceSharedGroups)) } - if atr.BalanceTimingTags != "" && atr.BalanceTimingTags != utils.ANY { + if atr.BalanceTimingTags != "" && atr.BalanceTimingTags != utils.MetaAny { atrs[idx].Balance.TimingIDs = utils.StringMapPointer(utils.ParseStringMap(atr.BalanceTimingTags)) } - if atr.BalanceBlocker != "" && atr.BalanceBlocker != utils.ANY { + if atr.BalanceBlocker != "" && atr.BalanceBlocker != utils.MetaAny { u, err := strconv.ParseBool(atr.BalanceBlocker) if err != nil { return err } atrs[idx].Balance.Blocker = utils.BoolPointer(u) } - if atr.BalanceDisabled != "" && atr.BalanceDisabled != utils.ANY { + if atr.BalanceDisabled != "" && atr.BalanceDisabled != utils.MetaAny { u, err := strconv.ParseBool(atr.BalanceDisabled) if err != nil { return err @@ -835,52 +835,52 @@ func (tpr *TpReader) LoadAccountActionsFiltered(qriedAA *utils.TPAccountActions) Weight: atr.Weight, ActionsID: atr.ActionsId, } - if atr.BalanceId != "" && atr.BalanceId != utils.ANY { + if atr.BalanceId != "" && atr.BalanceId != utils.MetaAny { atrs[idx].Balance.ID = utils.StringPointer(atr.BalanceId) } - if atr.BalanceType != "" && atr.BalanceType != utils.ANY { + if atr.BalanceType != "" && atr.BalanceType != utils.MetaAny { atrs[idx].Balance.Type = utils.StringPointer(atr.BalanceType) } - if atr.BalanceWeight != "" && atr.BalanceWeight != utils.ANY { + if atr.BalanceWeight != "" && atr.BalanceWeight != utils.MetaAny { u, err := strconv.ParseFloat(atr.BalanceWeight, 64) if err != nil { return err } atrs[idx].Balance.Weight = utils.Float64Pointer(u) } - if atr.BalanceExpirationDate != "" && atr.BalanceExpirationDate != utils.ANY && atr.ExpirationDate != utils.UNLIMITED { + if atr.BalanceExpirationDate != "" && atr.BalanceExpirationDate != utils.MetaAny && atr.ExpirationDate != utils.UNLIMITED { u, err := utils.ParseTimeDetectLayout(atr.BalanceExpirationDate, tpr.timezone) if err != nil { return err } atrs[idx].Balance.ExpirationDate = utils.TimePointer(u) } - if atr.BalanceRatingSubject != "" && atr.BalanceRatingSubject != utils.ANY { + if atr.BalanceRatingSubject != "" && atr.BalanceRatingSubject != utils.MetaAny { atrs[idx].Balance.RatingSubject = utils.StringPointer(atr.BalanceRatingSubject) } - if atr.BalanceCategories != "" && atr.BalanceCategories != utils.ANY { + if atr.BalanceCategories != "" && atr.BalanceCategories != utils.MetaAny { atrs[idx].Balance.Categories = utils.StringMapPointer(utils.ParseStringMap(atr.BalanceCategories)) } - if atr.BalanceDestinationIds != "" && atr.BalanceDestinationIds != utils.ANY { + if atr.BalanceDestinationIds != "" && atr.BalanceDestinationIds != utils.MetaAny { atrs[idx].Balance.DestinationIDs = utils.StringMapPointer(utils.ParseStringMap(atr.BalanceDestinationIds)) } - if atr.BalanceSharedGroups != "" && atr.BalanceSharedGroups != utils.ANY { + if atr.BalanceSharedGroups != "" && atr.BalanceSharedGroups != utils.MetaAny { atrs[idx].Balance.SharedGroups = utils.StringMapPointer(utils.ParseStringMap(atr.BalanceSharedGroups)) } - if atr.BalanceTimingTags != "" && atr.BalanceTimingTags != utils.ANY { + if atr.BalanceTimingTags != "" && atr.BalanceTimingTags != utils.MetaAny { atrs[idx].Balance.TimingIDs = utils.StringMapPointer(utils.ParseStringMap(atr.BalanceTimingTags)) } - if atr.BalanceBlocker != "" && atr.BalanceBlocker != utils.ANY { + if atr.BalanceBlocker != "" && atr.BalanceBlocker != utils.MetaAny { u, err := strconv.ParseBool(atr.BalanceBlocker) if err != nil { return err } atrs[idx].Balance.Blocker = utils.BoolPointer(u) } - if atr.BalanceDisabled != "" && atr.BalanceDisabled != utils.ANY { + if atr.BalanceDisabled != "" && atr.BalanceDisabled != utils.MetaAny { u, err := strconv.ParseBool(atr.BalanceDisabled) if err != nil { return err @@ -938,14 +938,14 @@ func (tpr *TpReader) LoadAccountActionsFiltered(qriedAA *utils.TPAccountActions) Filter: tpact.Filter, Balance: &BalanceFilter{}, } - if tpact.BalanceId != "" && tpact.BalanceId != utils.ANY { + if tpact.BalanceId != "" && tpact.BalanceId != utils.MetaAny { acts[idx].Balance.ID = utils.StringPointer(tpact.BalanceId) } - if tpact.BalanceType != "" && tpact.BalanceType != utils.ANY { + if tpact.BalanceType != "" && tpact.BalanceType != utils.MetaAny { acts[idx].Balance.Type = utils.StringPointer(tpact.BalanceType) } - if tpact.Units != "" && tpact.Units != utils.ANY { + if tpact.Units != "" && tpact.Units != utils.MetaAny { vf, err := utils.ParseBalanceFilterValue(tpact.BalanceType, tpact.Units) if err != nil { return err @@ -953,37 +953,37 @@ func (tpr *TpReader) LoadAccountActionsFiltered(qriedAA *utils.TPAccountActions) acts[idx].Balance.Value = vf } - if tpact.BalanceWeight != "" && tpact.BalanceWeight != utils.ANY { + if tpact.BalanceWeight != "" && tpact.BalanceWeight != utils.MetaAny { u, err := strconv.ParseFloat(tpact.BalanceWeight, 64) if err != nil { return err } acts[idx].Balance.Weight = utils.Float64Pointer(u) } - if tpact.RatingSubject != "" && tpact.RatingSubject != utils.ANY { + if tpact.RatingSubject != "" && tpact.RatingSubject != utils.MetaAny { acts[idx].Balance.RatingSubject = utils.StringPointer(tpact.RatingSubject) } - if tpact.Categories != "" && tpact.Categories != utils.ANY { + if tpact.Categories != "" && tpact.Categories != utils.MetaAny { acts[idx].Balance.Categories = utils.StringMapPointer(utils.ParseStringMap(tpact.Categories)) } - if tpact.DestinationIds != "" && tpact.DestinationIds != utils.ANY { + if tpact.DestinationIds != "" && tpact.DestinationIds != utils.MetaAny { acts[idx].Balance.DestinationIDs = utils.StringMapPointer(utils.ParseStringMap(tpact.DestinationIds)) } - if tpact.SharedGroups != "" && tpact.SharedGroups != utils.ANY { + if tpact.SharedGroups != "" && tpact.SharedGroups != utils.MetaAny { acts[idx].Balance.SharedGroups = utils.StringMapPointer(utils.ParseStringMap(tpact.SharedGroups)) } - if tpact.TimingTags != "" && tpact.TimingTags != utils.ANY { + if tpact.TimingTags != "" && tpact.TimingTags != utils.MetaAny { acts[idx].Balance.TimingIDs = utils.StringMapPointer(utils.ParseStringMap(tpact.TimingTags)) } - if tpact.BalanceBlocker != "" && tpact.BalanceBlocker != utils.ANY { + if tpact.BalanceBlocker != "" && tpact.BalanceBlocker != utils.MetaAny { u, err := strconv.ParseBool(tpact.BalanceBlocker) if err != nil { return err } acts[idx].Balance.Blocker = utils.BoolPointer(u) } - if tpact.BalanceDisabled != "" && tpact.BalanceDisabled != utils.ANY { + if tpact.BalanceDisabled != "" && tpact.BalanceDisabled != utils.MetaAny { u, err := strconv.ParseBool(tpact.BalanceDisabled) if err != nil { return err @@ -2736,8 +2736,8 @@ func (tpr *TpReader) ReloadScheduler(verbose bool) (err error) { } func (tpr *TpReader) addDefaultTimings() { - tpr.timings[utils.ANY] = &utils.TPTiming{ - ID: utils.ANY, + tpr.timings[utils.MetaAny] = &utils.TPTiming{ + ID: utils.MetaAny, Years: utils.Years{}, Months: utils.Months{}, MonthDays: utils.MonthDays{}, diff --git a/engine/units_counter.go b/engine/units_counter.go index 45f824509..77f883c7c 100644 --- a/engine/units_counter.go +++ b/engine/units_counter.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/units_counter_test.go b/engine/units_counter_test.go index 3fbc68d9c..8ba8e84c9 100644 --- a/engine/units_counter_test.go +++ b/engine/units_counter_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/version.go b/engine/version.go index 1e2194c7b..35587b93e 100644 --- a/engine/version.go +++ b/engine/version.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/version_test.go b/engine/version_test.go index 9d4ab7954..8fade309d 100644 --- a/engine/version_test.go +++ b/engine/version_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/z_actions2_it_test.go b/engine/z_actions2_it_test.go index 5ddd5cec0..7ead7a302 100644 --- a/engine/z_actions2_it_test.go +++ b/engine/z_actions2_it_test.go @@ -10,7 +10,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/z_actions_it_test.go b/engine/z_actions_it_test.go index d53e094e9..eff069f7b 100644 --- a/engine/z_actions_it_test.go +++ b/engine/z_actions_it_test.go @@ -10,7 +10,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/z_attributes_test.go b/engine/z_attributes_test.go index 46875a4f4..dfb3c2155 100644 --- a/engine/z_attributes_test.go +++ b/engine/z_attributes_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -456,7 +456,7 @@ func TestAttributeIndexer(t *testing.T) { attrPrf := &AttributeProfile{ Tenant: "cgrates.org", ID: "AttrPrf", - Contexts: []string{utils.META_ANY}, + Contexts: []string{utils.MetaAny}, FilterIDs: []string{"*string:~*req.Account:1007"}, ActivationInterval: &utils.ActivationInterval{ ActivationTime: time.Date(2014, 7, 14, 14, 25, 0, 0, time.UTC), @@ -479,7 +479,7 @@ func TestAttributeIndexer(t *testing.T) { }, } if rcvIdx, err := dmAtr.GetIndexes(utils.CacheAttributeFilterIndexes, - utils.ConcatenatedKey(attrPrf.Tenant, utils.META_ANY), "", false, false); err != nil { + utils.ConcatenatedKey(attrPrf.Tenant, utils.MetaAny), "", false, false); err != nil { t.Error(err) } else { if !reflect.DeepEqual(eIdxes, rcvIdx) { @@ -503,7 +503,7 @@ func TestAttributeIndexer(t *testing.T) { } //verify if old index was deleted ( context *any) if _, err := dmAtr.GetIndexes(utils.CacheAttributeFilterIndexes, - utils.ConcatenatedKey(attrPrf.Tenant, utils.META_ANY), "", false, false); err != utils.ErrNotFound { + utils.ConcatenatedKey(attrPrf.Tenant, utils.MetaAny), "", false, false); err != utils.ErrNotFound { t.Error(err) } } @@ -1261,7 +1261,7 @@ func TestAttributeAttributeFilterIDs(t *testing.T) { attrPrf1 := &AttributeProfile{ Tenant: config.CgrConfig().GeneralCfg().DefaultTenant, ID: "ATTR_1", - Contexts: []string{utils.META_ANY}, + Contexts: []string{utils.MetaAny}, ActivationInterval: &utils.ActivationInterval{ ActivationTime: time.Date(2014, 7, 14, 14, 25, 0, 0, time.UTC), }, @@ -1958,7 +1958,7 @@ func TestGetAttributeProfileFromInline(t *testing.T) { expAttrPrf1 := &AttributeProfile{ Tenant: config.CgrConfig().GeneralCfg().DefaultTenant, ID: attrID, - Contexts: []string{utils.META_ANY}, + Contexts: []string{utils.MetaAny}, Attributes: []*Attribute{{ Path: utils.MetaReq + utils.NestingSep + "Field2", Type: utils.MetaSum, diff --git a/engine/z_cdr_it_test.go b/engine/z_cdr_it_test.go index 7f7c04f1c..e60d73126 100644 --- a/engine/z_cdr_it_test.go +++ b/engine/z_cdr_it_test.go @@ -10,7 +10,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/z_datamanager_it_test.go b/engine/z_datamanager_it_test.go index c97586168..a1beabf50 100644 --- a/engine/z_datamanager_it_test.go +++ b/engine/z_datamanager_it_test.go @@ -10,7 +10,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/z_filterhelpers_test.go b/engine/z_filterhelpers_test.go index cbe846377..be5369837 100644 --- a/engine/z_filterhelpers_test.go +++ b/engine/z_filterhelpers_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/z_filterindexer_it_test.go b/engine/z_filterindexer_it_test.go index 66ec6568b..18ff35641 100644 --- a/engine/z_filterindexer_it_test.go +++ b/engine/z_filterindexer_it_test.go @@ -10,7 +10,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -144,7 +144,7 @@ func testITSetFilterIndexes(t *testing.T) { "RL2": struct{}{}, "RL3": struct{}{}, }, - utils.ConcatenatedKey(utils.MetaNone, utils.ANY, utils.ANY): { + utils.ConcatenatedKey(utils.MetaNone, utils.MetaAny, utils.MetaAny): { "RL4": struct{}{}, "RL5": struct{}{}, }, @@ -171,7 +171,7 @@ func testITGetFilterIndexes(t *testing.T) { "RL2": struct{}{}, "RL3": struct{}{}, }, - utils.ConcatenatedKey(utils.MetaNone, utils.ANY, utils.ANY): { + utils.ConcatenatedKey(utils.MetaNone, utils.MetaAny, utils.MetaAny): { "RL4": struct{}{}, "RL5": struct{}{}, }, @@ -910,7 +910,7 @@ func testITTestStoreFilterIndexesWithTransID(t *testing.T) { "RL3": struct{}{}, }, utils.ConcatenatedKey(utils.MetaNone, - utils.ANY, utils.ANY): { + utils.MetaAny, utils.MetaAny): { "RL4": struct{}{}, "RL5": struct{}{}, }, @@ -941,7 +941,7 @@ func testITTestStoreFilterIndexesWithTransID(t *testing.T) { "RL3": struct{}{}, }, utils.ConcatenatedKey(utils.MetaNone, - utils.ANY, utils.ANY): { + utils.MetaAny, utils.MetaAny): { "RL4": struct{}{}, "RL5": struct{}{}, }, @@ -1047,7 +1047,7 @@ func testITTestIndexingWithEmptyFltrID(t *testing.T) { } if rcvMp, err := dataManager.GetIndexes( utils.CacheThresholdFilterIndexes, th.Tenant, - utils.ConcatenatedKey(utils.MetaNone, utils.META_ANY, utils.META_ANY), + utils.ConcatenatedKey(utils.MetaNone, utils.MetaAny, utils.MetaAny), true, true); err != nil { t.Error(err) } else if !reflect.DeepEqual(eMp, rcvMp) { @@ -1132,7 +1132,7 @@ func testITTestIndexingWithEmptyFltrID2(t *testing.T) { } if rcvMp, err := dataManager.GetIndexes( utils.CacheRouteFilterIndexes, splProfile.Tenant, - utils.ConcatenatedKey(utils.MetaNone, utils.META_ANY, utils.META_ANY), + utils.ConcatenatedKey(utils.MetaNone, utils.MetaAny, utils.MetaAny), true, true); err != nil { t.Error(err) } else if !reflect.DeepEqual(eMp, rcvMp) { diff --git a/engine/z_libcdre_it_test.go b/engine/z_libcdre_it_test.go index 9677cb747..1f619da71 100644 --- a/engine/z_libcdre_it_test.go +++ b/engine/z_libcdre_it_test.go @@ -10,7 +10,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/z_loader_it_test.go b/engine/z_loader_it_test.go index 0933f5856..c23865753 100644 --- a/engine/z_loader_it_test.go +++ b/engine/z_loader_it_test.go @@ -10,7 +10,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/z_onstor_it_test.go b/engine/z_onstor_it_test.go index 47b9aeab4..27bf749bd 100644 --- a/engine/z_onstor_it_test.go +++ b/engine/z_onstor_it_test.go @@ -10,7 +10,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/z_poster_it_test.go b/engine/z_poster_it_test.go index 1d590736f..dedbdb1e5 100644 --- a/engine/z_poster_it_test.go +++ b/engine/z_poster_it_test.go @@ -10,7 +10,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/z_resources_test.go b/engine/z_resources_test.go index 1092f54f3..8f0071c63 100644 --- a/engine/z_resources_test.go +++ b/engine/z_resources_test.go @@ -8,7 +8,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/z_storage_cdrs_it_test.go b/engine/z_storage_cdrs_it_test.go index 04146d39d..52c65a1df 100644 --- a/engine/z_storage_cdrs_it_test.go +++ b/engine/z_storage_cdrs_it_test.go @@ -10,7 +10,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/z_stordb_it_test.go b/engine/z_stordb_it_test.go index 84e4b7db3..9a1e74d5c 100644 --- a/engine/z_stordb_it_test.go +++ b/engine/z_stordb_it_test.go @@ -10,7 +10,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/engine/z_versions_it_test.go b/engine/z_versions_it_test.go index 00ab28ff2..bdd2ffd64 100644 --- a/engine/z_versions_it_test.go +++ b/engine/z_versions_it_test.go @@ -10,7 +10,7 @@ the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of +but WITHOUT MetaAny WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/general_tests/attributes_it_test.go b/general_tests/attributes_it_test.go index 01f92b5b5..12a32aa47 100644 --- a/general_tests/attributes_it_test.go +++ b/general_tests/attributes_it_test.go @@ -178,7 +178,7 @@ func testAttributeSProcessEventWithAccount(t *testing.T) { AttributeProfile: &engine.AttributeProfile{ Tenant: "cgrates.org", ID: "ATTR_ACCOUNT", - Contexts: []string{utils.META_ANY}, + Contexts: []string{utils.MetaAny}, FilterIDs: []string{"*string:~*req.EventName:AddAccountInfo"}, ActivationInterval: &utils.ActivationInterval{ ActivationTime: time.Date(2014, 7, 14, 14, 35, 0, 0, time.UTC), @@ -262,7 +262,7 @@ func testAttributeSProcessEventWithAccountFull(t *testing.T) { AttributeProfile: &engine.AttributeProfile{ Tenant: "cgrates.org", ID: "ATTR_ACCOUNT2", - Contexts: []string{utils.META_ANY}, + Contexts: []string{utils.MetaAny}, FilterIDs: []string{"*string:~*req.EventName:AddFullAccount"}, ActivationInterval: &utils.ActivationInterval{ ActivationTime: time.Date(2014, 7, 14, 14, 35, 0, 0, time.UTC), @@ -396,7 +396,7 @@ func testAttributeSProcessEventWithStat(t *testing.T) { AttributeProfile: &engine.AttributeProfile{ Tenant: "cgrates.org", ID: "ATTR_STATS", - Contexts: []string{utils.META_ANY}, + Contexts: []string{utils.MetaAny}, FilterIDs: []string{"*string:~*req.EventName:AddStatEvent"}, ActivationInterval: &utils.ActivationInterval{ ActivationTime: time.Date(2014, 7, 14, 14, 35, 0, 0, time.UTC), @@ -480,7 +480,7 @@ func testAttributeSProcessEventWithStatFull(t *testing.T) { AttributeProfile: &engine.AttributeProfile{ Tenant: "cgrates.org", ID: "ATTR_STATS2", - Contexts: []string{utils.META_ANY}, + Contexts: []string{utils.MetaAny}, FilterIDs: []string{"*string:~*req.EventName:AddFullStats"}, ActivationInterval: &utils.ActivationInterval{ ActivationTime: time.Date(2014, 7, 14, 14, 35, 0, 0, time.UTC), @@ -628,7 +628,7 @@ func testAttributeSProcessEventWithResource(t *testing.T) { AttributeProfile: &engine.AttributeProfile{ Tenant: "cgrates.org", ID: "ATTR_RESOURCE", - Contexts: []string{utils.META_ANY}, + Contexts: []string{utils.MetaAny}, FilterIDs: []string{"*string:~*req.EventName:AddResourceUsages"}, ActivationInterval: &utils.ActivationInterval{ ActivationTime: time.Date(2014, 7, 14, 14, 35, 0, 0, time.UTC), @@ -712,7 +712,7 @@ func testAttributeSProcessEventWithResourceFull(t *testing.T) { AttributeProfile: &engine.AttributeProfile{ Tenant: "cgrates.org", ID: "ATTR_RESOURCE2", - Contexts: []string{utils.META_ANY}, + Contexts: []string{utils.MetaAny}, FilterIDs: []string{"*string:~*req.EventName:AddFullResource"}, ActivationInterval: &utils.ActivationInterval{ ActivationTime: time.Date(2014, 7, 14, 14, 35, 0, 0, time.UTC), @@ -807,7 +807,7 @@ func testAttributeSProcessEventWithLibPhoneNumber(t *testing.T) { AttributeProfile: &engine.AttributeProfile{ Tenant: "cgrates.org", ID: "ATTR_LIBPHONENUMBER2", - Contexts: []string{utils.META_ANY}, + Contexts: []string{utils.MetaAny}, FilterIDs: []string{"*string:~*req.EventName:AddDestinationCarrier"}, ActivationInterval: &utils.ActivationInterval{ ActivationTime: time.Date(2014, 7, 14, 14, 35, 0, 0, time.UTC), @@ -893,7 +893,7 @@ func testAttributeSProcessEventWithLibPhoneNumberComposed(t *testing.T) { AttributeProfile: &engine.AttributeProfile{ Tenant: "cgrates.org", ID: "ATTR_LIBPHONENUMBER_COMPOSED", - Contexts: []string{utils.META_ANY}, + Contexts: []string{utils.MetaAny}, FilterIDs: []string{"*string:~*req.EventName:AddComposedInfo"}, ActivationInterval: &utils.ActivationInterval{ ActivationTime: time.Date(2014, 7, 14, 14, 35, 0, 0, time.UTC), @@ -997,7 +997,7 @@ func testAttributeSProcessEventWithLibPhoneNumberFull(t *testing.T) { AttributeProfile: &engine.AttributeProfile{ Tenant: "cgrates.org", ID: "ATTR_LIBPHONENUMBER", - Contexts: []string{utils.META_ANY}, + Contexts: []string{utils.MetaAny}, FilterIDs: []string{"*string:~*req.EventName:AddDestinationDetails"}, ActivationInterval: &utils.ActivationInterval{ ActivationTime: time.Date(2014, 7, 14, 14, 35, 0, 0, time.UTC), diff --git a/general_tests/cdrs_processevent_it_test.go b/general_tests/cdrs_processevent_it_test.go index bd25b605c..d695a3a1b 100644 --- a/general_tests/cdrs_processevent_it_test.go +++ b/general_tests/cdrs_processevent_it_test.go @@ -178,7 +178,7 @@ func testV1CDRsProcessEventAttrS(t *testing.T) { AttributeProfile: &engine.AttributeProfile{ Tenant: "cgrates.org", ID: "ApierTest", - Contexts: []string{utils.META_ANY}, + Contexts: []string{utils.MetaAny}, FilterIDs: []string{"*string:~*req.Account:1001"}, Attributes: []*engine.Attribute{ { diff --git a/general_tests/sessions_concur_test.go b/general_tests/sessions_concur_test.go index 05fcf8dc1..4dded96c0 100644 --- a/general_tests/sessions_concur_test.go +++ b/general_tests/sessions_concur_test.go @@ -129,7 +129,7 @@ func testSCncrLoadTP(t *testing.T) { ExternalAttributeProfile: &engine.ExternalAttributeProfile{ Tenant: "cgrates.org", ID: "AttrConcurrentSessions", - Contexts: []string{utils.ANY}, + Contexts: []string{utils.MetaAny}, Attributes: []*engine.ExternalAttribute{ { Path: utils.MetaReq + utils.NestingSep + "TestType", diff --git a/loaders/loader_test.go b/loaders/loader_test.go index ceb15d15f..3f6d16a49 100644 --- a/loaders/loader_test.go +++ b/loaders/loader_test.go @@ -231,7 +231,7 @@ func TestLoaderProcessContentMultiFiles(t *testing.T) { Tenant: "cgrates.org", ID: "TestLoader2", FilterIDs: []string{}, - Contexts: []string{utils.ANY}, + Contexts: []string{utils.MetaAny}, Attributes: []*engine.Attribute{ { Path: utils.MetaReq + utils.NestingSep + "Subject", diff --git a/migrator/accounts.go b/migrator/accounts.go index 1da059a01..af5499704 100755 --- a/migrator/accounts.go +++ b/migrator/accounts.go @@ -242,7 +242,7 @@ type v2Account struct { } func (b *v1Balance) IsDefault() bool { - return (b.DestinationIds == "" || b.DestinationIds == utils.ANY) && + return (b.DestinationIds == "" || b.DestinationIds == utils.MetaAny) && b.RatingSubject == "" && b.Category == "" && b.ExpirationDate.IsZero() && diff --git a/migrator/alias.go b/migrator/alias.go index 632ff8649..ed7ea96e8 100644 --- a/migrator/alias.go +++ b/migrator/alias.go @@ -76,31 +76,31 @@ func alias2AtttributeProfile(alias *v1Alias, defaultTenant string) *engine.Attri out := &engine.AttributeProfile{ Tenant: alias.Tenant, ID: alias.GetId(), - Contexts: []string{utils.META_ANY}, + Contexts: []string{utils.MetaAny}, FilterIDs: make([]string, 0), ActivationInterval: nil, Attributes: make([]*engine.Attribute, 0), Blocker: false, Weight: 20, // should have prio against attributes out of users } - if len(out.Tenant) == 0 || out.Tenant == utils.META_ANY { + if len(out.Tenant) == 0 || out.Tenant == utils.MetaAny { out.Tenant = defaultTenant } - if len(alias.Category) != 0 && alias.Category != utils.META_ANY { + if len(alias.Category) != 0 && alias.Category != utils.MetaAny { out.FilterIDs = append(out.FilterIDs, fmt.Sprintf("%s:~%s:%s", utils.MetaString, utils.MetaReq+utils.NestingSep+utils.Category, alias.Category)) } - if len(alias.Account) != 0 && alias.Account != utils.META_ANY { + if len(alias.Account) != 0 && alias.Account != utils.MetaAny { out.FilterIDs = append(out.FilterIDs, fmt.Sprintf("%s:~%s:%s", utils.MetaString, utils.MetaReq+utils.NestingSep+utils.AccountField, alias.Account)) } - if len(alias.Subject) != 0 && alias.Subject != utils.META_ANY { + if len(alias.Subject) != 0 && alias.Subject != utils.MetaAny { out.FilterIDs = append(out.FilterIDs, fmt.Sprintf("%s:~%s:%s", utils.MetaString, utils.MetaReq+utils.NestingSep+utils.Subject, alias.Subject)) } var destination string for _, av := range alias.Values { - if len(destination) == 0 || destination == utils.META_ANY { + if len(destination) == 0 || destination == utils.MetaAny { destination = av.DestinationId } for fieldName, vals := range av.Pairs { @@ -121,7 +121,7 @@ func alias2AtttributeProfile(alias *v1Alias, defaultTenant string) *engine.Attri } out.Attributes = append(out.Attributes, attr) // Add attribute filters if needed - if initial == "" || initial == utils.META_ANY { + if initial == "" || initial == utils.MetaAny { continue } if fieldName == utils.MetaTenant { // no filter for tenant @@ -141,7 +141,7 @@ func alias2AtttributeProfile(alias *v1Alias, defaultTenant string) *engine.Attri } } } - if len(destination) != 0 && destination != utils.META_ANY { + if len(destination) != 0 && destination != utils.MetaAny { out.FilterIDs = append(out.FilterIDs, fmt.Sprintf("%s:~%s:%s", utils.MetaDestinations, utils.MetaReq+utils.NestingSep+utils.Destination, destination)) } diff --git a/migrator/alias_it_test.go b/migrator/alias_it_test.go index fa7dafeca..54096e15c 100644 --- a/migrator/alias_it_test.go +++ b/migrator/alias_it_test.go @@ -120,9 +120,9 @@ func testAlsITFlush(t *testing.T) { func testAlsITMigrateAndMove(t *testing.T) { alias := &v1Alias{ - Tenant: utils.META_ANY, + Tenant: utils.MetaAny, Direction: "*out", - Category: utils.META_ANY, + Category: utils.MetaAny, Account: "1001", Subject: "call_1001", Context: "*rated", @@ -144,7 +144,7 @@ func testAlsITMigrateAndMove(t *testing.T) { attrProf := &engine.AttributeProfile{ Tenant: "cgrates.org", ID: alias.GetId(), - Contexts: []string{utils.META_ANY}, + Contexts: []string{utils.MetaAny}, FilterIDs: []string{ "*string:~*req.Account:1001", "*string:~*req.Subject:call_1001", @@ -226,7 +226,7 @@ func testAlsITMigrateAndMove(t *testing.T) { }, } if alsidx, err := alsMigrator.dmOut.DataManager().GetIndexes( - utils.CacheAttributeFilterIndexes, utils.ConcatenatedKey("cgrates.org", utils.META_ANY), + utils.CacheAttributeFilterIndexes, utils.ConcatenatedKey("cgrates.org", utils.MetaAny), "", false, false); err != nil { t.Error(err) } else if !reflect.DeepEqual(expAlsIdx, alsidx) { diff --git a/migrator/alias_test.go b/migrator/alias_test.go index 3ab103caa..d64b6c02d 100644 --- a/migrator/alias_test.go +++ b/migrator/alias_test.go @@ -33,24 +33,24 @@ var defaultTenant = "cgrates.org" func TestAlias2AtttributeProfile(t *testing.T) { aliases := map[int]*v1Alias{ 0: { - Tenant: utils.META_ANY, + Tenant: utils.MetaAny, Direction: utils.META_OUT, - Category: utils.META_ANY, - Account: utils.META_ANY, - Subject: utils.META_ANY, + Category: utils.MetaAny, + Account: utils.MetaAny, + Subject: utils.MetaAny, Context: "*rating", Values: v1AliasValues{}, }, 1: { - Tenant: utils.META_ANY, + Tenant: utils.MetaAny, Direction: utils.META_OUT, - Category: utils.META_ANY, - Account: utils.META_ANY, - Subject: utils.META_ANY, + Category: utils.MetaAny, + Account: utils.MetaAny, + Subject: utils.MetaAny, Context: "*rating", Values: v1AliasValues{ &v1AliasValue{ - DestinationId: utils.META_ANY, + DestinationId: utils.MetaAny, Pairs: map[string]map[string]string{ "Account": map[string]string{ "1001": "1002", @@ -61,15 +61,15 @@ func TestAlias2AtttributeProfile(t *testing.T) { }, }, 2: { - Tenant: utils.META_ANY, + Tenant: utils.MetaAny, Direction: utils.META_OUT, - Category: utils.META_ANY, - Account: utils.META_ANY, - Subject: utils.META_ANY, + Category: utils.MetaAny, + Account: utils.MetaAny, + Subject: utils.MetaAny, Context: "*rating", Values: v1AliasValues{ &v1AliasValue{ - DestinationId: utils.META_ANY, + DestinationId: utils.MetaAny, Pairs: map[string]map[string]string{ "Account": map[string]string{ "1001": "1002", @@ -89,7 +89,7 @@ func TestAlias2AtttributeProfile(t *testing.T) { Context: "", Values: v1AliasValues{ &v1AliasValue{ - DestinationId: utils.META_ANY, + DestinationId: utils.MetaAny, Pairs: map[string]map[string]string{ "Account": map[string]string{ "1001": "1002", @@ -105,7 +105,7 @@ func TestAlias2AtttributeProfile(t *testing.T) { Direction: "*out", Category: "*voice", Account: "1001", - Subject: utils.META_ANY, + Subject: utils.MetaAny, Context: "*rated", Values: v1AliasValues{ &v1AliasValue{ @@ -125,7 +125,7 @@ func TestAlias2AtttributeProfile(t *testing.T) { 5: { Tenant: "notDefaultTenant", Direction: "*out", - Category: utils.META_ANY, + Category: utils.MetaAny, Account: "1001", Subject: "call_1001", Context: "*rated", @@ -145,10 +145,10 @@ func TestAlias2AtttributeProfile(t *testing.T) { }, }, 6: { - Tenant: utils.META_ANY, + Tenant: utils.MetaAny, Category: "somecateg_5141", - Account: utils.META_ANY, - Subject: utils.META_ANY, + Account: utils.MetaAny, + Subject: utils.MetaAny, Context: "*rated", Values: v1AliasValues{ &v1AliasValue{ @@ -165,7 +165,7 @@ func TestAlias2AtttributeProfile(t *testing.T) { 0: { Tenant: defaultTenant, ID: aliases[0].GetId(), - Contexts: []string{utils.META_ANY}, + Contexts: []string{utils.MetaAny}, FilterIDs: make([]string, 0), ActivationInterval: nil, Attributes: make([]*engine.Attribute, 0), @@ -175,7 +175,7 @@ func TestAlias2AtttributeProfile(t *testing.T) { 1: { Tenant: defaultTenant, ID: aliases[1].GetId(), - Contexts: []string{utils.META_ANY}, + Contexts: []string{utils.MetaAny}, FilterIDs: make([]string, 0), ActivationInterval: nil, Attributes: []*engine.Attribute{ @@ -192,7 +192,7 @@ func TestAlias2AtttributeProfile(t *testing.T) { 2: { Tenant: defaultTenant, ID: aliases[2].GetId(), - Contexts: []string{utils.META_ANY}, + Contexts: []string{utils.MetaAny}, FilterIDs: make([]string, 0), ActivationInterval: nil, Attributes: []*engine.Attribute{ @@ -215,7 +215,7 @@ func TestAlias2AtttributeProfile(t *testing.T) { 3: { Tenant: defaultTenant, ID: aliases[3].GetId(), - Contexts: []string{utils.META_ANY}, + Contexts: []string{utils.MetaAny}, FilterIDs: make([]string, 0), ActivationInterval: nil, Attributes: []*engine.Attribute{ @@ -238,7 +238,7 @@ func TestAlias2AtttributeProfile(t *testing.T) { 4: { Tenant: "notDefaultTenant", ID: aliases[4].GetId(), - Contexts: []string{utils.META_ANY}, + Contexts: []string{utils.MetaAny}, FilterIDs: []string{ "*string:~*req.Category:*voice", "*string:~*req.Account:1001", @@ -263,7 +263,7 @@ func TestAlias2AtttributeProfile(t *testing.T) { 5: { Tenant: "notDefaultTenant", ID: aliases[5].GetId(), - Contexts: []string{utils.META_ANY}, + Contexts: []string{utils.MetaAny}, FilterIDs: []string{ "*string:~*req.Account:1001", "*string:~*req.Subject:call_1001", @@ -289,7 +289,7 @@ func TestAlias2AtttributeProfile(t *testing.T) { 6: { Tenant: "cgrates.org", ID: aliases[6].GetId(), - Contexts: []string{utils.META_ANY}, + Contexts: []string{utils.MetaAny}, FilterIDs: []string{ "*string:~*req.Category:somecateg_5141", }, diff --git a/migrator/attributes.go b/migrator/attributes.go index 70f8cee97..57b982fae 100644 --- a/migrator/attributes.go +++ b/migrator/attributes.go @@ -311,7 +311,7 @@ func (v2AttrPrf v2AttributeProfile) AsAttributeProfile() (attrPrf *v3AttributePr } //Initial not *any translate to if value of fieldName = initial do stuff initial := utils.IfaceAsString(attr.Initial) - if initial != utils.META_ANY { + if initial != utils.MetaAny { filterIDs = append(filterIDs, utils.MetaString+utils.InInFieldSep+attr.FieldName+utils.InInFieldSep+initial) } @@ -343,7 +343,7 @@ func (v1AttrPrf v1AttributeProfile) AsAttributeProfileV1To4() (attrPrf *v4Attrib filterIDs = append(filterIDs, utils.MetaExists+utils.CONCATENATED_KEY_SEP+attr.FieldName+utils.CONCATENATED_KEY_SEP) } //Initial not *any translate to if value of fieldName = initial do stuff - if attr.Initial != utils.META_ANY { + if attr.Initial != utils.MetaAny { filterIDs = append(filterIDs, utils.MetaString+utils.CONCATENATED_KEY_SEP+attr.FieldName+utils.CONCATENATED_KEY_SEP+attr.Initial) } // create RSRParser diff --git a/migrator/derived_chargers.go b/migrator/derived_chargers.go index a1e6c02d7..dca1dee59 100644 --- a/migrator/derived_chargers.go +++ b/migrator/derived_chargers.go @@ -165,13 +165,13 @@ func (m *Migrator) derivedChargers2Chargers(dck *v1DerivedChargersWithKey) (err if len(destination) != 0 { filter = append(filter, destination) } - if len(skey[2]) != 0 && skey[2] != utils.META_ANY { + if len(skey[2]) != 0 && skey[2] != utils.MetaAny { filter = append(filter, fmt.Sprintf("%s:~%s:%s", utils.MetaString, utils.MetaReq+utils.NestingSep+utils.Category, skey[2])) } - if len(skey[3]) != 0 && skey[3] != utils.META_ANY { + if len(skey[3]) != 0 && skey[3] != utils.MetaAny { filter = append(filter, fmt.Sprintf("%s:~%s:%s", utils.MetaString, utils.MetaReq+utils.NestingSep+utils.AccountField, skey[3])) } - if len(skey[4]) != 0 && skey[4] != utils.META_ANY { + if len(skey[4]) != 0 && skey[4] != utils.MetaAny { filter = append(filter, fmt.Sprintf("%s:~%s:%s", utils.MetaString, utils.MetaReq+utils.NestingSep+utils.Subject, skey[4])) } for i, dc := range dck.Value.Chargers { diff --git a/migrator/derived_chargers_it_test.go b/migrator/derived_chargers_it_test.go index c29995504..edcb9a0a3 100644 --- a/migrator/derived_chargers_it_test.go +++ b/migrator/derived_chargers_it_test.go @@ -129,7 +129,7 @@ func testDCITMigrateAndMove(t *testing.T) { return keys } derivch := &v1DerivedChargersWithKey{ - Key: utils.ConcatenatedKey("*out", defaultTenant, utils.META_ANY, "1003", utils.META_ANY), + Key: utils.ConcatenatedKey("*out", defaultTenant, utils.MetaAny, "1003", utils.MetaAny), Value: &v1DerivedChargers{ DestinationIDs: utils.StringMap{"1001": true, "1002": true, "1003": true}, Chargers: []*v1DerivedCharger{ diff --git a/migrator/filters_it_test.go b/migrator/filters_it_test.go index 668e14659..fa5d1cdb4 100644 --- a/migrator/filters_it_test.go +++ b/migrator/filters_it_test.go @@ -162,7 +162,7 @@ func testFltrITMigrateAndMove(t *testing.T) { attrProf := &engine.AttributeProfile{ Tenant: "cgrates.org", ID: "ATTR_1", - Contexts: []string{utils.META_ANY}, + Contexts: []string{utils.MetaAny}, FilterIDs: []string{"*string:Account:1001", "FLTR_2"}, ActivationInterval: nil, Attributes: []*engine.Attribute{ @@ -177,7 +177,7 @@ func testFltrITMigrateAndMove(t *testing.T) { expAttrProf := &engine.AttributeProfile{ Tenant: "cgrates.org", ID: "ATTR_1", - Contexts: []string{utils.META_ANY}, + Contexts: []string{utils.MetaAny}, FilterIDs: []string{"*string:~*req.Account:1001", "FLTR_2"}, ActivationInterval: nil, Attributes: []*engine.Attribute{ @@ -207,7 +207,7 @@ func testFltrITMigrateAndMove(t *testing.T) { if err := fltrMigrator.dmIN.DataManager().SetIndexes( utils.CacheAttributeFilterIndexes, - utils.ConcatenatedKey(attrProf.Tenant, utils.META_ANY), + utils.ConcatenatedKey(attrProf.Tenant, utils.MetaAny), wrongFltrIdx, false, ""); err != nil { t.Error(err) } @@ -270,7 +270,7 @@ func testFltrITMigrateAndMove(t *testing.T) { if fltridx, err := fltrMigrator.dmOut.DataManager().GetIndexes( utils.CacheAttributeFilterIndexes, - utils.ConcatenatedKey(attrProf.Tenant, utils.META_ANY), + utils.ConcatenatedKey(attrProf.Tenant, utils.MetaAny), "", false, false); err != nil { t.Error(err) } else if !reflect.DeepEqual(expFltrIdx, fltridx) { @@ -358,7 +358,7 @@ func testFltrITMigratev2(t *testing.T) { attrProf := &engine.AttributeProfile{ Tenant: "cgrates.org", ID: "ATTR_1", - Contexts: []string{utils.META_ANY}, + Contexts: []string{utils.MetaAny}, FilterIDs: []string{"*string:~Account:1001", "FLTR_2"}, ActivationInterval: nil, Attributes: []*engine.Attribute{ @@ -373,7 +373,7 @@ func testFltrITMigratev2(t *testing.T) { expAttrProf := &engine.AttributeProfile{ Tenant: "cgrates.org", ID: "ATTR_1", - Contexts: []string{utils.META_ANY}, + Contexts: []string{utils.MetaAny}, FilterIDs: []string{"*string:~*req.Account:1001", "FLTR_2"}, ActivationInterval: nil, Attributes: []*engine.Attribute{ @@ -402,7 +402,7 @@ func testFltrITMigratev2(t *testing.T) { if err := fltrMigrator.dmIN.DataManager().SetIndexes( utils.CacheAttributeFilterIndexes, - utils.ConcatenatedKey(attrProf.Tenant, utils.META_ANY), + utils.ConcatenatedKey(attrProf.Tenant, utils.MetaAny), wrongFltrIdx, false, ""); err != nil { t.Error(err) } @@ -468,7 +468,7 @@ func testFltrITMigratev2(t *testing.T) { if fltridx, err := fltrMigrator.dmOut.DataManager().GetIndexes( utils.CacheAttributeFilterIndexes, - utils.ConcatenatedKey(attrProf.Tenant, utils.META_ANY), + utils.ConcatenatedKey(attrProf.Tenant, utils.MetaAny), "", false, true); err != nil { t.Error(err) } else if !reflect.DeepEqual(expFltrIdx, fltridx) { diff --git a/migrator/user.go b/migrator/user.go index 1ab8faed5..65de039be 100644 --- a/migrator/user.go +++ b/migrator/user.go @@ -54,7 +54,7 @@ func userProfile2attributeProfile(user *v1UserProfile) (attr *engine.AttributePr attr = &engine.AttributeProfile{ Tenant: config.CgrConfig().GeneralCfg().DefaultTenant, ID: user.UserName, - Contexts: []string{utils.META_ANY}, + Contexts: []string{utils.MetaAny}, FilterIDs: make([]string, 0), ActivationInterval: nil, Attributes: make([]*engine.Attribute, 0), diff --git a/migrator/user_it_test.go b/migrator/user_it_test.go index 83a20cdb5..7b305582c 100644 --- a/migrator/user_it_test.go +++ b/migrator/user_it_test.go @@ -125,7 +125,7 @@ func testUsrITMigrateAndMove(t *testing.T) { attrProf := &engine.AttributeProfile{ Tenant: defaultTenant, ID: "1001", - Contexts: []string{utils.META_ANY}, + Contexts: []string{utils.MetaAny}, FilterIDs: []string{"*string:~Account:1002"}, ActivationInterval: nil, Attributes: []*engine.Attribute{ @@ -200,7 +200,7 @@ func testUsrITMigrateAndMove(t *testing.T) { } if usridx, err := usrMigrator.dmOut.DataManager().GetIndexes( utils.CacheAttributeFilterIndexes, - utils.ConcatenatedKey("cgrates.org", utils.META_ANY), + utils.ConcatenatedKey("cgrates.org", utils.MetaAny), "", true, true); err != nil { t.Error(err) } else if !reflect.DeepEqual(expUsrIdx, usridx) { diff --git a/migrator/user_test.go b/migrator/user_test.go index fbe248ac9..6573f34f1 100644 --- a/migrator/user_test.go +++ b/migrator/user_test.go @@ -89,7 +89,7 @@ func TestUserProfile2attributeProfile(t *testing.T) { 0: { Tenant: defaultTenant, ID: "1001", - Contexts: []string{utils.META_ANY}, + Contexts: []string{utils.MetaAny}, FilterIDs: make([]string, 0), ActivationInterval: nil, Attributes: []*engine.Attribute{}, @@ -99,7 +99,7 @@ func TestUserProfile2attributeProfile(t *testing.T) { 1: { Tenant: defaultTenant, ID: "1001", - Contexts: []string{utils.META_ANY}, + Contexts: []string{utils.MetaAny}, FilterIDs: []string{"*string:~Account:1002"}, ActivationInterval: nil, Attributes: []*engine.Attribute{ @@ -120,7 +120,7 @@ func TestUserProfile2attributeProfile(t *testing.T) { 2: { Tenant: defaultTenant, ID: "1001", - Contexts: []string{utils.META_ANY}, + Contexts: []string{utils.MetaAny}, FilterIDs: []string{ "*string:~Account:1002", }, @@ -143,7 +143,7 @@ func TestUserProfile2attributeProfile(t *testing.T) { 3: { Tenant: defaultTenant, ID: "1001", - Contexts: []string{utils.META_ANY}, + Contexts: []string{utils.MetaAny}, FilterIDs: []string{"*string:~Account:1002"}, ActivationInterval: nil, Attributes: []*engine.Attribute{ @@ -164,7 +164,7 @@ func TestUserProfile2attributeProfile(t *testing.T) { 4: { Tenant: defaultTenant, ID: "acstmusername", - Contexts: []string{utils.META_ANY}, + Contexts: []string{utils.MetaAny}, FilterIDs: []string{ "*string:~Account:acnt63", }, diff --git a/sessions/libsessions.go b/sessions/libsessions.go index 58f790402..06ab57f2c 100644 --- a/sessions/libsessions.go +++ b/sessions/libsessions.go @@ -168,7 +168,7 @@ func (pi *ProcessedStirIdentity) VerifySignature(timeoutVal time.Duration) (err // VerifyPayload returns if the payload is corectly populated func (pi *ProcessedStirIdentity) VerifyPayload(originatorTn, originatorURI, destinationTn, destinationURI string, hdrMaxDur time.Duration, attest utils.StringSet) (err error) { - if !attest.Has(utils.META_ANY) && !attest.Has(pi.Payload.ATTest) { + if !attest.Has(utils.MetaAny) && !attest.Has(pi.Payload.ATTest) { return errors.New("wrong attest level") } if hdrMaxDur >= 0 && time.Now().After(time.Unix(pi.Payload.IAT, 0).Add(hdrMaxDur)) { diff --git a/sessions/libsessions_test.go b/sessions/libsessions_test.go index 083ae45f9..19cdf8ad8 100644 --- a/sessions/libsessions_test.go +++ b/sessions/libsessions_test.go @@ -170,26 +170,26 @@ func TestProcessedIdentityVerifyPayload(t *testing.T) { OrigID: "123456", }, } - if err := args.VerifyPayload("1001", "", "1002", "", -1, utils.NewStringSet([]string{utils.META_ANY})); err != nil { + if err := args.VerifyPayload("1001", "", "1002", "", -1, utils.NewStringSet([]string{utils.MetaAny})); err != nil { t.Error(err) } - if err := args.VerifyPayload("1001", "", "1003", "", -1, utils.NewStringSet([]string{utils.META_ANY})); err == nil || + if err := args.VerifyPayload("1001", "", "1003", "", -1, utils.NewStringSet([]string{utils.MetaAny})); err == nil || err.Error() != "wrong destinationTn" { t.Errorf("Expected error: %s,receved %v", "wrong destinationTn", err) } - if err := args.VerifyPayload("1001", "", "1003", "1002", -1, utils.NewStringSet([]string{utils.META_ANY})); err == nil || + if err := args.VerifyPayload("1001", "", "1003", "1002", -1, utils.NewStringSet([]string{utils.MetaAny})); err == nil || err.Error() != "wrong destinationURI" { t.Errorf("Expected error: %s,receved %v", "wrong destinationURI", err) } - if err := args.VerifyPayload("1002", "", "1003", "1002", -1, utils.NewStringSet([]string{utils.META_ANY})); err == nil || + if err := args.VerifyPayload("1002", "", "1003", "1002", -1, utils.NewStringSet([]string{utils.MetaAny})); err == nil || err.Error() != "wrong originatorTn" { t.Errorf("Expected error: %s,receved %v", "wrong originatorTn", err) } - if err := args.VerifyPayload("1002", "1001", "1003", "1002", -1, utils.NewStringSet([]string{utils.META_ANY})); err == nil || + if err := args.VerifyPayload("1002", "1001", "1003", "1002", -1, utils.NewStringSet([]string{utils.MetaAny})); err == nil || err.Error() != "wrong originatorURI" { t.Errorf("Expected error: %s,receved %v", "wrong originatorURI", err) } - if err := args.VerifyPayload("1001", "", "1002", "", time.Second, utils.NewStringSet([]string{utils.META_ANY})); err == nil || + if err := args.VerifyPayload("1001", "", "1002", "", time.Second, utils.NewStringSet([]string{utils.MetaAny})); err == nil || err.Error() != "expired payload" { t.Errorf("Expected error: %s,receved %v", "expired payload", err) } @@ -200,12 +200,12 @@ func TestProcessedIdentityVerifyPayload(t *testing.T) { } func TestAuthStirShaken(t *testing.T) { - if err := AuthStirShaken("", "1001", "", "1002", "", utils.NewStringSet([]string{utils.META_ANY}), -1); err == nil { + if err := AuthStirShaken("", "1001", "", "1002", "", utils.NewStringSet([]string{utils.MetaAny}), -1); err == nil { t.Error("Expected invalid identity") } if err := AuthStirShaken( "eyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiIsInR5cCI6InBhc3Nwb3J0IiwieDV1IjoiaHR0cHM6Ly93d3cuZXhhbXBsZS5vcmcvY2VydC5jZXIifQ.eyJhdHRlc3QiOiJBIiwiZGVzdCI6eyJ0biI6WyIxMDAyIl19LCJpYXQiOjE1ODcwMTk4MjIsIm9yaWciOnsidG4iOiIxMDAxIn0sIm9yaWdpZCI6IjEyMzQ1NiJ9.4ybtWmgqdkNyJLS9Iv3PuJV8ZxR7yZ_NEBhCpKCEu2WBiTchqwoqoWpI17Q_ALm38tbnpay32t95ZY_LhSgwJg;info=;ppt=shaken", - "1001", "", "1002", "", utils.NewStringSet([]string{utils.META_ANY}), -1); err == nil { + "1001", "", "1002", "", utils.NewStringSet([]string{utils.MetaAny}), -1); err == nil { t.Error("Expected invalid identity") } if err := engine.Cache.Set(utils.CacheSTIR, "https://www.example.org/cert.cer", nil, @@ -213,7 +213,7 @@ func TestAuthStirShaken(t *testing.T) { t.Errorf("Expecting: nil, received: %s", err) } if err := AuthStirShaken( - "eyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiIsInR5cCI6InBhc3Nwb3J0IiwieDV1IjoiaHR0cHM6Ly93d3cuZXhhbXBsZS5vcmcvY2VydC5jZXIifQ.eyJhdHRlc3QiOiJBIiwiZGVzdCI6eyJ0biI6WyIxMDAyIl19LCJpYXQiOjE1ODcwMTk4MjIsIm9yaWciOnsidG4iOiIxMDAxIn0sIm9yaWdpZCI6IjEyMzQ1NiJ9.4ybtWmgqdkNyJLS9Iv3PuJV8ZxR7yZ_NEBhCpKCEu2WBiTchqwoqoWpI17Q_ALm38tbnpay32t95ZY_LhSgwJg;info=;ppt=shaken", "1001", "", "1002", "", utils.NewStringSet([]string{utils.META_ANY}), -1); err == nil { + "eyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiIsInR5cCI6InBhc3Nwb3J0IiwieDV1IjoiaHR0cHM6Ly93d3cuZXhhbXBsZS5vcmcvY2VydC5jZXIifQ.eyJhdHRlc3QiOiJBIiwiZGVzdCI6eyJ0biI6WyIxMDAyIl19LCJpYXQiOjE1ODcwMTk4MjIsIm9yaWciOnsidG4iOiIxMDAxIn0sIm9yaWdpZCI6IjEyMzQ1NiJ9.4ybtWmgqdkNyJLS9Iv3PuJV8ZxR7yZ_NEBhCpKCEu2WBiTchqwoqoWpI17Q_ALm38tbnpay32t95ZY_LhSgwJg;info=;ppt=shaken", "1001", "", "1002", "", utils.NewStringSet([]string{utils.MetaAny}), -1); err == nil { t.Error("Expected invalid identity") } @@ -232,12 +232,12 @@ aa+jqv4dwkr/FLEcN1zC76Y/IniI65fId55hVJvN3ORuzUqYEtzD3irmsw== } if err := AuthStirShaken( - "eyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiIsInR5cCI6InBhc3Nwb3J0IiwieDV1IjoiaHR0cHM6Ly93d3cuZXhhbXBsZS5vcmcvY2VydC5jZXIifQ.eyJhdHRlc3QiOiJBIiwiZGVzdCI6eyJ0biI6WyIxMDAyIl19LCJpYXQiOjE1ODcwMTk4MjIsIm9yaWciOnsidG4iOiIxMDAxIn0sIm9yaWdpZCI6IjEyMzQ1NiJ9.4ybtWmgqdkNyJLS9Iv3PuJV8ZxR7yZ_NEBhCpKCEu2WBiTchqwoqoWpI17Q_ALm38tbnpay32t95ZY_LhSgwJg;info=;ppt=shaken", "1001", "", "1003", "", utils.NewStringSet([]string{utils.META_ANY}), -1); err == nil { + "eyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiIsInR5cCI6InBhc3Nwb3J0IiwieDV1IjoiaHR0cHM6Ly93d3cuZXhhbXBsZS5vcmcvY2VydC5jZXIifQ.eyJhdHRlc3QiOiJBIiwiZGVzdCI6eyJ0biI6WyIxMDAyIl19LCJpYXQiOjE1ODcwMTk4MjIsIm9yaWciOnsidG4iOiIxMDAxIn0sIm9yaWdpZCI6IjEyMzQ1NiJ9.4ybtWmgqdkNyJLS9Iv3PuJV8ZxR7yZ_NEBhCpKCEu2WBiTchqwoqoWpI17Q_ALm38tbnpay32t95ZY_LhSgwJg;info=;ppt=shaken", "1001", "", "1003", "", utils.NewStringSet([]string{utils.MetaAny}), -1); err == nil { t.Error("Expected invalid identity") } if err := AuthStirShaken( - "eyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiIsInR5cCI6InBhc3Nwb3J0IiwieDV1IjoiaHR0cHM6Ly93d3cuZXhhbXBsZS5vcmcvY2VydC5jZXIifQ.eyJhdHRlc3QiOiJBIiwiZGVzdCI6eyJ0biI6WyIxMDAyIl19LCJpYXQiOjE1ODcwMTk4MjIsIm9yaWciOnsidG4iOiIxMDAxIn0sIm9yaWdpZCI6IjEyMzQ1NiJ9.4ybtWmgqdkNyJLS9Iv3PuJV8ZxR7yZ_NEBhCpKCEu2WBiTchqwoqoWpI17Q_ALm38tbnpay32t95ZY_LhSgwJg;info=;ppt=shaken", "1001", "", "1002", "", utils.NewStringSet([]string{utils.META_ANY}), -1); err != nil { + "eyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiIsInR5cCI6InBhc3Nwb3J0IiwieDV1IjoiaHR0cHM6Ly93d3cuZXhhbXBsZS5vcmcvY2VydC5jZXIifQ.eyJhdHRlc3QiOiJBIiwiZGVzdCI6eyJ0biI6WyIxMDAyIl19LCJpYXQiOjE1ODcwMTk4MjIsIm9yaWciOnsidG4iOiIxMDAxIn0sIm9yaWdpZCI6IjEyMzQ1NiJ9.4ybtWmgqdkNyJLS9Iv3PuJV8ZxR7yZ_NEBhCpKCEu2WBiTchqwoqoWpI17Q_ALm38tbnpay32t95ZY_LhSgwJg;info=;ppt=shaken", "1001", "", "1002", "", utils.NewStringSet([]string{utils.MetaAny}), -1); err != nil { t.Fatal(err) } } @@ -291,7 +291,7 @@ aa+jqv4dwkr/FLEcN1zC76Y/IniI65fId55hVJvN3ORuzUqYEtzD3irmsw== if rcv, err := NewSTIRIdentity(header, payload, "https://www.example.org/private.pem", time.Second); err != nil { t.Error(err) - } else if err := AuthStirShaken(rcv, "1001", "", "1002", "", utils.NewStringSet([]string{utils.META_ANY}), -1); err != nil { + } else if err := AuthStirShaken(rcv, "1001", "", "1002", "", utils.NewStringSet([]string{utils.MetaAny}), -1); err != nil { t.Fatal(err) } } diff --git a/sessions/sessions_test.go b/sessions/sessions_test.go index 5d66b58ca..a522817a2 100644 --- a/sessions/sessions_test.go +++ b/sessions/sessions_test.go @@ -2360,7 +2360,7 @@ aa+jqv4dwkr/FLEcN1zC76Y/IniI65fId55hVJvN3ORuzUqYEtzD3irmsw== OverwriteIAT: true, }, &rcv); err != nil { t.Error(err) - } else if err := AuthStirShaken(rcv, "1001", "", "1002", "", utils.NewStringSet([]string{utils.META_ANY}), -1); err != nil { + } else if err := AuthStirShaken(rcv, "1001", "", "1002", "", utils.NewStringSet([]string{utils.MetaAny}), -1); err != nil { t.Fatal(err) } } diff --git a/utils/consts.go b/utils/consts.go index 0af7ea770..83e1e3077 100755 --- a/utils/consts.go +++ b/utils/consts.go @@ -256,117 +256,117 @@ var ( ) const ( - CGRateS = "CGRateS" - Version = "v0.11.0~dev" - DiameterFirmwareRevision = 918 - RedisMaxConns = 10 - CGRateSLwr = "cgrates" - Postgres = "postgres" - MySQL = "mysql" - Mongo = "mongo" - Redis = "redis" - INTERNAL = "internal" - DataManager = "DataManager" - Localhost = "127.0.0.1" - Prepaid = "prepaid" - MetaPrepaid = "*prepaid" - Postpaid = "postpaid" - MetaPostpaid = "*postpaid" - PseudoPrepaid = "pseudoprepaid" - MetaPseudoPrepaid = "*pseudoprepaid" - MetaRated = "*rated" - MetaNone = "*none" - MetaNow = "*now" - MetaRoundingUp = "*up" - MetaRoundingMiddle = "*middle" - MetaRoundingDown = "*down" - ANY = "*any" - MetaAll = "*all" - MetaSingle = "*single" - ZERO = "*zero" - ASAP = "*asap" - COMMENT_CHAR = '#' - CSV_SEP = ',' - FALLBACK_SEP = ';' - INFIELD_SEP = ";" - MetaPipe = "*|" - FIELDS_SEP = "," - InInFieldSep = ":" - STATIC_HDRVAL_SEP = "::" - FilterValStart = "(" - FilterValEnd = ")" - JSON = "json" - MSGPACK = "msgpack" - CSV_LOAD = "CSVLOAD" - CGRID = "CGRID" - ToR = "ToR" - OrderID = "OrderID" - OriginID = "OriginID" - InitialOriginID = "InitialOriginID" - OriginIDPrefix = "OriginIDPrefix" - Source = "Source" - OriginHost = "OriginHost" - RequestType = "RequestType" - Direction = "Direction" - Tenant = "Tenant" - Category = "Category" - Contexts = "Contexts" - AccountField = "Account" - BalancesFld = "Balances" - Subject = "Subject" - Destination = "Destination" - SetupTime = "SetupTime" - AnswerTime = "AnswerTime" - Usage = "Usage" - DurationIndex = "DurationIndex" - MaxRateUnit = "MaxRateUnit" - DebitInterval = "DebitInterval" - TimeStart = "TimeStart" - TimeEnd = "TimeEnd" - CallDuration = "CallDuration" - FallbackSubject = "FallbackSubject" - DryRun = "DryRun" - ExtraFields = "ExtraFields" - CustomValue = "CustomValue" - Value = "Value" - LastUsed = "LastUsed" - PDD = "PDD" - ROUTE = "Route" - RunID = "RunID" - AttributeIDs = "AttributeIDs" - MetaReqRunID = "*req.RunID" - COST = "Cost" - CostDetails = "CostDetails" - RATED = "rated" - Partial = "Partial" - PreRated = "PreRated" - StaticValuePrefix = "^" - CSV = "csv" - FWV = "fwv" - MetaPartialCSV = "*partial_csv" - META_COMBIMED = "*combimed" - MetaMongo = "*mongo" - MetaPostgres = "*postgres" - MetaInternal = "*internal" - MetaLocalHost = "*localhost" - ZERO_RATING_SUBJECT_PREFIX = "*zero" - OK = "OK" - MetaFileXML = "*file_xml" - MetaFileJSON = "*file_json" - MASK_CHAR = "*" - CONCATENATED_KEY_SEP = ":" - UNIT_TEST = "UNIT_TEST" - HDR_VAL_SEP = "/" - MONETARY = "*monetary" - SMS = "*sms" - MMS = "*mms" - GENERIC = "*generic" - DATA = "*data" - VOICE = "*voice" - MAX_COST_FREE = "*free" - MAX_COST_DISCONNECT = "*disconnect" - META_OUT = "*out" - META_ANY = "*any" + CGRateS = "CGRateS" + Version = "v0.11.0~dev" + DiameterFirmwareRevision = 918 + RedisMaxConns = 10 + CGRateSLwr = "cgrates" + Postgres = "postgres" + MySQL = "mysql" + Mongo = "mongo" + Redis = "redis" + INTERNAL = "internal" + DataManager = "DataManager" + Localhost = "127.0.0.1" + Prepaid = "prepaid" + MetaPrepaid = "*prepaid" + Postpaid = "postpaid" + MetaPostpaid = "*postpaid" + PseudoPrepaid = "pseudoprepaid" + MetaPseudoPrepaid = "*pseudoprepaid" + MetaRated = "*rated" + MetaNone = "*none" + MetaNow = "*now" + MetaRoundingUp = "*up" + MetaRoundingMiddle = "*middle" + MetaRoundingDown = "*down" + MetaAny = "*any" + MetaAll = "*all" + MetaSingle = "*single" + ZERO = "*zero" + ASAP = "*asap" + COMMENT_CHAR = '#' + CSV_SEP = ',' + FALLBACK_SEP = ';' + INFIELD_SEP = ";" + MetaPipe = "*|" + FIELDS_SEP = "," + InInFieldSep = ":" + STATIC_HDRVAL_SEP = "::" + FilterValStart = "(" + FilterValEnd = ")" + JSON = "json" + MSGPACK = "msgpack" + CSV_LOAD = "CSVLOAD" + CGRID = "CGRID" + ToR = "ToR" + OrderID = "OrderID" + OriginID = "OriginID" + InitialOriginID = "InitialOriginID" + OriginIDPrefix = "OriginIDPrefix" + Source = "Source" + OriginHost = "OriginHost" + RequestType = "RequestType" + Direction = "Direction" + Tenant = "Tenant" + Category = "Category" + Contexts = "Contexts" + AccountField = "Account" + BalancesFld = "Balances" + Subject = "Subject" + Destination = "Destination" + SetupTime = "SetupTime" + AnswerTime = "AnswerTime" + Usage = "Usage" + DurationIndex = "DurationIndex" + MaxRateUnit = "MaxRateUnit" + DebitInterval = "DebitInterval" + TimeStart = "TimeStart" + TimeEnd = "TimeEnd" + CallDuration = "CallDuration" + FallbackSubject = "FallbackSubject" + DryRun = "DryRun" + ExtraFields = "ExtraFields" + CustomValue = "CustomValue" + Value = "Value" + LastUsed = "LastUsed" + PDD = "PDD" + ROUTE = "Route" + RunID = "RunID" + AttributeIDs = "AttributeIDs" + MetaReqRunID = "*req.RunID" + COST = "Cost" + CostDetails = "CostDetails" + RATED = "rated" + Partial = "Partial" + PreRated = "PreRated" + StaticValuePrefix = "^" + CSV = "csv" + FWV = "fwv" + MetaPartialCSV = "*partial_csv" + META_COMBIMED = "*combimed" + MetaMongo = "*mongo" + MetaPostgres = "*postgres" + MetaInternal = "*internal" + MetaLocalHost = "*localhost" + ZERO_RATING_SUBJECT_PREFIX = "*zero" + OK = "OK" + MetaFileXML = "*file_xml" + MetaFileJSON = "*file_json" + MASK_CHAR = "*" + CONCATENATED_KEY_SEP = ":" + UNIT_TEST = "UNIT_TEST" + HDR_VAL_SEP = "/" + MONETARY = "*monetary" + SMS = "*sms" + MMS = "*mms" + GENERIC = "*generic" + DATA = "*data" + VOICE = "*voice" + MAX_COST_FREE = "*free" + MAX_COST_DISCONNECT = "*disconnect" + META_OUT = "*out" + META_VOICE = "*voice" ACD = "ACD" TASKS_KEY = "tasks" diff --git a/utils/coreutils.go b/utils/coreutils.go index 57d303e57..efd3c22eb 100644 --- a/utils/coreutils.go +++ b/utils/coreutils.go @@ -375,10 +375,10 @@ func MinDuration(d1, d2 time.Duration) time.Duration { // returns error if not able to parse duration (ie: if ratingSubject is standard one) func ParseZeroRatingSubject(tor, rateSubj string, defaultRateSubj map[string]string) (time.Duration, error) { rateSubj = strings.TrimSpace(rateSubj) - if rateSubj == "" || rateSubj == ANY { + if rateSubj == "" || rateSubj == MetaAny { var hasToR bool if rateSubj, hasToR = defaultRateSubj[tor]; !hasToR { - rateSubj = defaultRateSubj[META_ANY] + rateSubj = defaultRateSubj[MetaAny] } } if !strings.HasPrefix(rateSubj, ZERO_RATING_SUBJECT_PREFIX) { diff --git a/utils/coreutils_test.go b/utils/coreutils_test.go index 40f2682cf..75c51f975 100644 --- a/utils/coreutils_test.go +++ b/utils/coreutils_test.go @@ -693,8 +693,8 @@ func TestParseZeroRatingSubject(t *testing.T) { dur := []time.Duration{time.Second, 1024, time.Second, 5 * time.Minute, 10 * time.Hour} dfltRatingSubject := map[string]string{ - ANY: "*zero1ns", - VOICE: "*zero1s", + MetaAny: "*zero1ns", + VOICE: "*zero1s", } for i, s := range subj { if d, err := ParseZeroRatingSubject(VOICE, s, dfltRatingSubject); err != nil || d != dur[i] { diff --git a/utils/dateseries.go b/utils/dateseries.go index 7ec0391d3..9479b6493 100644 --- a/utils/dateseries.go +++ b/utils/dateseries.go @@ -61,7 +61,7 @@ func (ys Years) Contains(year int) (result bool) { // Parse Years elements from string separated by sep. func (ys *Years) Parse(input, sep string) { switch input { - case META_ANY, EmptyString: + case MetaAny, EmptyString: *ys = []int{} default: elements := strings.Split(input, sep) @@ -75,7 +75,7 @@ func (ys *Years) Parse(input, sep string) { func (ys Years) Serialize(sep string) string { if len(ys) == 0 { - return META_ANY + return MetaAny } var yStr string for idx, yr := range ys { @@ -134,7 +134,7 @@ func (m Months) Contains(month time.Month) (result bool) { // Loades Month elemnents from a string separated by sep. func (m *Months) Parse(input, sep string) { switch input { - case META_ANY, EmptyString: // Apier cannot receive empty string, hence using meta-tag + case MetaAny, EmptyString: // Apier cannot receive empty string, hence using meta-tag *m = []time.Month{} default: elements := strings.Split(input, sep) @@ -149,7 +149,7 @@ func (m *Months) Parse(input, sep string) { // Dumps the months in a serialized string, similar to the one parsed func (m Months) Serialize(sep string) string { if len(m) == 0 { - return META_ANY + return MetaAny } var mStr string for idx, mt := range m { @@ -215,7 +215,7 @@ func (md MonthDays) Contains(monthDay int) (result bool) { // Parse MonthDay elements from string separated by sep. func (md *MonthDays) Parse(input, sep string) { switch input { - case META_ANY, EmptyString: + case MetaAny, EmptyString: *md = []int{} default: elements := strings.Split(input, sep) @@ -230,7 +230,7 @@ func (md *MonthDays) Parse(input, sep string) { // Dumps the month days in a serialized string, similar to the one parsed func (md MonthDays) Serialize(sep string) string { if len(md) == 0 { - return META_ANY + return MetaAny } var mdsStr string for idx, mDay := range md { @@ -289,7 +289,7 @@ func (wd WeekDays) Contains(weekDay time.Weekday) (result bool) { func (wd *WeekDays) Parse(input, sep string) { switch input { - case META_ANY, EmptyString: + case MetaAny, EmptyString: *wd = []time.Weekday{} default: elements := strings.Split(input, sep) @@ -304,7 +304,7 @@ func (wd *WeekDays) Parse(input, sep string) { // Dumps the week days in a serialized string, similar to the one parsed func (wd WeekDays) Serialize(sep string) string { if len(wd) == 0 { - return META_ANY + return MetaAny } var wdStr string for idx, d := range wd { diff --git a/utils/dateseries_test.go b/utils/dateseries_test.go index 63eb49462..ef2386676 100644 --- a/utils/dateseries_test.go +++ b/utils/dateseries_test.go @@ -86,7 +86,7 @@ func TestYearsContains(t *testing.T) { func TestYearsParse(t *testing.T) { ys1 := Years{} - ys1.Parse(META_ANY, EmptyString) + ys1.Parse(MetaAny, EmptyString) ys2 := Years{2013, 2014, 2015} in := "2013,2014,2015" if reflect.DeepEqual(ys2, ys1) != false { @@ -100,7 +100,7 @@ func TestYearsParse(t *testing.T) { func TestYearsSerialize(t *testing.T) { ys := &Years{} - eOut := META_ANY + eOut := MetaAny if yString := ys.Serialize(INFIELD_SEP); eOut != yString { t.Errorf("Expected: %s, received: %s", eOut, yString) } @@ -185,7 +185,7 @@ func TestMonthsContains(t *testing.T) { func TestMonthsParse(t *testing.T) { m1 := Months{} - m1.Parse(META_ANY, EmptyString) + m1.Parse(MetaAny, EmptyString) eOut := Months{time.May, time.June, time.July, time.August} if m1.Parse("5,6,7,8", FIELDS_SEP); !reflect.DeepEqual(eOut, m1) { t.Errorf("Expected: %+v, received: %+v", eOut, m1) @@ -194,8 +194,8 @@ func TestMonthsParse(t *testing.T) { func TestMonthsSerialize(t *testing.T) { mths := &Months{} - if rcv := mths.Serialize(INFIELD_SEP); !reflect.DeepEqual(META_ANY, rcv) { - t.Errorf("Expected: %s, received: %s", META_ANY, rcv) + if rcv := mths.Serialize(INFIELD_SEP); !reflect.DeepEqual(MetaAny, rcv) { + t.Errorf("Expected: %s, received: %s", MetaAny, rcv) } mths = &Months{time.January} if rcv := mths.Serialize(INFIELD_SEP); !reflect.DeepEqual("1", rcv) { @@ -288,7 +288,7 @@ func TestMonthDaysContains(t *testing.T) { func TestMonthDaysParse(t *testing.T) { md1 := MonthDays{} - md1.Parse(META_ANY, EmptyString) + md1.Parse(MetaAny, EmptyString) eOut := MonthDays{24, 25, 26} md1.Parse("24,25,26", ",") @@ -299,8 +299,8 @@ func TestMonthDaysParse(t *testing.T) { func TestMonthDaysSerialize(t *testing.T) { md := &MonthDays{} - if rcv := md.Serialize(INFIELD_SEP); !reflect.DeepEqual(META_ANY, rcv) { - t.Errorf("Expected: %s, received: %s", META_ANY, rcv) + if rcv := md.Serialize(INFIELD_SEP); !reflect.DeepEqual(MetaAny, rcv) { + t.Errorf("Expected: %s, received: %s", MetaAny, rcv) } md = &MonthDays{1} @@ -383,7 +383,7 @@ func TestWeekDaysContains(t *testing.T) { func TestWeekDaysParse(t *testing.T) { wd := WeekDays{} - wd.Parse(META_ANY, EmptyString) + wd.Parse(MetaAny, EmptyString) eOut := WeekDays{time.Monday, time.Tuesday, time.Wednesday} wd.Parse("1,2,3", FIELDS_SEP) if !reflect.DeepEqual(eOut, wd) { @@ -393,8 +393,8 @@ func TestWeekDaysParse(t *testing.T) { func TestWeekDaysSerialize(t *testing.T) { wd := &WeekDays{} - if rcv := wd.Serialize(INFIELD_SEP); !reflect.DeepEqual(META_ANY, rcv) { - t.Errorf("Expected: %s, received: %s", META_ANY, rcv) + if rcv := wd.Serialize(INFIELD_SEP); !reflect.DeepEqual(MetaAny, rcv) { + t.Errorf("Expected: %s, received: %s", MetaAny, rcv) } wd = &WeekDays{time.Monday} diff --git a/utils/map.go b/utils/map.go index 85d9e638c..75d86e957 100644 --- a/utils/map.go +++ b/utils/map.go @@ -87,7 +87,7 @@ func (sm StringMap) Slice() []string { func (sm StringMap) IsEmpty() bool { return sm == nil || len(sm) == 0 || - sm[ANY] == true + sm[MetaAny] == true } func StringMapFromSlice(s []string) StringMap {