From 5361a3f6a1cb655a8c513a4afb87006442a7f0ee Mon Sep 17 00:00:00 2001 From: gezimbll Date: Wed, 21 May 2025 14:52:06 +0200 Subject: [PATCH] added *accountID in CGROptionsSet --- engine/exportrequest_test.go | 4 ++-- engine/thresholds.go | 4 ++-- utils/consts.go | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/engine/exportrequest_test.go b/engine/exportrequest_test.go index 99bdfbb98..f6285a280 100644 --- a/engine/exportrequest_test.go +++ b/engine/exportrequest_test.go @@ -555,8 +555,8 @@ func TestExportRequestSetFields(t *testing.T) { Cache.Clear(nil) onm := utils.NewOrderedNavigableMap() fullPath := &utils.FullPath{ - PathSlice: []string{utils.MetaReq, utils.MetaAccount}, - Path: utils.MetaReq + utils.MetaAccount, + PathSlice: []string{utils.MetaReq, utils.MetaAccountID}, + Path: utils.MetaReq + utils.MetaAccountID, } val := &utils.DataLeaf{ Data: "value1", diff --git a/engine/thresholds.go b/engine/thresholds.go index 8ec0d5b74..d73b27b9b 100644 --- a/engine/thresholds.go +++ b/engine/thresholds.go @@ -218,8 +218,8 @@ func (t *Threshold) ProcessEvent(args *utils.CGREvent, dm *DataManager, fltrS *F } else { acnt, _ = args.FieldAsString(utils.AccountField) } - if _, has := args.APIOpts[utils.MetaAccount]; has { - acnt, _ = args.OptAsString(utils.MetaAccount) + if _, has := args.APIOpts[utils.MetaAccountID]; has { + acnt, _ = args.OptAsString(utils.MetaAccountID) } if acnt != utils.EmptyString { tntAcnt = utils.ConcatenatedKey(args.Tenant, acnt) diff --git a/utils/consts.go b/utils/consts.go index 780ceb5c6..780953395 100644 --- a/utils/consts.go +++ b/utils/consts.go @@ -350,7 +350,7 @@ const ( MetaBalance = "*balance" MetaLimit = "*limit" MetaEventConnect = "*event_connect" - MetaAccount = "*accountID" + MetaAccountID = "*accountID" EventName = "EventName" // action trigger threshold types TriggerMinEventCounter = "*min_event_counter" @@ -2752,7 +2752,7 @@ var CGROptionsSet = NewStringSet([]string{OptsSessionsTTL, OptsAttributesProfileIgnoreFilters, OptsStatsProfileIDs, OptsStatsProfileIgnoreFilters, OptsThresholdsProfileIDs, OptsThresholdsProfileIgnoreFilters, OptsResourcesUsageID, OptsResourcesUsageTTL, OptsResourcesUnits, OptsAttributeS, OptsThresholdS, OptsChargerS, OptsStatS, OptsRALs, OptsRerate, - OptsRefund}) + OptsRefund, MetaAccountID}) // EventExporter metrics const (