diff --git a/cmd/cgr-loader/cgr-loader_it_test.go b/cmd/cgr-loader/cgr-loader_it_test.go index 43477c783..8586e6d4b 100644 --- a/cmd/cgr-loader/cgr-loader_it_test.go +++ b/cmd/cgr-loader/cgr-loader_it_test.go @@ -284,6 +284,11 @@ func testLoadItCheckAttributes(t *testing.T) { Value: config.NewRSRParsersMustCompile("CGRateS.org", utils.InfieldSep), }, }, + Blockers: utils.DynamicBlockers{ + { + Blocker: false, + }, + }, } eAttrPrf.Weights = make(utils.DynamicWeights, 1) eAttrPrf.Weights[0] = &utils.DynamicWeight{ diff --git a/cmd/cgr-loader/cgr-loader_remove_it_test.go b/cmd/cgr-loader/cgr-loader_remove_it_test.go index 2badfb9fa..18478193d 100644 --- a/cmd/cgr-loader/cgr-loader_remove_it_test.go +++ b/cmd/cgr-loader/cgr-loader_remove_it_test.go @@ -407,6 +407,11 @@ func testCgrLdrGetAttributeProfileAfterLoad(t *testing.T) { Value: "Marketing", }, }, + Blockers: utils.DynamicBlockers{ + { + Blocker: false, + }, + }, } var replyAttr *engine.APIAttributeProfile if err := cgrLdrBIRPC.Call(context.Background(), utils.AdminSv1GetAttributeProfile, diff --git a/dispatchers/routes_it_test.go b/dispatchers/routes_it_test.go index 7f7ce7dc8..f3fb35b19 100644 --- a/dispatchers/routes_it_test.go +++ b/dispatchers/routes_it_test.go @@ -369,14 +369,9 @@ func testDspSupGetSupplierForEvent(t *testing.T) { RouteParameters: "", }, { - ID: "route2", - RateProfileIDs: []string{"RP_1002"}, - Weights: utils.DynamicWeights{{Weight: 20}}, - Blockers: utils.DynamicBlockers{ - { - Blocker: false, - }, - }, + ID: "route2", + RateProfileIDs: []string{"RP_1002"}, + Weights: utils.DynamicWeights{{Weight: 20}}, RouteParameters: "", }, }, @@ -394,6 +389,6 @@ func testDspSupGetSupplierForEvent(t *testing.T) { return supProf[0].Routes[i].Weights[0].Weight < supProf[0].Routes[j].Weights[0].Weight }) if !reflect.DeepEqual(expected, *supProf[0]) { - t.Errorf("Expected: %s ,received: %s", utils.ToJSON(expected), utils.ToJSON(supProf)) + t.Errorf("Expected: %s ,received: %s", utils.ToJSON(expected), utils.ToJSON(*supProf[0])) } } diff --git a/general_tests/all_cfg_rld_it_test.go b/general_tests/all_cfg_rld_it_test.go index 107fff4c2..6a12ffcbe 100644 --- a/general_tests/all_cfg_rld_it_test.go +++ b/general_tests/all_cfg_rld_it_test.go @@ -240,7 +240,7 @@ func testConfigSReload(t *testing.T) { } else if cfgStr != rpl13 { t.Errorf("\nExpected %+v ,\n received: %+v", utils.ToIJSON(cfgStr), utils.ToIJSON(rpl13)) } - cfgStr = "{\"asterisk_agent\":{\"asterisk_conns\":[{\"address\":\"127.0.0.1:8088\",\"alias\":\"\",\"connect_attempts\":3,\"password\":\"CGRateS.org\",\"reconnects\":5,\"user\":\"cgrates\"}],\"create_cdr\":false,\"enabled\":false,\"sessions_conns\":[\"*birpc_internal\"]}}" + cfgStr = "{\"asterisk_agent\":{\"asterisk_conns\":[{\"address\":\"127.0.0.1:8088\",\"alias\":\"\",\"connect_attempts\":3,\"max_reconnect_interval\":\"0s\",\"password\":\"CGRateS.org\",\"reconnects\":5,\"user\":\"cgrates\"}],\"create_cdr\":false,\"enabled\":false,\"sessions_conns\":[\"*birpc_internal\"]}}" var rpl14 string if err := testRPC.Call(context.Background(), utils.ConfigSv1GetConfigAsJSON, &config.SectionWithAPIOpts{ Tenant: "cgrates.org", @@ -250,7 +250,7 @@ func testConfigSReload(t *testing.T) { } else if cfgStr != rpl14 { t.Errorf("\nExpected %+v ,\n received: %+v", utils.ToIJSON(cfgStr), utils.ToIJSON(rpl14)) } - cfgStr = "{\"freeswitch_agent\":{\"create_cdr\":false,\"empty_balance_ann_file\":\"\",\"empty_balance_context\":\"\",\"enabled\":false,\"event_socket_conns\":[{\"address\":\"127.0.0.1:8021\",\"alias\":\"127.0.0.1:8021\",\"password\":\"ClueCon\",\"reconnects\":5}],\"extra_fields\":[],\"low_balance_ann_file\":\"\",\"max_wait_connection\":\"2s\",\"sessions_conns\":[\"*birpc_internal\"],\"subscribe_park\":true}}" + cfgStr = "{\"freeswitch_agent\":{\"create_cdr\":false,\"empty_balance_ann_file\":\"\",\"empty_balance_context\":\"\",\"enabled\":false,\"event_socket_conns\":[{\"address\":\"127.0.0.1:8021\",\"alias\":\"127.0.0.1:8021\",\"max_reconnect_interval\":\"0s\",\"password\":\"ClueCon\",\"reconnects\":5}],\"extra_fields\":[],\"low_balance_ann_file\":\"\",\"max_wait_connection\":\"2s\",\"sessions_conns\":[\"*birpc_internal\"],\"subscribe_park\":true}}" var rpl15 string if err := testRPC.Call(context.Background(), utils.ConfigSv1GetConfigAsJSON, &config.SectionWithAPIOpts{ Tenant: "cgrates.org", @@ -260,7 +260,7 @@ func testConfigSReload(t *testing.T) { } else if cfgStr != rpl15 { t.Errorf("\nExpected %+v ,\n received: %+v", utils.ToIJSON(cfgStr), utils.ToIJSON(rpl15)) } - cfgStr = "{\"kamailio_agent\":{\"create_cdr\":false,\"enabled\":false,\"evapi_conns\":[{\"address\":\"127.0.0.1:8448\",\"alias\":\"\",\"reconnects\":5}],\"sessions_conns\":[\"*birpc_internal\"],\"timezone\":\"\"}}" + cfgStr = "{\"kamailio_agent\":{\"create_cdr\":false,\"enabled\":false,\"evapi_conns\":[{\"address\":\"127.0.0.1:8448\",\"alias\":\"\",\"max_reconnect_interval\":\"0s\",\"reconnects\":5}],\"sessions_conns\":[\"*birpc_internal\"],\"timezone\":\"\"}}" var rpl16 string if err := testRPC.Call(context.Background(), utils.ConfigSv1GetConfigAsJSON, &config.SectionWithAPIOpts{ Tenant: "cgrates.org", @@ -419,7 +419,7 @@ func testConfigSReload(t *testing.T) { } } else if testCfgDir == "tutmysql" || testCfgDir == "tutmongo" { - cfgStr = "{\"loaders\":[{\"action\":\"*store\",\"cache\":{\"*accounts\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*action_profiles\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*attributes\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*chargers\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*dispatcher_hosts\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*dispatchers\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*filters\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*rate_profiles\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*resources\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*routes\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*stats\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*thresholds\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"}},\"caches_conns\":[\"*internal\"],\"data\":[{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"new_branch\":true,\"path\":\"Rules.Type\",\"tag\":\"Type\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Rules.Element\",\"tag\":\"Element\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"Rules.Values\",\"tag\":\"Values\",\"type\":\"*variable\",\"value\":\"~*req.4\"}],\"file_name\":\"Filters.csv\",\"flags\":null,\"type\":\"*filters\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"TenantID\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ProfileID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weights\",\"tag\":\"Weights\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"Blockers\",\"tag\":\"Blockers\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"new_branch\":true,\"path\":\"Attributes.FilterIDs\",\"tag\":\"AttributeFilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"path\":\"Attributes.Blockers\",\"tag\":\"AttributeBlockers\",\"type\":\"*variable\",\"value\":\"~*req.6\"},{\"path\":\"Attributes.Path\",\"tag\":\"Path\",\"type\":\"*variable\",\"value\":\"~*req.7\"},{\"path\":\"Attributes.Type\",\"tag\":\"Type\",\"type\":\"*variable\",\"value\":\"~*req.8\"},{\"path\":\"Attributes.Value\",\"tag\":\"Value\",\"type\":\"*variable\",\"value\":\"~*req.9\"}],\"file_name\":\"Attributes.csv\",\"flags\":null,\"type\":\"*attributes\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weights\",\"tag\":\"Weights\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"UsageTTL\",\"tag\":\"TTL\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"Limit\",\"tag\":\"Limit\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"path\":\"AllocationMessage\",\"tag\":\"AllocationMessage\",\"type\":\"*variable\",\"value\":\"~*req.6\"},{\"path\":\"Blocker\",\"tag\":\"Blocker\",\"type\":\"*variable\",\"value\":\"~*req.7\"},{\"path\":\"Stored\",\"tag\":\"Stored\",\"type\":\"*variable\",\"value\":\"~*req.8\"},{\"path\":\"ThresholdIDs\",\"tag\":\"ThresholdIDs\",\"type\":\"*variable\",\"value\":\"~*req.9\"}],\"file_name\":\"Resources.csv\",\"flags\":null,\"type\":\"*resources\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weights\",\"tag\":\"Weights\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"Blockers\",\"tag\":\"Blockers\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"QueueLength\",\"tag\":\"QueueLength\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"path\":\"TTL\",\"tag\":\"TTL\",\"type\":\"*variable\",\"value\":\"~*req.6\"},{\"path\":\"MinItems\",\"tag\":\"MinItems\",\"type\":\"*variable\",\"value\":\"~*req.7\"},{\"path\":\"Stored\",\"tag\":\"Stored\",\"type\":\"*variable\",\"value\":\"~*req.8\"},{\"path\":\"ThresholdIDs\",\"tag\":\"ThresholdIDs\",\"type\":\"*variable\",\"value\":\"~*req.9\"},{\"new_branch\":true,\"path\":\"Metrics.MetricID\",\"tag\":\"MetricIDs\",\"type\":\"*variable\",\"value\":\"~*req.10\"},{\"path\":\"Metrics.FilterIDs\",\"tag\":\"MetricFilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.11\"},{\"path\":\"Metrics.Blockers\",\"tag\":\"MetricBlockers\",\"type\":\"*variable\",\"value\":\"~*req.12\"}],\"file_name\":\"Stats.csv\",\"flags\":null,\"type\":\"*stats\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weights\",\"tag\":\"Weights\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"MaxHits\",\"tag\":\"MaxHits\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"MinHits\",\"tag\":\"MinHits\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"path\":\"MinSleep\",\"tag\":\"MinSleep\",\"type\":\"*variable\",\"value\":\"~*req.6\"},{\"path\":\"Blocker\",\"tag\":\"Blocker\",\"type\":\"*variable\",\"value\":\"~*req.7\"},{\"path\":\"ActionProfileIDs\",\"tag\":\"ActionProfileIDs\",\"type\":\"*variable\",\"value\":\"~*req.8\"},{\"path\":\"Async\",\"tag\":\"Async\",\"type\":\"*variable\",\"value\":\"~*req.9\"}],\"file_name\":\"Thresholds.csv\",\"flags\":null,\"type\":\"*thresholds\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weights\",\"tag\":\"Weights\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"Blockers\",\"tag\":\"Blockers\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"Sorting\",\"tag\":\"Sorting\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"path\":\"SortingParameters\",\"tag\":\"SortingParameters\",\"type\":\"*variable\",\"value\":\"~*req.6\"},{\"new_branch\":true,\"path\":\"Routes.ID\",\"tag\":\"RouteID\",\"type\":\"*variable\",\"value\":\"~*req.7\"},{\"path\":\"Routes.FilterIDs\",\"tag\":\"RouteFilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.8\"},{\"path\":\"Routes.AccountIDs\",\"tag\":\"RouteAccountIDs\",\"type\":\"*variable\",\"value\":\"~*req.9\"},{\"path\":\"Routes.RateProfileIDs\",\"tag\":\"RouteRateProfileIDs\",\"type\":\"*variable\",\"value\":\"~*req.10\"},{\"path\":\"Routes.ResourceIDs\",\"tag\":\"RouteResourceIDs\",\"type\":\"*variable\",\"value\":\"~*req.11\"},{\"path\":\"Routes.StatIDs\",\"tag\":\"RouteStatIDs\",\"type\":\"*variable\",\"value\":\"~*req.12\"},{\"path\":\"Routes.Weights\",\"tag\":\"RouteWeights\",\"type\":\"*variable\",\"value\":\"~*req.13\"},{\"path\":\"Routes.Blockers\",\"tag\":\"RouteBlockers\",\"type\":\"*variable\",\"value\":\"~*req.14\"},{\"path\":\"Routes.RouteParameters\",\"tag\":\"RouteParameters\",\"type\":\"*variable\",\"value\":\"~*req.15\"}],\"file_name\":\"Routes.csv\",\"flags\":null,\"type\":\"*routes\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weights\",\"tag\":\"Weights\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"Blockers\",\"tag\":\"Blockers\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"RunID\",\"tag\":\"RunID\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"path\":\"AttributeIDs\",\"tag\":\"AttributeIDs\",\"type\":\"*variable\",\"value\":\"~*req.6\"}],\"file_name\":\"Chargers.csv\",\"flags\":null,\"type\":\"*chargers\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weight\",\"tag\":\"Weight\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"Strategy\",\"tag\":\"Strategy\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"StrategyParams\",\"tag\":\"StrategyParameters\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"new_branch\":true,\"path\":\"Hosts.ID\",\"tag\":\"ConnID\",\"type\":\"*variable\",\"value\":\"~*req.6\"},{\"path\":\"Hosts.FilterIDs\",\"tag\":\"ConnFilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.7\"},{\"path\":\"Hosts.Weight\",\"tag\":\"ConnWeight\",\"type\":\"*variable\",\"value\":\"~*req.8\"},{\"path\":\"Hosts.Blocker\",\"tag\":\"ConnBlocker\",\"type\":\"*variable\",\"value\":\"~*req.9\"},{\"path\":\"Hosts.Params\",\"tag\":\"ConnParameters\",\"type\":\"*variable\",\"value\":\"~*req.10\"}],\"file_name\":\"DispatcherProfiles.csv\",\"flags\":null,\"type\":\"*dispatchers\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"Address\",\"tag\":\"Address\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Transport\",\"tag\":\"Transport\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"ConnectAttempts\",\"tag\":\"ConnectAttempts\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"Reconnects\",\"tag\":\"Reconnects\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"path\":\"ConnectTimeout\",\"tag\":\"ConnectTimeout\",\"type\":\"*variable\",\"value\":\"~*req.6\"},{\"path\":\"ReplyTimeout\",\"tag\":\"ReplyTimeout\",\"type\":\"*variable\",\"value\":\"~*req.7\"},{\"path\":\"TLS\",\"tag\":\"TLS\",\"type\":\"*variable\",\"value\":\"~*req.8\"},{\"path\":\"ClientKey\",\"tag\":\"ClientKey\",\"type\":\"*variable\",\"value\":\"~*req.9\"},{\"path\":\"ClientCertificate\",\"tag\":\"ClientCertificate\",\"type\":\"*variable\",\"value\":\"~*req.10\"},{\"path\":\"CaCertificate\",\"tag\":\"CaCertificate\",\"type\":\"*variable\",\"value\":\"~*req.11\"}],\"file_name\":\"DispatcherHosts.csv\",\"flags\":null,\"type\":\"*dispatcher_hosts\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weights\",\"tag\":\"Weights\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"MinCost\",\"tag\":\"MinCost\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"MaxCost\",\"tag\":\"MaxCost\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"path\":\"MaxCostStrategy\",\"tag\":\"MaxCostStrategy\",\"type\":\"*variable\",\"value\":\"~*req.6\"},{\"filters\":[\"*notempty:~*req.7:\"],\"path\":\"Rates[\\u003c~*req.7\\u003e].FilterIDs\",\"tag\":\"RateFilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.8\"},{\"filters\":[\"*notempty:~*req.7:\"],\"path\":\"Rates[\\u003c~*req.7\\u003e].ActivationTimes\",\"tag\":\"RateActivationTimes\",\"type\":\"*variable\",\"value\":\"~*req.9\"},{\"filters\":[\"*notempty:~*req.7:\"],\"path\":\"Rates[\\u003c~*req.7\\u003e].Weights\",\"tag\":\"RateWeights\",\"type\":\"*variable\",\"value\":\"~*req.10\"},{\"filters\":[\"*notempty:~*req.7:\"],\"path\":\"Rates[\\u003c~*req.7\\u003e].Blocker\",\"tag\":\"RateBlocker\",\"type\":\"*variable\",\"value\":\"~*req.11\"},{\"filters\":[\"*notempty:~*req.7:\"],\"new_branch\":true,\"path\":\"Rates[\\u003c~*req.7\\u003e].IntervalRates.IntervalStart\",\"tag\":\"RateIntervalStart\",\"type\":\"*variable\",\"value\":\"~*req.12\"},{\"filters\":[\"*notempty:~*req.7:\"],\"path\":\"Rates[\\u003c~*req.7\\u003e].IntervalRates.FixedFee\",\"tag\":\"RateFixedFee\",\"type\":\"*variable\",\"value\":\"~*req.13\"},{\"filters\":[\"*notempty:~*req.7:\"],\"path\":\"Rates[\\u003c~*req.7\\u003e].IntervalRates.RecurrentFee\",\"tag\":\"RateRecurrentFee\",\"type\":\"*variable\",\"value\":\"~*req.14\"},{\"filters\":[\"*notempty:~*req.7:\"],\"path\":\"Rates[\\u003c~*req.7\\u003e].IntervalRates.Unit\",\"tag\":\"RateUnit\",\"type\":\"*variable\",\"value\":\"~*req.15\"},{\"filters\":[\"*notempty:~*req.7:\"],\"path\":\"Rates[\\u003c~*req.7\\u003e].IntervalRates.Increment\",\"tag\":\"RateIncrement\",\"type\":\"*variable\",\"value\":\"~*req.16\"}],\"file_name\":\"Rates.csv\",\"flags\":null,\"type\":\"*rate_profiles\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weights\",\"tag\":\"Weights\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"Blockers\",\"tag\":\"Blockers\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"Schedule\",\"tag\":\"Schedule\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"path\":\"Targets[\\u003c~*req.6\\u003e]\",\"tag\":\"TargetIDs\",\"type\":\"*variable\",\"value\":\"~*req.7\"},{\"filters\":[\"*notempty:~*req.8:\"],\"path\":\"Actions[\\u003c~*req.8\\u003e].FilterIDs\",\"tag\":\"ActionFilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.9\"},{\"filters\":[\"*notempty:~*req.8:\"],\"path\":\"Actions[\\u003c~*req.8\\u003e].TTL\",\"tag\":\"ActionTTL\",\"type\":\"*variable\",\"value\":\"~*req.10\"},{\"filters\":[\"*notempty:~*req.8:\"],\"path\":\"Actions[\\u003c~*req.8\\u003e].Type\",\"tag\":\"ActionType\",\"type\":\"*variable\",\"value\":\"~*req.11\"},{\"filters\":[\"*notempty:~*req.8:\"],\"path\":\"Actions[\\u003c~*req.8\\u003e].Opts\",\"tag\":\"ActionOpts\",\"type\":\"*variable\",\"value\":\"~*req.12\"},{\"filters\":[\"*notempty:~*req.8:\"],\"new_branch\":true,\"path\":\"Actions[\\u003c~*req.8\\u003e].Diktats.Path\",\"tag\":\"ActionPath\",\"type\":\"*variable\",\"value\":\"~*req.13\"},{\"filters\":[\"*notempty:~*req.8:\"],\"path\":\"Actions[\\u003c~*req.8\\u003e].Diktats.Value\",\"tag\":\"ActionValue\",\"type\":\"*variable\",\"value\":\"~*req.14\"}],\"file_name\":\"Actions.csv\",\"flags\":null,\"type\":\"*action_profiles\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weights\",\"tag\":\"Weights\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"Blockers\",\"tag\":\"Blockers\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"Opts\",\"tag\":\"Opts\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].FilterIDs\",\"tag\":\"BalanceFilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.7\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].Weights\",\"tag\":\"BalanceWeights\",\"type\":\"*variable\",\"value\":\"~*req.8\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].Blockers\",\"tag\":\"BalanceBlockers\",\"type\":\"*variable\",\"value\":\"~*req.9\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].Type\",\"tag\":\"BalanceType\",\"type\":\"*variable\",\"value\":\"~*req.10\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].Units\",\"tag\":\"BalanceUnits\",\"type\":\"*variable\",\"value\":\"~*req.11\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].UnitFactors\",\"tag\":\"BalanceUnitFactors\",\"type\":\"*variable\",\"value\":\"~*req.12\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].Opts\",\"tag\":\"BalanceOpts\",\"type\":\"*variable\",\"value\":\"~*req.13\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].CostIncrements\",\"tag\":\"BalanceCostIncrements\",\"type\":\"*variable\",\"value\":\"~*req.14\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].AttributeIDs\",\"tag\":\"BalanceAttributeIDs\",\"type\":\"*variable\",\"value\":\"~*req.15\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].RateProfileIDs\",\"tag\":\"BalanceRateProfileIDs\",\"type\":\"*variable\",\"value\":\"~*req.16\"},{\"path\":\"ThresholdIDs\",\"tag\":\"ThresholdIDs\",\"type\":\"*variable\",\"value\":\"~*req.17\"}],\"file_name\":\"Accounts.csv\",\"flags\":null,\"type\":\"*accounts\"}],\"enabled\":false,\"field_separator\":\",\",\"id\":\"*default\",\"lockfile_path\":\".cgr.lck\",\"opts\":{\"*cache\":\"\",\"*forceLock\":false,\"*stopOnError\":false,\"*withIndex\":true},\"run_delay\":\"0\",\"tenant\":\"\",\"tp_in_dir\":\"/var/spool/cgrates/loader/in\",\"tp_out_dir\":\"/var/spool/cgrates/loader/out\"}]}" + cfgStr = "{\"loaders\":[{\"action\":\"*store\",\"cache\":{\"*accounts\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*action_profiles\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*attributes\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*chargers\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*dispatcher_hosts\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*dispatchers\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*filters\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*rate_profiles\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*resources\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*routes\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*stats\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*thresholds\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"}},\"caches_conns\":[\"*internal\"],\"data\":[{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"new_branch\":true,\"path\":\"Rules.Type\",\"tag\":\"Type\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Rules.Element\",\"tag\":\"Element\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"Rules.Values\",\"tag\":\"Values\",\"type\":\"*variable\",\"value\":\"~*req.4\"}],\"file_name\":\"Filters.csv\",\"flags\":null,\"type\":\"*filters\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"TenantID\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ProfileID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weights\",\"tag\":\"Weights\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"Blockers\",\"tag\":\"Blockers\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"new_branch\":true,\"path\":\"Attributes.FilterIDs\",\"tag\":\"AttributeFilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"path\":\"Attributes.Blockers\",\"tag\":\"AttributeBlockers\",\"type\":\"*variable\",\"value\":\"~*req.6\"},{\"path\":\"Attributes.Path\",\"tag\":\"Path\",\"type\":\"*variable\",\"value\":\"~*req.7\"},{\"path\":\"Attributes.Type\",\"tag\":\"Type\",\"type\":\"*variable\",\"value\":\"~*req.8\"},{\"path\":\"Attributes.Value\",\"tag\":\"Value\",\"type\":\"*variable\",\"value\":\"~*req.9\"}],\"file_name\":\"Attributes.csv\",\"flags\":null,\"type\":\"*attributes\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weights\",\"tag\":\"Weights\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"UsageTTL\",\"tag\":\"TTL\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"Limit\",\"tag\":\"Limit\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"path\":\"AllocationMessage\",\"tag\":\"AllocationMessage\",\"type\":\"*variable\",\"value\":\"~*req.6\"},{\"path\":\"Blocker\",\"tag\":\"Blocker\",\"type\":\"*variable\",\"value\":\"~*req.7\"},{\"path\":\"Stored\",\"tag\":\"Stored\",\"type\":\"*variable\",\"value\":\"~*req.8\"},{\"path\":\"ThresholdIDs\",\"tag\":\"ThresholdIDs\",\"type\":\"*variable\",\"value\":\"~*req.9\"}],\"file_name\":\"Resources.csv\",\"flags\":null,\"type\":\"*resources\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weights\",\"tag\":\"Weights\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"Blockers\",\"tag\":\"Blockers\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"QueueLength\",\"tag\":\"QueueLength\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"path\":\"TTL\",\"tag\":\"TTL\",\"type\":\"*variable\",\"value\":\"~*req.6\"},{\"path\":\"MinItems\",\"tag\":\"MinItems\",\"type\":\"*variable\",\"value\":\"~*req.7\"},{\"path\":\"Stored\",\"tag\":\"Stored\",\"type\":\"*variable\",\"value\":\"~*req.8\"},{\"path\":\"ThresholdIDs\",\"tag\":\"ThresholdIDs\",\"type\":\"*variable\",\"value\":\"~*req.9\"},{\"new_branch\":true,\"path\":\"Metrics.MetricID\",\"tag\":\"MetricIDs\",\"type\":\"*variable\",\"value\":\"~*req.10\"},{\"path\":\"Metrics.FilterIDs\",\"tag\":\"MetricFilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.11\"},{\"path\":\"Metrics.Blockers\",\"tag\":\"MetricBlockers\",\"type\":\"*variable\",\"value\":\"~*req.12\"}],\"file_name\":\"Stats.csv\",\"flags\":null,\"type\":\"*stats\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weights\",\"tag\":\"Weights\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"MaxHits\",\"tag\":\"MaxHits\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"MinHits\",\"tag\":\"MinHits\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"path\":\"MinSleep\",\"tag\":\"MinSleep\",\"type\":\"*variable\",\"value\":\"~*req.6\"},{\"path\":\"Blocker\",\"tag\":\"Blocker\",\"type\":\"*variable\",\"value\":\"~*req.7\"},{\"path\":\"ActionProfileIDs\",\"tag\":\"ActionProfileIDs\",\"type\":\"*variable\",\"value\":\"~*req.8\"},{\"path\":\"Async\",\"tag\":\"Async\",\"type\":\"*variable\",\"value\":\"~*req.9\"}],\"file_name\":\"Thresholds.csv\",\"flags\":null,\"type\":\"*thresholds\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weights\",\"tag\":\"Weights\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"Blockers\",\"tag\":\"Blockers\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"Sorting\",\"tag\":\"Sorting\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"path\":\"SortingParameters\",\"tag\":\"SortingParameters\",\"type\":\"*variable\",\"value\":\"~*req.6\"},{\"new_branch\":true,\"path\":\"Routes.ID\",\"tag\":\"RouteID\",\"type\":\"*variable\",\"value\":\"~*req.7\"},{\"path\":\"Routes.FilterIDs\",\"tag\":\"RouteFilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.8\"},{\"path\":\"Routes.AccountIDs\",\"tag\":\"RouteAccountIDs\",\"type\":\"*variable\",\"value\":\"~*req.9\"},{\"path\":\"Routes.RateProfileIDs\",\"tag\":\"RouteRateProfileIDs\",\"type\":\"*variable\",\"value\":\"~*req.10\"},{\"path\":\"Routes.ResourceIDs\",\"tag\":\"RouteResourceIDs\",\"type\":\"*variable\",\"value\":\"~*req.11\"},{\"path\":\"Routes.StatIDs\",\"tag\":\"RouteStatIDs\",\"type\":\"*variable\",\"value\":\"~*req.12\"},{\"path\":\"Routes.Weights\",\"tag\":\"RouteWeights\",\"type\":\"*variable\",\"value\":\"~*req.13\"},{\"path\":\"Routes.Blockers\",\"tag\":\"RouteBlockers\",\"type\":\"*variable\",\"value\":\"~*req.14\"},{\"path\":\"Routes.RouteParameters\",\"tag\":\"RouteParameters\",\"type\":\"*variable\",\"value\":\"~*req.15\"}],\"file_name\":\"Routes.csv\",\"flags\":null,\"type\":\"*routes\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weights\",\"tag\":\"Weights\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"Blockers\",\"tag\":\"Blockers\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"RunID\",\"tag\":\"RunID\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"path\":\"AttributeIDs\",\"tag\":\"AttributeIDs\",\"type\":\"*variable\",\"value\":\"~*req.6\"}],\"file_name\":\"Chargers.csv\",\"flags\":null,\"type\":\"*chargers\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weight\",\"tag\":\"Weight\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"Strategy\",\"tag\":\"Strategy\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"StrategyParams\",\"tag\":\"StrategyParameters\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"new_branch\":true,\"path\":\"Hosts.ID\",\"tag\":\"ConnID\",\"type\":\"*variable\",\"value\":\"~*req.6\"},{\"path\":\"Hosts.FilterIDs\",\"tag\":\"ConnFilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.7\"},{\"path\":\"Hosts.Weight\",\"tag\":\"ConnWeight\",\"type\":\"*variable\",\"value\":\"~*req.8\"},{\"path\":\"Hosts.Blocker\",\"tag\":\"ConnBlocker\",\"type\":\"*variable\",\"value\":\"~*req.9\"},{\"path\":\"Hosts.Params\",\"tag\":\"ConnParameters\",\"type\":\"*variable\",\"value\":\"~*req.10\"}],\"file_name\":\"DispatcherProfiles.csv\",\"flags\":null,\"type\":\"*dispatchers\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"Address\",\"tag\":\"Address\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Transport\",\"tag\":\"Transport\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"ConnectAttempts\",\"tag\":\"ConnectAttempts\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"Reconnects\",\"tag\":\"Reconnects\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"path\":\"MaxReconnectInterval\",\"tag\":\"MaxReconnectInterval\",\"type\":\"*variable\",\"value\":\"~*req.6\"},{\"path\":\"ConnectTimeout\",\"tag\":\"ConnectTimeout\",\"type\":\"*variable\",\"value\":\"~*req.7\"},{\"path\":\"ReplyTimeout\",\"tag\":\"ReplyTimeout\",\"type\":\"*variable\",\"value\":\"~*req.8\"},{\"path\":\"TLS\",\"tag\":\"TLS\",\"type\":\"*variable\",\"value\":\"~*req.9\"},{\"path\":\"ClientKey\",\"tag\":\"ClientKey\",\"type\":\"*variable\",\"value\":\"~*req.10\"},{\"path\":\"ClientCertificate\",\"tag\":\"ClientCertificate\",\"type\":\"*variable\",\"value\":\"~*req.11\"},{\"path\":\"CaCertificate\",\"tag\":\"CaCertificate\",\"type\":\"*variable\",\"value\":\"~*req.12\"}],\"file_name\":\"DispatcherHosts.csv\",\"flags\":null,\"type\":\"*dispatcher_hosts\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weights\",\"tag\":\"Weights\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"MinCost\",\"tag\":\"MinCost\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"MaxCost\",\"tag\":\"MaxCost\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"path\":\"MaxCostStrategy\",\"tag\":\"MaxCostStrategy\",\"type\":\"*variable\",\"value\":\"~*req.6\"},{\"filters\":[\"*notempty:~*req.7:\"],\"path\":\"Rates[\\u003c~*req.7\\u003e].FilterIDs\",\"tag\":\"RateFilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.8\"},{\"filters\":[\"*notempty:~*req.7:\"],\"path\":\"Rates[\\u003c~*req.7\\u003e].ActivationTimes\",\"tag\":\"RateActivationTimes\",\"type\":\"*variable\",\"value\":\"~*req.9\"},{\"filters\":[\"*notempty:~*req.7:\"],\"path\":\"Rates[\\u003c~*req.7\\u003e].Weights\",\"tag\":\"RateWeights\",\"type\":\"*variable\",\"value\":\"~*req.10\"},{\"filters\":[\"*notempty:~*req.7:\"],\"path\":\"Rates[\\u003c~*req.7\\u003e].Blocker\",\"tag\":\"RateBlocker\",\"type\":\"*variable\",\"value\":\"~*req.11\"},{\"filters\":[\"*notempty:~*req.7:\"],\"new_branch\":true,\"path\":\"Rates[\\u003c~*req.7\\u003e].IntervalRates.IntervalStart\",\"tag\":\"RateIntervalStart\",\"type\":\"*variable\",\"value\":\"~*req.12\"},{\"filters\":[\"*notempty:~*req.7:\"],\"path\":\"Rates[\\u003c~*req.7\\u003e].IntervalRates.FixedFee\",\"tag\":\"RateFixedFee\",\"type\":\"*variable\",\"value\":\"~*req.13\"},{\"filters\":[\"*notempty:~*req.7:\"],\"path\":\"Rates[\\u003c~*req.7\\u003e].IntervalRates.RecurrentFee\",\"tag\":\"RateRecurrentFee\",\"type\":\"*variable\",\"value\":\"~*req.14\"},{\"filters\":[\"*notempty:~*req.7:\"],\"path\":\"Rates[\\u003c~*req.7\\u003e].IntervalRates.Unit\",\"tag\":\"RateUnit\",\"type\":\"*variable\",\"value\":\"~*req.15\"},{\"filters\":[\"*notempty:~*req.7:\"],\"path\":\"Rates[\\u003c~*req.7\\u003e].IntervalRates.Increment\",\"tag\":\"RateIncrement\",\"type\":\"*variable\",\"value\":\"~*req.16\"}],\"file_name\":\"Rates.csv\",\"flags\":null,\"type\":\"*rate_profiles\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weights\",\"tag\":\"Weights\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"Blockers\",\"tag\":\"Blockers\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"Schedule\",\"tag\":\"Schedule\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"path\":\"Targets[\\u003c~*req.6\\u003e]\",\"tag\":\"TargetIDs\",\"type\":\"*variable\",\"value\":\"~*req.7\"},{\"filters\":[\"*notempty:~*req.8:\"],\"path\":\"Actions[\\u003c~*req.8\\u003e].FilterIDs\",\"tag\":\"ActionFilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.9\"},{\"filters\":[\"*notempty:~*req.8:\"],\"path\":\"Actions[\\u003c~*req.8\\u003e].TTL\",\"tag\":\"ActionTTL\",\"type\":\"*variable\",\"value\":\"~*req.10\"},{\"filters\":[\"*notempty:~*req.8:\"],\"path\":\"Actions[\\u003c~*req.8\\u003e].Type\",\"tag\":\"ActionType\",\"type\":\"*variable\",\"value\":\"~*req.11\"},{\"filters\":[\"*notempty:~*req.8:\"],\"path\":\"Actions[\\u003c~*req.8\\u003e].Opts\",\"tag\":\"ActionOpts\",\"type\":\"*variable\",\"value\":\"~*req.12\"},{\"filters\":[\"*notempty:~*req.8:\"],\"new_branch\":true,\"path\":\"Actions[\\u003c~*req.8\\u003e].Diktats.Path\",\"tag\":\"ActionPath\",\"type\":\"*variable\",\"value\":\"~*req.13\"},{\"filters\":[\"*notempty:~*req.8:\"],\"path\":\"Actions[\\u003c~*req.8\\u003e].Diktats.Value\",\"tag\":\"ActionValue\",\"type\":\"*variable\",\"value\":\"~*req.14\"}],\"file_name\":\"Actions.csv\",\"flags\":null,\"type\":\"*action_profiles\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weights\",\"tag\":\"Weights\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"Blockers\",\"tag\":\"Blockers\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"Opts\",\"tag\":\"Opts\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].FilterIDs\",\"tag\":\"BalanceFilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.7\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].Weights\",\"tag\":\"BalanceWeights\",\"type\":\"*variable\",\"value\":\"~*req.8\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].Blockers\",\"tag\":\"BalanceBlockers\",\"type\":\"*variable\",\"value\":\"~*req.9\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].Type\",\"tag\":\"BalanceType\",\"type\":\"*variable\",\"value\":\"~*req.10\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].Units\",\"tag\":\"BalanceUnits\",\"type\":\"*variable\",\"value\":\"~*req.11\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].UnitFactors\",\"tag\":\"BalanceUnitFactors\",\"type\":\"*variable\",\"value\":\"~*req.12\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].Opts\",\"tag\":\"BalanceOpts\",\"type\":\"*variable\",\"value\":\"~*req.13\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].CostIncrements\",\"tag\":\"BalanceCostIncrements\",\"type\":\"*variable\",\"value\":\"~*req.14\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].AttributeIDs\",\"tag\":\"BalanceAttributeIDs\",\"type\":\"*variable\",\"value\":\"~*req.15\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].RateProfileIDs\",\"tag\":\"BalanceRateProfileIDs\",\"type\":\"*variable\",\"value\":\"~*req.16\"},{\"path\":\"ThresholdIDs\",\"tag\":\"ThresholdIDs\",\"type\":\"*variable\",\"value\":\"~*req.17\"}],\"file_name\":\"Accounts.csv\",\"flags\":null,\"type\":\"*accounts\"}],\"enabled\":false,\"field_separator\":\",\",\"id\":\"*default\",\"lockfile_path\":\".cgr.lck\",\"opts\":{\"*cache\":\"\",\"*forceLock\":false,\"*stopOnError\":false,\"*withIndex\":true},\"run_delay\":\"0\",\"tenant\":\"\",\"tp_in_dir\":\"/var/spool/cgrates/loader/in\",\"tp_out_dir\":\"/var/spool/cgrates/loader/out\"}]}" var rpl26 string if err := testRPC.Call(context.Background(), utils.ConfigSv1GetConfigAsJSON, &config.SectionWithAPIOpts{ Tenant: "cgrates.org", diff --git a/general_tests/all_sections_cfg_rld_it_test.go b/general_tests/all_sections_cfg_rld_it_test.go index ac4d1683e..6c093dd0f 100644 --- a/general_tests/all_sections_cfg_rld_it_test.go +++ b/general_tests/all_sections_cfg_rld_it_test.go @@ -139,7 +139,7 @@ func testSectConfigSReloadGeneral(t *testing.T) { } else if reply != utils.OK { t.Errorf("Expected OK received: %+v", reply) } - cfgStr := "{\"general\":{\"connect_attempts\":5,\"connect_timeout\":\"1s\",\"dbdata_encoding\":\"*msgpack\",\"decimal_max_scale\":0,\"decimal_min_scale\":0,\"decimal_precision\":0,\"decimal_rounding_mode\":\"*toNearestEven\",\"default_caching\":\"*reload\",\"default_category\":\"call\",\"default_request_type\":\"*rated\",\"default_tenant\":\"cgrates.org\",\"default_timezone\":\"Local\",\"digest_equal\":\":\",\"digest_separator\":\",\",\"failed_posts_dir\":\"/var/spool/cgrates/failed_posts\",\"failed_posts_ttl\":\"5s\",\"locking_timeout\":\"0\",\"log_level\":7,\"logger\":\"*syslog\",\"max_parallel_conns\":100,\"node_id\":\"98ead14\",\"opts\":{\"*exporterIDs\":[]},\"poster_attempts\":3,\"reconnects\":-1,\"reply_timeout\":\"50s\",\"rounding_decimals\":5,\"rsr_separator\":\";\",\"tpexport_dir\":\"/var/spool/cgrates/tpe\"}}" + cfgStr := "{\"general\":{\"connect_attempts\":5,\"connect_timeout\":\"1s\",\"dbdata_encoding\":\"*msgpack\",\"decimal_max_scale\":0,\"decimal_min_scale\":0,\"decimal_precision\":0,\"decimal_rounding_mode\":\"*toNearestEven\",\"default_caching\":\"*reload\",\"default_category\":\"call\",\"default_request_type\":\"*rated\",\"default_tenant\":\"cgrates.org\",\"default_timezone\":\"Local\",\"digest_equal\":\":\",\"digest_separator\":\",\",\"failed_posts_dir\":\"/var/spool/cgrates/failed_posts\",\"failed_posts_ttl\":\"5s\",\"locking_timeout\":\"0\",\"log_level\":7,\"logger\":\"*syslog\",\"max_parallel_conns\":100,\"max_reconnect_interval\":\"0\",\"node_id\":\"98ead14\",\"opts\":{\"*exporterIDs\":[]},\"poster_attempts\":3,\"reconnects\":-1,\"reply_timeout\":\"50s\",\"rounding_decimals\":5,\"rsr_separator\":\";\",\"tpexport_dir\":\"/var/spool/cgrates/tpe\"}}" var rpl string if err := testSectRPC.Call(context.Background(), utils.ConfigSv1GetConfigAsJSON, &config.SectionWithAPIOpts{ Tenant: "cgrates.org", @@ -467,7 +467,7 @@ func testSectConfigSReloadAsteriskAgent(t *testing.T) { } else if reply != utils.OK { t.Errorf("Expected OK received: %+v", reply) } - cfgStr := "{\"asterisk_agent\":{\"asterisk_conns\":[{\"address\":\"127.0.0.1:8088\",\"alias\":\"\",\"connect_attempts\":3,\"password\":\"CGRateS.org\",\"reconnects\":5,\"user\":\"cgrates\"}],\"create_cdr\":false,\"enabled\":false,\"sessions_conns\":[\"*birpc_internal\"]}}" + cfgStr := "{\"asterisk_agent\":{\"asterisk_conns\":[{\"address\":\"127.0.0.1:8088\",\"alias\":\"\",\"connect_attempts\":3,\"max_reconnect_interval\":\"0s\",\"password\":\"CGRateS.org\",\"reconnects\":5,\"user\":\"cgrates\"}],\"create_cdr\":false,\"enabled\":false,\"sessions_conns\":[\"*birpc_internal\"]}}" var rpl string if err := testSectRPC.Call(context.Background(), utils.ConfigSv1GetConfigAsJSON, &config.SectionWithAPIOpts{ Tenant: "cgrates.org", @@ -489,7 +489,7 @@ func testSectConfigSReloadFreeswitchAgent(t *testing.T) { } else if reply != utils.OK { t.Errorf("Expected OK received: %+v", reply) } - cfgStr := "{\"freeswitch_agent\":{\"create_cdr\":false,\"empty_balance_ann_file\":\"\",\"empty_balance_context\":\"\",\"enabled\":false,\"event_socket_conns\":[{\"address\":\"127.0.0.1:8021\",\"alias\":\"127.0.0.1:8021\",\"password\":\"ClueCon\",\"reconnects\":5}],\"extra_fields\":[],\"low_balance_ann_file\":\"\",\"max_wait_connection\":\"2s\",\"sessions_conns\":[\"*birpc_internal\"],\"subscribe_park\":true}}" + cfgStr := "{\"freeswitch_agent\":{\"create_cdr\":false,\"empty_balance_ann_file\":\"\",\"empty_balance_context\":\"\",\"enabled\":false,\"event_socket_conns\":[{\"address\":\"127.0.0.1:8021\",\"alias\":\"127.0.0.1:8021\",\"max_reconnect_interval\":\"0s\",\"password\":\"ClueCon\",\"reconnects\":5}],\"extra_fields\":[],\"low_balance_ann_file\":\"\",\"max_wait_connection\":\"2s\",\"sessions_conns\":[\"*birpc_internal\"],\"subscribe_park\":true}}" var rpl string if err := testSectRPC.Call(context.Background(), utils.ConfigSv1GetConfigAsJSON, &config.SectionWithAPIOpts{ Tenant: "cgrates.org", @@ -511,7 +511,7 @@ func testSectConfigSReloadKamailioAgent(t *testing.T) { } else if reply != utils.OK { t.Errorf("Expected OK received: %+v", reply) } - cfgStr := "{\"kamailio_agent\":{\"create_cdr\":false,\"enabled\":false,\"evapi_conns\":[{\"address\":\"127.0.0.1:8448\",\"alias\":\"\",\"reconnects\":5}],\"sessions_conns\":[\"*birpc_internal\"],\"timezone\":\"\"}}" + cfgStr := "{\"kamailio_agent\":{\"create_cdr\":false,\"enabled\":false,\"evapi_conns\":[{\"address\":\"127.0.0.1:8448\",\"alias\":\"\",\"max_reconnect_interval\":\"0s\",\"reconnects\":5}],\"sessions_conns\":[\"*birpc_internal\"],\"timezone\":\"\"}}" var rpl string if err := testSectRPC.Call(context.Background(), utils.ConfigSv1GetConfigAsJSON, &config.SectionWithAPIOpts{ Tenant: "cgrates.org", @@ -816,7 +816,7 @@ func testSectConfigSReloadLoaders(t *testing.T) { } else if reply != utils.OK { t.Errorf("Expected OK received: %+v", reply) } - cfgStr := "{\"loaders\":[{\"action\":\"*store\",\"cache\":{\"*accounts\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*action_profiles\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*attributes\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*chargers\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*dispatcher_hosts\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*dispatchers\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*filters\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*rate_profiles\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*resources\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*routes\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*stats\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*thresholds\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"}},\"caches_conns\":[\"*internal\"],\"data\":[{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"new_branch\":true,\"path\":\"Rules.Type\",\"tag\":\"Type\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Rules.Element\",\"tag\":\"Element\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"Rules.Values\",\"tag\":\"Values\",\"type\":\"*variable\",\"value\":\"~*req.4\"}],\"file_name\":\"Filters.csv\",\"flags\":null,\"type\":\"*filters\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"TenantID\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ProfileID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weights\",\"tag\":\"Weights\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"Blockers\",\"tag\":\"Blockers\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"new_branch\":true,\"path\":\"Attributes.FilterIDs\",\"tag\":\"AttributeFilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"path\":\"Attributes.Blockers\",\"tag\":\"AttributeBlockers\",\"type\":\"*variable\",\"value\":\"~*req.6\"},{\"path\":\"Attributes.Path\",\"tag\":\"Path\",\"type\":\"*variable\",\"value\":\"~*req.7\"},{\"path\":\"Attributes.Type\",\"tag\":\"Type\",\"type\":\"*variable\",\"value\":\"~*req.8\"},{\"path\":\"Attributes.Value\",\"tag\":\"Value\",\"type\":\"*variable\",\"value\":\"~*req.9\"}],\"file_name\":\"Attributes.csv\",\"flags\":null,\"type\":\"*attributes\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weights\",\"tag\":\"Weights\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"UsageTTL\",\"tag\":\"TTL\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"Limit\",\"tag\":\"Limit\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"path\":\"AllocationMessage\",\"tag\":\"AllocationMessage\",\"type\":\"*variable\",\"value\":\"~*req.6\"},{\"path\":\"Blocker\",\"tag\":\"Blocker\",\"type\":\"*variable\",\"value\":\"~*req.7\"},{\"path\":\"Stored\",\"tag\":\"Stored\",\"type\":\"*variable\",\"value\":\"~*req.8\"},{\"path\":\"ThresholdIDs\",\"tag\":\"ThresholdIDs\",\"type\":\"*variable\",\"value\":\"~*req.9\"}],\"file_name\":\"Resources.csv\",\"flags\":null,\"type\":\"*resources\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weights\",\"tag\":\"Weights\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"Blockers\",\"tag\":\"Blockers\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"QueueLength\",\"tag\":\"QueueLength\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"path\":\"TTL\",\"tag\":\"TTL\",\"type\":\"*variable\",\"value\":\"~*req.6\"},{\"path\":\"MinItems\",\"tag\":\"MinItems\",\"type\":\"*variable\",\"value\":\"~*req.7\"},{\"path\":\"Stored\",\"tag\":\"Stored\",\"type\":\"*variable\",\"value\":\"~*req.8\"},{\"path\":\"ThresholdIDs\",\"tag\":\"ThresholdIDs\",\"type\":\"*variable\",\"value\":\"~*req.9\"},{\"new_branch\":true,\"path\":\"Metrics.MetricID\",\"tag\":\"MetricIDs\",\"type\":\"*variable\",\"value\":\"~*req.10\"},{\"path\":\"Metrics.FilterIDs\",\"tag\":\"MetricFilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.11\"},{\"path\":\"Metrics.Blockers\",\"tag\":\"MetricBlockers\",\"type\":\"*variable\",\"value\":\"~*req.12\"}],\"file_name\":\"Stats.csv\",\"flags\":null,\"type\":\"*stats\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weights\",\"tag\":\"Weights\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"MaxHits\",\"tag\":\"MaxHits\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"MinHits\",\"tag\":\"MinHits\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"path\":\"MinSleep\",\"tag\":\"MinSleep\",\"type\":\"*variable\",\"value\":\"~*req.6\"},{\"path\":\"Blocker\",\"tag\":\"Blocker\",\"type\":\"*variable\",\"value\":\"~*req.7\"},{\"path\":\"ActionProfileIDs\",\"tag\":\"ActionProfileIDs\",\"type\":\"*variable\",\"value\":\"~*req.8\"},{\"path\":\"Async\",\"tag\":\"Async\",\"type\":\"*variable\",\"value\":\"~*req.9\"}],\"file_name\":\"Thresholds.csv\",\"flags\":null,\"type\":\"*thresholds\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weights\",\"tag\":\"Weights\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"Blockers\",\"tag\":\"Blockers\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"Sorting\",\"tag\":\"Sorting\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"path\":\"SortingParameters\",\"tag\":\"SortingParameters\",\"type\":\"*variable\",\"value\":\"~*req.6\"},{\"new_branch\":true,\"path\":\"Routes.ID\",\"tag\":\"RouteID\",\"type\":\"*variable\",\"value\":\"~*req.7\"},{\"path\":\"Routes.FilterIDs\",\"tag\":\"RouteFilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.8\"},{\"path\":\"Routes.AccountIDs\",\"tag\":\"RouteAccountIDs\",\"type\":\"*variable\",\"value\":\"~*req.9\"},{\"path\":\"Routes.RateProfileIDs\",\"tag\":\"RouteRateProfileIDs\",\"type\":\"*variable\",\"value\":\"~*req.10\"},{\"path\":\"Routes.ResourceIDs\",\"tag\":\"RouteResourceIDs\",\"type\":\"*variable\",\"value\":\"~*req.11\"},{\"path\":\"Routes.StatIDs\",\"tag\":\"RouteStatIDs\",\"type\":\"*variable\",\"value\":\"~*req.12\"},{\"path\":\"Routes.Weights\",\"tag\":\"RouteWeights\",\"type\":\"*variable\",\"value\":\"~*req.13\"},{\"path\":\"Routes.Blockers\",\"tag\":\"RouteBlockers\",\"type\":\"*variable\",\"value\":\"~*req.14\"},{\"path\":\"Routes.RouteParameters\",\"tag\":\"RouteParameters\",\"type\":\"*variable\",\"value\":\"~*req.15\"}],\"file_name\":\"Routes.csv\",\"flags\":null,\"type\":\"*routes\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weights\",\"tag\":\"Weights\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"Blockers\",\"tag\":\"Blockers\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"RunID\",\"tag\":\"RunID\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"path\":\"AttributeIDs\",\"tag\":\"AttributeIDs\",\"type\":\"*variable\",\"value\":\"~*req.6\"}],\"file_name\":\"Chargers.csv\",\"flags\":null,\"type\":\"*chargers\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weight\",\"tag\":\"Weight\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"Strategy\",\"tag\":\"Strategy\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"StrategyParams\",\"tag\":\"StrategyParameters\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"new_branch\":true,\"path\":\"Hosts.ID\",\"tag\":\"ConnID\",\"type\":\"*variable\",\"value\":\"~*req.6\"},{\"path\":\"Hosts.FilterIDs\",\"tag\":\"ConnFilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.7\"},{\"path\":\"Hosts.Weight\",\"tag\":\"ConnWeight\",\"type\":\"*variable\",\"value\":\"~*req.8\"},{\"path\":\"Hosts.Blocker\",\"tag\":\"ConnBlocker\",\"type\":\"*variable\",\"value\":\"~*req.9\"},{\"path\":\"Hosts.Params\",\"tag\":\"ConnParameters\",\"type\":\"*variable\",\"value\":\"~*req.10\"}],\"file_name\":\"DispatcherProfiles.csv\",\"flags\":null,\"type\":\"*dispatchers\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"Address\",\"tag\":\"Address\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Transport\",\"tag\":\"Transport\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"ConnectAttempts\",\"tag\":\"ConnectAttempts\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"Reconnects\",\"tag\":\"Reconnects\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"path\":\"ConnectTimeout\",\"tag\":\"ConnectTimeout\",\"type\":\"*variable\",\"value\":\"~*req.6\"},{\"path\":\"ReplyTimeout\",\"tag\":\"ReplyTimeout\",\"type\":\"*variable\",\"value\":\"~*req.7\"},{\"path\":\"TLS\",\"tag\":\"TLS\",\"type\":\"*variable\",\"value\":\"~*req.8\"},{\"path\":\"ClientKey\",\"tag\":\"ClientKey\",\"type\":\"*variable\",\"value\":\"~*req.9\"},{\"path\":\"ClientCertificate\",\"tag\":\"ClientCertificate\",\"type\":\"*variable\",\"value\":\"~*req.10\"},{\"path\":\"CaCertificate\",\"tag\":\"CaCertificate\",\"type\":\"*variable\",\"value\":\"~*req.11\"}],\"file_name\":\"DispatcherHosts.csv\",\"flags\":null,\"type\":\"*dispatcher_hosts\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weights\",\"tag\":\"Weights\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"MinCost\",\"tag\":\"MinCost\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"MaxCost\",\"tag\":\"MaxCost\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"path\":\"MaxCostStrategy\",\"tag\":\"MaxCostStrategy\",\"type\":\"*variable\",\"value\":\"~*req.6\"},{\"filters\":[\"*notempty:~*req.7:\"],\"path\":\"Rates[\\u003c~*req.7\\u003e].FilterIDs\",\"tag\":\"RateFilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.8\"},{\"filters\":[\"*notempty:~*req.7:\"],\"path\":\"Rates[\\u003c~*req.7\\u003e].ActivationTimes\",\"tag\":\"RateActivationTimes\",\"type\":\"*variable\",\"value\":\"~*req.9\"},{\"filters\":[\"*notempty:~*req.7:\"],\"path\":\"Rates[\\u003c~*req.7\\u003e].Weights\",\"tag\":\"RateWeights\",\"type\":\"*variable\",\"value\":\"~*req.10\"},{\"filters\":[\"*notempty:~*req.7:\"],\"path\":\"Rates[\\u003c~*req.7\\u003e].Blocker\",\"tag\":\"RateBlocker\",\"type\":\"*variable\",\"value\":\"~*req.11\"},{\"filters\":[\"*notempty:~*req.7:\"],\"new_branch\":true,\"path\":\"Rates[\\u003c~*req.7\\u003e].IntervalRates.IntervalStart\",\"tag\":\"RateIntervalStart\",\"type\":\"*variable\",\"value\":\"~*req.12\"},{\"filters\":[\"*notempty:~*req.7:\"],\"path\":\"Rates[\\u003c~*req.7\\u003e].IntervalRates.FixedFee\",\"tag\":\"RateFixedFee\",\"type\":\"*variable\",\"value\":\"~*req.13\"},{\"filters\":[\"*notempty:~*req.7:\"],\"path\":\"Rates[\\u003c~*req.7\\u003e].IntervalRates.RecurrentFee\",\"tag\":\"RateRecurrentFee\",\"type\":\"*variable\",\"value\":\"~*req.14\"},{\"filters\":[\"*notempty:~*req.7:\"],\"path\":\"Rates[\\u003c~*req.7\\u003e].IntervalRates.Unit\",\"tag\":\"RateUnit\",\"type\":\"*variable\",\"value\":\"~*req.15\"},{\"filters\":[\"*notempty:~*req.7:\"],\"path\":\"Rates[\\u003c~*req.7\\u003e].IntervalRates.Increment\",\"tag\":\"RateIncrement\",\"type\":\"*variable\",\"value\":\"~*req.16\"}],\"file_name\":\"Rates.csv\",\"flags\":null,\"type\":\"*rate_profiles\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weights\",\"tag\":\"Weights\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"Blockers\",\"tag\":\"Blockers\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"Schedule\",\"tag\":\"Schedule\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"path\":\"Targets[\\u003c~*req.6\\u003e]\",\"tag\":\"TargetIDs\",\"type\":\"*variable\",\"value\":\"~*req.7\"},{\"filters\":[\"*notempty:~*req.8:\"],\"path\":\"Actions[\\u003c~*req.8\\u003e].FilterIDs\",\"tag\":\"ActionFilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.9\"},{\"filters\":[\"*notempty:~*req.8:\"],\"path\":\"Actions[\\u003c~*req.8\\u003e].TTL\",\"tag\":\"ActionTTL\",\"type\":\"*variable\",\"value\":\"~*req.10\"},{\"filters\":[\"*notempty:~*req.8:\"],\"path\":\"Actions[\\u003c~*req.8\\u003e].Type\",\"tag\":\"ActionType\",\"type\":\"*variable\",\"value\":\"~*req.11\"},{\"filters\":[\"*notempty:~*req.8:\"],\"path\":\"Actions[\\u003c~*req.8\\u003e].Opts\",\"tag\":\"ActionOpts\",\"type\":\"*variable\",\"value\":\"~*req.12\"},{\"filters\":[\"*notempty:~*req.8:\"],\"new_branch\":true,\"path\":\"Actions[\\u003c~*req.8\\u003e].Diktats.Path\",\"tag\":\"ActionPath\",\"type\":\"*variable\",\"value\":\"~*req.13\"},{\"filters\":[\"*notempty:~*req.8:\"],\"path\":\"Actions[\\u003c~*req.8\\u003e].Diktats.Value\",\"tag\":\"ActionValue\",\"type\":\"*variable\",\"value\":\"~*req.14\"}],\"file_name\":\"Actions.csv\",\"flags\":null,\"type\":\"*action_profiles\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weights\",\"tag\":\"Weights\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"Blockers\",\"tag\":\"Blockers\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"Opts\",\"tag\":\"Opts\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].FilterIDs\",\"tag\":\"BalanceFilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.7\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].Weights\",\"tag\":\"BalanceWeights\",\"type\":\"*variable\",\"value\":\"~*req.8\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].Blockers\",\"tag\":\"BalanceBlockers\",\"type\":\"*variable\",\"value\":\"~*req.9\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].Type\",\"tag\":\"BalanceType\",\"type\":\"*variable\",\"value\":\"~*req.10\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].Units\",\"tag\":\"BalanceUnits\",\"type\":\"*variable\",\"value\":\"~*req.11\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].UnitFactors\",\"tag\":\"BalanceUnitFactors\",\"type\":\"*variable\",\"value\":\"~*req.12\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].Opts\",\"tag\":\"BalanceOpts\",\"type\":\"*variable\",\"value\":\"~*req.13\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].CostIncrements\",\"tag\":\"BalanceCostIncrements\",\"type\":\"*variable\",\"value\":\"~*req.14\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].AttributeIDs\",\"tag\":\"BalanceAttributeIDs\",\"type\":\"*variable\",\"value\":\"~*req.15\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].RateProfileIDs\",\"tag\":\"BalanceRateProfileIDs\",\"type\":\"*variable\",\"value\":\"~*req.16\"},{\"path\":\"ThresholdIDs\",\"tag\":\"ThresholdIDs\",\"type\":\"*variable\",\"value\":\"~*req.17\"}],\"file_name\":\"Accounts.csv\",\"flags\":null,\"type\":\"*accounts\"}],\"enabled\":false,\"field_separator\":\",\",\"id\":\"*default\",\"lockfile_path\":\".cgr.lck\",\"opts\":{\"*cache\":\"\",\"*forceLock\":false,\"*stopOnError\":false,\"*withIndex\":true},\"run_delay\":\"0\",\"tenant\":\"\",\"tp_in_dir\":\"/var/spool/cgrates/loader/in\",\"tp_out_dir\":\"/var/spool/cgrates/loader/out\"}]}" + cfgStr := "{\"loaders\":[{\"action\":\"*store\",\"cache\":{\"*accounts\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*action_profiles\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*attributes\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*chargers\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*dispatcher_hosts\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*dispatchers\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*filters\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*rate_profiles\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*resources\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*routes\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*stats\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"},\"*thresholds\":{\"limit\":-1,\"precache\":false,\"replicate\":false,\"static_ttl\":false,\"ttl\":\"5s\"}},\"caches_conns\":[\"*internal\"],\"data\":[{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"new_branch\":true,\"path\":\"Rules.Type\",\"tag\":\"Type\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Rules.Element\",\"tag\":\"Element\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"Rules.Values\",\"tag\":\"Values\",\"type\":\"*variable\",\"value\":\"~*req.4\"}],\"file_name\":\"Filters.csv\",\"flags\":null,\"type\":\"*filters\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"TenantID\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ProfileID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weights\",\"tag\":\"Weights\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"Blockers\",\"tag\":\"Blockers\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"new_branch\":true,\"path\":\"Attributes.FilterIDs\",\"tag\":\"AttributeFilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"path\":\"Attributes.Blockers\",\"tag\":\"AttributeBlockers\",\"type\":\"*variable\",\"value\":\"~*req.6\"},{\"path\":\"Attributes.Path\",\"tag\":\"Path\",\"type\":\"*variable\",\"value\":\"~*req.7\"},{\"path\":\"Attributes.Type\",\"tag\":\"Type\",\"type\":\"*variable\",\"value\":\"~*req.8\"},{\"path\":\"Attributes.Value\",\"tag\":\"Value\",\"type\":\"*variable\",\"value\":\"~*req.9\"}],\"file_name\":\"Attributes.csv\",\"flags\":null,\"type\":\"*attributes\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weights\",\"tag\":\"Weights\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"UsageTTL\",\"tag\":\"TTL\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"Limit\",\"tag\":\"Limit\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"path\":\"AllocationMessage\",\"tag\":\"AllocationMessage\",\"type\":\"*variable\",\"value\":\"~*req.6\"},{\"path\":\"Blocker\",\"tag\":\"Blocker\",\"type\":\"*variable\",\"value\":\"~*req.7\"},{\"path\":\"Stored\",\"tag\":\"Stored\",\"type\":\"*variable\",\"value\":\"~*req.8\"},{\"path\":\"ThresholdIDs\",\"tag\":\"ThresholdIDs\",\"type\":\"*variable\",\"value\":\"~*req.9\"}],\"file_name\":\"Resources.csv\",\"flags\":null,\"type\":\"*resources\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weights\",\"tag\":\"Weights\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"Blockers\",\"tag\":\"Blockers\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"QueueLength\",\"tag\":\"QueueLength\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"path\":\"TTL\",\"tag\":\"TTL\",\"type\":\"*variable\",\"value\":\"~*req.6\"},{\"path\":\"MinItems\",\"tag\":\"MinItems\",\"type\":\"*variable\",\"value\":\"~*req.7\"},{\"path\":\"Stored\",\"tag\":\"Stored\",\"type\":\"*variable\",\"value\":\"~*req.8\"},{\"path\":\"ThresholdIDs\",\"tag\":\"ThresholdIDs\",\"type\":\"*variable\",\"value\":\"~*req.9\"},{\"new_branch\":true,\"path\":\"Metrics.MetricID\",\"tag\":\"MetricIDs\",\"type\":\"*variable\",\"value\":\"~*req.10\"},{\"path\":\"Metrics.FilterIDs\",\"tag\":\"MetricFilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.11\"},{\"path\":\"Metrics.Blockers\",\"tag\":\"MetricBlockers\",\"type\":\"*variable\",\"value\":\"~*req.12\"}],\"file_name\":\"Stats.csv\",\"flags\":null,\"type\":\"*stats\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weights\",\"tag\":\"Weights\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"MaxHits\",\"tag\":\"MaxHits\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"MinHits\",\"tag\":\"MinHits\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"path\":\"MinSleep\",\"tag\":\"MinSleep\",\"type\":\"*variable\",\"value\":\"~*req.6\"},{\"path\":\"Blocker\",\"tag\":\"Blocker\",\"type\":\"*variable\",\"value\":\"~*req.7\"},{\"path\":\"ActionProfileIDs\",\"tag\":\"ActionProfileIDs\",\"type\":\"*variable\",\"value\":\"~*req.8\"},{\"path\":\"Async\",\"tag\":\"Async\",\"type\":\"*variable\",\"value\":\"~*req.9\"}],\"file_name\":\"Thresholds.csv\",\"flags\":null,\"type\":\"*thresholds\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weights\",\"tag\":\"Weights\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"Blockers\",\"tag\":\"Blockers\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"Sorting\",\"tag\":\"Sorting\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"path\":\"SortingParameters\",\"tag\":\"SortingParameters\",\"type\":\"*variable\",\"value\":\"~*req.6\"},{\"new_branch\":true,\"path\":\"Routes.ID\",\"tag\":\"RouteID\",\"type\":\"*variable\",\"value\":\"~*req.7\"},{\"path\":\"Routes.FilterIDs\",\"tag\":\"RouteFilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.8\"},{\"path\":\"Routes.AccountIDs\",\"tag\":\"RouteAccountIDs\",\"type\":\"*variable\",\"value\":\"~*req.9\"},{\"path\":\"Routes.RateProfileIDs\",\"tag\":\"RouteRateProfileIDs\",\"type\":\"*variable\",\"value\":\"~*req.10\"},{\"path\":\"Routes.ResourceIDs\",\"tag\":\"RouteResourceIDs\",\"type\":\"*variable\",\"value\":\"~*req.11\"},{\"path\":\"Routes.StatIDs\",\"tag\":\"RouteStatIDs\",\"type\":\"*variable\",\"value\":\"~*req.12\"},{\"path\":\"Routes.Weights\",\"tag\":\"RouteWeights\",\"type\":\"*variable\",\"value\":\"~*req.13\"},{\"path\":\"Routes.Blockers\",\"tag\":\"RouteBlockers\",\"type\":\"*variable\",\"value\":\"~*req.14\"},{\"path\":\"Routes.RouteParameters\",\"tag\":\"RouteParameters\",\"type\":\"*variable\",\"value\":\"~*req.15\"}],\"file_name\":\"Routes.csv\",\"flags\":null,\"type\":\"*routes\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weights\",\"tag\":\"Weights\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"Blockers\",\"tag\":\"Blockers\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"RunID\",\"tag\":\"RunID\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"path\":\"AttributeIDs\",\"tag\":\"AttributeIDs\",\"type\":\"*variable\",\"value\":\"~*req.6\"}],\"file_name\":\"Chargers.csv\",\"flags\":null,\"type\":\"*chargers\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weight\",\"tag\":\"Weight\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"Strategy\",\"tag\":\"Strategy\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"StrategyParams\",\"tag\":\"StrategyParameters\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"new_branch\":true,\"path\":\"Hosts.ID\",\"tag\":\"ConnID\",\"type\":\"*variable\",\"value\":\"~*req.6\"},{\"path\":\"Hosts.FilterIDs\",\"tag\":\"ConnFilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.7\"},{\"path\":\"Hosts.Weight\",\"tag\":\"ConnWeight\",\"type\":\"*variable\",\"value\":\"~*req.8\"},{\"path\":\"Hosts.Blocker\",\"tag\":\"ConnBlocker\",\"type\":\"*variable\",\"value\":\"~*req.9\"},{\"path\":\"Hosts.Params\",\"tag\":\"ConnParameters\",\"type\":\"*variable\",\"value\":\"~*req.10\"}],\"file_name\":\"DispatcherProfiles.csv\",\"flags\":null,\"type\":\"*dispatchers\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"Address\",\"tag\":\"Address\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Transport\",\"tag\":\"Transport\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"ConnectAttempts\",\"tag\":\"ConnectAttempts\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"Reconnects\",\"tag\":\"Reconnects\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"path\":\"MaxReconnectInterval\",\"tag\":\"MaxReconnectInterval\",\"type\":\"*variable\",\"value\":\"~*req.6\"},{\"path\":\"ConnectTimeout\",\"tag\":\"ConnectTimeout\",\"type\":\"*variable\",\"value\":\"~*req.7\"},{\"path\":\"ReplyTimeout\",\"tag\":\"ReplyTimeout\",\"type\":\"*variable\",\"value\":\"~*req.8\"},{\"path\":\"TLS\",\"tag\":\"TLS\",\"type\":\"*variable\",\"value\":\"~*req.9\"},{\"path\":\"ClientKey\",\"tag\":\"ClientKey\",\"type\":\"*variable\",\"value\":\"~*req.10\"},{\"path\":\"ClientCertificate\",\"tag\":\"ClientCertificate\",\"type\":\"*variable\",\"value\":\"~*req.11\"},{\"path\":\"CaCertificate\",\"tag\":\"CaCertificate\",\"type\":\"*variable\",\"value\":\"~*req.12\"}],\"file_name\":\"DispatcherHosts.csv\",\"flags\":null,\"type\":\"*dispatcher_hosts\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weights\",\"tag\":\"Weights\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"MinCost\",\"tag\":\"MinCost\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"MaxCost\",\"tag\":\"MaxCost\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"path\":\"MaxCostStrategy\",\"tag\":\"MaxCostStrategy\",\"type\":\"*variable\",\"value\":\"~*req.6\"},{\"filters\":[\"*notempty:~*req.7:\"],\"path\":\"Rates[\\u003c~*req.7\\u003e].FilterIDs\",\"tag\":\"RateFilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.8\"},{\"filters\":[\"*notempty:~*req.7:\"],\"path\":\"Rates[\\u003c~*req.7\\u003e].ActivationTimes\",\"tag\":\"RateActivationTimes\",\"type\":\"*variable\",\"value\":\"~*req.9\"},{\"filters\":[\"*notempty:~*req.7:\"],\"path\":\"Rates[\\u003c~*req.7\\u003e].Weights\",\"tag\":\"RateWeights\",\"type\":\"*variable\",\"value\":\"~*req.10\"},{\"filters\":[\"*notempty:~*req.7:\"],\"path\":\"Rates[\\u003c~*req.7\\u003e].Blocker\",\"tag\":\"RateBlocker\",\"type\":\"*variable\",\"value\":\"~*req.11\"},{\"filters\":[\"*notempty:~*req.7:\"],\"new_branch\":true,\"path\":\"Rates[\\u003c~*req.7\\u003e].IntervalRates.IntervalStart\",\"tag\":\"RateIntervalStart\",\"type\":\"*variable\",\"value\":\"~*req.12\"},{\"filters\":[\"*notempty:~*req.7:\"],\"path\":\"Rates[\\u003c~*req.7\\u003e].IntervalRates.FixedFee\",\"tag\":\"RateFixedFee\",\"type\":\"*variable\",\"value\":\"~*req.13\"},{\"filters\":[\"*notempty:~*req.7:\"],\"path\":\"Rates[\\u003c~*req.7\\u003e].IntervalRates.RecurrentFee\",\"tag\":\"RateRecurrentFee\",\"type\":\"*variable\",\"value\":\"~*req.14\"},{\"filters\":[\"*notempty:~*req.7:\"],\"path\":\"Rates[\\u003c~*req.7\\u003e].IntervalRates.Unit\",\"tag\":\"RateUnit\",\"type\":\"*variable\",\"value\":\"~*req.15\"},{\"filters\":[\"*notempty:~*req.7:\"],\"path\":\"Rates[\\u003c~*req.7\\u003e].IntervalRates.Increment\",\"tag\":\"RateIncrement\",\"type\":\"*variable\",\"value\":\"~*req.16\"}],\"file_name\":\"Rates.csv\",\"flags\":null,\"type\":\"*rate_profiles\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weights\",\"tag\":\"Weights\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"Blockers\",\"tag\":\"Blockers\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"Schedule\",\"tag\":\"Schedule\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"path\":\"Targets[\\u003c~*req.6\\u003e]\",\"tag\":\"TargetIDs\",\"type\":\"*variable\",\"value\":\"~*req.7\"},{\"filters\":[\"*notempty:~*req.8:\"],\"path\":\"Actions[\\u003c~*req.8\\u003e].FilterIDs\",\"tag\":\"ActionFilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.9\"},{\"filters\":[\"*notempty:~*req.8:\"],\"path\":\"Actions[\\u003c~*req.8\\u003e].TTL\",\"tag\":\"ActionTTL\",\"type\":\"*variable\",\"value\":\"~*req.10\"},{\"filters\":[\"*notempty:~*req.8:\"],\"path\":\"Actions[\\u003c~*req.8\\u003e].Type\",\"tag\":\"ActionType\",\"type\":\"*variable\",\"value\":\"~*req.11\"},{\"filters\":[\"*notempty:~*req.8:\"],\"path\":\"Actions[\\u003c~*req.8\\u003e].Opts\",\"tag\":\"ActionOpts\",\"type\":\"*variable\",\"value\":\"~*req.12\"},{\"filters\":[\"*notempty:~*req.8:\"],\"new_branch\":true,\"path\":\"Actions[\\u003c~*req.8\\u003e].Diktats.Path\",\"tag\":\"ActionPath\",\"type\":\"*variable\",\"value\":\"~*req.13\"},{\"filters\":[\"*notempty:~*req.8:\"],\"path\":\"Actions[\\u003c~*req.8\\u003e].Diktats.Value\",\"tag\":\"ActionValue\",\"type\":\"*variable\",\"value\":\"~*req.14\"}],\"file_name\":\"Actions.csv\",\"flags\":null,\"type\":\"*action_profiles\"},{\"fields\":[{\"mandatory\":true,\"path\":\"Tenant\",\"tag\":\"Tenant\",\"type\":\"*variable\",\"value\":\"~*req.0\"},{\"mandatory\":true,\"path\":\"ID\",\"tag\":\"ID\",\"type\":\"*variable\",\"value\":\"~*req.1\"},{\"path\":\"FilterIDs\",\"tag\":\"FilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.2\"},{\"path\":\"Weights\",\"tag\":\"Weights\",\"type\":\"*variable\",\"value\":\"~*req.3\"},{\"path\":\"Blockers\",\"tag\":\"Blockers\",\"type\":\"*variable\",\"value\":\"~*req.4\"},{\"path\":\"Opts\",\"tag\":\"Opts\",\"type\":\"*variable\",\"value\":\"~*req.5\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].FilterIDs\",\"tag\":\"BalanceFilterIDs\",\"type\":\"*variable\",\"value\":\"~*req.7\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].Weights\",\"tag\":\"BalanceWeights\",\"type\":\"*variable\",\"value\":\"~*req.8\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].Blockers\",\"tag\":\"BalanceBlockers\",\"type\":\"*variable\",\"value\":\"~*req.9\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].Type\",\"tag\":\"BalanceType\",\"type\":\"*variable\",\"value\":\"~*req.10\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].Units\",\"tag\":\"BalanceUnits\",\"type\":\"*variable\",\"value\":\"~*req.11\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].UnitFactors\",\"tag\":\"BalanceUnitFactors\",\"type\":\"*variable\",\"value\":\"~*req.12\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].Opts\",\"tag\":\"BalanceOpts\",\"type\":\"*variable\",\"value\":\"~*req.13\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].CostIncrements\",\"tag\":\"BalanceCostIncrements\",\"type\":\"*variable\",\"value\":\"~*req.14\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].AttributeIDs\",\"tag\":\"BalanceAttributeIDs\",\"type\":\"*variable\",\"value\":\"~*req.15\"},{\"filters\":[\"*notempty:~*req.6:\"],\"path\":\"Balances[\\u003c~*req.6\\u003e].RateProfileIDs\",\"tag\":\"BalanceRateProfileIDs\",\"type\":\"*variable\",\"value\":\"~*req.16\"},{\"path\":\"ThresholdIDs\",\"tag\":\"ThresholdIDs\",\"type\":\"*variable\",\"value\":\"~*req.17\"}],\"file_name\":\"Accounts.csv\",\"flags\":null,\"type\":\"*accounts\"}],\"enabled\":false,\"field_separator\":\",\",\"id\":\"*default\",\"lockfile_path\":\".cgr.lck\",\"opts\":{\"*cache\":\"\",\"*forceLock\":false,\"*stopOnError\":false,\"*withIndex\":true},\"run_delay\":\"0\",\"tenant\":\"\",\"tp_in_dir\":\"/var/spool/cgrates/loader/in\",\"tp_out_dir\":\"/var/spool/cgrates/loader/out\"}]}" var rpl string if err := testSectRPC.Call(context.Background(), utils.ConfigSv1GetConfigAsJSON, &config.SectionWithAPIOpts{ Tenant: "cgrates.org", diff --git a/general_tests/amqp_multipleconcurrentcalls_it_test.go b/general_tests/amqp_multipleconcurrentcalls_it_test.go new file mode 100644 index 000000000..2c7fffb9e --- /dev/null +++ b/general_tests/amqp_multipleconcurrentcalls_it_test.go @@ -0,0 +1,241 @@ +//go:build integration +// +build integration + +/* +Real-time Online/Offline Charging System (OCS) for Telecom & ISP environments +Copyright (C) ITsysCOM GmbH + +This program is free software: you can redistribute it and/or modify +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 +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 +along with this program. If not, see +*/ +package general_tests + +// import ( +// "fmt" +// "net/rpc" +// "os" +// "path" +// "strconv" +// "testing" +// "time" + +// "github.com/cgrates/cgrates/config" +// "github.com/cgrates/cgrates/ees" +// "github.com/cgrates/cgrates/engine" +// "github.com/cgrates/cgrates/utils" +// ) + +// var ( +// amqpMCCCfgPath string +// amqpMCCCfg *config.CGRConfig +// amqpMCCRPC *rpc.Client +// amqpMCCConfDIR string //run tests for specific configuration +// amqpMCCDelay int + +// amqpMCCTests = []func(t *testing.T){ +// // testCreateDirectory, +// testAMQPMCCLoadConfig, +// testAMQPMCCInitDataDb, +// testAMQPMCCResetStorDb, +// // testAMQPMCCStartEngine, +// testAMQPMCCRPCConn, +// testAMQPMCCProcessEvent, +// // testAMQPMCCStopEngine, +// // testCleanDirectory, +// } +// ) + +// // Test start here +// func TestAMQPMCC(t *testing.T) { +// amqpMCCConfDIR = "amqp_multiplecalls_internal" +// for _, stest := range amqpMCCTests { +// t.Run(amqpMCCConfDIR, stest) +// } +// } + +// var exportPath = []string{"/tmp/testCSV", "/tmp/testComposedCSV", "/tmp/testFWV", "/tmp/testCSVMasked", +// "/tmp/testCSVfromVirt", "/tmp/testCSVExpTemp"} + +// func testCreateDirectory(t *testing.T) { +// for _, dir := range exportPath { +// if err := os.RemoveAll(dir); err != nil { +// t.Fatal("Error removing folder: ", dir, err) +// } +// if err := os.MkdirAll(dir, os.ModePerm); err != nil { +// t.Fatal("Error creating folder: ", dir, err) +// } +// } +// } + +// func testCleanDirectory(t *testing.T) { +// for _, dir := range exportPath { +// if err := os.RemoveAll(dir); err != nil { +// t.Fatal("Error removing folder: ", dir, err) +// } +// } +// } + +// func testAMQPMCCLoadConfig(t *testing.T) { +// var err error +// amqpMCCCfgPath = path.Join(*dataDir, "conf", "samples", amqpMCCConfDIR) +// if amqpMCCCfg, err = config.NewCGRConfigFromPath(amqpMCCCfgPath); err != nil { +// t.Error(err) +// } +// amqpMCCDelay = 1000 +// } + +// func testAMQPMCCInitDataDb(t *testing.T) { +// if err := engine.InitDataDb(amqpMCCCfg); err != nil { +// t.Fatal(err) +// } +// } + +// func testAMQPMCCResetStorDb(t *testing.T) { +// if err := engine.InitStorDb(amqpMCCCfg); err != nil { +// t.Fatal(err) +// } +// } + +// func testAMQPMCCStartEngine(t *testing.T) { +// if _, err := engine.StopStartEngine(amqpMCCCfgPath, amqpMCCDelay); err != nil { +// t.Fatal(err) +// } +// } + +// func testAMQPMCCRPCConn(t *testing.T) { +// var err error +// amqpMCCRPC, err = newRPCClient(amqpMCCCfg.ListenCfg()) // We connect over JSON so we can also troubleshoot if needed +// if err != nil { +// t.Fatal("Could not connect to rater: ", err.Error()) +// } +// } + +// func testAMQPMCCStopEngine(t *testing.T) { +// if err := engine.KillEngine(amqpMCCDelay); err != nil { +// t.Error(err) +// } +// } + +// func exportCDR(idx string, client *rpc.Client, channel chan string, t *testing.T) { +// var reply map[string]map[string]interface{} +// if err := client.Call(utils.EeSv1ProcessEvent, &engine.CGREventWithEeIDs{ +// CGREvent: &utils.CGREvent{ +// Tenant: "cgrates.org", +// ID: "event" + idx, +// Event: map[string]interface{}{ +// utils.RunID: "run_" + idx, +// utils.CGRID: "CGRID" + idx, +// utils.Tenant: "cgrates.org", +// utils.Category: "call", +// utils.ToR: utils.MetaVoice, +// utils.OriginID: "processCDR" + idx, +// utils.OriginHost: "OriginHost" + idx, +// utils.RequestType: utils.MetaPseudoPrepaid, +// utils.AccountField: "1001", +// utils.Destination: "1002", +// utils.SetupTime: time.Date(2021, time.February, 2, 16, 14, 50, 0, time.UTC), +// utils.AnswerTime: time.Date(2021, time.February, 2, 16, 15, 0, 0, time.UTC), +// utils.Usage: 2 * time.Minute, +// }, +// }, +// }, &reply); err != nil { +// channel <- err.Error() +// t.Error(err) +// } else { +// channel <- utils.ToJSON(reply) +// } + +// } + +// func testAMQPMCCProcessEvent(t *testing.T) { +// noOfExports := 2000 +// channel := make(chan string, noOfExports) +// for i := 0; i < noOfExports; i++ { +// idxStr := strconv.Itoa(i) +// go func() { +// var reply map[string]map[string]interface{} +// if err := amqpMCCRPC.Call(utils.EeSv1ProcessEvent, &engine.CGREventWithEeIDs{ +// CGREvent: &utils.CGREvent{ +// Tenant: "cgrates.org", +// ID: "event" + idxStr, +// Event: map[string]interface{}{ +// utils.RunID: "run_" + idxStr, +// utils.CGRID: "CGRID" + idxStr, +// utils.Tenant: "cgrates.org", +// utils.Category: "call", +// utils.ToR: utils.MetaVoice, +// utils.OriginID: "processCDR" + idxStr, +// utils.OriginHost: "OriginHost" + idxStr, +// utils.RequestType: utils.MetaPseudoPrepaid, +// utils.AccountField: "1001", +// utils.Destination: "1002", +// utils.SetupTime: time.Date(2021, time.February, 2, 16, 14, 50, 0, time.UTC), +// utils.AnswerTime: time.Date(2021, time.February, 2, 16, 15, 0, 0, time.UTC), +// utils.Usage: 2 * time.Minute, +// }, +// }, +// }, &reply); err != nil { +// channel <- err.Error() +// t.Error(err) +// } else { +// channel <- utils.ToJSON(reply) +// } +// }() +// } +// for i := 0; i < noOfExports; i++ { +// chanStr := <-channel +// fmt.Println(chanStr) +// } +// time.Sleep(10 * time.Second) + +// } + +// func TestAMQPMC1CExport(t *testing.T) { +// var err error +// amqpMCCCfgPath = path.Join(*dataDir, "conf", "samples", "amqp_multiplecalls_internal") +// if amqpMCCCfg, err = config.NewCGRConfigFromPath(amqpMCCCfgPath); err != nil { +// t.Error(err) +// } +// exporter, err := ees.NewEventExporter(amqpMCCCfg.EEsCfg().Exporters[0], amqpMCCCfg, nil, nil) +// if err != nil { +// t.Error(err) +// } +// for i := 1; i <= 10000; i++ { +// idx := strconv.Itoa(i) +// cgrEv := &utils.CGREvent{ +// Tenant: "cgrates.org", +// ID: "event" + idx, +// Event: map[string]interface{}{ +// utils.RunID: "run_" + idx, +// utils.CGRID: "CGRID" + idx, +// utils.Tenant: "cgrates.org", +// utils.Category: "call", +// utils.ToR: utils.MetaVoice, +// utils.OriginID: "processCDR" + idx, +// utils.OriginHost: "OriginHost" + idx, +// utils.RequestType: utils.MetaPseudoPrepaid, +// utils.AccountField: "1001", +// utils.Destination: "1002", +// utils.SetupTime: time.Date(2021, time.February, 2, 16, 14, 50, 0, time.UTC), +// utils.AnswerTime: time.Date(2021, time.February, 2, 16, 15, 0, 0, time.UTC), +// utils.Usage: 2 * time.Minute, +// }, +// } +// ev, err := exporter.PrepareMap(cgrEv) +// if err != nil { +// t.Error(err) +// } +// go ees.ExportWithAttempts(exporter, ev, "") +// } +// time.Sleep(time.Second) +// } diff --git a/general_tests/indexes_redis_it_test.go b/general_tests/indexes_redis_it_test.go index 1e3dce7a9..ed3c0c8e8 100644 --- a/general_tests/indexes_redis_it_test.go +++ b/general_tests/indexes_redis_it_test.go @@ -35,7 +35,7 @@ func TestIndexesRedis(t *testing.T) { cfg := config.NewDefaultCGRConfig() db, err := engine.NewRedisStorage(cfg.DataDbCfg().Host+":"+cfg.DataDbCfg().Port, 10, cfg.DataDbCfg().User, cfg.DataDbCfg().Password, cfg.GeneralCfg().DBDataEncoding, utils.RedisMaxConns, utils.RedisMaxAttempts, - utils.EmptyString, false, 0, 0, false, utils.EmptyString, utils.EmptyString, utils.EmptyString) + utils.EmptyString, false, 0, 0, 0, 0, false, utils.EmptyString, utils.EmptyString, utils.EmptyString) if err != nil { t.Fatal(err) } diff --git a/general_tests/session_volume_discount_it_test.go b/general_tests/session_volume_discount_it_test.go index 0a4019cd0..57ddc9596 100644 --- a/general_tests/session_volume_discount_it_test.go +++ b/general_tests/session_volume_discount_it_test.go @@ -158,7 +158,7 @@ func testSessVolDiscAuthorizeEventSortRoutes1Min30Sec(t *testing.T) { { RouteID: "supplier2", SortingData: map[string]interface{}{ - "Cost": float64(1.200000000000001), + "Cost": float64(1.2), utils.RateProfileID: "RP_SUPPLIER2", "Weight": float64(0), }, @@ -174,7 +174,7 @@ func testSessVolDiscAuthorizeEventSortRoutes1Min30Sec(t *testing.T) { { RouteID: "supplier3", SortingData: map[string]interface{}{ - "Cost": float64(1.425000000000001), + "Cost": float64(1.425), utils.RateProfileID: "RP_SUPPLIER3", "Weight": float64(0), }, @@ -225,7 +225,7 @@ func testSessVolDiscAuthorizeEventSortRoutes11Min10Sec(t *testing.T) { { RouteID: "supplier2", SortingData: map[string]interface{}{ - "Cost": float64(8.933333333333337), + "Cost": float64(8.933333333333332), utils.RateProfileID: "RP_SUPPLIER2", "Weight": float64(0), }, @@ -241,7 +241,7 @@ func testSessVolDiscAuthorizeEventSortRoutes11Min10Sec(t *testing.T) { { RouteID: "supplier3", SortingData: map[string]interface{}{ - "Cost": float64(10.60833333333334), + "Cost": float64(10.60833333333333), utils.RateProfileID: "RP_SUPPLIER3", "Weight": float64(0), }, @@ -285,7 +285,7 @@ func testSessVolDiscAuthorizeEventSortRoutes20Min(t *testing.T) { RouteID: "supplier2", SortingData: map[string]interface{}{ utils.RateProfileID: "RP_SUPPLIER2", - "Cost": float64(16.00000000000001), // returns from accounts null concretes, so the cost will be null, + "Cost": float64(16), // returns from accounts null concretes, so the cost will be null, "Weight": float64(0), }, }, @@ -308,7 +308,7 @@ func testSessVolDiscAuthorizeEventSortRoutes20Min(t *testing.T) { { RouteID: "supplier3", SortingData: map[string]interface{}{ - "Cost": float64(19.00000000000001), + "Cost": float64(19), utils.RateProfileID: "RP_SUPPLIER3", "Weight": float64(0), }, @@ -479,7 +479,7 @@ func testSessVolDiscAuthorizeEventSortRoutes1Min30SecAfterDebiting(t *testing.T) { RouteID: "supplier2", SortingData: map[string]interface{}{ - "Cost": float64(1.200000000000001), + "Cost": float64(1.2), utils.RateProfileID: "RP_SUPPLIER2", "Weight": float64(0), }, @@ -495,7 +495,7 @@ func testSessVolDiscAuthorizeEventSortRoutes1Min30SecAfterDebiting(t *testing.T) { RouteID: "supplier3", SortingData: map[string]interface{}{ - "Cost": float64(1.425000000000001), + "Cost": float64(1.425), utils.RateProfileID: "RP_SUPPLIER3", "Weight": float64(0), },