From 3e22cef9cbaa3bd55324fbca59de7dcceafc5ce6 Mon Sep 17 00:00:00 2001 From: ionutboangiu Date: Thu, 27 Apr 2023 15:05:08 -0400 Subject: [PATCH] Revise integration tests after StorDB addition --- analyzers/analyzers_it_test.go | 7 +- apis/accounts_it_test.go | 7 + apis/actions_it_test.go | 7 + apis/analyzer_it_test.go | 7 + apis/attributes_it_test.go | 7 + apis/cache_it_test.go | 7 + apis/chargers_it_test.go | 7 + apis/config_it_test.go | 14 + apis/cores_it_test.go | 7 + apis/filter_indexes_it_test.go | 14 +- apis/filters_it_test.go | 7 + apis/indexes_after_load_it_test.go | 7 + apis/loaders_it_test.go | 7 + apis/rates_it_test.go | 7 + apis/resources_it_test.go | 8 + apis/routes_it_test.go | 7 + apis/servmanager_it_test.go | 7 + apis/stats_it_test.go | 7 + apis/thresholds_it_test.go | 7 + apis/tpes_it_test.go | 8 + .../acc_generaltest_internal/cgrates.json | 4 +- .../acc_generaltest_mongo/cgrates.json | 8 +- .../acc_generaltest_mysql/cgrates.json | 4 + .../samples/actions_internal/cgradmin.json | 4 + data/conf/samples/actions_mongo/cgradmin.json | 6 + data/conf/samples/actions_mysql/cgradmin.json | 4 + .../samples/actions_mysql_gob/cgradmin.json | 4 + data/conf/samples/analyzers/cgrates.json | 8 +- data/conf/samples/analyzers_doc/cgrates.json | 78 ++--- .../apis_actions_internal/cgrates.json | 3 + .../samples/apis_actions_mongo/cgrates.json | 6 +- .../samples/apis_actions_mysql/cgrates.json | 69 +++-- .../apis_chargers_internal/cgrates.json | 4 + .../samples/apis_chargers_mongo/cgrates.json | 54 ++-- .../samples/apis_chargers_mysql/cgrates.json | 52 ++-- .../samples/apis_config_mongo/cgrates.json | 6 + .../samples/apis_config_mysql/cgrates.json | 177 +++++------ .../apis_loaders_internal/cgrates.json | 3 + .../samples/apis_loaders_mongo/cgrates.json | 6 +- .../samples/apis_loaders_mysql/cgrates.json | 4 + .../samples/apis_srvmng_internal/cgrates.json | 4 + .../samples/apis_srvmng_mongo/cgrates.json | 6 + .../samples/apis_srvmng_mysql/cgrates.json | 4 + .../samples/attr_test_internal/cgrates.json | 3 + .../conf/samples/attr_test_mongo/cgrates.json | 6 + .../conf/samples/attr_test_mysql/cgrates.json | 4 +- .../samples/attributes_internal/cgrates.json | 35 +-- .../samples/attributes_mongo/cgrates.json | 36 ++- .../samples/attributes_mysql/cgrates.json | 3 + .../attributesindexes_mongo/cgrates.json | 49 +-- .../attributesindexes_mysql/cgrates.json | 37 ++- .../dispatcher_engine/cgrates.json | 3 + .../dispatcher_engine2/cgrates.json | 4 + .../cache_replicate/engine1/cgrates.json | 4 + .../fltr_update_e1_mongo/cgrates.json | 6 +- .../fltr_update_e1_mysql/cgrates.json | 4 +- .../dispatcher_engine/cgrates.json | 4 +- .../dispatcher_engine2/cgrates.json | 4 + .../engine1/cgrates.json | 4 +- .../cdrsreplicationmaster.json | 8 +- .../cdrsreplicationmaster.json | 4 + .../cdrsreplicationslave.json | 6 + .../cdrsreplicationslave.json | 4 + .../cdrsv1processeventmongo/cgrates.json | 7 +- .../cdrsv1processeventmysql/cgrates.json | 4 + data/conf/samples/cdrsv2internal/cgrates.json | 115 +++---- data/conf/samples/cdrsv2mongo/cgrates.json | 111 +++---- .../conf/samples/cdrsv2mysql/cdrsv2mysql.json | 110 +++---- .../cdrsv_failover_internal/cgrates.json | 150 +++++----- .../samples/cdrsv_failover_mongo/cgrates.json | 161 +++++----- .../samples/cdrsv_failover_mysql/cgrates.json | 4 + .../cfg_rld_rates_internal/cgrates.json | 10 +- .../samples/cfg_rld_rates_mongo/cgrates.json | 16 +- .../samples/cfg_rld_rates_mysql/cgrates.json | 4 +- data/conf/samples/core_config/cgrates.json | 27 +- .../dataconverter_internal/cgrates.json | 4 + .../samples/dataconverter_mongo/cgrates.json | 6 + .../samples/dataconverter_mysql/cgrates.json | 4 + .../samples/diamagent_internal/cgrates.json | 6 +- .../conf/samples/diamagent_mongo/cgrates.json | 6 + .../conf/samples/diamagent_mysql/cgrates.json | 4 + .../diamagentmaxconn_internal/cgrates.json | 4 + .../diamagentmaxconn_mongo/cgrates.json | 7 + .../diamagentmaxconn_mysql/cgrates.json | 4 + .../diamsctpagent_internal/cgrates.json | 4 + .../samples/diamsctpagent_mongo/cgrates.json | 7 + .../samples/diamsctpagent_mysql/cgrates.json | 4 + .../conf/samples/dispatcher_opts/cgrates.json | 110 +++---- .../dispatcher_opts_admin/cgrates.json | 117 ++++---- .../conf/samples/dispatchers/all/cgrates.json | 51 ++-- .../samples/dispatchers/all2/cgrates.json | 51 ++-- .../dispatchers/all2_mongo/cgrates.json | 46 ++- .../dispatchers/all2_mysql/cgrates.json | 51 ++-- .../dispatchers/all_mongo/cgrates.json | 45 ++- .../dispatchers/all_mysql/cgrates.json | 49 ++- .../dispatchers_mysql/cgrates.json | 26 +- .../dispatchers_no_attributes/cgrates.json | 26 +- .../samples/dnsagent_internal/cgrates.json | 128 ++++---- data/conf/samples/dnsagent_mongo/cgrates.json | 5 + data/conf/samples/dnsagent_mysql/cgrates.json | 3 + data/conf/samples/ees/cgrates.json | 19 +- .../samples/ees_blocker_internal/cgrates.json | 84 +++--- .../samples/ees_blocker_mongo/cgrates.json | 6 + .../samples/ees_blocker_mysql/cgrates.json | 4 + data/conf/samples/ees_internal/cgrates.json | 4 + data/conf/samples/ees_mongo/cgrates.json | 7 +- data/conf/samples/ees_mysql/cgrates.json | 4 + data/conf/samples/ers_internal/cgrates.json | 6 +- data/conf/samples/ers_mongo/cgrates.json | 6 + data/conf/samples/ers_mysql/cgrates.json | 4 + .../export_it_test_internal/cgrates.json | 3 + .../samples/export_it_test_mongo/cgrates.json | 6 + .../samples/export_it_test_mysql/cgrates.json | 4 + .../filter_indexes_internal/cgrates.json | 4 +- .../samples/filter_indexes_mongo/cgrates.json | 6 +- .../samples/filter_indexes_mysql/cgrates.json | 4 +- .../engine1_mongo/cgrates.json | 30 +- .../engine1_redis/cgrates.json | 28 +- .../engine2_mongo/cgrates.json | 31 +- .../engine2_redis/cgrates.json | 29 +- .../internal/cgrates.json | 42 ++- data/conf/samples/filters/cgrates.json | 42 ++- data/conf/samples/filters_gob/cgrates.json | 46 ++- .../samples/filters_internal/cgrates.json | 3 + data/conf/samples/filters_mongo/cgrates.json | 9 +- data/conf/samples/filters_mysql/cgrates.json | 5 +- .../samples/fltr_sep_internal/cgrates.json | 4 + data/conf/samples/fltr_sep_mongo/cgrates.json | 6 + data/conf/samples/fltr_sep_mysql/cgrates.json | 4 + data/conf/samples/gocs/au_site/cgrates.json | 3 + data/conf/samples/gocs/dsp_site/cgrates.json | 4 + data/conf/samples/gocs/us_site/cgrates.json | 4 +- .../samples/httpagent_internal/cgrates.json | 4 + .../conf/samples/httpagent_mongo/cgrates.json | 33 +- .../conf/samples/httpagent_mysql/cgrates.json | 3 + .../httpagenttls_internal/cgrates.json | 4 + .../samples/httpagenttls_mongo/cgrates.json | 5 + .../samples/httpagenttls_mysql/cgrates.json | 3 + .../ld_process_match_rt_internal/cgrates.json | 3 + .../ld_process_match_rt_mongo/cgrates.json | 6 +- .../ld_process_match_rt_mysql/cgrates.json | 3 + data/conf/samples/loader_mongo/cgrates.json | 6 + data/conf/samples/loader_mysql/cgrates.json | 3 + .../samples/loaders/tutinternal/cgrates.json | 4 + .../samples/loaders/tutmongo/cgrates.json | 5 + .../samples/loaders/tutmysql/cgrates.json | 3 + .../loaders_old2new_internal/cgrates.json | 5 +- .../loaders_old2new_mongo/cgrates.json | 5 + .../loaders_old2new_mysql/cgrates.json | 3 + .../conf/samples/multiral1_mongo/cgrates.json | 6 + .../conf/samples/multiral1_mysql/cgrates.json | 4 + .../samples/multiral2_internal/cgrates.json | 4 + .../conf/samples/multiral2_mongo/cgrates.json | 6 + .../conf/samples/multiral2_mysql/cgrates.json | 4 + .../samples/precache/tutmongo/cgrates.json | 8 +- .../precache/tutmongo_apiban/cgrates.json | 10 +- .../samples/precache/tutmysql/cgrates.json | 5 +- .../precache/tutmysql_apiban/cgrates.json | 5 +- .../samples/preload_internal/cgrates.json | 3 + .../samples/radagent_internal/cgrates.json | 5 +- data/conf/samples/radagent_mongo/cgrates.json | 6 + data/conf/samples/radagent_mysql/cgrates.json | 3 + data/conf/samples/rates_internal/cgrates.json | 32 +- data/conf/samples/rates_mongo/cgrates.json | 38 +-- data/conf/samples/rates_mysql/cgrates.json | 44 +-- .../registrarc/all2_mongo/cgrates.json | 43 ++- .../registrarc/all2_mysql/cgrates.json | 203 ++++++------- .../samples/registrarc/all_mongo/cgrates.json | 42 ++- .../samples/registrarc/all_mysql/cgrates.json | 52 ++-- .../registrarc/dispatchers_mongo/cgrates.json | 36 +-- .../registrarc/dispatchers_mysql/cgrates.json | 28 +- .../registrarc_rpc_mongo/cgrates.json | 62 ++-- .../registrarc_rpc_mysql/cgrates.json | 56 ++-- .../registrars_rpc_mongo/cgrates.json | 35 +-- .../registrars_rpc_mysql/cgrates.json | 29 +- .../samples/resources_internal/cgrates.json | 57 ++-- .../conf/samples/resources_mongo/cgrates.json | 62 ++-- .../conf/samples/resources_mysql/cgrates.json | 58 ++-- .../routes_cases_internal/cgrates.json | 4 + .../samples/routes_cases_mongo/cgrates.json | 7 +- .../samples/routes_cases_mysql/cgrates.json | 197 ++++++------ .../routes_generaltests_internal/cgrates.json | 137 ++++----- .../routes_generaltests_mongo/cgrates.json | 139 ++++----- .../routes_generaltests_mysql/cgrates.json | 135 +++++---- .../conf/samples/routes_internal/cgrates.json | 42 +-- data/conf/samples/routes_mongo/cgrates.json | 46 +-- data/conf/samples/routes_mysql/cgrates.json | 46 +-- .../samples/rpccaching_mongo/cgrates.json | 136 +++++---- .../samples/rpccaching_mysql/cgrates.json | 120 ++++---- .../rpcexp_opts_engine1_internal/cgrates.json | 134 +++++---- .../rpcexp_opts_engine1_mongo/cgrates.json | 142 ++++----- .../rpcexp_opts_engine1_mysql/cgrates.json | 139 ++++----- .../rpcexp_opts_engine2_internal/cgrates.json | 78 ++--- .../rpcexp_opts_engine2_mongo/cgrates.json | 85 +++--- .../rpcexp_opts_engine2_mysql/cgrates.json | 80 ++--- data/conf/samples/sessinternal/cgrates.json | 4 + .../cgrates.json | 4 +- .../cgrates.json | 279 ++++++++--------- .../cgrates.json | 281 +++++++++--------- .../samples/sessions_internal/cgrates.json | 4 + data/conf/samples/sessions_mongo/cgrates.json | 6 + data/conf/samples/sessions_mysql/cgrates.json | 4 +- .../cgrates.json | 28 +- .../cgrates.json | 34 +-- .../cgrates.json | 48 +-- .../cgrates.json | 26 +- .../cgrates.json | 32 +- .../cgrates.json | 26 +- .../samples/sipagent_internal/cgrates.json | 4 + data/conf/samples/sipagent_mongo/cgrates.json | 6 + data/conf/samples/sipagent_mysql/cgrates.json | 4 + .../cgrates.json | 4 + .../smg_automatic_debits_mongo/cgrates.json | 7 + .../smg_automatic_debits_mysql/cgrates.json | 4 + .../samples/smgreplcmaster_mongo/cgrates.json | 6 + .../samples/smgreplcmaster_mysql/cgrates.json | 4 + .../samples/smgreplcslave_mongo/cgrates.json | 6 + .../samples/smgreplcslave_mysql/cgrates.json | 4 + data/conf/samples/stats_internal/cgrates.json | 4 +- data/conf/samples/stats_mongo/cgrates.json | 5 + data/conf/samples/stats_mysql/cgrates.json | 4 + .../samples/thresholds_internal/cgrates.json | 4 +- .../samples/thresholds_mongo/cgrates.json | 6 + .../samples/thresholds_mysql/cgrates.json | 3 + data/conf/samples/tls/cgrates.json | 4 + data/conf/samples/tls_gob/cgrates.json | 4 + data/conf/samples/tp_internal/cgrates.json | 4 + data/conf/samples/tp_mongo/cgrates.json | 5 + data/conf/samples/tp_mysql/cgrates.json | 4 +- .../samples/tut_session_internal/cgrates.json | 5 +- .../samples/tut_session_mongo/cgrates.json | 6 +- .../samples/tut_session_mysql/cgrates.json | 5 +- data/conf/samples/tutinternal/cgrates.json | 4 + .../conf/samples/tutinternal_gob/cgrates.json | 3 + .../conf/samples/tutinternal_new/cgrates.json | 38 ++- data/conf/samples/tutmongo/cgrates.json | 6 + data/conf/samples/tutmongo2/cgrates.json | 7 +- data/conf/samples/tutmongo2_gob/cgrates.json | 6 +- data/conf/samples/tutmongo_gob/cgrates.json | 6 + data/conf/samples/tutmongojson/cgrates.json | 6 + data/conf/samples/tutmysql/cgrates.json | 3 + data/conf/samples/tutmysqljson/cgrates.json | 191 ++++++------ data/conf/samples/tutpostgres/cgrates.json | 5 + .../samples/twoengines/engine1/cgrates.json | 21 +- .../samples/twoengines/engine2/cgrates.json | 17 +- dispatchers/lib_test.go | 2 +- ees/amqp_it_test.go | 7 +- ees/amqpv1_it_test.go | 7 +- ees/elastic_it_test.go | 7 +- ees/filecsv_it_test.go | 7 +- ees/filefwv_it_test.go | 7 +- ees/httppost_it_test.go | 7 +- ees/kafka_it_test.go | 7 +- ees/posterjsonmap_it_test.go | 7 +- ees/sql_it_test.go | 7 +- ees/sqs_it_test.go | 7 +- ees/virtual_ee_it_test.go | 7 +- efs/efs_it_test.go | 7 +- general_tests/accountactions_it_test.go | 7 +- general_tests/accounts_it_test.go | 7 +- general_tests/all_cfg_rld_it_test.go | 7 +- general_tests/all_sections_cfg_rld_it_test.go | 7 +- general_tests/analyzers_doc_it_test.go | 7 +- .../attributes_filters_index_it_test.go | 7 +- general_tests/attributes_it_test.go | 7 +- general_tests/cacherpl_it_test.go | 14 +- general_tests/cdrs_it_test.go | 7 +- general_tests/cdrs_post_failover_it_test.go | 7 +- general_tests/cgrloader_it_test.go | 7 +- general_tests/config_reload_rates_it_test.go | 7 +- general_tests/dataconverter_it_test.go | 7 +- general_tests/dispatcher_opts_it_test.go | 7 +- general_tests/doubleremove_it_test.go | 7 +- general_tests/ees_blocker_it_test.go | 7 +- general_tests/export_it_test.go | 7 +- general_tests/filter_update_it_test.go | 7 +- general_tests/filtered_replication_it_test.go | 12 +- general_tests/filters_it_test.go | 9 +- general_tests/fltr_sep_it_test.go | 7 +- general_tests/gocs_it_test.go | 14 +- general_tests/kafka_ssl_it_test.go | 7 +- general_tests/ld_process_match_ac_it_test.go | 7 +- general_tests/ld_process_match_rt_it_test.go | 7 +- .../loaders_internal_indexes_it_test.go | 8 +- general_tests/loadersold2new_it_test.go | 7 +- general_tests/resourcesv1_it_test.go | 7 +- general_tests/route_it_test.go | 7 +- general_tests/route_stats_it_test.go | 7 +- general_tests/routes_cases_it_test.go | 7 +- general_tests/rpccaching_it_test.go | 11 +- general_tests/rpcexp_opts_it_test.go | 10 +- general_tests/session2_it_test.go | 7 +- .../session_graceful_shutdown_it_test.go | 8 +- .../session_volume_discount_it_test.go | 7 +- general_tests/tp_it_test.go | 7 +- general_tests/tut_smgeneric_it_test.go | 7 +- general_tests/twoengines_it_test.go | 7 +- registrarc/registrarc_it_test.go | 4 +- registrarc/registrarcrpc_it_test.go | 3 + services/cdrs_it_test.go | 10 +- sessions/sessions_birpc_it_test.go | 7 +- sessions/sessions_data_it_test.go | 7 +- sessions/sessions_it_test.go | 7 +- sessions/sessions_rpl_it_test.go | 7 +- sessions/sessions_voice_it_test.go | 7 +- 305 files changed, 4055 insertions(+), 3148 deletions(-) diff --git a/analyzers/analyzers_it_test.go b/analyzers/analyzers_it_test.go index 237cea022..3f9d5a9fc 100644 --- a/analyzers/analyzers_it_test.go +++ b/analyzers/analyzers_it_test.go @@ -52,7 +52,7 @@ var ( sTestsAlsPrf = []func(t *testing.T){ testAnalyzerSInitCfg, - testAnalyzerSInitDataDb, + testAnalyzerSResetDbs, testAnalyzerSStartEngine, testAnalyzerSRPCConn, @@ -106,10 +106,13 @@ func testAnalyzerSInitCfg(t *testing.T) { } } -func testAnalyzerSInitDataDb(t *testing.T) { +func testAnalyzerSResetDbs(t *testing.T) { if err := engine.InitDataDB(anzCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(anzCfg); err != nil { + t.Fatal(err) + } } // Start CGR Engine diff --git a/apis/accounts_it_test.go b/apis/accounts_it_test.go index 42b968684..5ea9cfe39 100644 --- a/apis/accounts_it_test.go +++ b/apis/accounts_it_test.go @@ -44,6 +44,7 @@ var ( sTestsAccPrf = []func(t *testing.T){ testAccSInitCfg, testAccSInitDataDb, + testAccSResetStorDb, testAccSStartEngine, testAccSRPCConn, testGetAccProfileBeforeSet, @@ -111,6 +112,12 @@ func testAccSInitDataDb(t *testing.T) { } } +func testAccSResetStorDb(t *testing.T) { + if err := engine.InitStorDB(accPrfCfg); err != nil { + t.Fatal(err) + } +} + // Start CGR Engine func testAccSStartEngine(t *testing.T) { if _, err := engine.StopStartEngine(accPrfCfgPath, *waitRater); err != nil { diff --git a/apis/actions_it_test.go b/apis/actions_it_test.go index e7d048284..3af6b7ab0 100644 --- a/apis/actions_it_test.go +++ b/apis/actions_it_test.go @@ -49,6 +49,7 @@ var ( sTestsAct = []func(t *testing.T){ testActionsInitCfg, testActionsInitDataDB, + testActionsResetStorDB, testActionsStartEngine, testActionsRPCConn, @@ -129,6 +130,12 @@ func testActionsInitDataDB(t *testing.T) { } } +func testActionsResetStorDB(t *testing.T) { + if err := engine.InitStorDB(actCfg); err != nil { + t.Fatal(err) + } +} + // Start CGR Engine func testActionsStartEngine(t *testing.T) { if _, err := engine.StopStartEngine(actCfgPath, *waitRater); err != nil { diff --git a/apis/analyzer_it_test.go b/apis/analyzer_it_test.go index b0037f2cf..ac2d63f31 100644 --- a/apis/analyzer_it_test.go +++ b/apis/analyzer_it_test.go @@ -46,6 +46,7 @@ var ( sTestsAnz = []func(t *testing.T){ testAnalyzerSInitCfg, testAnalyzerSInitDataDb, + testAnalyzerSResetStorDb, testAnalyzerSStartEngine, testAnzBiSRPCConn, testAnalyzerSLoad, @@ -94,6 +95,12 @@ func testAnalyzerSInitDataDb(t *testing.T) { } } +func testAnalyzerSResetStorDb(t *testing.T) { + if err := engine.InitStorDB(anzCfg); err != nil { + t.Fatal(err) + } +} + // Start CGR Engine func testAnalyzerSStartEngine(t *testing.T) { if _, err := engine.StopStartEngine(anzCfgPath, *waitRater); err != nil { diff --git a/apis/attributes_it_test.go b/apis/attributes_it_test.go index 5e6a3a852..9c73a40b5 100644 --- a/apis/attributes_it_test.go +++ b/apis/attributes_it_test.go @@ -44,6 +44,7 @@ var ( sTestsAttr = []func(t *testing.T){ testAttributesInitCfg, testAttributesInitDataDb, + testAttributeSResetStorDb, testAttributesStartEngine, testAttributesRPCConn, @@ -134,6 +135,12 @@ func testAttributesInitDataDb(t *testing.T) { } } +func testAttributeSResetStorDb(t *testing.T) { + if err := engine.InitStorDB(attrCfg); err != nil { + t.Fatal(err) + } +} + // Start CGR Engine func testAttributesStartEngine(t *testing.T) { if _, err := engine.StopStartEngine(attrCfgPath, *waitRater); err != nil { diff --git a/apis/cache_it_test.go b/apis/cache_it_test.go index a9a56e5ef..52b2e4ff5 100644 --- a/apis/cache_it_test.go +++ b/apis/cache_it_test.go @@ -47,6 +47,7 @@ var ( sTestsCacheSV1 = []func(t *testing.T){ testCacheSLoadConfig, testCacheSInitDataDb, + testCacheSInitStorDb, testCacheSStartEngine, testCacheSRpcConn, @@ -97,6 +98,12 @@ func testCacheSInitDataDb(t *testing.T) { } } +func testCacheSInitStorDb(t *testing.T) { + if err := engine.InitStorDB(chcCfg); err != nil { + t.Fatal(err) + } +} + // Start engine func testCacheSStartEngine(t *testing.T) { if _, err := engine.StopStartEngine(chcCfgPath, *waitRater); err != nil { diff --git a/apis/chargers_it_test.go b/apis/chargers_it_test.go index 48ac256a1..bf35bd561 100644 --- a/apis/chargers_it_test.go +++ b/apis/chargers_it_test.go @@ -43,6 +43,7 @@ var ( sTestsChargers = []func(t *testing.T){ testChargersInitCfg, testChargersInitDataDb, + testChargersResetStorDb, testChargersStartEngine, testChargersSRPCConn, @@ -110,6 +111,12 @@ func testChargersInitDataDb(t *testing.T) { } } +func testChargersResetStorDb(t *testing.T) { + if err := engine.InitStorDB(chargersCfg); err != nil { + t.Fatal(err) + } +} + // Start CGR Engine func testChargersStartEngine(t *testing.T) { if _, err := engine.StopStartEngine(chargersCfgPath, *waitRater); err != nil { diff --git a/apis/config_it_test.go b/apis/config_it_test.go index 498c85e28..ea965eb5a 100644 --- a/apis/config_it_test.go +++ b/apis/config_it_test.go @@ -43,6 +43,7 @@ var ( sTestsCfg = []func(t *testing.T){ testCfgInitCfg, testCfgInitDataDb, + testCfgResetStorDb, testCfgResetConfigDBStore, testCfgStartEngine, testCfgRPCConn, @@ -55,6 +56,7 @@ var ( //Store Cfg in Database Test testCfgInitCfgStore, testCfgInitDataDbStore, + testCfgResetStorDbStore, testCfgResetConfigDBStore, testCfgStartEngineStore, testCfgRPCConnStore, @@ -104,6 +106,12 @@ func testCfgInitDataDb(t *testing.T) { } } +func testCfgResetStorDb(t *testing.T) { + if err := engine.InitStorDB(cfgCfg); err != nil { + t.Fatal(err) + } +} + // Start CGR Engine func testCfgStartEngine(t *testing.T) { if _, err := engine.StopStartEngine(cfgPath, *waitRater); err != nil { @@ -388,6 +396,12 @@ func testCfgInitDataDbStore(t *testing.T) { } } +func testCfgResetStorDbStore(t *testing.T) { + if err := engine.InitStorDB(cfgCfg); err != nil { + t.Fatal(err) + } +} + func testCfgResetConfigDBStore(t *testing.T) { if err := engine.InitConfigDB(cfgCfg); err != nil { t.Fatal(err) diff --git a/apis/cores_it_test.go b/apis/cores_it_test.go index 1abdd0685..2905dcf99 100644 --- a/apis/cores_it_test.go +++ b/apis/cores_it_test.go @@ -49,6 +49,7 @@ var ( sTestCoreIt = []func(t *testing.T){ testCoreItLoadCofig, testCoreItInitDataDB, + testCoreItInitStorDB, //engine separate with cpu testCoreItStartEngineByExecWithCPUProfiling, @@ -115,6 +116,12 @@ func testCoreItInitDataDB(t *testing.T) { } } +func testCoreItInitStorDB(t *testing.T) { + if err := engine.InitStorDB(coreSCfg); err != nil { + t.Error(err) + } +} + func testCoreItStartEngineByExecWithCPUProfiling(t *testing.T) { engine := exec.Command("cgr-engine", "-config_path", coreSCfgPath, "-cpuprof_dir", argPath) if err := engine.Start(); err != nil { diff --git a/apis/filter_indexes_it_test.go b/apis/filter_indexes_it_test.go index df8f260ba..65cb51ada 100644 --- a/apis/filter_indexes_it_test.go +++ b/apis/filter_indexes_it_test.go @@ -43,7 +43,8 @@ var ( sTestsFilterIndexesSV1 = []func(t *testing.T){ testV1FIdxLoadConfig, - testV1FIdxdxInitDataDb, + testV1FIdxInitDataDb, + testV1FIdxResetStorDb, testV1FIdxStartEngine, testV1FIdxRpcConn, @@ -143,7 +144,8 @@ var ( testV1FIdxThresholdSRemoveThresholdsProfileNoINdexes, testV1IndexClearCache, - testV1FIdxdxInitDataDb, + testV1FIdxInitDataDb, + testV1FIdxResetStorDb, testV1FidxSetProfilesWithFltrsAndOverwriteThemFIdx, testV1FidxSetAndChangeFiltersOnProfiles, @@ -253,12 +255,18 @@ func testV1FIdxLoadConfig(t *testing.T) { } } -func testV1FIdxdxInitDataDb(t *testing.T) { +func testV1FIdxInitDataDb(t *testing.T) { if err := engine.InitDataDB(tFltrIdxCfg); err != nil { t.Fatal(err) } } +func testV1FIdxResetStorDb(t *testing.T) { + if err := engine.InitStorDB(tFltrIdxCfg); err != nil { + t.Fatal(err) + } +} + func testV1IndexClearCache(t *testing.T) { var reply string if err := tFIdxRpc.Call(context.Background(), utils.CacheSv1Clear, &utils.AttrCacheIDsWithAPIOpts{}, &reply); err != nil { diff --git a/apis/filters_it_test.go b/apis/filters_it_test.go index cef1f5f8c..35b5abb1e 100644 --- a/apis/filters_it_test.go +++ b/apis/filters_it_test.go @@ -44,6 +44,7 @@ var ( sTestsFltrs = []func(t *testing.T){ testFiltersInitCfg, testFiltersInitDataDb, + testFiltersResetStorDb, testFiltersStartEngine, testFiltersRPCConn, @@ -104,6 +105,12 @@ func testFiltersInitDataDb(t *testing.T) { } } +func testFiltersResetStorDb(t *testing.T) { + if err := engine.InitStorDB(fltrCfg); err != nil { + t.Fatal(err) + } +} + // Start CGR Engine func testFiltersStartEngine(t *testing.T) { if _, err := engine.StopStartEngine(fltrCfgPath, *waitRater); err != nil { diff --git a/apis/indexes_after_load_it_test.go b/apis/indexes_after_load_it_test.go index c85a4cc47..4f4d3b659 100644 --- a/apis/indexes_after_load_it_test.go +++ b/apis/indexes_after_load_it_test.go @@ -44,6 +44,7 @@ var ( idxLoadAccPrf = []func(t *testing.T){ testIdxLoadInitCfg, testIdxLoadInitDataDb, + testIdxLoadResetStorDb, testIdxLoadStartEngine, testIdxLoadRPCConn, @@ -86,6 +87,12 @@ func testIdxLoadInitDataDb(t *testing.T) { } } +func testIdxLoadResetStorDb(t *testing.T) { + if err := engine.InitStorDB(idxLoadCfg); err != nil { + t.Fatal(err) + } +} + // Start CGR Engine func testIdxLoadStartEngine(t *testing.T) { if _, err := engine.StopStartEngine(idxLoadCfgPath, *waitRater); err != nil { diff --git a/apis/loaders_it_test.go b/apis/loaders_it_test.go index 3c3011939..0097dbbe1 100644 --- a/apis/loaders_it_test.go +++ b/apis/loaders_it_test.go @@ -49,6 +49,7 @@ var ( testLoadersInitCfg, testLoadersInitDataDB, + testLoadersResetStorDB, testLoadersStartEngine, testLoadersRPCConn, @@ -122,6 +123,12 @@ func testLoadersInitDataDB(t *testing.T) { } } +func testLoadersResetStorDB(t *testing.T) { + if err := engine.InitStorDB(ldrCfg); err != nil { + t.Fatal(err) + } +} + // Start CGR Engine func testLoadersStartEngine(t *testing.T) { if _, err := engine.StopStartEngine(ldrCfgPath, *waitRater); err != nil { diff --git a/apis/rates_it_test.go b/apis/rates_it_test.go index 0421900ac..3268e3e5b 100644 --- a/apis/rates_it_test.go +++ b/apis/rates_it_test.go @@ -46,6 +46,7 @@ var ( sTestsRatePrf = []func(t *testing.T){ testRateSInitCfg, testRateSInitDataDb, + testRateSResetStorDb, testRateSStartEngine, testRateSRPCConn, @@ -120,6 +121,12 @@ func testRateSInitDataDb(t *testing.T) { } } +func testRateSResetStorDb(t *testing.T) { + if err := engine.InitStorDB(ratePrfCfg); err != nil { + t.Fatal(err) + } +} + // Start CGR Engine func testRateSStartEngine(t *testing.T) { if _, err := engine.StopStartEngine(ratePrfCfgPath, *waitRater); err != nil { diff --git a/apis/resources_it_test.go b/apis/resources_it_test.go index 34b0bb2a3..d0925d694 100644 --- a/apis/resources_it_test.go +++ b/apis/resources_it_test.go @@ -50,6 +50,7 @@ var ( sTestsRs = []func(t *testing.T){ testResourceSInitCfg, testResourceSInitDataDB, + testResourceSResetStorDB, testResourceSStartEngine, testResourceSRPCConn, @@ -75,6 +76,7 @@ var ( // check threshold behaviour after allocation/release of resources testResourceSInitCfg, testResourceSInitDataDB, + testResourceSResetStorDB, testResourceSStartEngine, testResourceSRPCConn, @@ -123,6 +125,12 @@ func testResourceSInitDataDB(t *testing.T) { } } +func testResourceSResetStorDB(t *testing.T) { + if err := engine.InitStorDB(rsCfg); err != nil { + t.Fatal(err) + } +} + // Start CGR Engine func testResourceSStartEngine(t *testing.T) { if _, err := engine.StopStartEngine(rsCfgPath, *waitRater); err != nil { diff --git a/apis/routes_it_test.go b/apis/routes_it_test.go index 8810039ce..c60d1ce16 100644 --- a/apis/routes_it_test.go +++ b/apis/routes_it_test.go @@ -44,6 +44,7 @@ var ( sTestsRo = []func(t *testing.T){ testRouteSInitCfg, testRouteSInitDataDB, + testRouteSResetStorDB, testRoutesStartEngine, testRoutesRPCConn, @@ -109,6 +110,12 @@ func testRouteSInitDataDB(t *testing.T) { } } +func testRouteSResetStorDB(t *testing.T) { + if err := engine.InitStorDB(roCfg); err != nil { + t.Fatal(err) + } +} + // Start CGR Engine func testRoutesStartEngine(t *testing.T) { if _, err := engine.StopStartEngine(roCfgPath, *waitRater); err != nil { diff --git a/apis/servmanager_it_test.go b/apis/servmanager_it_test.go index dd4079f7a..6f2a2d01e 100644 --- a/apis/servmanager_it_test.go +++ b/apis/servmanager_it_test.go @@ -43,6 +43,7 @@ var ( sTestsServManager = []func(t *testing.T){ testSrvMngInitCfg, testSrvMngInitDataDb, + testSrvMngResetStorDb, testSrvMngStartEngine, testSrvMngSRPCConn, @@ -85,6 +86,12 @@ func testSrvMngInitDataDb(t *testing.T) { } } +func testSrvMngResetStorDb(t *testing.T) { + if err := engine.InitStorDB(srvMngCfg); err != nil { + t.Fatal(err) + } +} + // Start CGR Engine func testSrvMngStartEngine(t *testing.T) { if _, err := engine.StopStartEngine(srvMngCfgPath, *waitRater); err != nil { diff --git a/apis/stats_it_test.go b/apis/stats_it_test.go index 0f2cf8916..e4ce7d5ed 100644 --- a/apis/stats_it_test.go +++ b/apis/stats_it_test.go @@ -49,6 +49,7 @@ var ( sTestsSq = []func(t *testing.T){ testStatsInitCfg, testStatsInitDataDB, + testStatsResetStorDB, testStatsStartEngine, testStatsRPCConn, testStatsGetStatQueueBeforeSet, @@ -113,6 +114,12 @@ func testStatsInitDataDB(t *testing.T) { } } +func testStatsResetStorDB(t *testing.T) { + if err := engine.InitStorDB(sqCfg); err != nil { + t.Fatal(err) + } +} + // Start CGR Engine func testStatsStartEngine(t *testing.T) { if _, err := engine.StopStartEngine(sqCfgPath, *waitRater); err != nil { diff --git a/apis/thresholds_it_test.go b/apis/thresholds_it_test.go index 20b9f3c40..1297f80ef 100644 --- a/apis/thresholds_it_test.go +++ b/apis/thresholds_it_test.go @@ -44,6 +44,7 @@ var ( sTestsTh = []func(t *testing.T){ testThresholdsInitCfg, testThresholdsInitDataDB, + testThresholdsResetStorDB, testThresholdsStartEngine, testThresholdsRPCConn, @@ -105,6 +106,12 @@ func testThresholdsInitDataDB(t *testing.T) { } } +func testThresholdsResetStorDB(t *testing.T) { + if err := engine.InitStorDB(thCfg); err != nil { + t.Fatal(err) + } +} + // Start CGR Engine func testThresholdsStartEngine(t *testing.T) { if _, err := engine.StopStartEngine(thCfgPath, *waitRater); err != nil { diff --git a/apis/tpes_it_test.go b/apis/tpes_it_test.go index 27d9cf361..e8fc6c1c1 100644 --- a/apis/tpes_it_test.go +++ b/apis/tpes_it_test.go @@ -47,6 +47,7 @@ var ( sTestTpes = []func(t *testing.T){ testTPeSInitCfg, testTPeSInitDataDb, + testTpeSResetStorDb, testTPeSStartEngine, testTPeSRPCConn, testTPeSPing, @@ -66,6 +67,7 @@ var ( testTPeSExportTariffPlanAllTariffPlan, // export again after we will flush the database testTPeSInitDataDb, + testTpeSResetStorDb, testTPeSKillEngine, testTPeSInitCfg, testTPeSStartEngine, @@ -108,6 +110,12 @@ func testTPeSInitDataDb(t *testing.T) { } } +func testTpeSResetStorDb(t *testing.T) { + if err := engine.InitStorDB(tpesCfg); err != nil { + t.Fatal(err) + } +} + // Start CGR Engine func testTPeSStartEngine(t *testing.T) { if _, err := engine.StopStartEngine(tpesCfgPath, *waitRater); err != nil { diff --git a/data/conf/samples/acc_generaltest_internal/cgrates.json b/data/conf/samples/acc_generaltest_internal/cgrates.json index 488781059..8a9b87d0d 100644 --- a/data/conf/samples/acc_generaltest_internal/cgrates.json +++ b/data/conf/samples/acc_generaltest_internal/cgrates.json @@ -20,7 +20,9 @@ "db_type": "*internal" }, - +"stor_db": { + "db_type": "*internal" +}, "loaders": [ { diff --git a/data/conf/samples/acc_generaltest_mongo/cgrates.json b/data/conf/samples/acc_generaltest_mongo/cgrates.json index cf2209c0e..72ecdb5d2 100644 --- a/data/conf/samples/acc_generaltest_mongo/cgrates.json +++ b/data/conf/samples/acc_generaltest_mongo/cgrates.json @@ -18,7 +18,13 @@ "data_db": { "db_type": "mongo", "db_name": "10", - "db_port": 27017, + "db_port": 27017 +}, + +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 }, "loaders": [ diff --git a/data/conf/samples/acc_generaltest_mysql/cgrates.json b/data/conf/samples/acc_generaltest_mysql/cgrates.json index 987429378..1279edc62 100644 --- a/data/conf/samples/acc_generaltest_mysql/cgrates.json +++ b/data/conf/samples/acc_generaltest_mysql/cgrates.json @@ -21,6 +21,10 @@ "db_name": "10", // data_db database name to connect to }, +"stor_db": { + "db_password": "CGRateS.org" +}, + "loaders": [ { "id": "*default", diff --git a/data/conf/samples/actions_internal/cgradmin.json b/data/conf/samples/actions_internal/cgradmin.json index db2363cb9..31903d7ea 100644 --- a/data/conf/samples/actions_internal/cgradmin.json +++ b/data/conf/samples/actions_internal/cgradmin.json @@ -20,6 +20,10 @@ "db_type": "*internal", }, +"stor_db": { + "db_type": "*internal" +}, + "cdrs": { "enabled": true, // start the CDR Server service: "chargers_conns":["*localhost"], diff --git a/data/conf/samples/actions_mongo/cgradmin.json b/data/conf/samples/actions_mongo/cgradmin.json index 43e7f55d6..9a2fa2d94 100644 --- a/data/conf/samples/actions_mongo/cgradmin.json +++ b/data/conf/samples/actions_mongo/cgradmin.json @@ -23,6 +23,12 @@ "db_port": 27017, }, +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, + "cdrs": { "enabled": true, // start the CDR Server service: "chargers_conns":["*localhost"], diff --git a/data/conf/samples/actions_mysql/cgradmin.json b/data/conf/samples/actions_mysql/cgradmin.json index cf6ff771d..5920d80f8 100644 --- a/data/conf/samples/actions_mysql/cgradmin.json +++ b/data/conf/samples/actions_mysql/cgradmin.json @@ -23,6 +23,10 @@ "db_name": "10", }, +"stor_db": { + "db_password": "CGRateS.org" +}, + "cdrs": { "enabled": true, // start the CDR Server service: "chargers_conns":["*localhost"], diff --git a/data/conf/samples/actions_mysql_gob/cgradmin.json b/data/conf/samples/actions_mysql_gob/cgradmin.json index f6b2c084f..537529ad4 100644 --- a/data/conf/samples/actions_mysql_gob/cgradmin.json +++ b/data/conf/samples/actions_mysql_gob/cgradmin.json @@ -30,6 +30,10 @@ "db_name": "10", }, +"stor_db": { + "db_password": "CGRateS.org" +}, + "cdrs": { "enabled": true, // start the CDR Server service: "chargers_conns":["conn1"], diff --git a/data/conf/samples/analyzers/cgrates.json b/data/conf/samples/analyzers/cgrates.json index 1b5965d08..c1ca8b7c9 100644 --- a/data/conf/samples/analyzers/cgrates.json +++ b/data/conf/samples/analyzers/cgrates.json @@ -18,7 +18,13 @@ "data_db": { "db_type": "mongo", "db_name": "10", - "db_port": 27017, + "db_port": 27017 +}, + +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 }, "cdrs": { diff --git a/data/conf/samples/analyzers_doc/cgrates.json b/data/conf/samples/analyzers_doc/cgrates.json index a2217efbf..96a372250 100644 --- a/data/conf/samples/analyzers_doc/cgrates.json +++ b/data/conf/samples/analyzers_doc/cgrates.json @@ -1,43 +1,47 @@ { - "general": { - "log_level": 7, - "reply_timeout": "30s" - }, - - "listen": { - "rpc_json": ":2012", - "rpc_gob": ":2013", - "http": ":2080" - }, - - "data_db": { - "db_type": "redis", - "db_name": "10" - }, - - "admins": { - "enabled": true - }, - - "attributes": { - "enabled": true, - "prefix_indexed_fields":["*req.Destination", "*req.Account"], - "opts":{ - "*processRuns": [ - { - "Tenant": "cgrates.org", - "FilterIDs": [], - "Value": 2 - } - ] - } - }, - - "analyzers":{ - "enabled": true, - "db_path": "/tmp/analyzers" +"general": { + "log_level": 7, + "reply_timeout": "30s" +}, + +"listen": { + "rpc_json": ":2012", + "rpc_gob": ":2013", + "http": ":2080" +}, + +"data_db": { + "db_type": "redis", + "db_name": "10" +}, + +"stor_db": { + "db_password": "CGRateS.org" +}, + +"admins": { + "enabled": true +}, + +"attributes": { + "enabled": true, + "prefix_indexed_fields":["*req.Destination", "*req.Account"], + "opts":{ + "*processRuns": [ + { + "Tenant": "cgrates.org", + "FilterIDs": [], + "Value": 2 + } + ] } +}, + +"analyzers":{ + "enabled": true, + "db_path": "/tmp/analyzers" +} } \ No newline at end of file diff --git a/data/conf/samples/apis_actions_internal/cgrates.json b/data/conf/samples/apis_actions_internal/cgrates.json index 03ceb6700..e2d2402ec 100644 --- a/data/conf/samples/apis_actions_internal/cgrates.json +++ b/data/conf/samples/apis_actions_internal/cgrates.json @@ -10,6 +10,9 @@ "db_type": "*internal", }, + "stor_db": { + "db_type": "*internal" + }, "actions": { "enabled": true, diff --git a/data/conf/samples/apis_actions_mongo/cgrates.json b/data/conf/samples/apis_actions_mongo/cgrates.json index e431ce529..a781afbf6 100644 --- a/data/conf/samples/apis_actions_mongo/cgrates.json +++ b/data/conf/samples/apis_actions_mongo/cgrates.json @@ -12,7 +12,11 @@ "db_port": 27017, }, - + "stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 + }, "actions": { "enabled": true, diff --git a/data/conf/samples/apis_actions_mysql/cgrates.json b/data/conf/samples/apis_actions_mysql/cgrates.json index 50a0cdbf6..18c6cf11d 100644 --- a/data/conf/samples/apis_actions_mysql/cgrates.json +++ b/data/conf/samples/apis_actions_mysql/cgrates.json @@ -1,39 +1,44 @@ { - "general": { - "log_level": 7 - }, - "data_db": { - "db_type": "redis", - "db_port": 6379, - "db_name": "10" - }, - +"general": { + "log_level": 7 +}, - "actions": { - "enabled": true, - "thresholds_conns": ["*internal"], - "stats_conns": ["*internal"], - "accounts_conns": ["*internal"] - }, +"data_db": { + "db_type": "redis", + "db_port": 6379, + "db_name": "10" +}, - "accounts": { - "enabled": true - }, +"stor_db": { + "db_password": "CGRateS.org" +}, - "stats": { - "enabled": true, - "store_interval": "-1", - "thresholds_conns": ["*internal"] - }, +"actions": { + "enabled": true, + "thresholds_conns": ["*internal"], + "stats_conns": ["*internal"], + "accounts_conns": ["*internal"] +}, + +"accounts": { + "enabled": true +}, + +"stats": { + "enabled": true, + "store_interval": "-1", + "thresholds_conns": ["*internal"] +}, + +"thresholds": { + "enabled": true, + "store_interval": "-1", + "actions_conns": ["*internal"] +}, + +"admins": { + "enabled": true +} - "thresholds": { - "enabled": true, - "store_interval": "-1", - "actions_conns": ["*internal"] - }, - - "admins": { - "enabled": true - } } \ No newline at end of file diff --git a/data/conf/samples/apis_chargers_internal/cgrates.json b/data/conf/samples/apis_chargers_internal/cgrates.json index 75dfbf88b..060e705be 100644 --- a/data/conf/samples/apis_chargers_internal/cgrates.json +++ b/data/conf/samples/apis_chargers_internal/cgrates.json @@ -14,6 +14,10 @@ "db_type": "*internal" }, + "stor_db": { + "db_type": "*internal" + }, + "attributes": { "enabled": true }, diff --git a/data/conf/samples/apis_chargers_mongo/cgrates.json b/data/conf/samples/apis_chargers_mongo/cgrates.json index 013dc270c..900a638fc 100644 --- a/data/conf/samples/apis_chargers_mongo/cgrates.json +++ b/data/conf/samples/apis_chargers_mongo/cgrates.json @@ -1,32 +1,38 @@ { - "general": { - "log_level": 7, - "reply_timeout": "30s" - }, +"general": { + "log_level": 7, + "reply_timeout": "30s" +}, - "listen": { - "rpc_json": ":2012", - "rpc_gob": ":2013", - "http": ":2080" - }, +"listen": { + "rpc_json": ":2012", + "rpc_gob": ":2013", + "http": ":2080" +}, - "data_db": { - "db_type": "mongo", - "db_name": "10", - "db_port": 27017 - }, +"data_db": { + "db_type": "mongo", + "db_name": "10", + "db_port": 27017 +}, - "attributes": { - "enabled": true - }, +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, - "chargers": { - "enabled": true, - "attributes_conns": ["*internal"] - }, +"attributes": { + "enabled": true +}, - "admins": { - "enabled": true - } +"chargers": { + "enabled": true, + "attributes_conns": ["*internal"] +}, + +"admins": { + "enabled": true +} } \ No newline at end of file diff --git a/data/conf/samples/apis_chargers_mysql/cgrates.json b/data/conf/samples/apis_chargers_mysql/cgrates.json index 8bd88e5c8..6014c7fb9 100644 --- a/data/conf/samples/apis_chargers_mysql/cgrates.json +++ b/data/conf/samples/apis_chargers_mysql/cgrates.json @@ -1,33 +1,37 @@ { - "general": { - "log_level": 7, - "reply_timeout": "50s" - }, +"general": { + "log_level": 7, + "reply_timeout": "50s" +}, - "listen": { - "rpc_json": ":2012", - "rpc_gob": ":2013", - "http": ":2080" - }, +"listen": { + "rpc_json": ":2012", + "rpc_gob": ":2013", + "http": ":2080" +}, - "data_db": { - "db_type": "redis", - "db_port": 6379, - "db_name": "10" - }, +"data_db": { + "db_type": "redis", + "db_port": 6379, + "db_name": "10" +}, - "attributes": { - "enabled": true - }, +"stor_db": { + "db_password": "CGRateS.org" +}, - "chargers": { - "enabled": true, - "attributes_conns": ["*internal"] - }, +"attributes": { + "enabled": true +}, - "admins": { - "enabled": true - } +"chargers": { + "enabled": true, + "attributes_conns": ["*internal"] +}, + +"admins": { + "enabled": true +} } \ No newline at end of file diff --git a/data/conf/samples/apis_config_mongo/cgrates.json b/data/conf/samples/apis_config_mongo/cgrates.json index 092e99e10..1557194cb 100644 --- a/data/conf/samples/apis_config_mongo/cgrates.json +++ b/data/conf/samples/apis_config_mongo/cgrates.json @@ -21,6 +21,12 @@ "db_port": 27017, }, + "stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 + }, + "cdrs": { "enabled": true, "chargers_conns":["*internal"], diff --git a/data/conf/samples/apis_config_mysql/cgrates.json b/data/conf/samples/apis_config_mysql/cgrates.json index c6dcca655..a885f9a26 100644 --- a/data/conf/samples/apis_config_mysql/cgrates.json +++ b/data/conf/samples/apis_config_mysql/cgrates.json @@ -1,122 +1,127 @@ { - // CGRateS Configuration file - // +// CGRateS Configuration file +// - "general": { - "log_level": 7, - "reply_timeout": "50s", - }, +"general": { + "log_level": 7, + "reply_timeout": "50s", +}, - "listen": { - "rpc_json": ":2012", - "rpc_gob": ":2013", - "http": ":2080", - }, +"listen": { + "rpc_json": ":2012", + "rpc_gob": ":2013", + "http": ":2080", +}, - "data_db": { // database used to store runtime data (eg: accounts, cdr stats) - "db_type": "redis", // data_db type: - "db_port": 6379, // data_db port to reach the database - "db_name": "10", // data_db database name to connect to - }, +"data_db": { // database used to store runtime data (eg: accounts, cdr stats) + "db_type": "redis", // data_db type: + "db_port": 6379, // data_db port to reach the database + "db_name": "10", // data_db database name to connect to +}, - "cdrs": { - "enabled": true, - "chargers_conns":["*internal"], - }, +"stor_db": { + "db_password": "CGRateS.org" +}, + +"cdrs": { + "enabled": true, + "chargers_conns":["*internal"], +}, - "attributes": { - "enabled": true, - "stats_conns": ["*localhost"], - "resources_conns": ["*localhost"], - "accounts_conns": ["*localhost"] - }, +"attributes": { + "enabled": true, + "stats_conns": ["*localhost"], + "resources_conns": ["*localhost"], + "accounts_conns": ["*localhost"] +}, - "chargers": { - "enabled": true, - "attributes_conns": ["*internal"], - }, +"chargers": { + "enabled": true, + "attributes_conns": ["*internal"], +}, - "resources": { - "enabled": true, - "store_interval": "1s", - "thresholds_conns": ["*internal"] - }, +"resources": { + "enabled": true, + "store_interval": "1s", + "thresholds_conns": ["*internal"] +}, - "stats": { - "enabled": true, - "store_interval": "1s", - "thresholds_conns": ["*internal"], - }, +"stats": { + "enabled": true, + "store_interval": "1s", + "thresholds_conns": ["*internal"], +}, - "thresholds": { - "enabled": true, - "store_interval": "1s", - }, +"thresholds": { + "enabled": true, + "store_interval": "1s", +}, - "routes": { - "enabled": true, - "prefix_indexed_fields":["*req.Destination"], - "stats_conns": ["*internal"], - "resources_conns": ["*internal"], - "rates_conns": ["*internal"], - }, +"routes": { + "enabled": true, + "prefix_indexed_fields":["*req.Destination"], + "stats_conns": ["*internal"], + "resources_conns": ["*internal"], + "rates_conns": ["*internal"], +}, - "sessions": { - "enabled": true, - "routes_conns": ["*internal"], - "resources_conns": ["*internal"], - "attributes_conns": ["*internal"], - "rates_conns": ["*internal"], - "cdrs_conns": ["*internal"], - "chargers_conns": ["*internal"], - }, +"sessions": { + "enabled": true, + "routes_conns": ["*internal"], + "resources_conns": ["*internal"], + "attributes_conns": ["*internal"], + "rates_conns": ["*internal"], + "cdrs_conns": ["*internal"], + "chargers_conns": ["*internal"], +}, - "migrator":{ +"migrator":{ - "users_filters":["Account"], - }, + "users_filters":["Account"], +}, - "admins": { - "enabled": true, - }, +"admins": { + "enabled": true, +}, - "rates": { - "enabled": false - }, +"rates": { + "enabled": false +}, - "actions": { - "enabled": true, - "accounts_conns": ["*localhost"] - }, +"actions": { + "enabled": true, + "accounts_conns": ["*localhost"] +}, - "accounts": { - "enabled": true - }, +"accounts": { + "enabled": true +}, - "filters": { - "stats_conns": ["*internal"], - "resources_conns": ["*internal"], - "accounts_conns": ["*internal"], - }, +"filters": { + "stats_conns": ["*internal"], + "resources_conns": ["*internal"], + "accounts_conns": ["*internal"], +}, + +"config_db": { + "db_type": "redis", + "db_port": 6379, + "db_name": "12" +} - "config_db": { - "db_type": "redis", - "db_port": 6379, - "db_name": "12" - } } diff --git a/data/conf/samples/apis_loaders_internal/cgrates.json b/data/conf/samples/apis_loaders_internal/cgrates.json index acd2dfc09..4b416cf35 100644 --- a/data/conf/samples/apis_loaders_internal/cgrates.json +++ b/data/conf/samples/apis_loaders_internal/cgrates.json @@ -10,6 +10,9 @@ "db_type": "*internal", }, +"stor_db": { + "db_type": "*internal" +}, "loaders": [ { diff --git a/data/conf/samples/apis_loaders_mongo/cgrates.json b/data/conf/samples/apis_loaders_mongo/cgrates.json index 9296a7b63..b57d988f4 100644 --- a/data/conf/samples/apis_loaders_mongo/cgrates.json +++ b/data/conf/samples/apis_loaders_mongo/cgrates.json @@ -12,7 +12,11 @@ "db_port": 27017, }, - +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, "loaders": [ { diff --git a/data/conf/samples/apis_loaders_mysql/cgrates.json b/data/conf/samples/apis_loaders_mysql/cgrates.json index ca04b341a..3b35fa765 100644 --- a/data/conf/samples/apis_loaders_mysql/cgrates.json +++ b/data/conf/samples/apis_loaders_mysql/cgrates.json @@ -11,6 +11,10 @@ "db_name": "10", // data_db database name to connect to }, +"stor_db": { + "db_password": "CGRateS.org" +}, + "loaders": [ { diff --git a/data/conf/samples/apis_srvmng_internal/cgrates.json b/data/conf/samples/apis_srvmng_internal/cgrates.json index 0bc0847c4..787d33aea 100644 --- a/data/conf/samples/apis_srvmng_internal/cgrates.json +++ b/data/conf/samples/apis_srvmng_internal/cgrates.json @@ -13,6 +13,10 @@ "data_db": { "db_type": "*internal" +}, + +"stor_db": { + "db_type": "*internal" } } \ No newline at end of file diff --git a/data/conf/samples/apis_srvmng_mongo/cgrates.json b/data/conf/samples/apis_srvmng_mongo/cgrates.json index bc400080b..9376e8061 100644 --- a/data/conf/samples/apis_srvmng_mongo/cgrates.json +++ b/data/conf/samples/apis_srvmng_mongo/cgrates.json @@ -15,6 +15,12 @@ "db_type": "mongo", "db_name": "10", "db_port": 27017 +}, + +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 } } \ No newline at end of file diff --git a/data/conf/samples/apis_srvmng_mysql/cgrates.json b/data/conf/samples/apis_srvmng_mysql/cgrates.json index 2da9c5228..0e32bde16 100644 --- a/data/conf/samples/apis_srvmng_mysql/cgrates.json +++ b/data/conf/samples/apis_srvmng_mysql/cgrates.json @@ -15,6 +15,10 @@ "db_type": "redis", "db_port": 6379, "db_name": "10" +}, + +"stor_db": { + "db_password": "CGRateS.org" } } \ No newline at end of file diff --git a/data/conf/samples/attr_test_internal/cgrates.json b/data/conf/samples/attr_test_internal/cgrates.json index 98a70d205..3bac7684b 100644 --- a/data/conf/samples/attr_test_internal/cgrates.json +++ b/data/conf/samples/attr_test_internal/cgrates.json @@ -20,6 +20,9 @@ "db_type": "*internal" }, +"stor_db": { + "db_type": "*internal" +}, "loaders": [ { diff --git a/data/conf/samples/attr_test_mongo/cgrates.json b/data/conf/samples/attr_test_mongo/cgrates.json index fee66d73c..23ac04afc 100644 --- a/data/conf/samples/attr_test_mongo/cgrates.json +++ b/data/conf/samples/attr_test_mongo/cgrates.json @@ -21,6 +21,12 @@ "db_port": 27017, }, +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, + "loaders": [ { "id": "*default", diff --git a/data/conf/samples/attr_test_mysql/cgrates.json b/data/conf/samples/attr_test_mysql/cgrates.json index 791c7eaa8..13d783bcf 100644 --- a/data/conf/samples/attr_test_mysql/cgrates.json +++ b/data/conf/samples/attr_test_mysql/cgrates.json @@ -21,7 +21,9 @@ "db_name": "10", // data_db database name to connect to }, - +"stor_db": { + "db_password": "CGRateS.org" +}, "loaders": [ { diff --git a/data/conf/samples/attributes_internal/cgrates.json b/data/conf/samples/attributes_internal/cgrates.json index e489b28c6..2559a8d4c 100644 --- a/data/conf/samples/attributes_internal/cgrates.json +++ b/data/conf/samples/attributes_internal/cgrates.json @@ -1,25 +1,26 @@ { - // CGRateS Configuration file - // will be used in apis/attributes_it_test.go +"data_db": { + "db_type": "*internal" +}, - "data_db": { - "db_type": "*internal", - }, +"stor_db": { + "db_type": "*internal" +}, +"attributes": { + "enabled": true, + "prefix_indexed_fields": ["*req.Destination"], + "exists_indexed_fields": ["*opts.*usage"], + "notexists_indexed_fields": ["*req.ToR"] +}, - "attributes": { - "enabled": true, - "prefix_indexed_fields": ["*req.Destination"], - "exists_indexed_fields": ["*opts.*usage"], - "notexists_indexed_fields": ["*req.ToR"], - }, +"admins": { + "enabled": true +}, - "admins": { - "enabled": true, - }, +"tpes": { + "enabled": true +} - "tpes": { - "enabled": true, - } } \ No newline at end of file diff --git a/data/conf/samples/attributes_mongo/cgrates.json b/data/conf/samples/attributes_mongo/cgrates.json index 3e7f882d1..58b67014e 100644 --- a/data/conf/samples/attributes_mongo/cgrates.json +++ b/data/conf/samples/attributes_mongo/cgrates.json @@ -1,23 +1,27 @@ { - // CGRateS Configuration file - // will be used in apis/attributes_it_test.go + +"data_db": { + "db_type": "mongo", + "db_name": "10", + "db_port": 27017 +}, - "data_db": { - "db_type": "mongo", - "db_name": "10", - "db_port": 27017, - }, +"attributes": { + "enabled": true, + "prefix_indexed_fields": ["*req.Destination"], + "exists_indexed_fields": ["*opts.*usage"], + "notexists_indexed_fields": ["*req.ToR"] +}, +"admins": { + "enabled": true +}, - "attributes": { - "enabled": true, - "prefix_indexed_fields": ["*req.Destination"], - "exists_indexed_fields": ["*opts.*usage"], - "notexists_indexed_fields": ["*req.ToR"], - }, +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +} - "admins": { - "enabled": true, - } } \ No newline at end of file diff --git a/data/conf/samples/attributes_mysql/cgrates.json b/data/conf/samples/attributes_mysql/cgrates.json index 64758203a..77216fc56 100644 --- a/data/conf/samples/attributes_mysql/cgrates.json +++ b/data/conf/samples/attributes_mysql/cgrates.json @@ -12,6 +12,9 @@ "db_name": "10", // data_db database name to connect to }, + "stor_db": { + "db_password": "CGRateS.org" + }, "attributes": { "enabled": true, diff --git a/data/conf/samples/attributesindexes_mongo/cgrates.json b/data/conf/samples/attributesindexes_mongo/cgrates.json index 9e7a5626a..63c0d3ae0 100644 --- a/data/conf/samples/attributesindexes_mongo/cgrates.json +++ b/data/conf/samples/attributesindexes_mongo/cgrates.json @@ -1,24 +1,29 @@ { - // CGRateS Configuration file - // used in general_tests/attributes_filters_index_it_test.go - "general": { - "log_level": 7, - }, + +"general": { + "log_level": 7 +}, + +"data_db": { + "db_type": "mongo", + "db_name": "10", + "db_port": 27017 +}, + +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, + +"admins": { + "enabled": true +}, + +"attributes": { + "enabled": true, + "string_indexed_fields": [], + "prefix_indexed_fields": ["*req.Subject"], +} - "data_db": { - "db_type": "mongo", - "db_name": "10", - "db_port": 27017, - }, - - "admins": { - "enabled": true, - }, - - "attributes": { - "enabled": true, - "string_indexed_fields": [], - "prefix_indexed_fields": ["*req.Subject"], - }, - - } \ No newline at end of file +} \ No newline at end of file diff --git a/data/conf/samples/attributesindexes_mysql/cgrates.json b/data/conf/samples/attributesindexes_mysql/cgrates.json index d714348f4..b973c0c8e 100644 --- a/data/conf/samples/attributesindexes_mysql/cgrates.json +++ b/data/conf/samples/attributesindexes_mysql/cgrates.json @@ -1,18 +1,23 @@ { - // CGRateS Configuration file - // used in general_tests/attributes_filters_index_it_test.go - "general": { - "log_level": 7, - }, + +// CGRateS Configuration file +// used in general_tests/attributes_filters_index_it_test.go +"general": { + "log_level": 7, +}, + +"stor_db": { + "db_password": "CGRateS.org" +}, + +"admins": { + "enabled": true, +}, + +"attributes": { + "enabled": true, + "string_indexed_fields": [], + "prefix_indexed_fields": ["*req.Subject"], +}, - "admins": { - "enabled": true, - }, - - "attributes": { - "enabled": true, - "string_indexed_fields": [], - "prefix_indexed_fields": ["*req.Subject"], - }, - - } \ No newline at end of file +} \ No newline at end of file diff --git a/data/conf/samples/cache_replicate/dispatcher_engine/cgrates.json b/data/conf/samples/cache_replicate/dispatcher_engine/cgrates.json index bb4c7a90e..70281a075 100644 --- a/data/conf/samples/cache_replicate/dispatcher_engine/cgrates.json +++ b/data/conf/samples/cache_replicate/dispatcher_engine/cgrates.json @@ -6,6 +6,9 @@ "reconnects": 1, }, +"stor_db": { + "db_type": "*internal" +}, "listen": { "rpc_json": ":2012", diff --git a/data/conf/samples/cache_replicate/dispatcher_engine2/cgrates.json b/data/conf/samples/cache_replicate/dispatcher_engine2/cgrates.json index 4815ca212..0ea050511 100644 --- a/data/conf/samples/cache_replicate/dispatcher_engine2/cgrates.json +++ b/data/conf/samples/cache_replicate/dispatcher_engine2/cgrates.json @@ -19,6 +19,10 @@ "db_port": 6379, "db_name": "11", }, + +"stor_db": { + "db_type": "*internal", +}, "caches":{ "partitions": { diff --git a/data/conf/samples/cache_replicate/engine1/cgrates.json b/data/conf/samples/cache_replicate/engine1/cgrates.json index 2efb97a2d..28567141b 100644 --- a/data/conf/samples/cache_replicate/engine1/cgrates.json +++ b/data/conf/samples/cache_replicate/engine1/cgrates.json @@ -19,6 +19,10 @@ "db_type": "*internal", }, +"stor_db": { + "db_type": "*internal" +}, + "caches":{ "remote_conns": ["gob_cache"], // the conns that are queried when the items are not found in cache }, diff --git a/data/conf/samples/cache_replicate/fltr_update_e1_mongo/cgrates.json b/data/conf/samples/cache_replicate/fltr_update_e1_mongo/cgrates.json index 8b3a1485d..69c619597 100644 --- a/data/conf/samples/cache_replicate/fltr_update_e1_mongo/cgrates.json +++ b/data/conf/samples/cache_replicate/fltr_update_e1_mongo/cgrates.json @@ -21,7 +21,11 @@ "db_port": 27017, }, - + "stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 + }, "rpc_conns": { diff --git a/data/conf/samples/cache_replicate/fltr_update_e1_mysql/cgrates.json b/data/conf/samples/cache_replicate/fltr_update_e1_mysql/cgrates.json index 027567b4d..ecc92ea3b 100644 --- a/data/conf/samples/cache_replicate/fltr_update_e1_mysql/cgrates.json +++ b/data/conf/samples/cache_replicate/fltr_update_e1_mysql/cgrates.json @@ -21,7 +21,9 @@ "db_name": "10", // data_db database name to connect to }, - + "stor_db": { + "db_password": "CGRateS.org" + }, "rpc_conns": { "cache_conn": { diff --git a/data/conf/samples/cache_rpl_active_active/dispatcher_engine/cgrates.json b/data/conf/samples/cache_rpl_active_active/dispatcher_engine/cgrates.json index 06d8850af..0bf814aac 100644 --- a/data/conf/samples/cache_rpl_active_active/dispatcher_engine/cgrates.json +++ b/data/conf/samples/cache_rpl_active_active/dispatcher_engine/cgrates.json @@ -13,7 +13,9 @@ "http": ":2080", }, - +"stor_db": { + "db_type": "*internal" +}, "caches":{ "partitions": { diff --git a/data/conf/samples/cache_rpl_active_active/dispatcher_engine2/cgrates.json b/data/conf/samples/cache_rpl_active_active/dispatcher_engine2/cgrates.json index 0ec3b7a0d..4486873d3 100644 --- a/data/conf/samples/cache_rpl_active_active/dispatcher_engine2/cgrates.json +++ b/data/conf/samples/cache_rpl_active_active/dispatcher_engine2/cgrates.json @@ -20,6 +20,10 @@ "db_name": "11", }, +"stor_db": { + "db_type": "*internal" +}, + "caches":{ "partitions": { "*dispatcher_routes": {"limit": -1, "ttl": "1h", "replicate": true}, diff --git a/data/conf/samples/cache_rpl_active_active/engine1/cgrates.json b/data/conf/samples/cache_rpl_active_active/engine1/cgrates.json index ae7e2ef65..f9677947d 100644 --- a/data/conf/samples/cache_rpl_active_active/engine1/cgrates.json +++ b/data/conf/samples/cache_rpl_active_active/engine1/cgrates.json @@ -19,7 +19,9 @@ "db_type": "*internal", }, - +"stor_db": { + "db_type": "*internal" +}, "rpc_conns": { "conn1": { diff --git a/data/conf/samples/cdrsonexpmaster_mongo/cdrsreplicationmaster.json b/data/conf/samples/cdrsonexpmaster_mongo/cdrsreplicationmaster.json index a88e74a3c..ec9d79274 100644 --- a/data/conf/samples/cdrsonexpmaster_mongo/cdrsreplicationmaster.json +++ b/data/conf/samples/cdrsonexpmaster_mongo/cdrsreplicationmaster.json @@ -13,7 +13,13 @@ "data_db": { "db_type": "mongo", "db_name": "10", - "db_port": 27017, + "db_port": 27017 +}, + +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 }, "cdrs": { diff --git a/data/conf/samples/cdrsonexpmaster_mysql/cdrsreplicationmaster.json b/data/conf/samples/cdrsonexpmaster_mysql/cdrsreplicationmaster.json index 4f82d86dd..c98f11e3e 100644 --- a/data/conf/samples/cdrsonexpmaster_mysql/cdrsreplicationmaster.json +++ b/data/conf/samples/cdrsonexpmaster_mysql/cdrsreplicationmaster.json @@ -16,6 +16,10 @@ "db_name": "10", }, +"stor_db": { + "db_password": "CGRateS.org" +}, + "cdrs": { "enabled": true, // start the CDR Server service: "chargers_conns":["*internal"], diff --git a/data/conf/samples/cdrsonexpslave_mongo/cdrsreplicationslave.json b/data/conf/samples/cdrsonexpslave_mongo/cdrsreplicationslave.json index 5721b9b41..c4606ca5c 100644 --- a/data/conf/samples/cdrsonexpslave_mongo/cdrsreplicationslave.json +++ b/data/conf/samples/cdrsonexpslave_mongo/cdrsreplicationslave.json @@ -16,6 +16,12 @@ "db_port": 27017, }, +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, + "cdrs": { "enabled": true, // start the CDR Server service: "chargers_conns":["*internal"], diff --git a/data/conf/samples/cdrsonexpslave_mysql/cdrsreplicationslave.json b/data/conf/samples/cdrsonexpslave_mysql/cdrsreplicationslave.json index 4e5ce0023..307eba5ff 100644 --- a/data/conf/samples/cdrsonexpslave_mysql/cdrsreplicationslave.json +++ b/data/conf/samples/cdrsonexpslave_mysql/cdrsreplicationslave.json @@ -16,6 +16,10 @@ "db_name": "10", }, +"stor_db": { + "db_password": "CGRateS.org" +}, + "rates": { "enabled": true, }, diff --git a/data/conf/samples/cdrsv1processeventmongo/cgrates.json b/data/conf/samples/cdrsv1processeventmongo/cgrates.json index 9e9ae5a99..45eadbaac 100644 --- a/data/conf/samples/cdrsv1processeventmongo/cgrates.json +++ b/data/conf/samples/cdrsv1processeventmongo/cgrates.json @@ -15,8 +15,11 @@ "db_port": 27017, }, - - +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, "attributes": { "enabled": true, diff --git a/data/conf/samples/cdrsv1processeventmysql/cgrates.json b/data/conf/samples/cdrsv1processeventmysql/cgrates.json index f14ee9a38..91ff5234b 100644 --- a/data/conf/samples/cdrsv1processeventmysql/cgrates.json +++ b/data/conf/samples/cdrsv1processeventmysql/cgrates.json @@ -15,6 +15,10 @@ "db_name": "10", // data_db database name to connect to }, +"stor_db": { + "db_password": "CGRateS.org" +}, + "attributes": { "enabled": true, }, diff --git a/data/conf/samples/cdrsv2internal/cgrates.json b/data/conf/samples/cdrsv2internal/cgrates.json index 792381f07..72b131d72 100644 --- a/data/conf/samples/cdrsv2internal/cgrates.json +++ b/data/conf/samples/cdrsv2internal/cgrates.json @@ -1,58 +1,69 @@ { - "general": { - "log_level": 7 - }, - "rates": { - "enabled": true - }, +"general": { + "log_level": 7 +}, - "cdrs": { +"data_db": { + "db_type": "*internal", +}, + +"stor_db": { + "db_type": "*internal", + "string_indexed_fields": ["RunID"] +}, + +"rates": { + "enabled": true +}, + +"cdrs": { + "enabled": true, + "attributes_conns":["*internal"], + "chargers_conns":["*localhost"], + "rates_conns": ["*localhost"], + "stats_conns": ["*localhost"], + "thresholds_conns": ["*localhost"], +}, + +"attributes": { + "enabled": true +}, + +"stats": { + "enabled": true, + "store_interval": "-1", + "thresholds_conns": ["*internal"] +}, + +"thresholds": { + "enabled": true, + "actions_conns": ["*localhost"], + "store_interval": "-1" +}, + +"chargers": { + "enabled": true, + "attributes_conns": ["*internal"] +}, + +"admins": { + "enabled": true, +}, + +"actions": { + "enabled": true +}, + +"loaders": [ + { + "id": "*default", "enabled": true, - "attributes_conns":["*internal"], - "chargers_conns":["*localhost"], - "rates_conns": ["*localhost"], - "stats_conns": ["*localhost"], - "thresholds_conns": ["*localhost"], - }, + "tenant": "cgrates.org", + "lockfile_path": ".cgr.lck", + "tp_in_dir": "/usr/share/cgrates/tariffplans/testit", + "tp_out_dir": "" + } +] - "attributes": { - "enabled": true - }, - - "stats": { - "enabled": true, - "store_interval": "-1", - "thresholds_conns": ["*internal"] - }, - - "thresholds": { - "enabled": true, - "actions_conns": ["*localhost"], - "store_interval": "-1" - }, - - "chargers": { - "enabled": true, - "attributes_conns": ["*internal"] - }, - - "admins": { - "enabled": true, - }, - - "actions": { - "enabled": true - }, - - "loaders": [ - { - "id": "*default", - "enabled": true, - "tenant": "cgrates.org", - "lockfile_path": ".cgr.lck", - "tp_in_dir": "/usr/share/cgrates/tariffplans/testit", - "tp_out_dir": "" - } - ] } diff --git a/data/conf/samples/cdrsv2mongo/cgrates.json b/data/conf/samples/cdrsv2mongo/cgrates.json index df012a37e..ea9a42928 100644 --- a/data/conf/samples/cdrsv2mongo/cgrates.json +++ b/data/conf/samples/cdrsv2mongo/cgrates.json @@ -1,58 +1,65 @@ { - "general": { - "log_level": 7 - }, - "rates": { - "enabled": true - }, +"general": { + "log_level": 7 +}, - "cdrs": { +"stor_db": { + "db_type": "mongo", + "db_port": 27017 +}, + +"rates": { + "enabled": true +}, + +"cdrs": { + "enabled": true, + "attributes_conns":["*internal"], + "chargers_conns":["*localhost"], + "rates_conns": ["*localhost"], + "stats_conns": ["*localhost"], + "thresholds_conns": ["*localhost"] +}, + +"attributes": { + "enabled": true +}, + +"stats": { + "enabled": true, + "store_interval": "1s", + "thresholds_conns": ["*internal"] +}, + +"thresholds": { + "enabled": true, + "actions_conns": ["*localhost"], + "store_interval": "1s" +}, + +"chargers": { + "enabled": true, + "attributes_conns": ["*internal"] +}, + +"admins": { + "enabled": true +}, + +"actions": { + "enabled": true +}, + +"loaders": [ + { + "id": "*default", "enabled": true, - "attributes_conns":["*internal"], - "chargers_conns":["*localhost"], - "rates_conns": ["*localhost"], - "stats_conns": ["*localhost"], - "thresholds_conns": ["*localhost"], - }, + "tenant": "cgrates.org", + "lockfile_path": ".cgr.lck", + "tp_in_dir": "/usr/share/cgrates/tariffplans/testit", + "tp_out_dir": "" + } +] - "attributes": { - "enabled": true - }, - - "stats": { - "enabled": true, - "store_interval": "1s", - "thresholds_conns": ["*internal"] - }, - - "thresholds": { - "enabled": true, - "actions_conns": ["*localhost"], - "store_interval": "1s" - }, - - "chargers": { - "enabled": true, - "attributes_conns": ["*internal"] - }, - - "admins": { - "enabled": true, - }, - - "actions": { - "enabled": true - }, - - "loaders": [ - { - "id": "*default", - "enabled": true, - "tenant": "cgrates.org", - "lockfile_path": ".cgr.lck", - "tp_in_dir": "/usr/share/cgrates/tariffplans/testit", - "tp_out_dir": "" - } - ] } diff --git a/data/conf/samples/cdrsv2mysql/cdrsv2mysql.json b/data/conf/samples/cdrsv2mysql/cdrsv2mysql.json index df012a37e..52678eff1 100644 --- a/data/conf/samples/cdrsv2mysql/cdrsv2mysql.json +++ b/data/conf/samples/cdrsv2mysql/cdrsv2mysql.json @@ -1,58 +1,64 @@ { - "general": { - "log_level": 7 - }, - "rates": { - "enabled": true - }, +"general": { + "log_level": 7 +}, - "cdrs": { +"stor_db": { + "db_password": "CGRateS.org" +}, + +"rates": { + "enabled": true +}, + +"cdrs": { + "enabled": true, + "attributes_conns":["*internal"], + "chargers_conns":["*localhost"], + "rates_conns": ["*localhost"], + "stats_conns": ["*localhost"], + "thresholds_conns": ["*localhost"], +}, + +"attributes": { + "enabled": true +}, + +"stats": { + "enabled": true, + "store_interval": "1s", + "thresholds_conns": ["*internal"] +}, + +"thresholds": { + "enabled": true, + "actions_conns": ["*localhost"], + "store_interval": "1s" +}, + +"chargers": { + "enabled": true, + "attributes_conns": ["*internal"] +}, + +"admins": { + "enabled": true, +}, + +"actions": { + "enabled": true +}, + +"loaders": [ + { + "id": "*default", "enabled": true, - "attributes_conns":["*internal"], - "chargers_conns":["*localhost"], - "rates_conns": ["*localhost"], - "stats_conns": ["*localhost"], - "thresholds_conns": ["*localhost"], - }, + "tenant": "cgrates.org", + "lockfile_path": ".cgr.lck", + "tp_in_dir": "/usr/share/cgrates/tariffplans/testit", + "tp_out_dir": "" + } +] - "attributes": { - "enabled": true - }, - - "stats": { - "enabled": true, - "store_interval": "1s", - "thresholds_conns": ["*internal"] - }, - - "thresholds": { - "enabled": true, - "actions_conns": ["*localhost"], - "store_interval": "1s" - }, - - "chargers": { - "enabled": true, - "attributes_conns": ["*internal"] - }, - - "admins": { - "enabled": true, - }, - - "actions": { - "enabled": true - }, - - "loaders": [ - { - "id": "*default", - "enabled": true, - "tenant": "cgrates.org", - "lockfile_path": ".cgr.lck", - "tp_in_dir": "/usr/share/cgrates/tariffplans/testit", - "tp_out_dir": "" - } - ] } diff --git a/data/conf/samples/cdrsv_failover_internal/cgrates.json b/data/conf/samples/cdrsv_failover_internal/cgrates.json index de3bcb9b1..b89148fea 100644 --- a/data/conf/samples/cdrsv_failover_internal/cgrates.json +++ b/data/conf/samples/cdrsv_failover_internal/cgrates.json @@ -1,87 +1,95 @@ { - "general": { - "log_level": 7, - "node_id": "TestFailCDRS", - }, +"general": { + "log_level": 7, + "node_id": "TestFailCDRS" +}, - "rates": { - "enabled": true, - }, +"data_db": { + "db_type": "*internal" +}, - "efs": { // ExportFailover service - "enabled": true, // starts the EventReader service: - "poster_attempts": 1, // number of attempts before considering post request failed (eg: *httpPost, CDR exports) - "failed_posts_dir": "/tmp/failed_posts", // directory path where we store failed requests - "failed_posts_ttl": "1s", // time to wait before writing the failed posts in a single file - }, +"stor_db": { + "db_type": "*internal" +}, - "cdrs": { - "enabled": true, - "attributes_conns":["*internal"], - "chargers_conns":["*localhost"], - "rates_conns": ["*localhost"], - "stats_conns": ["*localhost"], - "thresholds_conns": ["*localhost"], - "online_cdr_exports": ["s3_test_file"], - "ees_conns": ["*localhost"] - }, +"rates": { + "enabled": true +}, - "attributes": { - "enabled": true - }, +"efs": { + "enabled": true, + "poster_attempts": 1, + "failed_posts_dir": "/tmp/failed_posts", + "failed_posts_ttl": "1s" +}, - "stats": { - "enabled": true, - "store_interval": "1s", - "thresholds_conns": ["*internal"] - }, +"cdrs": { + "enabled": true, + "attributes_conns":["*internal"], + "chargers_conns":["*localhost"], + "rates_conns": ["*localhost"], + "stats_conns": ["*localhost"], + "thresholds_conns": ["*localhost"], + "online_cdr_exports": ["s3_test_file"], + "ees_conns": ["*localhost"] +}, - "thresholds": { - "enabled": true, - "store_interval": "1s" - }, +"attributes": { + "enabled": true +}, - "chargers": { - "enabled": true, - "attributes_conns": ["*internal"] - }, +"stats": { + "enabled": true, + "store_interval": "1s", + "thresholds_conns": ["*internal"] +}, - "admins": { - "enabled": true, - }, +"thresholds": { + "enabled": true, + "store_interval": "1s" +}, - "ees": { - "enabled": true, - "attributes_conns": ["*internal"], - "exporters": [ - { - "id": "s3_test_file", - "type": "*s3JSONMap", - "export_path": "http://s3.us-east-2.amazonaws.com/", - "opts": { - "awsRegion": "eu-west-2", - "awsKey": "testkey", - "awsSecret": "testsecret", - "s3BucketID": "cgrates-cdrs" - }, - "attempts": 1, - "failed_posts_dir": "/tmp/failed_posts", - "fields":[ - {"tag": "*originID", "path": "*exp.*originID", "type": "*variable", "value": "~*opts.*originID"} - ] - } - ] - }, +"chargers": { + "enabled": true, + "attributes_conns": ["*internal"] +}, - "loaders": [ +"admins": { + "enabled": true +}, + +"ees": { + "enabled": true, + "attributes_conns": ["*internal"], + "exporters": [ { - "id": "*default", - "enabled": true, - "tenant": "cgrates.org", - "lockfile_path": ".cgr.lck", - "tp_in_dir": "/usr/share/cgrates/tariffplans/testit", - "tp_out_dir": "" + "id": "s3_test_file", + "type": "*s3JSONMap", + "export_path": "http://s3.us-east-2.amazonaws.com/", + "opts": { + "awsRegion": "eu-west-2", + "awsKey": "testkey", + "awsSecret": "testsecret", + "s3BucketID": "cgrates-cdrs" + }, + "attempts": 1, + "failed_posts_dir": "/tmp/failed_posts", + "fields":[ + {"tag": "*originID", "path": "*exp.*originID", "type": "*variable", "value": "~*opts.*originID"} + ] } ] +}, + +"loaders": [ + { + "id": "*default", + "enabled": true, + "tenant": "cgrates.org", + "lockfile_path": ".cgr.lck", + "tp_in_dir": "/usr/share/cgrates/tariffplans/testit", + "tp_out_dir": "" + } +] } diff --git a/data/conf/samples/cdrsv_failover_mongo/cgrates.json b/data/conf/samples/cdrsv_failover_mongo/cgrates.json index 0636d4032..b5513c1a0 100644 --- a/data/conf/samples/cdrsv_failover_mongo/cgrates.json +++ b/data/conf/samples/cdrsv_failover_mongo/cgrates.json @@ -1,99 +1,102 @@ { - "general": { - "log_level": 7, - "node_id": "TestFailCDRS", - }, +"general": { + "log_level": 7, + "node_id": "TestFailCDRS" +}, - "efs": { // ExportFailover service - "enabled": true, // starts the EventReader service: - "poster_attempts": 1, // number of attempts before considering post request failed (eg: *httpPost, CDR exports) - "failed_posts_dir": "/tmp/failed_posts", // directory path where we store failed requests - "failed_posts_ttl": "1s", // time to wait before writing the failed posts in a single file - }, +"efs": { + "enabled": true, + "poster_attempts": 1, + "failed_posts_dir": "/tmp/failed_posts", + "failed_posts_ttl": "1s" +}, - "data_db": { - "db_type": "mongo", - "db_name": "10", - "db_port": 27017 - }, +"data_db": { + "db_type": "mongo", + "db_name": "10", + "db_port": 27017 +}, - "cdrs": { - "enabled": true, - "attributes_conns":["*internal"], - "chargers_conns":["*localhost"], - "rates_conns": ["*localhost"], - "stats_conns": ["*localhost"], - "thresholds_conns": ["*localhost"], - "online_cdr_exports": ["s3_test_file"], - "ees_conns": ["*localhost"] - }, +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, - "attributes": { - "enabled": true - }, +"cdrs": { + "enabled": true, + "attributes_conns":["*internal"], + "chargers_conns":["*localhost"], + "rates_conns": ["*localhost"], + "stats_conns": ["*localhost"], + "thresholds_conns": ["*localhost"], + "online_cdr_exports": ["s3_test_file"], + "ees_conns": ["*localhost"] +}, - "stats": { - "enabled": true, - "store_interval": "1s", - "thresholds_conns": ["*internal"] - }, +"attributes": { + "enabled": true +}, - "thresholds": { - "enabled": true, - "store_interval": "1s" - }, +"stats": { + "enabled": true, + "store_interval": "1s", + "thresholds_conns": ["*internal"] +}, - "chargers": { - "enabled": true, - "attributes_conns": ["*internal"] - }, +"thresholds": { + "enabled": true, + "store_interval": "1s" +}, - "admins": { - "enabled": true, - }, +"chargers": { + "enabled": true, + "attributes_conns": ["*internal"] +}, + +"admins": { + "enabled": true +}, - "ees": { - "enabled": true, - "attributes_conns": ["*internal"], - "exporters": [ - { - "id": "s3_test_file", - "type": "*s3JSONMap", - "export_path": "http://s3.us-east-2.amazonaws.com/", - "opts": { - "awsRegion": "eu-west-2", - "awsKey": "testkey", - "awsSecret": "testsecret", - "s3BucketID": "cgrates-cdrs" - }, - "attempts": 1, - "failed_posts_dir": "/tmp/failed_posts", - "fields":[ - {"tag": "*originID", "path": "*exp.*originID", "type": "*variable", "value": "~*opts.*originID"} - ] - } - ] - }, - - "rates": { - "enabled": true, - }, - - "loaders": [ +"ees": { + "enabled": true, + "attributes_conns": ["*internal"], + "exporters": [ { - "id": "*default", - "enabled": true, - "tenant": "cgrates.org", - "lockfile_path": ".cgr.lck", - "tp_in_dir": "/usr/share/cgrates/tariffplans/testit", - "tp_out_dir": "" + "id": "s3_test_file", + "type": "*s3JSONMap", + "export_path": "http://s3.us-east-2.amazonaws.com/", + "opts": { + "awsRegion": "eu-west-2", + "awsKey": "testkey", + "awsSecret": "testsecret", + "s3BucketID": "cgrates-cdrs" + }, + "attempts": 1, + "failed_posts_dir": "/tmp/failed_posts", + "fields":[ + {"tag": "*originID", "path": "*exp.*originID", "type": "*variable", "value": "~*opts.*originID"} + ] } ] +}, +"rates": { + "enabled": true +}, - +"loaders": [ + { + "id": "*default", + "enabled": true, + "tenant": "cgrates.org", + "lockfile_path": ".cgr.lck", + "tp_in_dir": "/usr/share/cgrates/tariffplans/testit", + "tp_out_dir": "" + } +] } diff --git a/data/conf/samples/cdrsv_failover_mysql/cgrates.json b/data/conf/samples/cdrsv_failover_mysql/cgrates.json index 2ad67147a..ef45ef22d 100644 --- a/data/conf/samples/cdrsv_failover_mysql/cgrates.json +++ b/data/conf/samples/cdrsv_failover_mysql/cgrates.json @@ -9,6 +9,10 @@ "node_id": "TestFailCDRS", }, +"stor_db": { + "db_password": "CGRateS.org" +}, + "efs": { // ExportFailover service "enabled": true, // starts the EventReader service: "poster_attempts": 1, // number of attempts before considering post request failed (eg: *httpPost, CDR exports) diff --git a/data/conf/samples/cfg_rld_rates_internal/cgrates.json b/data/conf/samples/cfg_rld_rates_internal/cgrates.json index 006d915a2..f9457ee09 100644 --- a/data/conf/samples/cfg_rld_rates_internal/cgrates.json +++ b/data/conf/samples/cfg_rld_rates_internal/cgrates.json @@ -1,26 +1,22 @@ { -// CGRateS Configuration file -// - "general": { "log_level": 7, "reply_timeout": "50s" }, - "listen": { "rpc_json": ":2012", "rpc_gob": ":2013", "http": ":2080" }, - "data_db": { "db_type": "*internal" }, - - +"stor_db": { + "db_type": "*internal" +} } diff --git a/data/conf/samples/cfg_rld_rates_mongo/cgrates.json b/data/conf/samples/cfg_rld_rates_mongo/cgrates.json index 1c98a44be..46d1ad58e 100644 --- a/data/conf/samples/cfg_rld_rates_mongo/cgrates.json +++ b/data/conf/samples/cfg_rld_rates_mongo/cgrates.json @@ -1,28 +1,28 @@ { -// CGRateS Configuration file - "general": { "log_level": 7, - "reply_timeout": "30s", + "reply_timeout": "30s" }, "listen": { "rpc_json": ":2012", "rpc_gob": ":2013", - "http": ":2080", + "http": ":2080" }, "data_db": { "db_type": "mongo", "db_name": "10", - "db_port": 27017, + "db_port": 27017 }, - - - +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +} } diff --git a/data/conf/samples/cfg_rld_rates_mysql/cgrates.json b/data/conf/samples/cfg_rld_rates_mysql/cgrates.json index 808fe9a4e..1567cedc0 100644 --- a/data/conf/samples/cfg_rld_rates_mysql/cgrates.json +++ b/data/conf/samples/cfg_rld_rates_mysql/cgrates.json @@ -21,6 +21,8 @@ "db_name": "10", // data_db database name to connect to }, - +"stor_db": { + "db_password": "CGRateS.org" +} } diff --git a/data/conf/samples/core_config/cgrates.json b/data/conf/samples/core_config/cgrates.json index 3a5eb9607..a260f6ba5 100644 --- a/data/conf/samples/core_config/cgrates.json +++ b/data/conf/samples/core_config/cgrates.json @@ -1,17 +1,20 @@ { - // CGRateS Configuration file - // will be used in apis/cores_it_test.go - "general": { - "node_id": "Cores_apis_test", - "log_level": 7, - }, - "data_db": { - "db_type": "*internal", - }, +"general": { + "node_id": "Cores_apis_test", + "log_level": 7 +}, +"data_db": { + "db_type": "*internal" +}, + +"stor_db": { + "db_type": "*internal" +}, + +"admins": { + "enabled": true +} - "admins": { - "enabled": true, - } } \ No newline at end of file diff --git a/data/conf/samples/dataconverter_internal/cgrates.json b/data/conf/samples/dataconverter_internal/cgrates.json index ebd52bbdc..b5a08cf0b 100644 --- a/data/conf/samples/dataconverter_internal/cgrates.json +++ b/data/conf/samples/dataconverter_internal/cgrates.json @@ -8,6 +8,10 @@ "db_type": "*internal" }, +"stor_db": { + "db_type": "*internal" +}, + "attributes": { "enabled": true }, diff --git a/data/conf/samples/dataconverter_mongo/cgrates.json b/data/conf/samples/dataconverter_mongo/cgrates.json index 7e812dc46..e8ccc2187 100644 --- a/data/conf/samples/dataconverter_mongo/cgrates.json +++ b/data/conf/samples/dataconverter_mongo/cgrates.json @@ -10,6 +10,12 @@ "db_port": 27017 }, +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, + "attributes": { "enabled": true }, diff --git a/data/conf/samples/dataconverter_mysql/cgrates.json b/data/conf/samples/dataconverter_mysql/cgrates.json index 9d2057654..24e29dd02 100644 --- a/data/conf/samples/dataconverter_mysql/cgrates.json +++ b/data/conf/samples/dataconverter_mysql/cgrates.json @@ -10,6 +10,10 @@ "db_name": "10" }, +"stor_db": { + "db_password": "CGRateS.org" +}, + "attributes": { "enabled": true }, diff --git a/data/conf/samples/diamagent_internal/cgrates.json b/data/conf/samples/diamagent_internal/cgrates.json index 78911d4f8..145145aec 100644 --- a/data/conf/samples/diamagent_internal/cgrates.json +++ b/data/conf/samples/diamagent_internal/cgrates.json @@ -16,7 +16,11 @@ }, "data_db": { - "db_type": "*internal", + "db_type": "*internal" +}, + +"stor_db": { + "db_type": "*internal" }, "cdrs": { diff --git a/data/conf/samples/diamagent_mongo/cgrates.json b/data/conf/samples/diamagent_mongo/cgrates.json index 6335ec168..7c28146a2 100644 --- a/data/conf/samples/diamagent_mongo/cgrates.json +++ b/data/conf/samples/diamagent_mongo/cgrates.json @@ -22,6 +22,12 @@ "db_password": "", }, +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, + "cdrs": { "enabled": true, }, diff --git a/data/conf/samples/diamagent_mysql/cgrates.json b/data/conf/samples/diamagent_mysql/cgrates.json index 6adad0010..08e20c5f7 100644 --- a/data/conf/samples/diamagent_mysql/cgrates.json +++ b/data/conf/samples/diamagent_mysql/cgrates.json @@ -9,6 +9,10 @@ "default_tenant": "cgrates.com", }, +"stor_db": { + "db_password": "CGRateS.org" +}, + "listen": { "rpc_json": ":2012", // RPC JSON listening address "rpc_gob": ":2013", // RPC GOB listening address diff --git a/data/conf/samples/diamagentmaxconn_internal/cgrates.json b/data/conf/samples/diamagentmaxconn_internal/cgrates.json index 08b88acaa..3544e8fe4 100755 --- a/data/conf/samples/diamagentmaxconn_internal/cgrates.json +++ b/data/conf/samples/diamagentmaxconn_internal/cgrates.json @@ -18,6 +18,10 @@ "db_type": "*internal", }, +"stor_db": { + "db_type": "*internal" +}, + "rates": { "enabled": true, }, diff --git a/data/conf/samples/diamagentmaxconn_mongo/cgrates.json b/data/conf/samples/diamagentmaxconn_mongo/cgrates.json index 808404544..b220f979e 100755 --- a/data/conf/samples/diamagentmaxconn_mongo/cgrates.json +++ b/data/conf/samples/diamagentmaxconn_mongo/cgrates.json @@ -21,6 +21,13 @@ "db_password": "", }, +"stor_db": { + "db_type": "mongo", // stor database type to use: + "db_port": 27017, // the port to reach the stordb + "db_name": "stordb", + "db_password": "" +}, + "rates": { "enabled": true, }, diff --git a/data/conf/samples/diamagentmaxconn_mysql/cgrates.json b/data/conf/samples/diamagentmaxconn_mysql/cgrates.json index af047db59..d04c1ab98 100755 --- a/data/conf/samples/diamagentmaxconn_mysql/cgrates.json +++ b/data/conf/samples/diamagentmaxconn_mysql/cgrates.json @@ -20,6 +20,10 @@ "db_name": "10", // data_db database name to connect to }, +"stor_db": { + "db_password": "CGRateS.org" +}, + "rates": { "enabled": true, }, diff --git a/data/conf/samples/diamsctpagent_internal/cgrates.json b/data/conf/samples/diamsctpagent_internal/cgrates.json index a92a4a791..8796b435f 100755 --- a/data/conf/samples/diamsctpagent_internal/cgrates.json +++ b/data/conf/samples/diamsctpagent_internal/cgrates.json @@ -19,6 +19,10 @@ "db_type": "*internal", }, +"stor_db": { + "db_type": "*internal" +}, + "rates": { "enabled": true, }, diff --git a/data/conf/samples/diamsctpagent_mongo/cgrates.json b/data/conf/samples/diamsctpagent_mongo/cgrates.json index 2abf2827a..882872758 100755 --- a/data/conf/samples/diamsctpagent_mongo/cgrates.json +++ b/data/conf/samples/diamsctpagent_mongo/cgrates.json @@ -22,6 +22,13 @@ "db_password": "", }, +"stor_db": { + "db_type": "mongo", // stor database type to use: + "db_port": 27017, // the port to reach the stordb + "db_name": "stordb", + "db_password": "" +}, + "rates": { "enabled": true, }, diff --git a/data/conf/samples/diamsctpagent_mysql/cgrates.json b/data/conf/samples/diamsctpagent_mysql/cgrates.json index ccab8c9ac..6968bcab3 100755 --- a/data/conf/samples/diamsctpagent_mysql/cgrates.json +++ b/data/conf/samples/diamsctpagent_mysql/cgrates.json @@ -21,6 +21,10 @@ "db_name": "10", // data_db database name to connect to }, +"stor_db": { + "db_password": "CGRateS.org" +}, + "rates": { "enabled": true, }, diff --git a/data/conf/samples/dispatcher_opts/cgrates.json b/data/conf/samples/dispatcher_opts/cgrates.json index d0fb7ccbe..06c99eb81 100644 --- a/data/conf/samples/dispatcher_opts/cgrates.json +++ b/data/conf/samples/dispatcher_opts/cgrates.json @@ -1,59 +1,63 @@ { - "general": { - "node_id": "HOST1", - "log_level": 7, - }, - - "listen": { - "rpc_json": ":2012", // RPC JSON listening address - "rpc_gob": ":2013", // RPC GOB listening address - "http": ":2080", // HTTP listening address - }, +"general": { + "node_id": "HOST1", + "log_level": 7 +}, + +"listen": { + "rpc_json": ":2012", + "rpc_gob": ":2013", + "http": ":2080" +}, - "data_db": { // database used to store runtime data (eg: accounts, cdr stats) - "db_type": "redis", // data_db type: - "db_port": 6379, // data_db port to reach the database - "db_name": "10", // data_db database name to connect to - }, - - "attributes": { - "enabled": true, - }, - - "dispatchers":{ - "enabled": true, - "opts": { - "*dispatchers": [ - { - "Tenant": "cgrates.org", - "FilterIDs": ["*string:~*opts.*subsys:*dispatchers"], - "Value": false, - }, - ], - }, - }, - - "caches":{ - "partitions": { - "*dispatcher_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "remote":true, "replicate": false}, - "*dispatcher_routes": {"limit": -1, "ttl": "", "static_ttl": false, "remote":true, "replicate": false}, // control dispatcher routes caching - "*dispatchers": {"limit": -1, "ttl": "", "static_ttl": false, "remote":true, "replicate": false}, // control dispatcher interface - }, - "remote_conns": ["gob_cache"], // the conns that are queried when the items are not found in cache - }, +"data_db": { + "db_type": "redis", + "db_port": 6379, + "db_name": "10" +}, - "admins": { - "enabled": true, - }, +"stor_db": { + "db_password": "CGRateS.org" +}, + +"attributes": { + "enabled": true +}, + +"dispatchers":{ + "enabled": true, + "opts": { + "*dispatchers": [ + { + "Tenant": "cgrates.org", + "FilterIDs": ["*string:~*opts.*subsys:*dispatchers"], + "Value": false + } + ] + } +}, - "rpc_conns": { - "gob_cache": { - "strategy": "*first", - "conns": [ - {"address": "127.0.0.1:2013", "transport":"*gob"}, - ], - }, - }, +"caches":{ + "partitions": { + "*dispatcher_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "remote":true, "replicate": false}, + "*dispatcher_routes": {"limit": -1, "ttl": "", "static_ttl": false, "remote":true, "replicate": false}, + "*dispatchers": {"limit": -1, "ttl": "", "static_ttl": false, "remote":true, "replicate": false} + }, + "remote_conns": ["gob_cache"] +}, + +"admins": { + "enabled": true +}, + +"rpc_conns": { + "gob_cache": { + "strategy": "*first", + "conns": [ + {"address": "127.0.0.1:2013", "transport":"*gob"} + ] + } +} - } \ No newline at end of file +} \ No newline at end of file diff --git a/data/conf/samples/dispatcher_opts_admin/cgrates.json b/data/conf/samples/dispatcher_opts_admin/cgrates.json index 970291323..f4e8c9d9b 100644 --- a/data/conf/samples/dispatcher_opts_admin/cgrates.json +++ b/data/conf/samples/dispatcher_opts_admin/cgrates.json @@ -1,66 +1,67 @@ { - "general": { - "node_id": "HOST2", - "log_level": 7, - }, - +"general": { + "node_id": "HOST2", + "log_level": 7 +}, - "listen": { - "rpc_json": ":4012", // RPC JSON listening address - "rpc_gob": ":4013", // RPC GOB listening address - "http": ":4080", // HTTP listening address - }, +"listen": { + "rpc_json": ":4012", + "rpc_gob": ":4013", + "http": ":4080" +}, - "data_db": { // database used to store runtime data (eg: accounts, cdr stats) - "db_type": "redis", // data_db type: - "db_port": 6379, // data_db port to reach the database - "db_name": "10", // data_db database name to connect to - }, - - - "dispatchers":{ - "enabled": true, - "opts": { - "*dispatchers": [ - { - "Tenant": "cgrates.org", - "FilterIDs": ["*string:~*opts.*subsys:*dispatchers"], - "Value": false, - }, - ], - }, - }, +"data_db": { + "db_type": "redis", + "db_port": 6379, + "db_name": "10" +}, - "caches":{ - "partitions": { - "*dispatcher_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "remote":true, "replicate": false}, - "*dispatcher_routes": {"limit": -1, "ttl": "", "static_ttl": false, "remote":true, "replicate": false}, // control dispatcher routes caching - "*dispatchers": {"limit": -1, "ttl": "", "static_ttl": false, "remote":true, "replicate": false}, // control dispatcher interface - }, - "remote_conns": ["gob_cache"], // the conns that are queried when the items are not found in cache - }, - +"stor_db": { + "db_password": "CGRateS.org" +}, - "admins": { - "enabled": true, - "caches_conns":["broadcast_cache"], +"dispatchers":{ + "enabled": true, + "opts": { + "*dispatchers": [ + { + "Tenant": "cgrates.org", + "FilterIDs": ["*string:~*opts.*subsys:*dispatchers"], + "Value": false + } + ] + } +}, + +"caches":{ + "partitions": { + "*dispatcher_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "remote":true, "replicate": false}, + "*dispatcher_routes": {"limit": -1, "ttl": "", "static_ttl": false, "remote":true, "replicate": false}, + "*dispatchers": {"limit": -1, "ttl": "", "static_ttl": false, "remote":true, "replicate": false} }, + "remote_conns": ["gob_cache"] +}, - "rpc_conns": { - "broadcast_cache": { - "strategy": "*broadcast", - "conns": [ - {"address": "127.0.0.1:2012", "transport":"*json"}, - {"address": "127.0.0.1:4012", "transport":"*json"}, - ], - }, - "gob_cache": { - "strategy": "*first", - "conns": [ - {"address": "127.0.0.1:4013", "transport":"*gob"}, - ], - }, - }, - - } \ No newline at end of file +"admins": { + "enabled": true, + "caches_conns":["broadcast_cache"] +}, + +"rpc_conns": { + "broadcast_cache": { + "strategy": "*broadcast", + "conns": [ + {"address": "127.0.0.1:2012", "transport":"*json"}, + {"address": "127.0.0.1:4012", "transport":"*json"} + ] + }, + "gob_cache": { + "strategy": "*first", + "conns": [ + {"address": "127.0.0.1:4013", "transport":"*gob"} + ] + } +} + +} \ No newline at end of file diff --git a/data/conf/samples/dispatchers/all/cgrates.json b/data/conf/samples/dispatchers/all/cgrates.json index a5bd481f4..b796bf0da 100644 --- a/data/conf/samples/dispatchers/all/cgrates.json +++ b/data/conf/samples/dispatchers/all/cgrates.json @@ -1,36 +1,34 @@ { -// CGRateS Configuration file -// - "general": { "node_id": "ALL", "log_level": 7 }, - "listen": { "rpc_json": ":6012", "rpc_gob": ":6013", - "http": ":6080", + "http": ":6080" }, -"data_db": { // database used to store runtime data (eg: accounts, cdr stats) - "db_type": "redis", // data_db type: - "db_port": 6379, // data_db port to reach the database - "db_name": "11", // data_db database name to connect to +"data_db": { + "db_type": "redis", + "db_port": 6379, + "db_name": "11" }, - +"stor_db": { + "db_password": "CGRateS.org" +}, "rpc_conns": { "conn1": { "strategy": "*first", - "conns": [{"address": "127.0.0.1:6012", "transport":"*json"}], + "conns": [{"address": "127.0.0.1:6012", "transport":"*json"}] }, "rplConn": { "strategy": "*broadcast_sync", - "conns": [{"address": "127.0.0.1:7012", "transport":"*json"}], + "conns": [{"address": "127.0.0.1:7012", "transport":"*json"}] } }, @@ -38,50 +36,45 @@ "enabled": true }, - "chargers": { "enabled": true, - "attributes_conns": ["*internal"], + "attributes_conns": ["*internal"] }, "thresholds": { - "enabled": true, + "enabled": true }, "routes": { "enabled": true, "rates_conns": ["*internal"], - "accounts_conns": ["*internal"], + "accounts_conns": ["*internal"] }, "stats": { - "enabled": true, + "enabled": true }, "resources": { - "enabled": true, + "enabled": true }, - "rates": { - "enabled": true, + "enabled": true }, - "actions": { - "enabled": true, + "enabled": true }, - "accounts": { - "enabled": true, + "enabled": true }, - "cdrs": { "enabled": true, "chargers_conns":["*internal"], - "rates_conns": ["*internal"], + "rates_conns": ["*internal"] }, "sessions": { @@ -92,12 +85,12 @@ "attributes_conns": ["*internal"], "rates_conns": ["*internal"], "chargers_conns": ["*internal"], - "cdrs_conns": ["*internal"], + "cdrs_conns": ["*internal"] }, "admins": { "enabled": true, - "caches_conns":["conn1"], -}, + "caches_conns":["conn1"] +} } diff --git a/data/conf/samples/dispatchers/all2/cgrates.json b/data/conf/samples/dispatchers/all2/cgrates.json index 58b7265a2..30dc6f361 100644 --- a/data/conf/samples/dispatchers/all2/cgrates.json +++ b/data/conf/samples/dispatchers/all2/cgrates.json @@ -1,33 +1,31 @@ { -// CGRateS Configuration file -// - "general": { "node_id": "ALL2", "log_level": 7 }, - "listen": { "rpc_json": ":7012", "rpc_gob": ":7013", - "http": ":7080", + "http": ":7080" }, -"data_db": { // database used to store runtime data (eg: accounts, cdr stats) - "db_type": "redis", // data_db type: - "db_port": 6379, // data_db port to reach the database - "db_name": "12", // data_db database name to connect to +"data_db": { + "db_type": "redis", + "db_port": 6379, + "db_name": "12" }, - +"stor_db": { + "db_type":"*internal" +}, "rpc_conns": { "conn1": { "strategy": "*first", - "conns": [{"address": "127.0.0.1:7012", "transport":"*json"}], - }, + "conns": [{"address": "127.0.0.1:7012", "transport":"*json"}] + } }, "attributes": { @@ -36,47 +34,43 @@ "chargers": { "enabled": true, - "attributes_conns": ["*internal"], + "attributes_conns": ["*internal"] }, "thresholds": { - "enabled": true, + "enabled": true }, "routes": { "enabled": true, "rates_conns": ["*internal"], - "accounts_conns": ["*internal"], + "accounts_conns": ["*internal"] }, "stats": { - "enabled": true, + "enabled": true }, "resources": { - "enabled": true, + "enabled": true }, - "rates": { - "enabled": true, + "enabled": true }, - "actions": { - "enabled": true, + "enabled": true }, - "accounts": { - "enabled": true, + "enabled": true }, - "cdrs": { "enabled": true, "chargers_conns":["*internal"], - "rates_conns": ["*internal"], + "rates_conns": ["*internal"] }, "sessions": { @@ -87,13 +81,12 @@ "attributes_conns": ["*internal"], "rates_conns": ["*internal"], "cdrs_conns": ["*internal"], - "chargers_conns": ["*internal"], + "chargers_conns": ["*internal"] }, "admins": { "enabled": true, - "caches_conns":["conn1"], -}, - + "caches_conns":["conn1"] +} } diff --git a/data/conf/samples/dispatchers/all2_mongo/cgrates.json b/data/conf/samples/dispatchers/all2_mongo/cgrates.json index 3906c836d..0f14544b2 100644 --- a/data/conf/samples/dispatchers/all2_mongo/cgrates.json +++ b/data/conf/samples/dispatchers/all2_mongo/cgrates.json @@ -1,7 +1,4 @@ { -// CGRateS Configuration file -// - "general": { "node_id": "ALL2", @@ -12,22 +9,26 @@ "listen": { "rpc_json": ":7012", "rpc_gob": ":7013", - "http": ":7080", + "http": ":7080" }, "data_db": { "db_type": "mongo", "db_name": "12", - "db_port": 27017, + "db_port": 27017 }, - +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, "rpc_conns": { "conn1": { "strategy": "*first", - "conns": [{"address": "127.0.0.1:7012", "transport":"*json"}], - }, + "conns": [{"address": "127.0.0.1:7012", "transport":"*json"}] + } }, "attributes": { @@ -36,47 +37,43 @@ "chargers": { "enabled": true, - "attributes_conns": ["*internal"], + "attributes_conns": ["*internal"] }, "thresholds": { - "enabled": true, + "enabled": true }, "routes": { "enabled": true, "rates_conns": ["*internal"], - "accounts_conns": ["*internal"], + "accounts_conns": ["*internal"] }, "stats": { - "enabled": true, + "enabled": true }, "resources": { - "enabled": true, + "enabled": true }, - "rates": { - "enabled": true, + "enabled": true }, - "actions": { - "enabled": true, + "enabled": true }, - "accounts": { - "enabled": true, + "enabled": true }, - "cdrs": { "enabled": true, "chargers_conns":["*internal"], - "rates_conns": ["*internal"], + "rates_conns": ["*internal"] }, "sessions": { @@ -87,13 +84,12 @@ "attributes_conns": ["*internal"], "rates_conns": ["*internal"], "cdrs_conns": ["*internal"], - "chargers_conns": ["*internal"], + "chargers_conns": ["*internal"] }, "admins": { "enabled": true, - "caches_conns":["conn1"], -}, - + "caches_conns":["conn1"] +} } diff --git a/data/conf/samples/dispatchers/all2_mysql/cgrates.json b/data/conf/samples/dispatchers/all2_mysql/cgrates.json index d6f450cd0..fe0a9cf9e 100644 --- a/data/conf/samples/dispatchers/all2_mysql/cgrates.json +++ b/data/conf/samples/dispatchers/all2_mysql/cgrates.json @@ -1,33 +1,31 @@ { -// CGRateS Configuration file -// - "general": { "node_id": "ALL2", "log_level": 7 }, - "listen": { "rpc_json": ":7012", "rpc_gob": ":7013", - "http": ":7080", + "http": ":7080" }, -"data_db": { // database used to store runtime data (eg: accounts, cdr stats) - "db_type": "redis", // data_db type: - "db_port": 6379, // data_db port to reach the database - "db_name": "12", // data_db database name to connect to +"data_db": { + "db_type": "redis", + "db_port": 6379, + "db_name": "12" }, - +"stor_db": { + "db_type":"*internal" +}, "rpc_conns": { "conn1": { "strategy": "*first", - "conns": [{"address": "127.0.0.1:7012", "transport":"*json"}], - }, + "conns": [{"address": "127.0.0.1:7012", "transport":"*json"}] + } }, "attributes": { @@ -36,47 +34,43 @@ "chargers": { "enabled": true, - "attributes_conns": ["*internal"], + "attributes_conns": ["*internal"] }, "thresholds": { - "enabled": true, + "enabled": true }, "routes": { "enabled": true, "rates_conns": ["*internal"], - "accounts_conns": ["*internal"], + "accounts_conns": ["*internal"] }, "stats": { - "enabled": true, + "enabled": true }, "resources": { - "enabled": true, + "enabled": true }, - "rates": { - "enabled": true, + "enabled": true }, - "actions": { - "enabled": true, + "enabled": true }, - "accounts": { - "enabled": true, + "enabled": true }, - "cdrs": { "enabled": true, "chargers_conns":["*internal"], - "rates_conns": ["*internal"], + "rates_conns": ["*internal"] }, "sessions": { @@ -87,13 +81,12 @@ "attributes_conns": ["*internal"], "rates_conns": ["*internal"], "cdrs_conns": ["*internal"], - "chargers_conns": ["*internal"], + "chargers_conns": ["*internal"] }, "admins": { "enabled": true, - "caches_conns":["conn1"], -}, - + "caches_conns":["conn1"] +} } diff --git a/data/conf/samples/dispatchers/all_mongo/cgrates.json b/data/conf/samples/dispatchers/all_mongo/cgrates.json index 3ea0e1ebc..6373df9a2 100644 --- a/data/conf/samples/dispatchers/all_mongo/cgrates.json +++ b/data/conf/samples/dispatchers/all_mongo/cgrates.json @@ -1,35 +1,36 @@ { -// CGRateS Configuration file -// - "general": { "node_id": "ALL", "log_level": 7 }, - "listen": { "rpc_json": ":6012", "rpc_gob": ":6013", - "http": ":6080", + "http": ":6080" }, "data_db": { "db_type": "mongo", "db_name": "11", - "db_port": 27017, + "db_port": 27017 }, +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, "rpc_conns": { "conn1": { "strategy": "*first", - "conns": [{"address": "127.0.0.1:6012", "transport":"*json"}], + "conns": [{"address": "127.0.0.1:6012", "transport":"*json"}] }, "rplConn": { "strategy": "*broadcast_sync", - "conns": [{"address": "127.0.0.1:7012", "transport":"*json"}], + "conns": [{"address": "127.0.0.1:7012", "transport":"*json"}] } }, @@ -39,47 +40,43 @@ "chargers": { "enabled": true, - "attributes_conns": ["*internal"], + "attributes_conns": ["*internal"] }, "thresholds": { - "enabled": true, + "enabled": true }, "routes": { "enabled": true, "rates_conns": ["*internal"], - "accounts_conns": ["*internal"], + "accounts_conns": ["*internal"] }, "stats": { - "enabled": true, + "enabled": true }, "resources": { - "enabled": true, + "enabled": true }, - "rates": { - "enabled": true, + "enabled": true }, - "actions": { - "enabled": true, + "enabled": true }, - "accounts": { - "enabled": true, + "enabled": true }, - "cdrs": { "enabled": true, "chargers_conns":["*internal"], - "rates_conns": ["*internal"], + "rates_conns": ["*internal"] }, "sessions": { @@ -90,12 +87,12 @@ "attributes_conns": ["*internal"], "rates_conns": ["*internal"], "chargers_conns": ["*internal"], - "cdrs_conns": ["*internal"], + "cdrs_conns": ["*internal"] }, "admins": { "enabled": true, - "caches_conns":["conn1"], -}, + "caches_conns":["conn1"] +} } diff --git a/data/conf/samples/dispatchers/all_mysql/cgrates.json b/data/conf/samples/dispatchers/all_mysql/cgrates.json index 4d7894b64..dbd91bf6e 100644 --- a/data/conf/samples/dispatchers/all_mysql/cgrates.json +++ b/data/conf/samples/dispatchers/all_mysql/cgrates.json @@ -1,86 +1,81 @@ { -// CGRateS Configuration file -// - "general": { "node_id": "ALL", "log_level": 7 }, - "listen": { "rpc_json": ":6012", "rpc_gob": ":6013", - "http": ":6080", + "http": ":6080" }, -"data_db": { // database used to store runtime data (eg: accounts, cdr stats) - "db_type": "redis", // data_db type: - "db_port": 6379, // data_db port to reach the database - "db_name": "11", // data_db database name to connect to +"data_db": { + "db_type": "redis", + "db_port": 6379, + "db_name": "11" }, +"stor_db": { + "db_password": "CGRateS.org" +}, "rpc_conns": { "conn1": { "strategy": "*first", - "conns": [{"address": "127.0.0.1:6012", "transport":"*json"}], + "conns": [{"address": "127.0.0.1:6012", "transport":"*json"}] }, "rplConn": { "strategy": "*broadcast_sync", - "conns": [{"address": "127.0.0.1:7012", "transport":"*json"}], + "conns": [{"address": "127.0.0.1:7012", "transport":"*json"}] } }, - "attributes": { "enabled": true }, "chargers": { "enabled": true, - "attributes_conns": ["*internal"], + "attributes_conns": ["*internal"] }, "thresholds": { - "enabled": true, + "enabled": true }, "routes": { "enabled": true, "rates_conns": ["*internal"], - "accounts_conns": ["*internal"], + "accounts_conns": ["*internal"] }, "stats": { - "enabled": true, + "enabled": true }, "resources": { - "enabled": true, + "enabled": true }, - "rates": { - "enabled": true, + "enabled": true }, "actions": { - "enabled": true, + "enabled": true }, - "accounts": { - "enabled": true, + "enabled": true }, - "cdrs": { "enabled": true, "chargers_conns":["*internal"], - "rates_conns": ["*internal"], + "rates_conns": ["*internal"] }, "sessions": { @@ -91,12 +86,12 @@ "attributes_conns": ["*internal"], "rates_conns": ["*internal"], "chargers_conns": ["*internal"], - "cdrs_conns": ["*internal"], + "cdrs_conns": ["*internal"] }, "admins": { "enabled": true, - "caches_conns":["conn1"], -}, + "caches_conns":["conn1"] +} } diff --git a/data/conf/samples/dispatchers/dispatchers_mysql/cgrates.json b/data/conf/samples/dispatchers/dispatchers_mysql/cgrates.json index c76c04322..7ae90cd27 100755 --- a/data/conf/samples/dispatchers/dispatchers_mysql/cgrates.json +++ b/data/conf/samples/dispatchers/dispatchers_mysql/cgrates.json @@ -1,29 +1,25 @@ { -// Real-time Online/Offline Charging System (OCS) for Telecom & ISP environments -// Copyright (C) ITsysCOM GmbH -// -// This file contains the default configuration hardcoded into CGRateS. -// This is what you get when you load CGRateS with an empty configuration file. - "general": { "node_id": "DispatcherS1", "log_level": 7, - "reconnects": 1, + "reconnects": 1 }, - "listen": { "rpc_json": ":2012", "rpc_gob": ":2013", - "http": ":2080", + "http": ":2080" }, +"stor_db": { + "db_type":"*internal" +}, "caches":{ "partitions": { "*dispatcher_routes": {"limit": -1, "ttl": "2s"} - }, + } }, "attributes": { @@ -31,7 +27,7 @@ }, "chargers": { - "enabled": true, + "enabled": true }, "sessions": { @@ -40,15 +36,15 @@ "rates_conns": ["*localhost"], "resources_conns": ["*localhost"], "chargers_conns": ["*localhost"], - "listen_bijson": ":3014", + "listen_bijson": ":3014" }, "dispatchers":{ "enabled": true, - "attributes_conns": ["*internal"], + "attributes_conns": ["*internal"] }, "admins": { - "enabled": true, -}, + "enabled": true +} } \ No newline at end of file diff --git a/data/conf/samples/dispatchers/dispatchers_no_attributes/cgrates.json b/data/conf/samples/dispatchers/dispatchers_no_attributes/cgrates.json index 1e9ba9d01..282037eed 100755 --- a/data/conf/samples/dispatchers/dispatchers_no_attributes/cgrates.json +++ b/data/conf/samples/dispatchers/dispatchers_no_attributes/cgrates.json @@ -1,42 +1,38 @@ { -// Real-time Online/Offline Charging System (OCS) for Telecom & ISP environments -// Copyright (C) ITsysCOM GmbH -// -// This file contains the default configuration hardcoded into CGRateS. -// This is what you get when you load CGRateS with an empty configuration file. - "general": { "node_id": "DispatcherS1", "log_level": 7, - "reconnects": 1, + "reconnects": 1 }, - "listen": { "rpc_json": ":2012", "rpc_gob": ":2013", - "http": ":2080", + "http": ":2080" }, +"stor_db": { + "db_type":"*internal" +}, "caches":{ "partitions": { "*dispatcher_routes": {"limit": -1, "ttl": "2s"} - }, + } }, - "sessions": { "enabled": true, - "listen_bijson": ":3014", + "listen_bijson": ":3014" }, "dispatchers":{ - "enabled": true, + "enabled": true }, "admins": { - "enabled": true, -}, + "enabled": true +} + } \ No newline at end of file diff --git a/data/conf/samples/dnsagent_internal/cgrates.json b/data/conf/samples/dnsagent_internal/cgrates.json index 660460edf..2365795d9 100644 --- a/data/conf/samples/dnsagent_internal/cgrates.json +++ b/data/conf/samples/dnsagent_internal/cgrates.json @@ -1,67 +1,73 @@ { - "general": { - "log_level": 7 - }, - "data_db": { - "db_type": "*internal" - }, +"general": { + "log_level": 7 +}, - "schedulers": { +"data_db": { + "db_type": "*internal" +}, + +"stor_db": { + "db_type": "*internal" +}, + +"schedulers": { + "enabled": true, + "cdrs_conns": ["*internal"] +}, + +"sessions": { + "enabled": true, + "attributes_conns": ["*localhost"], + "rals_conns": ["*internal"], + "cdrs_conns": ["*internal"], + "chargers_conns": ["*internal"], + "routes_conns": ["*localhost"] +}, + +"rates": { + "enabled": true +}, + +"cdrs": { + "enabled": true, + "rates_conns": ["*internal"] +}, + +"chargers": { + "enabled": true +}, + + +"attributes": { + "enabled": true +}, + +"routes": { + "enabled": true +}, + +"dns_agent": { + "enabled": true, + "listen": ":2053", + "sessions_conns": ["*localhost"] +}, + +"admins": { + "enabled": true, + "scheduler_conns": ["*internal"] +}, + +"loaders": [ + { + "id": "*default", "enabled": true, - "cdrs_conns": ["*internal"] - }, + "tenant": "cgrates.org", + "lockfile_path": ".cgr.lck", + "tp_in_dir": "/usr/share/cgrates/tariffplans/dnsagent", + "tp_out_dir": "" + } +] - "sessions": { - "enabled": true, - "attributes_conns": ["*localhost"], - "rals_conns": ["*internal"], - "cdrs_conns": ["*internal"], - "chargers_conns": ["*internal"], - "routes_conns": ["*localhost"] - }, - - "rates": { - "enabled": true - }, - - "cdrs": { - "enabled": true, - "rates_conns": ["*internal"] - }, - - "chargers": { - "enabled": true - }, - - - "attributes": { - "enabled": true - }, - - "routes": { - "enabled": true - }, - - "dns_agent": { - "enabled": true, - "listen": ":2053", - "sessions_conns": ["*localhost"] - }, - - "admins": { - "enabled": true, - "scheduler_conns": ["*internal"] - }, - - "loaders": [ - { - "id": "*default", - "enabled": true, - "tenant": "cgrates.org", - "lockfile_path": ".cgr.lck", - "tp_in_dir": "/usr/share/cgrates/tariffplans/dnsagent", - "tp_out_dir": "" - } - ] } diff --git a/data/conf/samples/dnsagent_mongo/cgrates.json b/data/conf/samples/dnsagent_mongo/cgrates.json index d895d9eb2..3b454178b 100644 --- a/data/conf/samples/dnsagent_mongo/cgrates.json +++ b/data/conf/samples/dnsagent_mongo/cgrates.json @@ -17,6 +17,11 @@ "db_port": 27017, }, +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, "sessions": { "enabled": true, diff --git a/data/conf/samples/dnsagent_mysql/cgrates.json b/data/conf/samples/dnsagent_mysql/cgrates.json index 66ef2065a..c5d09c3f5 100644 --- a/data/conf/samples/dnsagent_mysql/cgrates.json +++ b/data/conf/samples/dnsagent_mysql/cgrates.json @@ -11,6 +11,9 @@ "log_level": 7, // control the level of messages logged (0-emerg to 7-debug) }, +"stor_db": { + "db_password": "CGRateS.org" +}, "sessions": { "enabled": true, diff --git a/data/conf/samples/ees/cgrates.json b/data/conf/samples/ees/cgrates.json index f3c8df9fc..756a0a56d 100644 --- a/data/conf/samples/ees/cgrates.json +++ b/data/conf/samples/ees/cgrates.json @@ -1,34 +1,33 @@ { -// Sample CGRateS Configuration file for EEs -// -// Copyright (C) ITsysCOM GmbH - "logger": { - "type": "*syslog", // controls the destination of logs <*syslog|*stdout|*kafka> - "level": 7, // system level precision for floats + "type": "*syslog", + "level": 7 }, "listen": { "rpc_json": ":2012", "rpc_gob": ":2013", - "http": ":2080", + "http": ":2080" }, "data_db": { "db_type": "redis", "db_port": 6379, - "db_name": "10", + "db_name": "10" +}, + +"stor_db": { + "db_password": "CGRateS.org" }, "cdrs": { "enabled": true, "chargers_conns": ["*localhost"], "rates_conns": ["*internal"], - "session_cost_retries": 0, + "session_cost_retries": 0 }, - "chargers": { "enabled": true, "attributes_conns": ["*internal"], diff --git a/data/conf/samples/ees_blocker_internal/cgrates.json b/data/conf/samples/ees_blocker_internal/cgrates.json index e3ab74ed5..4eb90d541 100644 --- a/data/conf/samples/ees_blocker_internal/cgrates.json +++ b/data/conf/samples/ees_blocker_internal/cgrates.json @@ -1,46 +1,50 @@ { - "general": { - "log_level": 7 +"general": { + "log_level": 7 +}, + +"listen": { + "rpc_json": ":2012", + "rpc_gob": ":2013", + "http": ":2080" +}, + +"data_db": { + "db_type": "*internal" +}, + +"stor_db": { + "db_type": "*internal" +}, + +"ees": { + "enabled": true, + "cache": { + "*fileCSV": {"limit": -1, "ttl": "500ms", "static_ttl": false} }, - - "listen": { - "rpc_json": ":2012", - "rpc_gob": ":2013", - "http": ":2080" - }, - - "data_db": { - "db_type": "*internal" - }, - - "ees": { - "enabled": true, - "cache": { - "*fileCSV": {"limit": -1, "ttl": "500ms", "static_ttl": false} + "exporters": [ + { + "id": "CSVExporter1", + "type": "*fileCSV", + "export_path": "/tmp/CSVFile1", + "attempts": 1, + "blocker": true, + "field_separator": "," }, - "exporters": [ - { - "id": "CSVExporter1", - "type": "*fileCSV", - "export_path": "/tmp/CSVFile1", - "attempts": 1, - "blocker": true, - "field_separator": "," - }, - { - "id": "CSVExporter2", - "type": "*fileCSV", - "export_path": "/tmp/CSVFile2", - "attempts": 1, - "field_separator": "," - } - ] - }, - - - "admins": { - "enabled": true - } + { + "id": "CSVExporter2", + "type": "*fileCSV", + "export_path": "/tmp/CSVFile2", + "attempts": 1, + "field_separator": "," + } + ] +}, + + +"admins": { + "enabled": true +} } \ No newline at end of file diff --git a/data/conf/samples/ees_blocker_mongo/cgrates.json b/data/conf/samples/ees_blocker_mongo/cgrates.json index ccbea728f..e30ed52fc 100644 --- a/data/conf/samples/ees_blocker_mongo/cgrates.json +++ b/data/conf/samples/ees_blocker_mongo/cgrates.json @@ -15,6 +15,12 @@ "db_name": "10", "db_port": 27017 }, + + "stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 + }, "ees": { "enabled": true, diff --git a/data/conf/samples/ees_blocker_mysql/cgrates.json b/data/conf/samples/ees_blocker_mysql/cgrates.json index d3f747b1c..eadaa71ce 100644 --- a/data/conf/samples/ees_blocker_mysql/cgrates.json +++ b/data/conf/samples/ees_blocker_mysql/cgrates.json @@ -16,6 +16,10 @@ "db_name": "10" }, + "stor_db": { + "db_password": "CGRateS.org" + }, + "ees": { "enabled": true, "cache": { diff --git a/data/conf/samples/ees_internal/cgrates.json b/data/conf/samples/ees_internal/cgrates.json index a5d9fe505..b1b282708 100644 --- a/data/conf/samples/ees_internal/cgrates.json +++ b/data/conf/samples/ees_internal/cgrates.json @@ -18,6 +18,10 @@ "db_type": "*internal", }, +"stor_db": { + "db_type": "*internal" +}, + "rates": { "enabled": true, }, diff --git a/data/conf/samples/ees_mongo/cgrates.json b/data/conf/samples/ees_mongo/cgrates.json index c63045e7e..e7dc5123f 100644 --- a/data/conf/samples/ees_mongo/cgrates.json +++ b/data/conf/samples/ees_mongo/cgrates.json @@ -13,13 +13,18 @@ "http": ":2080", }, - "data_db": { "db_type": "mongo", "db_name": "10", "db_port": 27017 }, +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, + "rates": { "enabled": true, }, diff --git a/data/conf/samples/ees_mysql/cgrates.json b/data/conf/samples/ees_mysql/cgrates.json index f67943814..705fbd988 100644 --- a/data/conf/samples/ees_mysql/cgrates.json +++ b/data/conf/samples/ees_mysql/cgrates.json @@ -20,6 +20,10 @@ "db_name": "10" }, +"stor_db": { + "db_password": "CGRateS.org" +}, + "rates": { "enabled": true, }, diff --git a/data/conf/samples/ers_internal/cgrates.json b/data/conf/samples/ers_internal/cgrates.json index 86f6ed480..ccf013344 100644 --- a/data/conf/samples/ers_internal/cgrates.json +++ b/data/conf/samples/ers_internal/cgrates.json @@ -19,7 +19,11 @@ "data_db": { - "db_type": "*internal", + "db_type": "*internal" +}, + +"stor_db": { + "db_type": "*internal" }, "rates": { diff --git a/data/conf/samples/ers_mongo/cgrates.json b/data/conf/samples/ers_mongo/cgrates.json index 136fd3ce8..83b0cc5ae 100644 --- a/data/conf/samples/ers_mongo/cgrates.json +++ b/data/conf/samples/ers_mongo/cgrates.json @@ -24,6 +24,12 @@ "db_port": 27017, }, +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, + "rates": { "enabled": true, }, diff --git a/data/conf/samples/ers_mysql/cgrates.json b/data/conf/samples/ers_mysql/cgrates.json index c68269703..36430d709 100644 --- a/data/conf/samples/ers_mysql/cgrates.json +++ b/data/conf/samples/ers_mysql/cgrates.json @@ -23,6 +23,10 @@ "db_name": "10", }, +"stor_db": { + "db_password": "CGRateS.org" +}, + "rates": { "enabled": true, }, diff --git a/data/conf/samples/export_it_test_internal/cgrates.json b/data/conf/samples/export_it_test_internal/cgrates.json index f3371f60d..aa5641a3e 100644 --- a/data/conf/samples/export_it_test_internal/cgrates.json +++ b/data/conf/samples/export_it_test_internal/cgrates.json @@ -20,6 +20,9 @@ "db_type": "*internal" }, + "stor_db": { + "db_type": "*internal" + }, "cdrs": { "enabled": true, diff --git a/data/conf/samples/export_it_test_mongo/cgrates.json b/data/conf/samples/export_it_test_mongo/cgrates.json index 43f2851e8..836e2d0bb 100644 --- a/data/conf/samples/export_it_test_mongo/cgrates.json +++ b/data/conf/samples/export_it_test_mongo/cgrates.json @@ -21,6 +21,12 @@ "db_port": 27017, }, +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, + "tpes": { "enabled": true, }, diff --git a/data/conf/samples/export_it_test_mysql/cgrates.json b/data/conf/samples/export_it_test_mysql/cgrates.json index f274ad432..186196c05 100644 --- a/data/conf/samples/export_it_test_mysql/cgrates.json +++ b/data/conf/samples/export_it_test_mysql/cgrates.json @@ -21,6 +21,10 @@ "db_name": "10", // data_db database name to connect to }, +"stor_db": { + "db_password": "CGRateS.org" +}, + "cdrs": { "enabled": true, diff --git a/data/conf/samples/filter_indexes_internal/cgrates.json b/data/conf/samples/filter_indexes_internal/cgrates.json index 415ac14dc..84190ee40 100644 --- a/data/conf/samples/filter_indexes_internal/cgrates.json +++ b/data/conf/samples/filter_indexes_internal/cgrates.json @@ -10,7 +10,9 @@ "db_type": "*internal", }, - + "stor_db": { + "db_type": "*internal" + }, "attributes": { "enabled": true, diff --git a/data/conf/samples/filter_indexes_mongo/cgrates.json b/data/conf/samples/filter_indexes_mongo/cgrates.json index 88141782a..952f81ce2 100644 --- a/data/conf/samples/filter_indexes_mongo/cgrates.json +++ b/data/conf/samples/filter_indexes_mongo/cgrates.json @@ -12,7 +12,11 @@ "db_port": 27017, }, - + "stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 + }, "attributes": { "enabled": true, diff --git a/data/conf/samples/filter_indexes_mysql/cgrates.json b/data/conf/samples/filter_indexes_mysql/cgrates.json index 7ee98aef2..aca2e346d 100644 --- a/data/conf/samples/filter_indexes_mysql/cgrates.json +++ b/data/conf/samples/filter_indexes_mysql/cgrates.json @@ -12,7 +12,9 @@ "db_name": "10", // data_db database name to connect to }, - + "stor_db": { + "db_password": "CGRateS.org" + }, "attributes": { "enabled": true, diff --git a/data/conf/samples/filtered_replication/engine1_mongo/cgrates.json b/data/conf/samples/filtered_replication/engine1_mongo/cgrates.json index b8960fc3a..2aeda0bc6 100644 --- a/data/conf/samples/filtered_replication/engine1_mongo/cgrates.json +++ b/data/conf/samples/filtered_replication/engine1_mongo/cgrates.json @@ -1,25 +1,22 @@ { "general": { "log_level": 7, - "node_id" : "EngineMongo1", + "node_id" : "EngineMongo1" }, - "listen": { "rpc_json": ":2022", "rpc_gob": ":2023", - "http": ":2280", + "http": ":2280" }, - "rpc_conns": { "conn1": { "strategy": "*first", - "conns": [{"address": "127.0.0.1:2013", "transport":"*gob"}], - }, + "conns": [{"address": "127.0.0.1:2013", "transport":"*gob"}] + } }, - "data_db": { "db_type": "mongo", "db_name": "10", @@ -44,25 +41,30 @@ "*load_ids":{"remote":true,"replicate":false}, "*indexes":{"remote":true, "replicate":false}, "*action_profiles":{"remote":true,"replicate":false}, - "*account_profiles":{"remote":true,"replicate":false}, - }, + "*account_profiles":{"remote":true,"replicate":false} + } }, +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, "admins": { - "enabled": true, + "enabled": true }, "thresholds": { - "enabled": true, + "enabled": true }, "stats": { - "enabled": true, + "enabled": true }, "resources": { - "enabled": true, -}, + "enabled": true +} } diff --git a/data/conf/samples/filtered_replication/engine1_redis/cgrates.json b/data/conf/samples/filtered_replication/engine1_redis/cgrates.json index c35775676..1899a1a33 100644 --- a/data/conf/samples/filtered_replication/engine1_redis/cgrates.json +++ b/data/conf/samples/filtered_replication/engine1_redis/cgrates.json @@ -1,22 +1,21 @@ { + "general": { "log_level": 7, - "node_id" : "EngineMongo1", + "node_id" : "EngineMongo1" }, - "listen": { "rpc_json": ":2022", "rpc_gob": ":2023", - "http": ":2280", + "http": ":2280" }, - "rpc_conns": { "conn1": { "strategy": "*first", - "conns": [{"address": "127.0.0.1:2013", "transport":"*gob"}], - }, + "conns": [{"address": "127.0.0.1:2013", "transport":"*gob"}] + } }, "data_db": { @@ -43,25 +42,28 @@ "*load_ids":{"remote":true,"replicate":false}, "*indexes":{"remote":true, "replicate":false}, "*action_profiles":{"remote":true,"replicate":false}, - "*account_profiles":{"remote":true,"replicate":false}, - }, + "*account_profiles":{"remote":true,"replicate":false} + } }, +"stor_db": { + "db_password": "CGRateS.org" +}, "admins": { - "enabled": true, + "enabled": true }, "thresholds": { - "enabled": true, + "enabled": true }, "stats": { - "enabled": true, + "enabled": true }, "resources": { - "enabled": true, -}, + "enabled": true +} } diff --git a/data/conf/samples/filtered_replication/engine2_mongo/cgrates.json b/data/conf/samples/filtered_replication/engine2_mongo/cgrates.json index 3d5d24d47..50da6c746 100644 --- a/data/conf/samples/filtered_replication/engine2_mongo/cgrates.json +++ b/data/conf/samples/filtered_replication/engine2_mongo/cgrates.json @@ -1,25 +1,23 @@ { + "general": { "log_level": 7, - "node_id" : "EngineMongo2", + "node_id" : "EngineMongo2" }, - "listen": { "rpc_json": ":2032", "rpc_gob": ":2033", - "http": ":2380", + "http": ":2380" }, - "rpc_conns": { "conn1": { "strategy": "*first", - "conns": [{"address": "127.0.0.1:2013", "transport":"*gob"}], - }, + "conns": [{"address": "127.0.0.1:2013", "transport":"*gob"}] + } }, - "data_db": { "db_type": "mongo", "db_name": "11", @@ -44,25 +42,30 @@ "*load_ids":{"remote":true,"replicate":false}, "*indexes":{"remote":true, "replicate":false}, "*action_profiles":{"remote":true,"replicate":false}, - "*account_profiles":{"remote":true,"replicate":false}, - }, + "*account_profiles":{"remote":true,"replicate":false} + } }, +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, "admins": { - "enabled": true, + "enabled": true }, "thresholds": { - "enabled": true, + "enabled": true }, "stats": { - "enabled": true, + "enabled": true }, "resources": { - "enabled": true, -}, + "enabled": true +} } diff --git a/data/conf/samples/filtered_replication/engine2_redis/cgrates.json b/data/conf/samples/filtered_replication/engine2_redis/cgrates.json index a966667c8..1bbc101e2 100644 --- a/data/conf/samples/filtered_replication/engine2_redis/cgrates.json +++ b/data/conf/samples/filtered_replication/engine2_redis/cgrates.json @@ -1,25 +1,23 @@ { + "general": { "log_level": 7, - "node_id" : "EngineMongo2", + "node_id" : "EngineMongo2" }, - "listen": { "rpc_json": ":2032", "rpc_gob": ":2033", - "http": ":2380", + "http": ":2380" }, - "rpc_conns": { "conn1": { "strategy": "*first", - "conns": [{"address": "127.0.0.1:2013", "transport":"*gob"}], - }, + "conns": [{"address": "127.0.0.1:2013", "transport":"*gob"}] + } }, - "data_db": { "db_type": "redis", "db_port": 6379, @@ -44,25 +42,28 @@ "*load_ids":{"remote":true,"replicate":false}, "*indexes":{"remote":true, "replicate":false}, "*action_profiles":{"remote":true,"replicate":false}, - "*account_profiles":{"remote":true,"replicate":false}, - }, + "*account_profiles":{"remote":true,"replicate":false} + } }, +"stor_db": { + "db_password": "CGRateS.org" +}, "admins": { - "enabled": true, + "enabled": true }, "thresholds": { - "enabled": true, + "enabled": true }, "stats": { - "enabled": true, + "enabled": true }, "resources": { - "enabled": true, -}, + "enabled": true +} } diff --git a/data/conf/samples/filtered_replication/internal/cgrates.json b/data/conf/samples/filtered_replication/internal/cgrates.json index 445a08654..7ab064ce1 100644 --- a/data/conf/samples/filtered_replication/internal/cgrates.json +++ b/data/conf/samples/filtered_replication/internal/cgrates.json @@ -1,28 +1,26 @@ { + "general": { "log_level": 7, - "node_id": "InternalEngine", + "node_id": "InternalEngine" }, - "listen": { "rpc_json": ":2012", "rpc_gob": ":2013", - "http": ":2080", + "http": ":2080" }, - "rpc_conns": { "conn2": { "strategy": "*broadcast_sync", "conns": [ {"id": "engine1", "address": "127.0.0.1:2023", "transport":"*gob"}, {"id": "engine2", "address": "127.0.0.1:2033", "transport":"*gob"} - ], - }, + ] + } }, - "data_db": { "db_type": "*internal", "replication_conns": ["conn2"], @@ -45,40 +43,38 @@ "*rate_profiles":{"remote":false,"replicate":true}, "*load_ids":{"remote":false,"replicate":true}, "*action_profiles":{"remote":false,"replicate":true}, - "*account_profiles":{"remote":false,"replicate":true}, - }, -}, - - -"caches":{ - "partitions": { - "*replication_hosts": {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, + "*account_profiles":{"remote":false,"replicate":true} } }, +"stor_db": { + "db_type": "*internal" +}, +"caches":{ + "partitions": { + "*replication_hosts": {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false} + } +}, "thresholds": { "enabled": true, - "store_interval": "-1", + "store_interval": "-1" }, - "resources": { "enabled": true, "store_interval": "-1", - "thresholds_conns": ["*internal"], + "thresholds_conns": ["*internal"] }, - - "admins": { - "enabled": true, + "enabled": true }, "stats": { "enabled": true, - "store_interval": "-1", -}, + "store_interval": "-1" +} } diff --git a/data/conf/samples/filters/cgrates.json b/data/conf/samples/filters/cgrates.json index 609c9e781..0cd0f99a7 100644 --- a/data/conf/samples/filters/cgrates.json +++ b/data/conf/samples/filters/cgrates.json @@ -1,75 +1,67 @@ { -// CGRateS Configuration file -// - "general": { "log_level": 7, - "node_id": "CGRFilterS", + "node_id": "CGRFilterS" }, - "listen": { "rpc_json": ":2012", "rpc_gob": ":2013", - "http": ":2080", + "http": ":2080" }, - -"data_db": { // database used to store runtime data (eg: accounts, cdr stats) - "db_type": "redis", // data_db type: - "db_port": 6379, // data_db port to reach the database - "db_name": "10", // data_db database name to connect to +"data_db": { + "db_type": "redis", + "db_port": 6379, + "db_name": "10" }, +"stor_db": { + "db_password": "CGRateS.org" +}, "filters": { "stats_conns": ["*localhost"], "resources_conns": ["*localhost"], - "accounts_conns": ["*localhost"], + "accounts_conns": ["*localhost"] }, "accounts": { "enabled": true }, - "resources": { "enabled": true, "indexed_selects":false, - "store_interval": "1s", + "store_interval": "1s" }, - "stats": { "enabled": true, "indexed_selects":false, - "store_interval": "1s", + "store_interval": "1s" }, - "thresholds": { "enabled": true, "indexed_selects":false, - "store_interval": "1s", + "store_interval": "1s" }, - "attributes": { - "enabled": true, + "enabled": true }, - "chargers": { "enabled": true, "suffix_indexed_fields": ["*req.Subject"], - "attributes_conns": ["*internal"], + "attributes_conns": ["*internal"] }, "admins": { "enabled": true, - "caches_conns":["*localhost"], -}, - + "caches_conns":["*localhost"] +} } diff --git a/data/conf/samples/filters_gob/cgrates.json b/data/conf/samples/filters_gob/cgrates.json index 07dc32b54..e1b2bdffd 100644 --- a/data/conf/samples/filters_gob/cgrates.json +++ b/data/conf/samples/filters_gob/cgrates.json @@ -1,39 +1,37 @@ { -// CGRateS Configuration file -// - "general": { "log_level": 7, - "node_id": "CGRFilterS", + "node_id": "CGRFilterS" }, "rpc_conns": { "conn1": { "strategy": "*first", - "conns": [{"address": "127.0.0.1:2013", "transport":"*gob"}], - }, + "conns": [{"address": "127.0.0.1:2013", "transport":"*gob"}] + } }, - "listen": { "rpc_json": ":2012", "rpc_gob": ":2013", - "http": ":2080", + "http": ":2080" }, - -"data_db": { // database used to store runtime data (eg: accounts, cdr stats) - "db_type": "redis", // data_db type: - "db_port": 6379, // data_db port to reach the database - "db_name": "10", // data_db database name to connect to +"data_db": { + "db_type": "redis", + "db_port": 6379, + "db_name": "10" }, +"stor_db": { + "db_password": "CGRateS.org" +}, "filters": { "stats_conns": ["conn1"], "resources_conns": ["conn1"], - "accounts_conns": ["conn1"], + "accounts_conns": ["conn1"] }, "accounts": { @@ -43,40 +41,34 @@ "resources": { "enabled": true, "indexed_selects":false, - "store_interval": "1s", + "store_interval": "1s" }, - "stats": { "enabled": true, "indexed_selects":false, - "store_interval": "1s", + "store_interval": "1s" }, - "thresholds": { "enabled": true, "indexed_selects":false, - "store_interval": "1s", + "store_interval": "1s" }, - "attributes": { - "enabled": true, + "enabled": true }, - "chargers": { "enabled": true, "suffix_indexed_fields": ["*req.Subject"], - "attributes_conns": ["*internal"], + "attributes_conns": ["*internal"] }, - "admins": { "enabled": true, - "caches_conns":["conn1"], -}, - + "caches_conns":["conn1"] +} } diff --git a/data/conf/samples/filters_internal/cgrates.json b/data/conf/samples/filters_internal/cgrates.json index d58239dbb..af49a6a6d 100644 --- a/data/conf/samples/filters_internal/cgrates.json +++ b/data/conf/samples/filters_internal/cgrates.json @@ -17,6 +17,9 @@ "db_type": "*internal" }, +"stor_db": { + "db_type": "*internal" +}, "rates": { "enabled": true, diff --git a/data/conf/samples/filters_mongo/cgrates.json b/data/conf/samples/filters_mongo/cgrates.json index c62057e48..ea8bfe4f2 100644 --- a/data/conf/samples/filters_mongo/cgrates.json +++ b/data/conf/samples/filters_mongo/cgrates.json @@ -12,14 +12,17 @@ "http": ":2080" }, - - "data_db": { "db_type": "mongo", "db_name": "10", "db_port": 27017 }, +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, "filters": { "stats_conns": ["*localhost"], @@ -69,7 +72,7 @@ "admins": { "enabled": true, - "caches_conns":["*localhost"], + "caches_conns":["*localhost"] }, "loaders": [ diff --git a/data/conf/samples/filters_mysql/cgrates.json b/data/conf/samples/filters_mysql/cgrates.json index 87e19c0fe..f9d7242f2 100644 --- a/data/conf/samples/filters_mysql/cgrates.json +++ b/data/conf/samples/filters_mysql/cgrates.json @@ -19,8 +19,9 @@ "db_name": "10" }, - - +"stor_db": { + "db_password": "CGRateS.org" +}, "rates": { "enabled": true, diff --git a/data/conf/samples/fltr_sep_internal/cgrates.json b/data/conf/samples/fltr_sep_internal/cgrates.json index 1ee0abf14..6ea9f463c 100644 --- a/data/conf/samples/fltr_sep_internal/cgrates.json +++ b/data/conf/samples/fltr_sep_internal/cgrates.json @@ -8,6 +8,10 @@ "db_type": "*internal" }, +"stor_db": { + "db_type": "*internal" +}, + "loaders": [ { "id": "*default", diff --git a/data/conf/samples/fltr_sep_mongo/cgrates.json b/data/conf/samples/fltr_sep_mongo/cgrates.json index 45a19e3b7..98da34d6e 100644 --- a/data/conf/samples/fltr_sep_mongo/cgrates.json +++ b/data/conf/samples/fltr_sep_mongo/cgrates.json @@ -10,6 +10,12 @@ "db_port": 27017 }, +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, + "loaders": [ { "id": "*default", diff --git a/data/conf/samples/fltr_sep_mysql/cgrates.json b/data/conf/samples/fltr_sep_mysql/cgrates.json index 7897141d1..6d8cb14bf 100644 --- a/data/conf/samples/fltr_sep_mysql/cgrates.json +++ b/data/conf/samples/fltr_sep_mysql/cgrates.json @@ -10,6 +10,10 @@ "db_name": "10" }, +"stor_db": { + "db_password": "CGRateS.org" +}, + "loaders": [ { "id": "*default", diff --git a/data/conf/samples/gocs/au_site/cgrates.json b/data/conf/samples/gocs/au_site/cgrates.json index ba1588833..9754a4c43 100644 --- a/data/conf/samples/gocs/au_site/cgrates.json +++ b/data/conf/samples/gocs/au_site/cgrates.json @@ -44,6 +44,9 @@ } }, + "stor_db": { + "db_password": "CGRateS.org" + }, "rates": { "enabled": true, diff --git a/data/conf/samples/gocs/dsp_site/cgrates.json b/data/conf/samples/gocs/dsp_site/cgrates.json index 5995b2f08..32f15da7d 100644 --- a/data/conf/samples/gocs/dsp_site/cgrates.json +++ b/data/conf/samples/gocs/dsp_site/cgrates.json @@ -20,6 +20,10 @@ "db_name": "13" }, + "stor_db": { + "db_password": "CGRateS.org" + }, + "caches":{ "partitions": { "*dispatcher_routes": {"limit": -1, "ttl": "2s"} diff --git a/data/conf/samples/gocs/us_site/cgrates.json b/data/conf/samples/gocs/us_site/cgrates.json index 954c18c8a..0736ca4f5 100644 --- a/data/conf/samples/gocs/us_site/cgrates.json +++ b/data/conf/samples/gocs/us_site/cgrates.json @@ -49,7 +49,9 @@ } }, - + "stor_db": { + "db_password": "CGRateS.org" + }, "rates": { "enabled": true, diff --git a/data/conf/samples/httpagent_internal/cgrates.json b/data/conf/samples/httpagent_internal/cgrates.json index b3f1610be..62090849a 100644 --- a/data/conf/samples/httpagent_internal/cgrates.json +++ b/data/conf/samples/httpagent_internal/cgrates.json @@ -14,6 +14,10 @@ "http": ":2080", }, +"stor_db": { + "db_type": "*internal" +}, + "rates": { "enabled": true, }, diff --git a/data/conf/samples/httpagent_mongo/cgrates.json b/data/conf/samples/httpagent_mongo/cgrates.json index b3f1610be..3f99fb43a 100644 --- a/data/conf/samples/httpagent_mongo/cgrates.json +++ b/data/conf/samples/httpagent_mongo/cgrates.json @@ -1,53 +1,50 @@ { -// CGRateS Configuration file -// - "general": { - "log_level": 7, + "log_level": 7 }, - "listen": { "rpc_json": ":2012", "rpc_gob": ":2013", - "http": ":2080", + "http": ":2080" +}, + +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 }, "rates": { - "enabled": true, + "enabled": true }, - "cdrs": { "enabled": true, "chargers_conns": ["*internal"], - "rates_conns": ["*internal"], + "rates_conns": ["*internal"] }, - "attributes": { - "enabled": true, + "enabled": true }, "chargers": { "enabled": true, - "attributes_conns": ["*internal"], + "attributes_conns": ["*internal"] }, - "sessions": { "enabled": true, "attributes_conns": ["*localhost"], "cdrs_conns": ["*localhost"], "rates_conns": ["*localhost"], - "chargers_conns": ["*internal"], + "chargers_conns": ["*internal"] }, - "admins": { - "enabled": true, -}, - + "enabled": true +} } diff --git a/data/conf/samples/httpagent_mysql/cgrates.json b/data/conf/samples/httpagent_mysql/cgrates.json index b3f1610be..5323770e7 100644 --- a/data/conf/samples/httpagent_mysql/cgrates.json +++ b/data/conf/samples/httpagent_mysql/cgrates.json @@ -7,6 +7,9 @@ "log_level": 7, }, +"stor_db": { + "db_password": "CGRateS.org" +}, "listen": { "rpc_json": ":2012", diff --git a/data/conf/samples/httpagenttls_internal/cgrates.json b/data/conf/samples/httpagenttls_internal/cgrates.json index 847aa4fe7..a7394418b 100755 --- a/data/conf/samples/httpagenttls_internal/cgrates.json +++ b/data/conf/samples/httpagenttls_internal/cgrates.json @@ -25,6 +25,10 @@ "ca_certificate":"/usr/share/cgrates/tls/ca.crt", }, +"stor_db": { + "db_type": "*internal" +}, + "rates": { "enabled": true, }, diff --git a/data/conf/samples/httpagenttls_mongo/cgrates.json b/data/conf/samples/httpagenttls_mongo/cgrates.json index 847aa4fe7..a5e2e298b 100755 --- a/data/conf/samples/httpagenttls_mongo/cgrates.json +++ b/data/conf/samples/httpagenttls_mongo/cgrates.json @@ -7,6 +7,11 @@ "log_level": 7, }, +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, "listen": { "rpc_json": ":2012", diff --git a/data/conf/samples/httpagenttls_mysql/cgrates.json b/data/conf/samples/httpagenttls_mysql/cgrates.json index 8fc08f976..2069f94e5 100755 --- a/data/conf/samples/httpagenttls_mysql/cgrates.json +++ b/data/conf/samples/httpagenttls_mysql/cgrates.json @@ -7,6 +7,9 @@ "log_level": 7, }, +"stor_db": { + "db_password": "CGRateS.org" +}, "listen": { "rpc_json": ":2012", diff --git a/data/conf/samples/ld_process_match_rt_internal/cgrates.json b/data/conf/samples/ld_process_match_rt_internal/cgrates.json index d87ef4aed..51cc573b6 100644 --- a/data/conf/samples/ld_process_match_rt_internal/cgrates.json +++ b/data/conf/samples/ld_process_match_rt_internal/cgrates.json @@ -19,6 +19,9 @@ "db_type": "*internal" }, + "stor_db": { + "db_type": "*internal" + }, "loaders": [ { diff --git a/data/conf/samples/ld_process_match_rt_mongo/cgrates.json b/data/conf/samples/ld_process_match_rt_mongo/cgrates.json index 5fb38f0a3..d3eea729b 100644 --- a/data/conf/samples/ld_process_match_rt_mongo/cgrates.json +++ b/data/conf/samples/ld_process_match_rt_mongo/cgrates.json @@ -21,7 +21,11 @@ "db_port": 27017, }, - + "stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 + }, "loaders": [ { diff --git a/data/conf/samples/ld_process_match_rt_mysql/cgrates.json b/data/conf/samples/ld_process_match_rt_mysql/cgrates.json index 9c8912c3d..d7f8369e9 100644 --- a/data/conf/samples/ld_process_match_rt_mysql/cgrates.json +++ b/data/conf/samples/ld_process_match_rt_mysql/cgrates.json @@ -8,6 +8,9 @@ "reply_timeout": "50s", }, + "stor_db": { + "db_password": "CGRateS.org" + }, "listen": { "rpc_json": ":2012", diff --git a/data/conf/samples/loader_mongo/cgrates.json b/data/conf/samples/loader_mongo/cgrates.json index 35f967047..894a6223e 100644 --- a/data/conf/samples/loader_mongo/cgrates.json +++ b/data/conf/samples/loader_mongo/cgrates.json @@ -21,6 +21,12 @@ "db_port": 27017, }, +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, + "rates": { "enabled": true, }, diff --git a/data/conf/samples/loader_mysql/cgrates.json b/data/conf/samples/loader_mysql/cgrates.json index d64768473..289dbeb43 100644 --- a/data/conf/samples/loader_mysql/cgrates.json +++ b/data/conf/samples/loader_mysql/cgrates.json @@ -8,6 +8,9 @@ "reply_timeout": "50s", }, +"stor_db": { + "db_password": "CGRateS.org" +}, "listen": { "rpc_json": ":2012", diff --git a/data/conf/samples/loaders/tutinternal/cgrates.json b/data/conf/samples/loaders/tutinternal/cgrates.json index 1e2e2b60c..ed8b8e41b 100644 --- a/data/conf/samples/loaders/tutinternal/cgrates.json +++ b/data/conf/samples/loaders/tutinternal/cgrates.json @@ -20,6 +20,10 @@ "db_type": "*internal", }, +"stor_db": { + "db_type": "*internal" +}, + "rates": { "enabled": true, }, diff --git a/data/conf/samples/loaders/tutmongo/cgrates.json b/data/conf/samples/loaders/tutmongo/cgrates.json index 6e16f8dc2..b302d63bb 100644 --- a/data/conf/samples/loaders/tutmongo/cgrates.json +++ b/data/conf/samples/loaders/tutmongo/cgrates.json @@ -21,6 +21,11 @@ "db_port": 27017, }, +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, "rates": { "enabled": true, diff --git a/data/conf/samples/loaders/tutmysql/cgrates.json b/data/conf/samples/loaders/tutmysql/cgrates.json index 1d4b243fd..16120959d 100644 --- a/data/conf/samples/loaders/tutmysql/cgrates.json +++ b/data/conf/samples/loaders/tutmysql/cgrates.json @@ -21,6 +21,9 @@ "db_name": "10", // data_db database name to connect to }, +"stor_db": { + "db_password": "CGRateS.org" +}, "rates": { "enabled": true, diff --git a/data/conf/samples/loaders_old2new_internal/cgrates.json b/data/conf/samples/loaders_old2new_internal/cgrates.json index 957cfc7ec..8a634607e 100644 --- a/data/conf/samples/loaders_old2new_internal/cgrates.json +++ b/data/conf/samples/loaders_old2new_internal/cgrates.json @@ -10,8 +10,9 @@ "db_type": "*internal", }, - - +"stor_db": { + "db_type": "*internal" +}, "loaders": [ { diff --git a/data/conf/samples/loaders_old2new_mongo/cgrates.json b/data/conf/samples/loaders_old2new_mongo/cgrates.json index 486847aa2..ca9910cd3 100644 --- a/data/conf/samples/loaders_old2new_mongo/cgrates.json +++ b/data/conf/samples/loaders_old2new_mongo/cgrates.json @@ -11,6 +11,11 @@ "db_port": 27017, }, +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, "loaders": [ { diff --git a/data/conf/samples/loaders_old2new_mysql/cgrates.json b/data/conf/samples/loaders_old2new_mysql/cgrates.json index e207dfff2..40bc569db 100644 --- a/data/conf/samples/loaders_old2new_mysql/cgrates.json +++ b/data/conf/samples/loaders_old2new_mysql/cgrates.json @@ -11,6 +11,9 @@ "db_name": "10", }, +"stor_db": { + "db_password": "CGRateS.org" +}, "loaders": [ { diff --git a/data/conf/samples/multiral1_mongo/cgrates.json b/data/conf/samples/multiral1_mongo/cgrates.json index f7ca2b01c..315535229 100644 --- a/data/conf/samples/multiral1_mongo/cgrates.json +++ b/data/conf/samples/multiral1_mongo/cgrates.json @@ -20,6 +20,12 @@ "db_port": 27017, }, +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, + "rates": { "enabled": true, }, diff --git a/data/conf/samples/multiral1_mysql/cgrates.json b/data/conf/samples/multiral1_mysql/cgrates.json index b13194d6c..09afc87b9 100644 --- a/data/conf/samples/multiral1_mysql/cgrates.json +++ b/data/conf/samples/multiral1_mysql/cgrates.json @@ -20,6 +20,10 @@ "db_name": "10", }, +"stor_db": { + "db_password": "CGRateS.org" +}, + "rates": { "enabled": true, }, diff --git a/data/conf/samples/multiral2_internal/cgrates.json b/data/conf/samples/multiral2_internal/cgrates.json index 25dc759e1..7ccf3b3ce 100644 --- a/data/conf/samples/multiral2_internal/cgrates.json +++ b/data/conf/samples/multiral2_internal/cgrates.json @@ -18,6 +18,10 @@ "db_type": "*internal", }, +"stor_db": { + "db_type": "*internal" +}, + "rates": { "enabled": true, }, diff --git a/data/conf/samples/multiral2_mongo/cgrates.json b/data/conf/samples/multiral2_mongo/cgrates.json index e2d156d83..613b207c3 100644 --- a/data/conf/samples/multiral2_mongo/cgrates.json +++ b/data/conf/samples/multiral2_mongo/cgrates.json @@ -20,6 +20,12 @@ "db_port": 27017, }, +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, + "rates": { "enabled": true, }, diff --git a/data/conf/samples/multiral2_mysql/cgrates.json b/data/conf/samples/multiral2_mysql/cgrates.json index 8b6dfbfe2..3494df237 100644 --- a/data/conf/samples/multiral2_mysql/cgrates.json +++ b/data/conf/samples/multiral2_mysql/cgrates.json @@ -20,6 +20,10 @@ "db_name": "10", }, +"stor_db": { + "db_password": "CGRateS.org" +}, + "rates": { "enabled": true, }, diff --git a/data/conf/samples/precache/tutmongo/cgrates.json b/data/conf/samples/precache/tutmongo/cgrates.json index 6b7f3680a..c6a4020f7 100644 --- a/data/conf/samples/precache/tutmongo/cgrates.json +++ b/data/conf/samples/precache/tutmongo/cgrates.json @@ -21,9 +21,11 @@ "db_port": 27017, }, - - - +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, "caches":{ "partitions": { diff --git a/data/conf/samples/precache/tutmongo_apiban/cgrates.json b/data/conf/samples/precache/tutmongo_apiban/cgrates.json index 067ce2d27..9903c8a48 100644 --- a/data/conf/samples/precache/tutmongo_apiban/cgrates.json +++ b/data/conf/samples/precache/tutmongo_apiban/cgrates.json @@ -18,12 +18,14 @@ "data_db": { "db_type": "mongo", "db_name": "10", - "db_port": 27017, + "db_port": 27017 }, - - - +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, "caches":{ "partitions": { diff --git a/data/conf/samples/precache/tutmysql/cgrates.json b/data/conf/samples/precache/tutmysql/cgrates.json index 19610a1db..f422db0e7 100644 --- a/data/conf/samples/precache/tutmysql/cgrates.json +++ b/data/conf/samples/precache/tutmysql/cgrates.json @@ -20,8 +20,9 @@ "db_name": "10", // data_db database name to connect to }, - - +"stor_db": { + "db_password": "CGRateS.org" +}, "caches":{ "partitions": { diff --git a/data/conf/samples/precache/tutmysql_apiban/cgrates.json b/data/conf/samples/precache/tutmysql_apiban/cgrates.json index f15d2a9e4..82a0bafd5 100644 --- a/data/conf/samples/precache/tutmysql_apiban/cgrates.json +++ b/data/conf/samples/precache/tutmysql_apiban/cgrates.json @@ -20,8 +20,9 @@ "db_name": "10", // data_db database name to connect to }, - - +"stor_db": { + "db_password": "CGRateS.org" +}, "caches":{ "partitions": { diff --git a/data/conf/samples/preload_internal/cgrates.json b/data/conf/samples/preload_internal/cgrates.json index 356e04740..763a10daa 100644 --- a/data/conf/samples/preload_internal/cgrates.json +++ b/data/conf/samples/preload_internal/cgrates.json @@ -10,6 +10,9 @@ "db_type": "*internal" }, + "stor_db": { + "db_type": "*internal" + }, "loaders": [ { diff --git a/data/conf/samples/radagent_internal/cgrates.json b/data/conf/samples/radagent_internal/cgrates.json index 7f31d0986..71e74beae 100644 --- a/data/conf/samples/radagent_internal/cgrates.json +++ b/data/conf/samples/radagent_internal/cgrates.json @@ -18,8 +18,9 @@ "db_type": "*internal", }, - - +"stor_db": { + "db_type": "*internal" +}, "rals": { "enabled": true, diff --git a/data/conf/samples/radagent_mongo/cgrates.json b/data/conf/samples/radagent_mongo/cgrates.json index cd8be594b..32fe6b635 100644 --- a/data/conf/samples/radagent_mongo/cgrates.json +++ b/data/conf/samples/radagent_mongo/cgrates.json @@ -20,6 +20,12 @@ "db_password": "", }, +"stor_db": { + "db_type": "mongo", // stor database type to use: + "db_port": 27017, // the port to reach the stordb + "db_name": "stordb", + "db_password": "" +}, "rals": { "enabled": true, diff --git a/data/conf/samples/radagent_mysql/cgrates.json b/data/conf/samples/radagent_mysql/cgrates.json index 27e1fe67f..1cfe4022b 100644 --- a/data/conf/samples/radagent_mysql/cgrates.json +++ b/data/conf/samples/radagent_mysql/cgrates.json @@ -19,6 +19,9 @@ "db_name": "10", }, +"stor_db": { + "db_password": "CGRateS.org" +}, "rals": { "enabled": true, diff --git a/data/conf/samples/rates_internal/cgrates.json b/data/conf/samples/rates_internal/cgrates.json index ead4a0477..c14ed7ac6 100644 --- a/data/conf/samples/rates_internal/cgrates.json +++ b/data/conf/samples/rates_internal/cgrates.json @@ -1,22 +1,22 @@ { - // CGRateS Configuration file - // will be used in apis/attributes_it_test.go +"data_db": { + "db_type": "*internal" +}, - "data_db": { - "db_type": "*internal", - }, +"stor_db": { + "db_type": "*internal" +}, +"rates": { + "enabled": true, + "prefix_indexed_fields": ["*req.Destination"], + "exists_indexed_fields": ["*req.Destination"], + "rate_prefix_indexed_fields": ["*req.Destination"] +}, +"admins": { + "enabled": true +} - "rates": { - "enabled": true, - "prefix_indexed_fields": ["*req.Destination"], - "exists_indexed_fields": ["*req.Destination"], - "rate_prefix_indexed_fields": ["*req.Destination"], - }, - - "admins": { - "enabled": true, - } -}, \ No newline at end of file +} \ No newline at end of file diff --git a/data/conf/samples/rates_mongo/cgrates.json b/data/conf/samples/rates_mongo/cgrates.json index d88329714..5c6a466fd 100644 --- a/data/conf/samples/rates_mongo/cgrates.json +++ b/data/conf/samples/rates_mongo/cgrates.json @@ -1,24 +1,26 @@ { - // CGRateS Configuration file - // will be used in apis/attributes_it_test.go +"data_db": { + "db_type": "mongo", + "db_name": "10", + "db_port": 27017 +}, - "data_db": { - "db_type": "mongo", - "db_name": "10", - "db_port": 27017, - }, +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, - +"rates": { + "enabled": true, + "prefix_indexed_fields": ["*req.Destination"], + "exists_indexed_fields": ["*req.Destination"], + "rate_prefix_indexed_fields": ["*req.Destination"] +}, - "rates": { - "enabled": true, - "prefix_indexed_fields": ["*req.Destination"], - "exists_indexed_fields": ["*req.Destination"], - "rate_prefix_indexed_fields": ["*req.Destination"], - }, +"admins": { + "enabled": true +} - "admins": { - "enabled": true, - } -}, \ No newline at end of file +} \ No newline at end of file diff --git a/data/conf/samples/rates_mysql/cgrates.json b/data/conf/samples/rates_mysql/cgrates.json index ac046c948..07b8c10d3 100644 --- a/data/conf/samples/rates_mysql/cgrates.json +++ b/data/conf/samples/rates_mysql/cgrates.json @@ -1,27 +1,29 @@ { - // CGRateS Configuration file - // will be used in apis/attributes_it_test.go - "general": { - "node_id": "id", // identifier of this instance in the cluster, if empty it will be autogenerated - "log_level": 7, - }, +"general": { + "node_id": "id", + "log_level": 7 +}, - "data_db": { // database used to store runtime data (eg: accounts, cdr stats) - "db_type": "redis", // data_db type: - "db_port": 6379, // data_db port to reach the database - "db_name": "10", // data_db database name to connect to - }, +"data_db": { + "db_type": "redis", + "db_port": 6379, + "db_name": "10" +}, +"stor_db": { + "db_password": "CGRateS.org" +}, - "rates": { - "enabled": true, - "prefix_indexed_fields": ["*req.Destination"], - "exists_indexed_fields": ["*req.Destination"], - "rate_prefix_indexed_fields": ["*req.Destination"], - }, +"rates": { + "enabled": true, + "prefix_indexed_fields": ["*req.Destination"], + "exists_indexed_fields": ["*req.Destination"], + "rate_prefix_indexed_fields": ["*req.Destination"] +}, - "admins": { - "enabled": true, - } -}, \ No newline at end of file +"admins": { + "enabled": true +} + +} \ No newline at end of file diff --git a/data/conf/samples/registrarc/all2_mongo/cgrates.json b/data/conf/samples/registrarc/all2_mongo/cgrates.json index 99a5affd2..cdbf5c76b 100644 --- a/data/conf/samples/registrarc/all2_mongo/cgrates.json +++ b/data/conf/samples/registrarc/all2_mongo/cgrates.json @@ -1,32 +1,32 @@ { -// CGRateS Configuration file -// - "general": { "node_id": "ALL2", "log_level": 7 }, - "listen": { "rpc_json": ":7012", "rpc_gob": ":7013", - "http": ":7080", + "http": ":7080" }, "data_db": { "db_type": "mongo", "db_name": "12", - "db_port": 27017, + "db_port": 27017 }, - +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, "rpc_conns": { "conn1": { "strategy": "*first", - "conns": [{"address": "127.0.0.1:7012", "transport":"*json"}], + "conns": [{"address": "127.0.0.1:7012", "transport":"*json"}] }, "dispConn": { "strategy": "*first", @@ -40,36 +40,34 @@ "chargers": { "enabled": true, - "attributes_conns": ["*internal"], + "attributes_conns": ["*internal"] }, "thresholds": { - "enabled": true, + "enabled": true }, "routes": { "enabled": true, - "rates_conns": ["*internal"], + "rates_conns": ["*internal"] }, "stats": { - "enabled": true, + "enabled": true }, "resources": { - "enabled": true, + "enabled": true }, - "rates": { - "enabled": true, + "enabled": true }, - "cdrs": { "enabled": true, "chargers_conns":["*internal"], - "rates_conns": ["*internal"], + "rates_conns": ["*internal"] }, "sessions": { @@ -80,14 +78,13 @@ "attributes_conns": ["*internal"], "rates_conns": ["*internal"], "cdrs_conns": ["*internal"], - "chargers_conns": ["*internal"], + "chargers_conns": ["*internal"] }, "admins": { "enabled": true, - "caches_conns":["conn1"], + "caches_conns":["conn1"] }, - "registrarc":{ "dispatchers":{ @@ -99,10 +96,10 @@ "ID":"ALL2", "transport": "*json", "tls": false - }, + } ], - "refresh_interval": "1s", - }, + "refresh_interval": "1s" + } } } diff --git a/data/conf/samples/registrarc/all2_mysql/cgrates.json b/data/conf/samples/registrarc/all2_mysql/cgrates.json index 1b218c128..bddb02366 100644 --- a/data/conf/samples/registrarc/all2_mysql/cgrates.json +++ b/data/conf/samples/registrarc/all2_mysql/cgrates.json @@ -1,113 +1,106 @@ { - // CGRateS Configuration file - // - - - "general": { - "node_id": "ALL2", - "log_level": 7 - }, - - - "listen": { - "rpc_json": ":7012", - "rpc_gob": ":7013", - "http": ":7080", - }, +"general": { + "node_id": "ALL2", + "log_level": 7 +}, - "data_db": { // database used to store runtime data (eg: accounts, cdr stats) - "db_type": "redis", // data_db type: - "db_port": 6379, // data_db port to reach the database - "db_name": "12", // data_db database name to connect to - }, - +"listen": { + "rpc_json": ":7012", + "rpc_gob": ":7013", + "http": ":7080" +}, - - - "rpc_conns": { - "conn1": { - "strategy": "*first", - "conns": [{"address": "127.0.0.1:7012", "transport":"*json"}], - }, - "dispConn": { - "strategy": "*first", - "conns": [{"address": "http://127.0.0.1:2080/registrar", "transport":"*http_jsonrpc"}] - } +"data_db": { + "db_type": "redis", + "db_port": 6379, + "db_name": "12" +}, + +"stor_db": { + "db_password": "CGRateS.org" +}, + +"rpc_conns": { + "conn1": { + "strategy": "*first", + "conns": [{"address": "127.0.0.1:7012", "transport":"*json"}] }, - - "attributes": { - "enabled": true - }, - - - "chargers": { - "enabled": true, - "attributes_conns": ["*internal"], - }, - - "thresholds": { - "enabled": true, - }, - - "routes": { - "enabled": true, - "rates_conns": ["*internal"], - }, - - "stats": { - "enabled": true, - }, - - "resources": { - "enabled": true, - }, - - - "rates": { - "enabled": true, - }, - - - "cdrs": { - "enabled": true, - "chargers_conns":["*internal"], - "rals_conns": ["*internal"], - }, - - "sessions": { - "enabled": true, - "listen_bijson": ":7014", - "routes_conns": ["*internal"], - "resources_conns": ["*internal"], - "attributes_conns": ["*internal"], - "rals_conns": ["*internal"], - "cdrs_conns": ["*internal"], - "chargers_conns": ["*internal"], - }, - - "admins": { - "enabled": true, - "caches_conns":["conn1"], - "scheduler_conns": ["*internal"], - }, - - - "registrarc":{ - "dispatchers":{ - "enabled": true, - "registrars_conns": ["dispConn"], - "hosts": [ - { - "Tenant": "*default", - "ID":"ALL2", - "transport": "*json", - "tls": false - }, - ], - "refresh_interval": "1s", - }, + "dispConn": { + "strategy": "*first", + "conns": [{"address": "http://127.0.0.1:2080/registrar", "transport":"*http_jsonrpc"}] } - +}, + +"attributes": { + "enabled": true +}, + + +"chargers": { + "enabled": true, + "attributes_conns": ["*internal"] +}, + +"thresholds": { + "enabled": true +}, + +"routes": { + "enabled": true, + "rates_conns": ["*internal"] +}, + +"stats": { + "enabled": true +}, + +"resources": { + "enabled": true +}, + +"rates": { + "enabled": true +}, + +"cdrs": { + "enabled": true, + "chargers_conns":["*internal"], + "rals_conns": ["*internal"] +}, + +"sessions": { + "enabled": true, + "listen_bijson": ":7014", + "routes_conns": ["*internal"], + "resources_conns": ["*internal"], + "attributes_conns": ["*internal"], + "rals_conns": ["*internal"], + "cdrs_conns": ["*internal"], + "chargers_conns": ["*internal"] +}, + +"admins": { + "enabled": true, + "caches_conns":["conn1"], + "scheduler_conns": ["*internal"] +}, + +"registrarc":{ + "dispatchers":{ + "enabled": true, + "registrars_conns": ["dispConn"], + "hosts": [ + { + "Tenant": "*default", + "ID":"ALL2", + "transport": "*json", + "tls": false + } + ], + "refresh_interval": "1s" + } +} + } \ No newline at end of file diff --git a/data/conf/samples/registrarc/all_mongo/cgrates.json b/data/conf/samples/registrarc/all_mongo/cgrates.json index 1c6abf980..e4178589b 100644 --- a/data/conf/samples/registrarc/all_mongo/cgrates.json +++ b/data/conf/samples/registrarc/all_mongo/cgrates.json @@ -1,35 +1,36 @@ { -// CGRateS Configuration file -// - "general": { "node_id": "ALL", "log_level": 7 }, - "listen": { "rpc_json": ":6012", "rpc_gob": ":6013", - "http": ":6080", + "http": ":6080" }, "data_db": { "db_type": "mongo", "db_name": "11", - "db_port": 27017, + "db_port": 27017 }, +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, "rpc_conns": { "conn1": { "strategy": "*first", - "conns": [{"address": "127.0.0.1:6012", "transport":"*json"}], + "conns": [{"address": "127.0.0.1:6012", "transport":"*json"}] }, "rplConn": { "strategy": "*broadcast_sync", - "conns": [{"address": "127.0.0.1:7012", "transport":"*json"}], + "conns": [{"address": "127.0.0.1:7012", "transport":"*json"}] }, "dispConn": { "strategy": "*first", @@ -43,11 +44,11 @@ "chargers": { "enabled": true, - "attributes_conns": ["*internal"], + "attributes_conns": ["*internal"] }, "thresholds": { - "enabled": true, + "enabled": true }, "routes": { @@ -56,23 +57,21 @@ }, "stats": { - "enabled": true, + "enabled": true }, "resources": { - "enabled": true, + "enabled": true }, - "rates": { - "enabled": true, + "enabled": true }, - "cdrs": { "enabled": true, "chargers_conns":["*internal"], - "rates_conns": ["*internal"], + "rates_conns": ["*internal"] }, "sessions": { @@ -83,15 +82,14 @@ "attributes_conns": ["*internal"], "rates_conns": ["*internal"], "chargers_conns": ["*internal"], - "cdrs_conns": ["*internal"], + "cdrs_conns": ["*internal"] }, "admins": { "enabled": true, - "caches_conns":["conn1"], + "caches_conns":["conn1"] }, - "registrarc":{ "dispatchers":{ "enabled": true, @@ -102,10 +100,10 @@ "ID":"ALL2", "transport": "*json", "tls": false - }, + } ], - "refresh_interval": "1s", - }, + "refresh_interval": "1s" + } } } diff --git a/data/conf/samples/registrarc/all_mysql/cgrates.json b/data/conf/samples/registrarc/all_mysql/cgrates.json index 8bbd8169d..c44ab2dec 100644 --- a/data/conf/samples/registrarc/all_mysql/cgrates.json +++ b/data/conf/samples/registrarc/all_mysql/cgrates.json @@ -1,37 +1,34 @@ { -// CGRateS Configuration file -// - "general": { "node_id": "ALL", "log_level": 7 }, - "listen": { "rpc_json": ":6012", "rpc_gob": ":6013", - "http": ":6080", + "http": ":6080" }, -"data_db": { // database used to store runtime data (eg: accounts, cdr stats) - "db_type": "redis", // data_db type: - "db_port": 6379, // data_db port to reach the database - "db_name": "11", // data_db database name to connect to +"data_db": { + "db_type": "redis", + "db_port": 6379, + "db_name": "11" }, - - +"stor_db": { + "db_password": "CGRateS.org" +}, "rpc_conns": { "conn1": { "strategy": "*first", - "conns": [{"address": "127.0.0.1:6012", "transport":"*json"}], + "conns": [{"address": "127.0.0.1:6012", "transport":"*json"}] }, "rplConn": { "strategy": "*broadcast_sync", - "conns": [{"address": "127.0.0.1:7012", "transport":"*json"}], + "conns": [{"address": "127.0.0.1:7012", "transport":"*json"}] }, "dispConn": { "strategy": "*first", @@ -39,43 +36,40 @@ } }, - "attributes": { "enabled": true }, "chargers": { "enabled": true, - "attributes_conns": ["*internal"], + "attributes_conns": ["*internal"] }, "thresholds": { - "enabled": true, + "enabled": true }, "routes": { "enabled": true, - "rates_conns": ["*internal"], + "rates_conns": ["*internal"] }, "stats": { - "enabled": true, + "enabled": true }, "resources": { - "enabled": true, + "enabled": true }, - "rates": { - "enabled": true, + "enabled": true }, - "cdrs": { "enabled": true, "chargers_conns":["*internal"], - "rates_conns": ["*internal"], + "rates_conns": ["*internal"] }, "sessions": { @@ -86,14 +80,13 @@ "attributes_conns": ["*internal"], "rates_conns": ["*internal"], "chargers_conns": ["*internal"], - "cdrs_conns": ["*internal"], + "cdrs_conns": ["*internal"] }, "admins": { "enabled": true, - "caches_conns":["conn1"], + "caches_conns":["conn1"] }, - "registrarc":{ "dispatchers":{ @@ -105,11 +98,10 @@ "ID":"ALL2", "transport": "*json", "tls": false - }, + } ], - "refresh_interval": "1s", - }, + "refresh_interval": "1s" + } } - } diff --git a/data/conf/samples/registrarc/dispatchers_mongo/cgrates.json b/data/conf/samples/registrarc/dispatchers_mongo/cgrates.json index 96e7c5f66..95fdcd2c0 100644 --- a/data/conf/samples/registrarc/dispatchers_mongo/cgrates.json +++ b/data/conf/samples/registrarc/dispatchers_mongo/cgrates.json @@ -1,46 +1,43 @@ { -// Real-time Online/Offline Charging System (OCS) for Telecom & ISP environments -// Copyright (C) ITsysCOM GmbH -// -// This file contains the default configuration hardcoded into CGRateS. -// This is what you get when you load CGRateS with an empty configuration file. - "general": { "node_id": "DispatcherS1", "log_level": 7, - "reconnects": 1, + "reconnects": 1 }, "listen": { "rpc_json": ":2012", "rpc_gob": ":2013", - "http": ":2080", + "http": ":2080" }, "data_db": { "db_type": "mongo", "db_name": "10", - "db_port": 27017, + "db_port": 27017 }, - - +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, "caches":{ "partitions": { "*dispatcher_routes": {"limit": -1, "ttl": "2s"}, "*dispatcher_hosts": {"limit": -1, "ttl": "2s"} - }, + } }, "chargers": { - "enabled": true, + "enabled": true }, "rates": { - "enabled": true, + "enabled": true }, "sessions": { @@ -48,16 +45,15 @@ "rates_conns": ["*localhost"], "resources_conns": ["*localhost"], "chargers_conns": ["*localhost"], - "listen_bijson": ":3014", + "listen_bijson": ":3014" }, - "dispatchers":{ - "enabled": true, + "enabled": true }, - "admins": { - "enabled": true, -}, + "enabled": true +} + } \ No newline at end of file diff --git a/data/conf/samples/registrarc/dispatchers_mysql/cgrates.json b/data/conf/samples/registrarc/dispatchers_mysql/cgrates.json index 42823ca68..992e48c36 100755 --- a/data/conf/samples/registrarc/dispatchers_mysql/cgrates.json +++ b/data/conf/samples/registrarc/dispatchers_mysql/cgrates.json @@ -1,38 +1,35 @@ { -// Real-time Online/Offline Charging System (OCS) for Telecom & ISP environments -// Copyright (C) ITsysCOM GmbH -// -// This file contains the default configuration hardcoded into CGRateS. -// This is what you get when you load CGRateS with an empty configuration file. - "general": { "node_id": "DispatcherS1", "log_level": 7, - "reconnects": 1, + "reconnects": 1 }, "listen": { "rpc_json": ":2012", "rpc_gob": ":2013", - "http": ":2080", + "http": ":2080" }, +"stor_db": { + "db_type":"*internal" +}, "caches":{ "partitions": { "*dispatcher_routes": {"limit": -1, "ttl": "2s"}, "*dispatcher_hosts": {"limit": -1, "ttl": "2s"} - }, + } }, "schedulers": { - "enabled": true, + "enabled": true }, "rates": { - "enabled": true, + "enabled": true }, "sessions": { @@ -40,14 +37,15 @@ "rates_conns": ["*localhost"], "resources_conns": ["*localhost"], "chargers_conns": ["*localhost"], - "listen_bijson": ":3014", + "listen_bijson": ":3014" }, "dispatchers":{ - "enabled": true, + "enabled": true }, "admins": { - "enabled": true, -}, + "enabled": true +} + } \ No newline at end of file diff --git a/data/conf/samples/registrarc/registrarc_rpc_mongo/cgrates.json b/data/conf/samples/registrarc/registrarc_rpc_mongo/cgrates.json index faffac812..f325ec097 100644 --- a/data/conf/samples/registrarc/registrarc_rpc_mongo/cgrates.json +++ b/data/conf/samples/registrarc/registrarc_rpc_mongo/cgrates.json @@ -1,28 +1,27 @@ { -// CGRateS Configuration file - "general": { "log_level": 7, - "reply_timeout": "30s", + "reply_timeout": "30s" }, - "listen": { "rpc_json": ":3012", "rpc_gob": ":3013", - "http": ":3080", + "http": ":3080" }, - "data_db": { "db_type": "mongo", "db_name": "10", - "db_port": 27017, + "db_port": 27017 }, - - +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, "rpc_conns": { "regConn": { @@ -31,97 +30,82 @@ } }, - "cdrs": { - "enabled": true, + "enabled": true }, - "chargers": { "enabled": true, - "attributes_conns": ["*internal"], + "attributes_conns": ["*internal"] }, - "resources": { "enabled": true, "store_interval": "1s", "thresholds_conns": ["*internal"] }, - "stats": { "enabled": true, "store_interval": "1s", - "thresholds_conns": ["*internal"], + "thresholds_conns": ["*internal"] }, - "thresholds": { "enabled": true, - "store_interval": "1s", + "store_interval": "1s" }, - "routes": { "enabled": true, "stats_conns": ["*localhost"], "resources_conns": ["*localhost"], - "rates_conns": ["*internal"], + "rates_conns": ["*internal"] }, - "attributes": { "enabled": true, "stats_conns": ["*localhost"], "resources_conns": ["*localhost"], - "accounts_conns": ["*internal"], + "accounts_conns": ["*internal"] }, - "sessions": { "enabled": true, "rates_conns": ["*internal"], "cdrs_conns": ["*internal"], - "chargers_conns": ["*internal"], + "chargers_conns": ["*internal"] }, - "migrator": { "out_datadb_type": "mongo", "out_datadb_port": "27017", "out_datadb_name": "10", - "users_filters":["Account"], + "users_filters":["Account"] }, - "admins": { - "enabled": true, + "enabled": true }, - "rates": { "enabled": true }, - "actions": { "enabled": true, "accounts_conns": ["*localhost"] }, - "accounts": { - "enabled": true, + "enabled": true }, - "filters": { - "accounts_conns": ["*internal"], + "accounts_conns": ["*internal"] }, - "registrarc":{ "rpc":{ "enabled": true, @@ -132,10 +116,10 @@ "ID":"attributes", "transport": "*json", "tls": false - }, + } ], - "refresh_interval": "1s", - }, -}, + "refresh_interval": "1s" + } +} } diff --git a/data/conf/samples/registrarc/registrarc_rpc_mysql/cgrates.json b/data/conf/samples/registrarc/registrarc_rpc_mysql/cgrates.json index 9dc0583eb..3d2fbb458 100644 --- a/data/conf/samples/registrarc/registrarc_rpc_mysql/cgrates.json +++ b/data/conf/samples/registrarc/registrarc_rpc_mysql/cgrates.json @@ -1,27 +1,25 @@ { -// CGRateS Configuration file - "general": { "log_level": 7, - "reply_timeout": "30s", + "reply_timeout": "30s" }, - "listen": { "rpc_json": ":3012", "rpc_gob": ":3013", - "http": ":3080", + "http": ":3080" }, - "data_db": { "db_type": "redis", "db_port": 6379, - "db_name": "10", + "db_name": "10" }, - +"stor_db": { + "db_password": "CGRateS.org" +}, "rpc_conns": { "regConn": { @@ -30,46 +28,39 @@ } }, - "cdrs": { - "enabled": true, + "enabled": true }, - "chargers": { "enabled": true, - "attributes_conns": ["*internal"], + "attributes_conns": ["*internal"] }, - "resources": { "enabled": true, "store_interval": "1s", "thresholds_conns": ["*internal"] }, - "stats": { "enabled": true, "store_interval": "1s", - "thresholds_conns": ["*internal"], + "thresholds_conns": ["*internal"] }, - "thresholds": { "enabled": true, - "store_interval": "1s", + "store_interval": "1s" }, - "routes": { "enabled": true, "stats_conns": ["*localhost"], "resources_conns": ["*localhost"], - "rates_conns": ["*internal"], + "rates_conns": ["*internal"] }, - "attributes": { "enabled": true, "stats_conns": ["*localhost"], @@ -77,47 +68,40 @@ "accounts_conns": ["*localhost"] }, - "sessions": { "enabled": true, "rates_conns": ["*internal"], "cdrs_conns": ["*internal"], - "chargers_conns": ["*internal"], + "chargers_conns": ["*internal"] }, - "migrator": { "out_datadb_type": "mongo", "out_datadb_port": "27017", "out_datadb_name": "10", - "users_filters":["Account"], + "users_filters":["Account"] }, - "admins": { - "enabled": true, + "enabled": true }, - "rates": { "enabled": true }, - "actions": { "enabled": true, "accounts_conns": ["*localhost"] }, - "accounts": { - "enabled": true, + "enabled": true }, - "filters": { - "accounts_conns": ["*internal"], + "accounts_conns": ["*internal"] }, "registrarc":{ @@ -130,10 +114,10 @@ "ID":"attributes", "transport": "*json", "tls": false - }, + } ], - "refresh_interval": "1s", - }, -}, + "refresh_interval": "1s" + } +} } diff --git a/data/conf/samples/registrarc/registrars_rpc_mongo/cgrates.json b/data/conf/samples/registrarc/registrars_rpc_mongo/cgrates.json index d7a335b85..35e23368c 100644 --- a/data/conf/samples/registrarc/registrars_rpc_mongo/cgrates.json +++ b/data/conf/samples/registrarc/registrars_rpc_mongo/cgrates.json @@ -1,45 +1,41 @@ { -// CGRateS Configuration file - "general": { - "log_level": 7, + "log_level": 7 }, - "listen": { "rpc_json": ":2012", "rpc_gob": ":2013", - "http": ":2080", + "http": ":2080" }, - "data_db": { "db_type": "mongo", "db_name": "10", - "db_port": 27017, + "db_port": 27017 }, - - - +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, "rpc_conns": { "conn1": { "strategy": "*first", - "conns": [{"id": "attributes"}], - }, + "conns": [{"id": "attributes"}] + } }, - "chargers": { "enabled": true, - "attributes_conns": ["conn1"], + "attributes_conns": ["conn1"] }, - "admins": { - "enabled": true, + "enabled": true }, "loaders": [ @@ -49,7 +45,8 @@ "tenant": "cgrates.org", "lockfile_path": ".cgr.lck", "tp_in_dir": "/usr/share/cgrates/tariffplans/testit", - "tp_out_dir": "", - }, -], + "tp_out_dir": "" + } +] + } diff --git a/data/conf/samples/registrarc/registrars_rpc_mysql/cgrates.json b/data/conf/samples/registrarc/registrars_rpc_mysql/cgrates.json index 02fa117e9..4897cfdff 100644 --- a/data/conf/samples/registrarc/registrars_rpc_mysql/cgrates.json +++ b/data/conf/samples/registrarc/registrars_rpc_mysql/cgrates.json @@ -1,44 +1,35 @@ { -// CGRateS Configuration file - "general": { - "log_level": 7, + "log_level": 7 }, - "listen": { "rpc_json": ":2012", "rpc_gob": ":2013", - "http": ":2080", + "http": ":2080" }, - "data_db": { "db_type": "redis", "db_port": 6379, - "db_name": "10", + "db_name": "10" }, - - - "rpc_conns": { "conn1": { "strategy": "*first", - "conns": [{"id": "attributes"}], - }, + "conns": [{"id": "attributes"}] + } }, - "chargers": { "enabled": true, - "attributes_conns": ["conn1"], + "attributes_conns": ["conn1"] }, - "admins": { - "enabled": true, + "enabled": true }, "loaders": [ @@ -48,8 +39,8 @@ "tenant": "cgrates.org", "lockfile_path": ".cgr.lck", "tp_in_dir": "/usr/share/cgrates/tariffplans/testit", - "tp_out_dir": "", - }, -], + "tp_out_dir": "" + } +] } diff --git a/data/conf/samples/resources_internal/cgrates.json b/data/conf/samples/resources_internal/cgrates.json index 865419565..7a9f341ea 100644 --- a/data/conf/samples/resources_internal/cgrates.json +++ b/data/conf/samples/resources_internal/cgrates.json @@ -1,32 +1,33 @@ { - // CGRateS Configuration file - // will be used in apis/resources_it_test.go - - "general": { - "log_level": 7, - }, - "data_db": { - "db_type": "*internal", - }, - +"general": { + "log_level": 7 +}, - - "actions": { - "enabled": true, - }, +"data_db": { + "db_type": "*internal" +}, - "thresholds": { - "enabled": true, - "actions_conns": ["*internal"], - }, - - "resources": { - "enabled": true, - "thresholds_conns": ["*internal"], - }, - - "admins": { - "enabled": true, - }, - } \ No newline at end of file +"stor_db": { + "db_type": "*internal" +}, + +"actions": { + "enabled": true +}, + +"thresholds": { + "enabled": true, + "actions_conns": ["*internal"] +}, + +"resources": { + "enabled": true, + "thresholds_conns": ["*internal"] +}, + +"admins": { + "enabled": true +} + +} \ No newline at end of file diff --git a/data/conf/samples/resources_mongo/cgrates.json b/data/conf/samples/resources_mongo/cgrates.json index 856c24853..caaff54cd 100644 --- a/data/conf/samples/resources_mongo/cgrates.json +++ b/data/conf/samples/resources_mongo/cgrates.json @@ -1,33 +1,37 @@ { - // CGRateS Configuration file - // will be used in apis/resources_it_test.go - "general": { - "log_level": 7, - }, +"general": { + "log_level": 7 +}, - "data_db": { - "db_type": "mongo", - "db_name": "10", - "db_port": 27017, - }, - - - "actions": { - "enabled": true, - }, +"data_db": { + "db_type": "mongo", + "db_name": "10", + "db_port": 27017 +}, - "thresholds": { - "enabled": true, - "actions_conns": ["*internal"], - }, - - "resources": { - "enabled": true, - "thresholds_conns": ["*internal"], - }, - - "admins": { - "enabled": true, - } - } \ No newline at end of file +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, + +"actions": { + "enabled": true +}, + +"thresholds": { + "enabled": true, + "actions_conns": ["*internal"] +}, + +"resources": { + "enabled": true, + "thresholds_conns": ["*internal"] +}, + +"admins": { + "enabled": true +} + +} \ No newline at end of file diff --git a/data/conf/samples/resources_mysql/cgrates.json b/data/conf/samples/resources_mysql/cgrates.json index 64475fffd..17104a081 100644 --- a/data/conf/samples/resources_mysql/cgrates.json +++ b/data/conf/samples/resources_mysql/cgrates.json @@ -1,33 +1,35 @@ { - // CGRateS Configuration file - // will be used in apis/resources_it_test.go - "general": { - "log_level": 7, - }, - "data_db": { // database used to store runtime data (eg: accounts, cdr stats) - "db_type": "redis", // data_db type: - "db_port": 6379, // data_db port to reach the database - "db_name": "10", // data_db database name to connect to - }, - +"general": { + "log_level": 7 +}, +"data_db": { + "db_type": "redis", + "db_port": 6379, + "db_name": "10" +}, - "actions": { - "enabled": true, - }, +"stor_db": { + "db_password": "CGRateS.org" +}, - "thresholds": { - "enabled": true, - "actions_conns": ["*internal"], - }, - - "resources": { - "enabled": true, - "thresholds_conns": ["*internal"], - }, - - "admins": { - "enabled": true, - } - } \ No newline at end of file +"actions": { + "enabled": true +}, + +"thresholds": { + "enabled": true, + "actions_conns": ["*internal"] +}, + +"resources": { + "enabled": true, + "thresholds_conns": ["*internal"] +}, + +"admins": { + "enabled": true +} + +} \ No newline at end of file diff --git a/data/conf/samples/routes_cases_internal/cgrates.json b/data/conf/samples/routes_cases_internal/cgrates.json index a72a04910..3eefe3765 100644 --- a/data/conf/samples/routes_cases_internal/cgrates.json +++ b/data/conf/samples/routes_cases_internal/cgrates.json @@ -12,6 +12,10 @@ "data_db": { "db_type": "*internal" }, + + "stor_db": { + "db_type": "*internal" + }, "attributes": { "enabled": true, diff --git a/data/conf/samples/routes_cases_mongo/cgrates.json b/data/conf/samples/routes_cases_mongo/cgrates.json index 8cf1c1a2c..e19255069 100644 --- a/data/conf/samples/routes_cases_mongo/cgrates.json +++ b/data/conf/samples/routes_cases_mongo/cgrates.json @@ -15,8 +15,11 @@ "db_port": 27017, }, - - + "stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 + }, "attributes": { "enabled": true, diff --git a/data/conf/samples/routes_cases_mysql/cgrates.json b/data/conf/samples/routes_cases_mysql/cgrates.json index 505ebc470..ef34f3295 100644 --- a/data/conf/samples/routes_cases_mysql/cgrates.json +++ b/data/conf/samples/routes_cases_mysql/cgrates.json @@ -1,104 +1,107 @@ { - "general": { - "log_level": 7, - "reply_timeout": "50s" - }, - - "data_db": { - "db_type": "redis", - "db_port": 6379, - "db_name": "10" - }, +"general": { + "log_level": 7, + "reply_timeout": "50s" +}, + +"data_db": { + "db_type": "redis", + "db_port": 6379, + "db_name": "10" +}, - "attributes": { - "enabled": true, - "stats_conns": ["*internal"], - "resources_conns": ["*localhost"], - "accounts_conns": ["*localhost"] - }, - - - "chargers": { - "enabled": true, - "attributes_conns": ["*internal"] - }, +"stor_db": { + "db_password": "CGRateS.org" +}, - "cdrs": { - "enabled": true - }, - - "resources": { +"attributes": { + "enabled": true, + "stats_conns": ["*internal"], + "resources_conns": ["*localhost"], + "accounts_conns": ["*localhost"] +}, + +"chargers": { + "enabled": true, + "attributes_conns": ["*internal"] +}, + +"cdrs": { + "enabled": true +}, + +"resources": { + "enabled": true, + "store_interval": "-1" +}, + +"loaders": [ + { + "id": "*default", "enabled": true, - "store_interval": "-1" - }, - - "loaders": [ - { - "id": "*default", - "enabled": true, - "tenant": "cgrates.org", - "tp_in_dir": "/usr/share/cgrates/tariffplans/tutroutes", - "tp_out_dir": "", - "lockfile_path": "" - } - ], - - "stats": { - "enabled": true, - "store_interval": "-1", - "thresholds_conns": ["*internal"] - }, - - "thresholds": { - "enabled": true, - "store_interval": "-1" - }, - - - "routes": { - "enabled": true, - "prefix_indexed_fields":["*req.Destination"], - "stats_conns": ["*internal"], - "resources_conns": ["*internal"], - "accounts_conns": ["*localhost"], - "rates_conns": ["*internal"] - }, - - - "sessions": { - "enabled": true, - "routes_conns": ["*internal"], - "resources_conns": ["*internal"], - "attributes_conns": ["*internal"], - "rates_conns": ["*internal"], - "cdrs_conns": ["*internal"], - "chargers_conns": ["*internal"] - }, - - "admins": { - "enabled": true - }, - - "rates": { - "enabled": true - }, - - - "actions": { - "enabled": true, - "accounts_conns": ["*localhost"] - }, - - "accounts": { - "enabled": true - }, - - - "filters": { - "stats_conns": ["*internal"], - "resources_conns": ["*internal"], - "accounts_conns": ["*localhost"] + "tenant": "cgrates.org", + "tp_in_dir": "/usr/share/cgrates/tariffplans/tutroutes", + "tp_out_dir": "", + "lockfile_path": "" } - +], + +"stats": { + "enabled": true, + "store_interval": "-1", + "thresholds_conns": ["*internal"] +}, + +"thresholds": { + "enabled": true, + "store_interval": "-1" +}, + + +"routes": { + "enabled": true, + "prefix_indexed_fields":["*req.Destination"], + "stats_conns": ["*internal"], + "resources_conns": ["*internal"], + "accounts_conns": ["*localhost"], + "rates_conns": ["*internal"] +}, + + +"sessions": { + "enabled": true, + "routes_conns": ["*internal"], + "resources_conns": ["*internal"], + "attributes_conns": ["*internal"], + "rates_conns": ["*internal"], + "cdrs_conns": ["*internal"], + "chargers_conns": ["*internal"] +}, + +"admins": { + "enabled": true +}, + +"rates": { + "enabled": true +}, + + +"actions": { + "enabled": true, + "accounts_conns": ["*localhost"] +}, + +"accounts": { + "enabled": true +}, + + +"filters": { + "stats_conns": ["*internal"], + "resources_conns": ["*internal"], + "accounts_conns": ["*localhost"] +} + } \ No newline at end of file diff --git a/data/conf/samples/routes_generaltests_internal/cgrates.json b/data/conf/samples/routes_generaltests_internal/cgrates.json index 5cfe81293..9f447c79f 100644 --- a/data/conf/samples/routes_generaltests_internal/cgrates.json +++ b/data/conf/samples/routes_generaltests_internal/cgrates.json @@ -1,73 +1,76 @@ + { - "general": { - "log_level": 7, - "reply_timeout": "50s" - }, - - - "listen": { - "rpc_json": ":2012", - "rpc_gob": ":2013", - "http": ":2080" - }, - - - "data_db": { - "db_type": "*internal" - }, +"general": { + "log_level": 7, + "reply_timeout": "50s" +}, - - "resources": { - "enabled": true, - "store_interval": "-1", - "thresholds_conns": ["*internal"] - }, - - - "stats": { - "enabled": true, - "store_interval": "-1", - "thresholds_conns": ["*internal"] - }, - - - "thresholds": { - "enabled": true, - "store_interval": "-1" - }, - - - "routes": { - "enabled": true, - "stats_conns": ["*internal"], - "resources_conns": ["*internal"], - "rates_conns": ["*internal"], - "accounts_conns": ["*internal"] - }, - "admins": { - "enabled": true, - }, - - - "rates": { - "enabled": true - }, - - - "accounts": { - "enabled": true - }, +"listen": { + "rpc_json": ":2012", + "rpc_gob": ":2013", + "http": ":2080" +}, - "loaders": [ - { - "id": "*default", - "enabled": true, - "tenant": "cgrates.org", - "lockfile_path": ".cgr.lck", - "tp_in_dir": "/usr/share/cgrates/tariffplans/testit", - "tp_out_dir": "" - } - ] +"data_db": { + "db_type": "*internal" +}, + +"stor_db": { + "db_type": "*internal" +}, + +"resources": { + "enabled": true, + "store_interval": "-1", + "thresholds_conns": ["*internal"] +}, + + +"stats": { + "enabled": true, + "store_interval": "-1", + "thresholds_conns": ["*internal"] +}, + + +"thresholds": { + "enabled": true, + "store_interval": "-1" +}, + + +"routes": { + "enabled": true, + "stats_conns": ["*internal"], + "resources_conns": ["*internal"], + "rates_conns": ["*internal"], + "accounts_conns": ["*internal"] +}, + +"admins": { + "enabled": true +}, + + +"rates": { + "enabled": true +}, + + +"accounts": { + "enabled": true +}, + +"loaders": [ + { + "id": "*default", + "enabled": true, + "tenant": "cgrates.org", + "lockfile_path": ".cgr.lck", + "tp_in_dir": "/usr/share/cgrates/tariffplans/testit", + "tp_out_dir": "" + } +] } \ No newline at end of file diff --git a/data/conf/samples/routes_generaltests_mongo/cgrates.json b/data/conf/samples/routes_generaltests_mongo/cgrates.json index fe4c63d9e..6d1cf4aae 100644 --- a/data/conf/samples/routes_generaltests_mongo/cgrates.json +++ b/data/conf/samples/routes_generaltests_mongo/cgrates.json @@ -1,74 +1,75 @@ { - "general": { - "log_level": 7, - "reply_timeout": "50s" - }, - - - "listen": { - "rpc_json": ":2012", - "rpc_gob": ":2013", - "http": ":2080" - }, - - "data_db": { - "db_type": "mongo", - "db_name": "10", - "db_port": 27017 - }, - - "resources": { - "enabled": true, - "store_interval": "1s", - "thresholds_conns": ["*internal"] - }, - - - "stats": { - "enabled": true, - "store_interval": "1s", - "thresholds_conns": ["*internal"] - }, - - - "thresholds": { - "enabled": true, - "store_interval": "1s" - }, - - - "routes": { - "enabled": true, - "stats_conns": ["*internal"], - "resources_conns": ["*internal"], - "rates_conns": ["*internal"], - "accounts_conns": ["*internal"] - }, +"general": { + "log_level": 7, + "reply_timeout": "50s" +}, - "admins": { +"listen": { + "rpc_json": ":2012", + "rpc_gob": ":2013", + "http": ":2080" +}, + +"data_db": { + "db_type": "mongo", + "db_name": "10", + "db_port": 27017 +}, + +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, + +"resources": { + "enabled": true, + "store_interval": "1s", + "thresholds_conns": ["*internal"] +}, + +"stats": { + "enabled": true, + "store_interval": "1s", + "thresholds_conns": ["*internal"] +}, + +"thresholds": { + "enabled": true, + "store_interval": "1s" +}, + +"routes": { + "enabled": true, + "stats_conns": ["*internal"], + "resources_conns": ["*internal"], + "rates_conns": ["*internal"], + "accounts_conns": ["*internal"] +}, + +"admins": { + "enabled": true + +}, + +"rates": { + "enabled": true +}, + + +"accounts": { + "enabled": true +}, + +"loaders": [ + { + "id": "*default", "enabled": true, - - }, - - - "rates": { - "enabled": true - }, - - - "accounts": { - "enabled": true - }, - - "loaders": [ - { - "id": "*default", - "enabled": true, - "tenant": "cgrates.org", - "lockfile_path": ".cgr.lck", - "tp_in_dir": "/usr/share/cgrates/tariffplans/testit", - "tp_out_dir": "" - } - ] + "tenant": "cgrates.org", + "lockfile_path": ".cgr.lck", + "tp_in_dir": "/usr/share/cgrates/tariffplans/testit", + "tp_out_dir": "" + } +] } \ No newline at end of file diff --git a/data/conf/samples/routes_generaltests_mysql/cgrates.json b/data/conf/samples/routes_generaltests_mysql/cgrates.json index 5d0d476f8..361b374ac 100644 --- a/data/conf/samples/routes_generaltests_mysql/cgrates.json +++ b/data/conf/samples/routes_generaltests_mysql/cgrates.json @@ -1,74 +1,73 @@ { - "general": { - "log_level": 7, - "reply_timeout": "50s" - }, - - - "listen": { - "rpc_json": ":2012", - "rpc_gob": ":2013", - "http": ":2080" - }, - - "data_db": { - "db_type": "redis", - "db_port": 6379, - "db_name": "10" - }, - - "resources": { - "enabled": true, - "store_interval": "1s", - "thresholds_conns": ["*internal"] - }, - - - "stats": { - "enabled": true, - "store_interval": "1s", - "thresholds_conns": ["*internal"] - }, - - - "thresholds": { - "enabled": true, - "store_interval": "1s" - }, - - - "routes": { - "enabled": true, - "stats_conns": ["*internal"], - "resources_conns": ["*internal"], - "rates_conns": ["*internal"], - "accounts_conns": ["*internal"] - }, +"general": { + "log_level": 7, + "reply_timeout": "50s" +}, - "admins": { - "enabled": true, - }, - - - "rates": { - "enabled": true - }, - - - "accounts": { - "enabled": true - }, +"listen": { + "rpc_json": ":2012", + "rpc_gob": ":2013", + "http": ":2080" +}, - "loaders": [ - { - "id": "*default", - "enabled": true, - "tenant": "cgrates.org", - "lockfile_path": ".cgr.lck", - "tp_in_dir": "/usr/share/cgrates/tariffplans/testit", - "tp_out_dir": "" - } - ] +"data_db": { + "db_type": "redis", + "db_port": 6379, + "db_name": "10" +}, + +"stor_db": { + "db_password": "CGRateS.org" +}, + +"resources": { + "enabled": true, + "store_interval": "1s", + "thresholds_conns": ["*internal"] +}, + + +"stats": { + "enabled": true, + "store_interval": "1s", + "thresholds_conns": ["*internal"] +}, + +"thresholds": { + "enabled": true, + "store_interval": "1s" +}, + +"routes": { + "enabled": true, + "stats_conns": ["*internal"], + "resources_conns": ["*internal"], + "rates_conns": ["*internal"], + "accounts_conns": ["*internal"] +}, + +"admins": { + "enabled": true +}, + +"rates": { + "enabled": true +}, + +"accounts": { + "enabled": true +}, + +"loaders": [ + { + "id": "*default", + "enabled": true, + "tenant": "cgrates.org", + "lockfile_path": ".cgr.lck", + "tp_in_dir": "/usr/share/cgrates/tariffplans/testit", + "tp_out_dir": "" + } +] } \ No newline at end of file diff --git a/data/conf/samples/routes_internal/cgrates.json b/data/conf/samples/routes_internal/cgrates.json index 497ff6e50..c184880b8 100644 --- a/data/conf/samples/routes_internal/cgrates.json +++ b/data/conf/samples/routes_internal/cgrates.json @@ -1,28 +1,32 @@ { - "general": { - "log_level": 7, - "reply_timeout": "50s" - }, +"general": { + "log_level": 7, + "reply_timeout": "50s" +}, - "listen": { - "rpc_json": ":2012", - "rpc_gob": ":2013", - "http": ":2080" - }, +"listen": { + "rpc_json": ":2012", + "rpc_gob": ":2013", + "http": ":2080" +}, - "data_db": { - "db_type": "*internal" - }, +"data_db": { + "db_type": "*internal" +}, - "routes": { - "enabled": true - }, +"stor_db": { + "db_type": "*internal" +}, - "admins": { - "enabled": true, - "scheduler_conns": ["*internal"] - } +"routes": { + "enabled": true +}, + +"admins": { + "enabled": true, + "scheduler_conns": ["*internal"] +} } \ No newline at end of file diff --git a/data/conf/samples/routes_mongo/cgrates.json b/data/conf/samples/routes_mongo/cgrates.json index 21ab40418..035ab3221 100644 --- a/data/conf/samples/routes_mongo/cgrates.json +++ b/data/conf/samples/routes_mongo/cgrates.json @@ -1,28 +1,34 @@ { - "general": { - "log_level": 7, - "reply_timeout": "30s" - }, +"general": { + "log_level": 7, + "reply_timeout": "30s" +}, - "listen": { - "rpc_json": ":2012", - "rpc_gob": ":2013", - "http": ":2080" - }, +"listen": { + "rpc_json": ":2012", + "rpc_gob": ":2013", + "http": ":2080" +}, - "data_db": { - "db_type": "mongo", - "db_name": "10", - "db_port": 27017 - }, +"data_db": { + "db_type": "mongo", + "db_name": "10", + "db_port": 27017 +}, - "routes": { - "enabled": true - }, +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, - "admins": { - "enabled": true - } +"routes": { + "enabled": true +}, + +"admins": { + "enabled": true +} } \ No newline at end of file diff --git a/data/conf/samples/routes_mysql/cgrates.json b/data/conf/samples/routes_mysql/cgrates.json index 7bb110b54..52b276c7c 100644 --- a/data/conf/samples/routes_mysql/cgrates.json +++ b/data/conf/samples/routes_mysql/cgrates.json @@ -1,30 +1,34 @@ { - "general": { - "log_level": 7, - "reply_timeout": "50s" - }, +"general": { + "log_level": 7, + "reply_timeout": "50s" +}, - "listen": { - "rpc_json": ":2012", - "rpc_gob": ":2013", - "http": ":2080" - }, +"listen": { + "rpc_json": ":2012", + "rpc_gob": ":2013", + "http": ":2080" +}, - "data_db": { - "db_type": "redis", - "db_port": 6379, - "db_name": "10" - }, +"data_db": { + "db_type": "redis", + "db_port": 6379, + "db_name": "10" +}, - "routes": { - "enabled": true - }, +"stor_db": { + "db_password": "CGRateS.org" +}, - "admins": { - "enabled": true, - "scheduler_conns": ["*internal"] - } +"routes": { + "enabled": true +}, + +"admins": { + "enabled": true, + "scheduler_conns": ["*internal"] +} } \ No newline at end of file diff --git a/data/conf/samples/rpccaching_mongo/cgrates.json b/data/conf/samples/rpccaching_mongo/cgrates.json index 39278005a..f3b063b84 100644 --- a/data/conf/samples/rpccaching_mongo/cgrates.json +++ b/data/conf/samples/rpccaching_mongo/cgrates.json @@ -1,78 +1,84 @@ { - "general": { - "log_level": 7, - "reply_timeout": "10s" - }, +"general": { + "log_level": 7, + "reply_timeout": "10s" +}, - "listen": { - "rpc_json": ":2012", - "rpc_gob": ":2013", - "http": ":2080" - }, +"listen": { + "rpc_json": ":2012", + "rpc_gob": ":2013", + "http": ":2080" +}, - "data_db": { - "db_type": "mongo", - "db_name": "10", - "db_port": 27017 - }, +"data_db": { + "db_type": "mongo", + "db_name": "10", + "db_port": 27017 +}, - "caches":{ - "partitions": { - "*rpc_responses": {"limit": -1, "ttl": "500ms"} - } - }, +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, + +"caches":{ + "partitions": { + "*rpc_responses": {"limit": -1, "ttl": "500ms"} + } +}, - "rates": { - "enabled": true - }, +"rates": { + "enabled": true +}, - "cdrs": { +"cdrs": { + "enabled": true, + "session_cost_retries": 2 +}, + + +"attributes": { + "enabled": true +}, + + +"chargers": { + "enabled": true, + "attributes_conns": ["*internal"] +}, + +"thresholds": { + "enabled": true, + "store_interval": "1s" +}, + +"sessions": { + "enabled": true, + "chargers_conns": ["*internal"], + "rates_conns": ["*internal"], + "cdrs_conns": ["*internal"], + "attributes_conns": ["*internal"], + "accounts_conns": ["*internal"] +}, + +"admins": { + "enabled": true +}, + +"loaders": [ + { + "id": "*default", "enabled": true, - "session_cost_retries": 2 - }, - - - "attributes": { - "enabled": true - }, - - - "chargers": { - "enabled": true, - "attributes_conns": ["*internal"] - }, - - "thresholds": { - "enabled": true, - "store_interval": "1s" - }, - - "sessions": { - "enabled": true, - "chargers_conns": ["*internal"], - "rates_conns": ["*internal"], - "cdrs_conns": ["*internal"], - "attributes_conns": ["*internal"], - "accounts_conns": ["*internal"] - }, - - "admins": { - "enabled": true - }, - - "loaders": [ - { - "id": "*default", - "enabled": true, - "tenant": "cgrates.org", - "tp_in_dir": "/usr/share/cgrates/tariffplans/testit", - "tp_out_dir": "", - "lockfile_path": "" - } - ] + "tenant": "cgrates.org", + "tp_in_dir": "/usr/share/cgrates/tariffplans/testit", + "tp_out_dir": "", + "lockfile_path": "" + } +] } \ No newline at end of file diff --git a/data/conf/samples/rpccaching_mysql/cgrates.json b/data/conf/samples/rpccaching_mysql/cgrates.json index c2c6f3e13..cbf345249 100644 --- a/data/conf/samples/rpccaching_mysql/cgrates.json +++ b/data/conf/samples/rpccaching_mysql/cgrates.json @@ -1,65 +1,71 @@ { - "general": { - "log_level": 7, - "reply_timeout": "10s" - }, - "listen": { - "rpc_json": ":2012", - "rpc_gob": ":2013", - "http": ":2080" - }, +"general": { + "log_level": 7, + "reply_timeout": "10s" +}, - "caches":{ - "partitions": { - "*rpc_responses": {"limit": -1, "ttl": "500ms"} - } - }, +"stor_db": { + "db_password": "CGRateS.org" +}, - "rates": { - "enabled": true - }, +"listen": { + "rpc_json": ":2012", + "rpc_gob": ":2013", + "http": ":2080" +}, - "cdrs": { +"caches":{ + "partitions": { + "*rpc_responses": {"limit": -1, "ttl": "500ms"} + } +}, + +"rates": { + "enabled": true +}, + +"cdrs": { + "enabled": true, + "session_cost_retries": 2 +}, + +"attributes": { + "enabled": true +}, + +"chargers": { + "enabled": true, + "attributes_conns": ["*internal"] +}, + +"thresholds": { + "enabled": true, + "store_interval": "1s" +}, + +"sessions": { + "enabled": true, + "chargers_conns": ["*internal"], + "rates_conns": ["*internal"], + "cdrs_conns": ["*internal"], + "attributes_conns": ["*internal"], + "accounts_conns": ["*internal"] +}, + +"admins": { + "enabled": true +}, + +"loaders": [ + { + "id": "*default", "enabled": true, - "session_cost_retries": 2 - }, + "tenant": "cgrates.org", + "tp_in_dir": "/usr/share/cgrates/tariffplans/testit", + "tp_out_dir": "", + "lockfile_path": "" + } +] - "attributes": { - "enabled": true - }, - - "chargers": { - "enabled": true, - "attributes_conns": ["*internal"] - }, - - "thresholds": { - "enabled": true, - "store_interval": "1s" - }, - - "sessions": { - "enabled": true, - "chargers_conns": ["*internal"], - "rates_conns": ["*internal"], - "cdrs_conns": ["*internal"], - "attributes_conns": ["*internal"], - "accounts_conns": ["*internal"] - }, - - "admins": { - "enabled": true - }, - - "loaders": [ - { - "id": "*default", - "enabled": true, - "tenant": "cgrates.org", - "tp_in_dir": "/usr/share/cgrates/tariffplans/testit", - "tp_out_dir": "", - "lockfile_path": "" - } - ] } \ No newline at end of file diff --git a/data/conf/samples/rpcexp_multiple_engines/rpcexp_opts_engine1_internal/cgrates.json b/data/conf/samples/rpcexp_multiple_engines/rpcexp_opts_engine1_internal/cgrates.json index 17edbe0cf..a8de92b45 100644 --- a/data/conf/samples/rpcexp_multiple_engines/rpcexp_opts_engine1_internal/cgrates.json +++ b/data/conf/samples/rpcexp_multiple_engines/rpcexp_opts_engine1_internal/cgrates.json @@ -1,74 +1,78 @@ { - "general": { - "log_level": 7, - "reply_timeout": "50s" - }, - - "listen": { - "rpc_json": ":2012", - "rpc_gob": ":2013", - "http": ":2080" - }, - - "data_db": { - "db_type": "*internal" - }, - +"general": { + "log_level": 7, + "reply_timeout": "50s" +}, - "ees": { - "enabled": true, - "exporters": [ - { - "id": "thProcessEv1", - "type": "*rpc", - "opts": { - "rpcCodec": "*json", - "connIDs": ["rplConn"], - "serviceMethod": "ThresholdSv1.ProcessEvent", - "keyPath": "" , - "certPath": "", - "caPath": "", - "tls": false, - "rpcConnTimeout" : "1s", - "rpcReplyTimeout":"5s" - } - }, - { - "id": "thProcessEv2", - "type": "*rpc", - "opts": { - "rpcCodec": "*json", - "connIDs": ["rplConn"], - "serviceMethod": "ThresholdSv1.ProcessEvent", - "keyPath": "" , - "certPath": "", - "caPath": "", - "tls": false, - "rpcConnTimeout" : "1s", - "rpcReplyTimeout":"5s", - "rpcAPIOpts": { - "*thdProfileIDs": ["THD_3"] - } +"listen": { + "rpc_json": ":2012", + "rpc_gob": ":2013", + "http": ":2080" +}, + +"data_db": { + "db_type": "*internal" +}, + +"stor_db": { + "db_type": "*internal" +}, + +"ees": { + "enabled": true, + "exporters": [ + { + "id": "thProcessEv1", + "type": "*rpc", + "opts": { + "rpcCodec": "*json", + "connIDs": ["rplConn"], + "serviceMethod": "ThresholdSv1.ProcessEvent", + "keyPath": "" , + "certPath": "", + "caPath": "", + "tls": false, + "rpcConnTimeout" : "1s", + "rpcReplyTimeout":"5s" + } + }, + { + "id": "thProcessEv2", + "type": "*rpc", + "opts": { + "rpcCodec": "*json", + "connIDs": ["rplConn"], + "serviceMethod": "ThresholdSv1.ProcessEvent", + "keyPath": "" , + "certPath": "", + "caPath": "", + "tls": false, + "rpcConnTimeout" : "1s", + "rpcReplyTimeout":"5s", + "rpcAPIOpts": { + "*thdProfileIDs": ["THD_3"] } } - ] - }, - - - "rpc_conns": { - "rplConn": { - "strategy": "*broadcast_sync", - "conns": [{"address": "127.0.0.1:22012", "transport": "*json"}] } - }, + ] +}, - "sessions": { - "enabled": true, - "replication_conns": ["rplConn"] - }, - - "admins": { - "enabled": true + +"rpc_conns": { + "rplConn": { + "strategy": "*broadcast_sync", + "conns": [{"address": "127.0.0.1:22012", "transport": "*json"}] } +}, + +"sessions": { + "enabled": true, + "replication_conns": ["rplConn"] +}, + +"admins": { + "enabled": true +} + } \ No newline at end of file diff --git a/data/conf/samples/rpcexp_multiple_engines/rpcexp_opts_engine1_mongo/cgrates.json b/data/conf/samples/rpcexp_multiple_engines/rpcexp_opts_engine1_mongo/cgrates.json index 323d3c297..1582085ec 100644 --- a/data/conf/samples/rpcexp_multiple_engines/rpcexp_opts_engine1_mongo/cgrates.json +++ b/data/conf/samples/rpcexp_multiple_engines/rpcexp_opts_engine1_mongo/cgrates.json @@ -1,77 +1,81 @@ { - "general": { - "log_level": 7, - "reply_timeout": "50s" - }, - - "listen": { - "rpc_json": ":2012", - "rpc_gob": ":2013", - "http": ":2080" - }, - - "data_db": { - "db_type": "mongo", - "db_name": "10", - "db_port": 27017 - }, - - - - "ees": { - "enabled": true, - "exporters": [ - { - "id": "thProcessEv1", - "type": "*rpc", - "opts": { - "rpcCodec": "*json", - "connIDs": ["rplConn"], - "serviceMethod": "ThresholdSv1.ProcessEvent", - "keyPath": "" , - "certPath": "", - "caPath": "", - "tls": false, - "rpcConnTimeout" : "1s", - "rpcReplyTimeout":"5s" - } - }, - { - "id": "thProcessEv2", - "type": "*rpc", - "opts": { - "rpcCodec": "*json", - "connIDs": ["rplConn"], - "serviceMethod": "ThresholdSv1.ProcessEvent", - "keyPath": "" , - "certPath": "", - "caPath": "", - "tls": false, - "rpcConnTimeout" : "1s", - "rpcReplyTimeout":"5s", - "rpcAPIOpts": { - "*thdProfileIDs": ["THD_3"] - } +"general": { + "log_level": 7, + "reply_timeout": "50s" +}, + +"listen": { + "rpc_json": ":2012", + "rpc_gob": ":2013", + "http": ":2080" +}, + +"data_db": { + "db_type": "mongo", + "db_name": "10", + "db_port": 27017 +}, + +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, + +"ees": { + "enabled": true, + "exporters": [ + { + "id": "thProcessEv1", + "type": "*rpc", + "opts": { + "rpcCodec": "*json", + "connIDs": ["rplConn"], + "serviceMethod": "ThresholdSv1.ProcessEvent", + "keyPath": "" , + "certPath": "", + "caPath": "", + "tls": false, + "rpcConnTimeout" : "1s", + "rpcReplyTimeout":"5s" + } + }, + { + "id": "thProcessEv2", + "type": "*rpc", + "opts": { + "rpcCodec": "*json", + "connIDs": ["rplConn"], + "serviceMethod": "ThresholdSv1.ProcessEvent", + "keyPath": "" , + "certPath": "", + "caPath": "", + "tls": false, + "rpcConnTimeout" : "1s", + "rpcReplyTimeout":"5s", + "rpcAPIOpts": { + "*thdProfileIDs": ["THD_3"] } } - ] - }, - - - "rpc_conns": { - "rplConn": { - "strategy": "*broadcast_sync", - "conns": [{"address": "127.0.0.1:22012", "transport": "*json"}] } - }, + ] +}, - "sessions": { - "enabled": true, - "replication_conns": ["rplConn"] - }, - - "admins": { - "enabled": true +"rpc_conns": { + "rplConn": { + "strategy": "*broadcast_sync", + "conns": [{"address": "127.0.0.1:22012", "transport": "*json"}] } +}, + +"sessions": { + "enabled": true, + "replication_conns": ["rplConn"] +}, + +"admins": { + "enabled": true +} + } \ No newline at end of file diff --git a/data/conf/samples/rpcexp_multiple_engines/rpcexp_opts_engine1_mysql/cgrates.json b/data/conf/samples/rpcexp_multiple_engines/rpcexp_opts_engine1_mysql/cgrates.json index f0a1d86f1..41d6e6eef 100644 --- a/data/conf/samples/rpcexp_multiple_engines/rpcexp_opts_engine1_mysql/cgrates.json +++ b/data/conf/samples/rpcexp_multiple_engines/rpcexp_opts_engine1_mysql/cgrates.json @@ -1,76 +1,79 @@ { - "general": { - "log_level": 7, - "reply_timeout": "50s" - }, - - "listen": { - "rpc_json": ":2012", - "rpc_gob": ":2013", - "http": ":2080" - }, - - "data_db": { - "db_type": "redis", - "db_port": 6379, - "db_name": "10" - }, - - - "ees": { - "enabled": true, - "exporters": [ - { - "id": "thProcessEv1", - "type": "*rpc", - "opts": { - "rpcCodec": "*json", - "connIDs": ["rplConn"], - "serviceMethod": "ThresholdSv1.ProcessEvent", - "keyPath": "" , - "certPath": "", - "caPath": "", - "tls": false, - "rpcConnTimeout" : "1s", - "rpcReplyTimeout":"5s" - } - }, - { - "id": "thProcessEv2", - "type": "*rpc", - "opts": { - "rpcCodec": "*json", - "connIDs": ["rplConn"], - "serviceMethod": "ThresholdSv1.ProcessEvent", - "keyPath": "" , - "certPath": "", - "caPath": "", - "tls": false, - "rpcConnTimeout" : "1s", - "rpcReplyTimeout":"5s", - "rpcAPIOpts": { - "*thdProfileIDs": ["THD_3"] - } +"general": { + "log_level": 7, + "reply_timeout": "50s" +}, + +"listen": { + "rpc_json": ":2012", + "rpc_gob": ":2013", + "http": ":2080" +}, + +"data_db": { + "db_type": "redis", + "db_port": 6379, + "db_name": "10" +}, + +"stor_db": { + "db_password": "CGRateS.org" +}, + +"ees": { + "enabled": true, + "exporters": [ + { + "id": "thProcessEv1", + "type": "*rpc", + "opts": { + "rpcCodec": "*json", + "connIDs": ["rplConn"], + "serviceMethod": "ThresholdSv1.ProcessEvent", + "keyPath": "" , + "certPath": "", + "caPath": "", + "tls": false, + "rpcConnTimeout" : "1s", + "rpcReplyTimeout":"5s" + } + }, + { + "id": "thProcessEv2", + "type": "*rpc", + "opts": { + "rpcCodec": "*json", + "connIDs": ["rplConn"], + "serviceMethod": "ThresholdSv1.ProcessEvent", + "keyPath": "" , + "certPath": "", + "caPath": "", + "tls": false, + "rpcConnTimeout" : "1s", + "rpcReplyTimeout":"5s", + "rpcAPIOpts": { + "*thdProfileIDs": ["THD_3"] } } - ] - }, - - - "rpc_conns": { - "rplConn": { - "strategy": "*broadcast_sync", - "conns": [{"address": "127.0.0.1:22012", "transport": "*json"}] } - }, + ] +}, - "sessions": { - "enabled": true, - "replication_conns": ["rplConn"] - }, - - "admins": { - "enabled": true +"rpc_conns": { + "rplConn": { + "strategy": "*broadcast_sync", + "conns": [{"address": "127.0.0.1:22012", "transport": "*json"}] } +}, + +"sessions": { + "enabled": true, + "replication_conns": ["rplConn"] +}, + +"admins": { + "enabled": true +} + } \ No newline at end of file diff --git a/data/conf/samples/rpcexp_multiple_engines/rpcexp_opts_engine2_internal/cgrates.json b/data/conf/samples/rpcexp_multiple_engines/rpcexp_opts_engine2_internal/cgrates.json index ac6ebb639..535ff6f88 100644 --- a/data/conf/samples/rpcexp_multiple_engines/rpcexp_opts_engine2_internal/cgrates.json +++ b/data/conf/samples/rpcexp_multiple_engines/rpcexp_opts_engine2_internal/cgrates.json @@ -1,42 +1,46 @@ { - "general": { - "log_level": 7, - "reply_timeout": "50s" - }, - - "listen": { - "rpc_json": ":22012", - "rpc_gob": ":22013", - "http": ":22080" - }, - - "data_db": { - "db_type": "*internal" - }, - +"general": { + "log_level": 7, + "reply_timeout": "50s" +}, - "thresholds": { - "enabled":true, - "store_interval": "-1", - "opts":{ - "*profileIDs": [ - { - "Tenant": "", - "FilterIDs": [], - "Value": ["THD_1"] - } - ] - - } - }, - - "sessions": { - "enabled": true, - "listen_bijson": "127.0.0.1:22014" - }, - - "admins": { - "enabled": true +"listen": { + "rpc_json": ":22012", + "rpc_gob": ":22013", + "http": ":22080" +}, + +"data_db": { + "db_type": "*internal" +}, + +"stor_db": { + "db_type": "*internal" +}, + +"thresholds": { + "enabled":true, + "store_interval": "-1", + "opts":{ + "*profileIDs": [ + { + "Tenant": "", + "FilterIDs": [], + "Value": ["THD_1"] + } + ] + } +}, + +"sessions": { + "enabled": true, + "listen_bijson": "127.0.0.1:22014" +}, + +"admins": { + "enabled": true +} + } \ No newline at end of file diff --git a/data/conf/samples/rpcexp_multiple_engines/rpcexp_opts_engine2_mongo/cgrates.json b/data/conf/samples/rpcexp_multiple_engines/rpcexp_opts_engine2_mongo/cgrates.json index 6461e155e..68429fd4a 100644 --- a/data/conf/samples/rpcexp_multiple_engines/rpcexp_opts_engine2_mongo/cgrates.json +++ b/data/conf/samples/rpcexp_multiple_engines/rpcexp_opts_engine2_mongo/cgrates.json @@ -1,45 +1,50 @@ { - "general": { - "log_level": 7, - "reply_timeout": "50s" - }, - "listen": { - "rpc_json": ":22012", - "rpc_gob": ":22013", - "http": ":22080" - }, - - "data_db": { - "db_type": "mongo", - "db_name": "10", - "db_port": 27017 - }, - - - +"general": { + "log_level": 7, + "reply_timeout": "50s" +}, - "thresholds": { - "enabled":true, - "store_interval": "-1", - "opts":{ - "*profileIDs": [ - { - "Tenant": "", - "FilterIDs": [], - "Value": ["THD_1"] - } - ] - - } - }, - - "sessions": { - "enabled": true, - "listen_bijson": "127.0.0.1:22014" - }, - - "admins": { - "enabled": true +"listen": { + "rpc_json": ":22012", + "rpc_gob": ":22013", + "http": ":22080" +}, + +"data_db": { + "db_type": "mongo", + "db_name": "10", + "db_port": 27017 +}, + +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, + +"thresholds": { + "enabled":true, + "store_interval": "-1", + "opts":{ + "*profileIDs": [ + { + "Tenant": "", + "FilterIDs": [], + "Value": ["THD_1"] + } + ] + } +}, + +"sessions": { + "enabled": true, + "listen_bijson": "127.0.0.1:22014" +}, + +"admins": { + "enabled": true +} + } \ No newline at end of file diff --git a/data/conf/samples/rpcexp_multiple_engines/rpcexp_opts_engine2_mysql/cgrates.json b/data/conf/samples/rpcexp_multiple_engines/rpcexp_opts_engine2_mysql/cgrates.json index 006eb0a94..cd269cbcd 100644 --- a/data/conf/samples/rpcexp_multiple_engines/rpcexp_opts_engine2_mysql/cgrates.json +++ b/data/conf/samples/rpcexp_multiple_engines/rpcexp_opts_engine2_mysql/cgrates.json @@ -1,44 +1,48 @@ { - "general": { - "log_level": 7, - "reply_timeout": "50s" - }, - - "listen": { - "rpc_json": ":22012", - "rpc_gob": ":22013", - "http": ":22080" - }, - - "data_db": { - "db_type": "redis", - "db_port": 6379, - "db_name": "10" - }, +"general": { + "log_level": 7, + "reply_timeout": "50s" +}, +"listen": { + "rpc_json": ":22012", + "rpc_gob": ":22013", + "http": ":22080" +}, - "thresholds": { - "enabled":true, - "store_interval": "-1", - "opts":{ - "*profileIDs": [ - { - "Tenant": "", - "FilterIDs": [], - "Value": ["THD_1"] - } - ] - - } - }, - - "sessions": { - "enabled": true, - "listen_bijson": "127.0.0.1:22014" - }, - - "admins": { - "enabled": true +"data_db": { + "db_type": "redis", + "db_port": 6379, + "db_name": "10" +}, + +"stor_db": { + "db_password": "CGRateS.org" +}, + +"thresholds": { + "enabled":true, + "store_interval": "-1", + "opts":{ + "*profileIDs": [ + { + "Tenant": "", + "FilterIDs": [], + "Value": ["THD_1"] + } + ] + } +}, + +"sessions": { + "enabled": true, + "listen_bijson": "127.0.0.1:22014" +}, + +"admins": { + "enabled": true +} + } \ No newline at end of file diff --git a/data/conf/samples/sessinternal/cgrates.json b/data/conf/samples/sessinternal/cgrates.json index cdd5d7c65..ce883daef 100644 --- a/data/conf/samples/sessinternal/cgrates.json +++ b/data/conf/samples/sessinternal/cgrates.json @@ -13,6 +13,10 @@ "db_type": "*internal", }, +"stor_db": { + "db_type": "*internal" +}, + "rates": { "enabled": true, }, diff --git a/data/conf/samples/session_volume_discount_internal/cgrates.json b/data/conf/samples/session_volume_discount_internal/cgrates.json index f7b94dc2d..696076026 100644 --- a/data/conf/samples/session_volume_discount_internal/cgrates.json +++ b/data/conf/samples/session_volume_discount_internal/cgrates.json @@ -12,7 +12,9 @@ "db_type": "*internal" }, - + "stor_db": { + "db_type": "*internal" + }, "sessions": { "enabled": true, diff --git a/data/conf/samples/session_volume_discount_mongo/cgrates.json b/data/conf/samples/session_volume_discount_mongo/cgrates.json index 2507ce3c4..68f552c75 100644 --- a/data/conf/samples/session_volume_discount_mongo/cgrates.json +++ b/data/conf/samples/session_volume_discount_mongo/cgrates.json @@ -1,147 +1,150 @@ { - // CGRateS Configuration file - // - // Used for sessions/sessions_volume_discount_it_test.go - "general": { - "log_level": 7, - "reply_timeout": "10s", - }, - - "data_db": { - "db_type": "mongo", - "db_name": "10", - "db_port": 27017, - }, - - "sessions": { - "enabled": true, - "routes_conns": ["*localhost"], - "cdrs_conns": ["*localhost"], - }, - - "attributes": { - "enabled": true, - "opts":{ // - "*processRuns": [ - { - "Tenant": "*any", - "Value": 2, - }, - ], - }, - }, +"general": { + "log_level": 7, + "reply_timeout": "10s" +}, + +"data_db": { + "db_type": "mongo", + "db_name": "10", + "db_port": 27017 +}, - "cdrs": { - "enabled": true, - "chargers_conns": ["*localhost"], - "accounts_conns": ["*localhost"], - "rates_conns": ["*localhost"], - "ees_conns":["*localhost"], - "opts": { - "*chargers": [ - { - "Tenant": "*any", - "FilterIDs": ["*notstring:~*req.Account:sipp"], - "Value": true, - }, - ], - "*rates": [ - { - "Tenant": "*any", - "FilterIDs": ["*notstring:~*req.Account:sipp|1001"], - "Value": true, - }, - { - "Tenant": "*any", - "FilterIDs": ["*string:~*opts.*runID:customers"], - "Value": true, - }, - ], - "*accounts": [ - { - "Tenant": "*any", - "FilterIDs": ["*string:~*req.Account:1001", "*string:~*opts.*runID:suppliers"], - "Value": true, - }, - ], - "*ees": [ - { - "Tenant": "*any", - "Value": true, - }, - ], - }, - }, - - "ees": { - "enabled": true, - "exporters": [ - { - "id": "MyLogger", - "type": "*log", - } - ] - }, +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, - "chargers": { - "enabled": true, - "attributes_conns": ["*localhost"], - }, - - "rates": { - "enabled": true, - "string_indexed_fields": ["*opts.*runID"], - "rate_string_indexed_fields": [], - "rate_prefix_indexed_fields": ["*req.Destination"], - "opts":{ - "*profileIgnoreFilters": [ - { - "Tenant": "*any", - "Value": true, - }, - ], - }, - }, - - "accounts": { - "enabled": true, - "rates_conns": ["*localhost"], - "opts":{ - "*usage": [ - { - "Tenant": "*any", - "Value": "1m", - }, - ], - }, - }, - - "loaders": [ - { - "id": "*default", - "enabled": true, - "tenant": "cgrates.org", - "tp_in_dir": "/usr/share/cgrates/tariffplans/sessions_discount_volume/routes1", - "tp_out_dir": "", - "lockfile_path": "", - }, - ], - - "routes": { - "enabled": true, - "accounts_conns": ["*localhost"], - "rates_conns": ["*localhost"], - "*ignoreErrors": [ +"sessions": { + "enabled": true, + "routes_conns": ["*localhost"], + "cdrs_conns": ["*localhost"] +}, + +"attributes": { + "enabled": true, + "opts":{ + "*processRuns": [ { "Tenant": "*any", - "Value": true, - }, + "Value": 2 + } + ] + } +}, + +"cdrs": { + "enabled": true, + "chargers_conns": ["*localhost"], + "accounts_conns": ["*localhost"], + "rates_conns": ["*localhost"], + "ees_conns":["*localhost"], + "opts": { + "*chargers": [ + { + "Tenant": "*any", + "FilterIDs": ["*notstring:~*req.Account:sipp"], + "Value": true + } ], - }, - - "admins": { - "enabled": true, - }, + "*rates": [ + { + "Tenant": "*any", + "FilterIDs": ["*notstring:~*req.Account:sipp|1001"], + "Value": true + }, + { + "Tenant": "*any", + "FilterIDs": ["*string:~*opts.*runID:customers"], + "Value": true + } + ], + "*accounts": [ + { + "Tenant": "*any", + "FilterIDs": ["*string:~*req.Account:1001", "*string:~*opts.*runID:suppliers"], + "Value": true + } + ], + "*ees": [ + { + "Tenant": "*any", + "Value": true + } + ] + } +}, + +"ees": { + "enabled": true, + "exporters": [ + { + "id": "MyLogger", + "type": "*log" + } + ] +}, +"chargers": { + "enabled": true, + "attributes_conns": ["*localhost"] +}, + +"rates": { + "enabled": true, + "string_indexed_fields": ["*opts.*runID"], + "rate_string_indexed_fields": [], + "rate_prefix_indexed_fields": ["*req.Destination"], + "opts":{ + "*profileIgnoreFilters": [ + { + "Tenant": "*any", + "Value": true + } + ] + } +}, + +"accounts": { + "enabled": true, + "rates_conns": ["*localhost"], + "opts":{ + "*usage": [ + { + "Tenant": "*any", + "Value": "1m" + } + ] + } +}, + +"loaders": [ + { + "id": "*default", + "enabled": true, + "tenant": "cgrates.org", + "tp_in_dir": "/usr/share/cgrates/tariffplans/sessions_discount_volume/routes1", + "tp_out_dir": "", + "lockfile_path": "" + } +], + +"routes": { + "enabled": true, + "accounts_conns": ["*localhost"], + "rates_conns": ["*localhost"], + "*ignoreErrors": [ + { + "Tenant": "*any", + "Value": true + } + ] +}, + +"admins": { + "enabled": true +} + } \ No newline at end of file diff --git a/data/conf/samples/session_volume_discount_mysql/cgrates.json b/data/conf/samples/session_volume_discount_mysql/cgrates.json index 2d68be524..b4d55d070 100644 --- a/data/conf/samples/session_volume_discount_mysql/cgrates.json +++ b/data/conf/samples/session_volume_discount_mysql/cgrates.json @@ -1,151 +1,150 @@ { - // CGRateS Configuration file - // - // Used for sessions/sessions_volume_discount_it_test.go - - "general": { - "log_level": 7, - "reply_timeout": "10s", - }, - - "data_db": { // database used to store runtime data (eg: accounts, cdr stats) - "db_type": "redis", // data_db type: - "db_port": 6379, // data_db port to reach the database - "db_name": "10", // data_db database name to connect to - }, +"general": { + "log_level": 7, + "reply_timeout": "10s" +}, + +"data_db": { + "db_type": "redis", + "db_port": 6379, + "db_name": "10" +}, - - "sessions": { - "enabled": true, - "routes_conns": ["*localhost"], - "cdrs_conns": ["*localhost"], - }, +"stor_db": { + "db_password": "CGRateS.org" +}, - "attributes": { - "enabled": true, - "opts":{ // - "*processRuns": [ - { - "Tenant": "*any", - "Value": 2, - }, - ], - }, - }, - - "cdrs": { - "enabled": true, - "chargers_conns": ["*localhost"], - "accounts_conns": ["*localhost"], - "rates_conns": ["*localhost"], - "ees_conns":["*localhost"], - "opts": { - "*chargers": [ - { - "Tenant": "*any", - "FilterIDs": ["*notstring:~*req.Account:sipp"], - "Value": true, - }, - ], - "*rates": [ - { - "Tenant": "*any", - "FilterIDs": ["*notstring:~*req.Account:sipp|1001"], - "Value": true, - }, - { - "Tenant": "*any", - "FilterIDs": ["*string:~*opts.*runID:customers"], - "Value": true, - }, - ], - "*accounts": [ - { - "Tenant": "*any", - "FilterIDs": ["*string:~*req.Account:1001", "*string:~*opts.*runID:suppliers"], - "Value": true, - }, - ], - "*ees": [ - { - "Tenant": "*any", - "Value": true, - }, - ], - }, - }, - - "ees": { - "enabled": true, - "exporters": [ +"sessions": { + "enabled": true, + "routes_conns": ["*localhost"], + "cdrs_conns": ["*localhost"] +}, + +"attributes": { + "enabled": true, + "opts":{ + "*processRuns": [ { - "id": "MyLogger", - "type": "*log", + "Tenant": "*any", + "Value": 2 + } + ] + } +}, + +"cdrs": { + "enabled": true, + "chargers_conns": ["*localhost"], + "accounts_conns": ["*localhost"], + "rates_conns": ["*localhost"], + "ees_conns":["*localhost"], + "opts": { + "*chargers": [ + { + "Tenant": "*any", + "FilterIDs": ["*notstring:~*req.Account:sipp"], + "Value": true + } + ], + "*rates": [ + { + "Tenant": "*any", + "FilterIDs": ["*notstring:~*req.Account:sipp|1001"], + "Value": true + }, + { + "Tenant": "*any", + "FilterIDs": ["*string:~*opts.*runID:customers"], + "Value": true + } + ], + "*accounts": [ + { + "Tenant": "*any", + "FilterIDs": ["*string:~*req.Account:1001", "*string:~*opts.*runID:suppliers"], + "Value": true + } + ], + "*ees": [ + { + "Tenant": "*any", + "Value": true } ] - }, - - "chargers": { - "enabled": true, - "attributes_conns": ["*localhost"], - }, - - "rates": { - "enabled": true, - "string_indexed_fields": ["*opts.*runID"], - "rate_string_indexed_fields": [], - "rate_prefix_indexed_fields": ["*req.Destination"], - "opts":{ - "*profileIgnoreFilters": [ - { - "Tenant": "*any", - "Value": true, - }, - ], - }, - }, - - "accounts": { - "enabled": true, - "rates_conns": ["*localhost"], - "opts":{ - "*usage": [ - { - "Tenant": "*any", - "Value": "1m", - }, - ], - }, - }, - - "loaders": [ + } +}, + +"ees": { + "enabled": true, + "exporters": [ { - "id": "*default", - "enabled": true, - "tenant": "cgrates.org", - "tp_in_dir": "/usr/share/cgrates/tariffplans/sessions_discount_volume/routes1", - "tp_out_dir": "", - "lockfile_path": "", - }, - ], - - "routes": { - "enabled": true, - "accounts_conns": ["*localhost"], - "rates_conns": ["*localhost"], - "opts":{ - "*ignoreErrors": [ - { - "Tenant": "*any", - "Value": true, - }, - ], - }, - }, - - "admins": { - "enabled": true, - }, + "id": "MyLogger", + "type": "*log" + } + ] +}, +"chargers": { + "enabled": true, + "attributes_conns": ["*localhost"] +}, + +"rates": { + "enabled": true, + "string_indexed_fields": ["*opts.*runID"], + "rate_string_indexed_fields": [], + "rate_prefix_indexed_fields": ["*req.Destination"], + "opts":{ + "*profileIgnoreFilters": [ + { + "Tenant": "*any", + "Value": true + } + ] + } +}, + +"accounts": { + "enabled": true, + "rates_conns": ["*localhost"], + "opts":{ + "*usage": [ + { + "Tenant": "*any", + "Value": "1m" + } + ] + } +}, + +"loaders": [ + { + "id": "*default", + "enabled": true, + "tenant": "cgrates.org", + "tp_in_dir": "/usr/share/cgrates/tariffplans/sessions_discount_volume/routes1", + "tp_out_dir": "", + "lockfile_path": "" + } +], + +"routes": { + "enabled": true, + "accounts_conns": ["*localhost"], + "rates_conns": ["*localhost"], + "opts":{ + "*ignoreErrors": [ + { + "Tenant": "*any", + "Value": true + } + ] + } +}, + +"admins": { + "enabled": true +} + } \ No newline at end of file diff --git a/data/conf/samples/sessions_internal/cgrates.json b/data/conf/samples/sessions_internal/cgrates.json index 748dddfe0..1de89de4e 100644 --- a/data/conf/samples/sessions_internal/cgrates.json +++ b/data/conf/samples/sessions_internal/cgrates.json @@ -20,6 +20,10 @@ "db_type": "*internal", }, +"stor_db": { + "db_type": "*internal" +}, + "rates": { "enabled": true, }, diff --git a/data/conf/samples/sessions_mongo/cgrates.json b/data/conf/samples/sessions_mongo/cgrates.json index 91edea095..36f627c02 100644 --- a/data/conf/samples/sessions_mongo/cgrates.json +++ b/data/conf/samples/sessions_mongo/cgrates.json @@ -23,6 +23,12 @@ "db_port": 27017, }, +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, + "rates": { "enabled": true, }, diff --git a/data/conf/samples/sessions_mysql/cgrates.json b/data/conf/samples/sessions_mysql/cgrates.json index ae94071cd..5e967ff83 100644 --- a/data/conf/samples/sessions_mysql/cgrates.json +++ b/data/conf/samples/sessions_mysql/cgrates.json @@ -18,7 +18,9 @@ "db_name": "10" }, - + "stor_db": { + "db_password": "CGRateS.org" + }, "rates": { "enabled": true diff --git a/data/conf/samples/sessions_replication/rplcTestGracefulShutdown1_internal/cgrates.json b/data/conf/samples/sessions_replication/rplcTestGracefulShutdown1_internal/cgrates.json index bdc619c0d..27e67811e 100644 --- a/data/conf/samples/sessions_replication/rplcTestGracefulShutdown1_internal/cgrates.json +++ b/data/conf/samples/sessions_replication/rplcTestGracefulShutdown1_internal/cgrates.json @@ -1,15 +1,10 @@ { -// CGRateS Configuration file -// -// Used for SessionSv1 integration tests - "general": { "log_level": 7, "node_id":"MasterReplication" }, - "listen": { "rpc_json": "127.0.0.1:22012", "rpc_gob": "127.0.0.1:22013", @@ -17,28 +12,25 @@ }, "data_db": { - "db_type": "*internal", + "db_type": "*internal" }, - - - +"stor_db": { + "db_type": "*internal" +}, "chargers": { - "enabled": true, + "enabled": true }, - - "sessions": { - "enabled": true, // starts SessionManager service: - "debit_interval": "5ms", // interval to perform debits on. - "listen_bijson": "127.0.0.1:22014", // address where to listen for bidirectional JSON-RPC requests + "enabled": true, + "debit_interval": "5ms", + "listen_bijson": "127.0.0.1:22014" }, "admins": { - "enabled": true, -}, - + "enabled": true +} } diff --git a/data/conf/samples/sessions_replication/rplcTestGracefulShutdown1_mongo/cgrates.json b/data/conf/samples/sessions_replication/rplcTestGracefulShutdown1_mongo/cgrates.json index cea141761..05680d7a6 100644 --- a/data/conf/samples/sessions_replication/rplcTestGracefulShutdown1_mongo/cgrates.json +++ b/data/conf/samples/sessions_replication/rplcTestGracefulShutdown1_mongo/cgrates.json @@ -1,40 +1,40 @@ { -// Real-time Online/Offline Charging System (OCS) for Telecom & ISP environments -// Copyright (C) ITsysCOM GmbH + "general": { "log_level": 7, - "node_id":"MasterReplication", + "node_id":"MasterReplication" }, "listen": { - "rpc_json": "127.0.0.1:22012", // RPC JSON listening address - "rpc_gob": "127.0.0.1:22013", // RPC GOB listening address - "http": "127.0.0.1:22080", // HTTP listening address + "rpc_json": "127.0.0.1:22012", + "rpc_gob": "127.0.0.1:22013", + "http": "127.0.0.1:22080" }, - "data_db": { "db_type": "mongo", "db_name": "10", - "db_port": 27017, + "db_port": 27017 }, - - - +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, "chargers": { - "enabled": true, + "enabled": true }, "sessions": { - "enabled": true, // starts SessionManager service: - "debit_interval": "5ms", // interval to perform debits on. - "listen_bijson": "127.0.0.1:22014", // address where to listen for bidirectional JSON-RPC requests + "enabled": true, + "debit_interval": "5ms", + "listen_bijson": "127.0.0.1:22014" }, "admins": { - "enabled": true, -}, + "enabled": true +} } diff --git a/data/conf/samples/sessions_replication/rplcTestGracefulShutdown1_mysql/cgrates.json b/data/conf/samples/sessions_replication/rplcTestGracefulShutdown1_mysql/cgrates.json index 889aa1930..131c16ee7 100644 --- a/data/conf/samples/sessions_replication/rplcTestGracefulShutdown1_mysql/cgrates.json +++ b/data/conf/samples/sessions_replication/rplcTestGracefulShutdown1_mysql/cgrates.json @@ -1,32 +1,32 @@ { - // Real-time Online/Offline Charging System (OCS) for Telecom & ISP environments - // Copyright (C) ITsysCOM GmbH - "general": { - "log_level": 7, - "node_id":"MasterReplication", - }, + +"general": { + "log_level": 7, + "node_id":"MasterReplication" +}, - "listen": { - "rpc_json": "127.0.0.1:22012", - "rpc_gob": "127.0.0.1:22013", - "http": "127.0.0.1:22080", - }, +"listen": { + "rpc_json": "127.0.0.1:22012", + "rpc_gob": "127.0.0.1:22013", + "http": "127.0.0.1:22080" +}, +"stor_db": { + "db_password": "CGRateS.org" +}, +"chargers": { + "enabled": true +}, - "chargers": { - "enabled": true, - }, - - "sessions": { - "enabled": true, - "listen_bijson": "127.0.0.1:22014", - "chargers_conns": ["*internal"], - }, - - "admins": { - "enabled": true, - }, +"sessions": { + "enabled": true, + "listen_bijson": "127.0.0.1:22014", + "chargers_conns": ["*internal"] +}, +"admins": { + "enabled": true +} } diff --git a/data/conf/samples/sessions_replication/rplcTestGracefulShutdown2_internal/cgrates.json b/data/conf/samples/sessions_replication/rplcTestGracefulShutdown2_internal/cgrates.json index 7d9f3907d..1f6e17bf8 100644 --- a/data/conf/samples/sessions_replication/rplcTestGracefulShutdown2_internal/cgrates.json +++ b/data/conf/samples/sessions_replication/rplcTestGracefulShutdown2_internal/cgrates.json @@ -1,15 +1,10 @@ { -// CGRateS Configuration file -// -// Used for SessionSv1 integration tests - "general": { "log_level": 7, "node_id":"MasterReplication" }, - "listen": { "rpc_json": "127.0.0.1:2012", "rpc_gob": "127.0.0.1:2013", @@ -19,33 +14,30 @@ "rpc_conns": { "rplConn": { "strategy": "*broadcast_sync", - "conns": [{"address": "127.0.0.1:22012", "transport": "*json"}], + "conns": [{"address": "127.0.0.1:22012", "transport": "*json"}] } }, "data_db": { - "db_type": "*internal", + "db_type": "*internal" }, - - - +"stor_db": { + "db_type": "*internal" +}, "chargers": { - "enabled": true, + "enabled": true }, - "sessions": { - "enabled": true, // interval to perform debits on. + "enabled": true, "replication_conns": ["rplConn"], "chargers_conns": ["*internal"] }, - "admins": { - "enabled": true, -}, - + "enabled": true +} } diff --git a/data/conf/samples/sessions_replication/rplcTestGracefulShutdown2_mongo/cgrates.json b/data/conf/samples/sessions_replication/rplcTestGracefulShutdown2_mongo/cgrates.json index d9eaa47ee..359f18d18 100644 --- a/data/conf/samples/sessions_replication/rplcTestGracefulShutdown2_mongo/cgrates.json +++ b/data/conf/samples/sessions_replication/rplcTestGracefulShutdown2_mongo/cgrates.json @@ -1,47 +1,47 @@ { -// Real-time Online/Offline Charging System (OCS) for Telecom & ISP environments -// Copyright (C) ITsysCOM GmbH + "general": { "log_level": 7, - "node_id":"MasterReplication", + "node_id":"MasterReplication" }, "listen": { "rpc_json": "127.0.0.1:2012", "rpc_gob": "127.0.0.1:2013", - "http": "127.0.0.1:2080", + "http": "127.0.0.1:2080" }, - "rpc_conns": { "rplConn": { "strategy": "*broadcast_sync", - "conns": [{"address": "127.0.0.1:22012", "transport": "*json"}], - }, + "conns": [{"address": "127.0.0.1:22012", "transport": "*json"}] + } }, - "data_db": { "db_type": "mongo", "db_name": "10", - "db_port": 27017, + "db_port": 27017 }, - - +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, "chargers": { - "enabled": true, + "enabled": true }, "sessions": { - "enabled": true, // interval to perform debits on. + "enabled": true, "replication_conns": ["rplConn"], - "chargers_conns": ["*internal"], + "chargers_conns": ["*internal"] }, "admins": { - "enabled": true, -}, + "enabled": true +} } diff --git a/data/conf/samples/sessions_replication/rplcTestGracefulShutdown2_mysql/cgrates.json b/data/conf/samples/sessions_replication/rplcTestGracefulShutdown2_mysql/cgrates.json index 6a133dbd6..69bc5cdb6 100644 --- a/data/conf/samples/sessions_replication/rplcTestGracefulShutdown2_mysql/cgrates.json +++ b/data/conf/samples/sessions_replication/rplcTestGracefulShutdown2_mysql/cgrates.json @@ -1,42 +1,42 @@ { -// Real-time Online/Offline Charging System (OCS) for Telecom & ISP environments -// Copyright (C) ITsysCOM GmbH + "general": { "log_level": 7, - "node_id":"MasterReplication", + "node_id":"MasterReplication" }, "listen": { "rpc_json": "127.0.0.1:2012", "rpc_gob": "127.0.0.1:2013", - "http": "127.0.0.1:2080", + "http": "127.0.0.1:2080" }, "rpc_conns": { "rplConn": { "strategy": "*broadcast_sync", - "conns": [{"address": "127.0.0.1:22012", "transport": "*json"}], - }, + "conns": [{"address": "127.0.0.1:22012", "transport": "*json"}] + } +}, + +"stor_db": { + "db_password": "CGRateS.org" }, - - "chargers": { - "enabled": true, + "enabled": true }, "sessions": { "enabled": true, "replication_conns": ["rplConn"], "chargers_conns": ["*internal"], - "listen_bijson": "127.0.0.1:2014", + "listen_bijson": "127.0.0.1:2014" }, "admins": { - "enabled": true, -}, - + "enabled": true +} } diff --git a/data/conf/samples/sipagent_internal/cgrates.json b/data/conf/samples/sipagent_internal/cgrates.json index 6992959fc..c761040ed 100644 --- a/data/conf/samples/sipagent_internal/cgrates.json +++ b/data/conf/samples/sipagent_internal/cgrates.json @@ -23,6 +23,10 @@ "db_type": "*internal", // stor database type to use: }, +"stor_db": { + "db_type": "*internal" +}, + "sessions": { "enabled": true, "attributes_conns": ["*localhost"], diff --git a/data/conf/samples/sipagent_mongo/cgrates.json b/data/conf/samples/sipagent_mongo/cgrates.json index ecca164c3..5a598f758 100644 --- a/data/conf/samples/sipagent_mongo/cgrates.json +++ b/data/conf/samples/sipagent_mongo/cgrates.json @@ -18,6 +18,12 @@ "db_name": "10", }, +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, + "rates": { "enabled": true, }, diff --git a/data/conf/samples/sipagent_mysql/cgrates.json b/data/conf/samples/sipagent_mysql/cgrates.json index 916852bf6..57e50bd7a 100644 --- a/data/conf/samples/sipagent_mysql/cgrates.json +++ b/data/conf/samples/sipagent_mysql/cgrates.json @@ -11,6 +11,10 @@ "log_level": 7, // control the level of messages logged (0-emerg to 7-debug) }, +"stor_db": { + "db_password": "CGRateS.org" +}, + "rates": { "enabled": true, }, diff --git a/data/conf/samples/smg_automatic_debits_internal/cgrates.json b/data/conf/samples/smg_automatic_debits_internal/cgrates.json index 200dd2431..67d8b5c85 100644 --- a/data/conf/samples/smg_automatic_debits_internal/cgrates.json +++ b/data/conf/samples/smg_automatic_debits_internal/cgrates.json @@ -11,6 +11,10 @@ "db_type": "*internal", }, +"stor_db": { + "db_type": "*internal" +}, + "rates": { "enabled": true, }, diff --git a/data/conf/samples/smg_automatic_debits_mongo/cgrates.json b/data/conf/samples/smg_automatic_debits_mongo/cgrates.json index 97ae65190..3bf7dc93a 100644 --- a/data/conf/samples/smg_automatic_debits_mongo/cgrates.json +++ b/data/conf/samples/smg_automatic_debits_mongo/cgrates.json @@ -14,6 +14,13 @@ "db_password": "", }, +"stor_db": { + "db_type": "mongo", // stor database type to use: + "db_port": 27017, // the port to reach the stordb + "db_name": "stordb", + "db_password": "" +}, + "rates": { "enabled": true, }, diff --git a/data/conf/samples/smg_automatic_debits_mysql/cgrates.json b/data/conf/samples/smg_automatic_debits_mysql/cgrates.json index af217a281..b29a5a8fb 100644 --- a/data/conf/samples/smg_automatic_debits_mysql/cgrates.json +++ b/data/conf/samples/smg_automatic_debits_mysql/cgrates.json @@ -13,6 +13,10 @@ "db_name": "10", }, +"stor_db": { + "db_password": "CGRateS.org" +}, + "rates": { "enabled": true, }, diff --git a/data/conf/samples/smgreplcmaster_mongo/cgrates.json b/data/conf/samples/smgreplcmaster_mongo/cgrates.json index 05119117f..f50e9d119 100644 --- a/data/conf/samples/smgreplcmaster_mongo/cgrates.json +++ b/data/conf/samples/smgreplcmaster_mongo/cgrates.json @@ -19,6 +19,12 @@ "db_password": "", }, +"stor_db": { + "db_type": "mongo", // stor database type to use: + "db_port": 27017, // the port to reach the stordb + "db_name": "stordb", + "db_password": "" +}, "rpc_conns": { "rplConn": { diff --git a/data/conf/samples/smgreplcmaster_mysql/cgrates.json b/data/conf/samples/smgreplcmaster_mysql/cgrates.json index aa1bb7a77..8a7fca5ed 100644 --- a/data/conf/samples/smgreplcmaster_mysql/cgrates.json +++ b/data/conf/samples/smgreplcmaster_mysql/cgrates.json @@ -6,6 +6,10 @@ "node_id":"MasterReplication", }, +"stor_db": { + "db_password": "CGRateS.org" +}, + "listen": { "rpc_json": "127.0.0.1:2012", "rpc_gob": "127.0.0.1:2013", diff --git a/data/conf/samples/smgreplcslave_mongo/cgrates.json b/data/conf/samples/smgreplcslave_mongo/cgrates.json index dd9468fdf..0458bed5b 100644 --- a/data/conf/samples/smgreplcslave_mongo/cgrates.json +++ b/data/conf/samples/smgreplcslave_mongo/cgrates.json @@ -31,6 +31,12 @@ "db_password": "", }, +"stor_db": { + "db_type": "mongo", // stor database type to use: + "db_port": 27017, // the port to reach the stordb + "db_name": "stordb", + "db_password": "" +}, "cdrs": { "enabled": true, // start the CDR Server service: diff --git a/data/conf/samples/smgreplcslave_mysql/cgrates.json b/data/conf/samples/smgreplcslave_mysql/cgrates.json index bdd0499e7..ac424c5bc 100644 --- a/data/conf/samples/smgreplcslave_mysql/cgrates.json +++ b/data/conf/samples/smgreplcslave_mysql/cgrates.json @@ -6,6 +6,10 @@ "node_id":"SlaveReplication", }, +"stor_db": { + "db_password": "CGRateS.org" +}, + "listen": { "rpc_json": "127.0.0.1:22012", // RPC JSON listening address "rpc_gob": "127.0.0.1:22013", // RPC GOB listening address diff --git a/data/conf/samples/stats_internal/cgrates.json b/data/conf/samples/stats_internal/cgrates.json index cbfa613d7..db63aece5 100644 --- a/data/conf/samples/stats_internal/cgrates.json +++ b/data/conf/samples/stats_internal/cgrates.json @@ -10,7 +10,9 @@ "db_type": "*internal", }, - + "stor_db": { + "db_type": "*internal" + }, "actions": { "enabled": true, diff --git a/data/conf/samples/stats_mongo/cgrates.json b/data/conf/samples/stats_mongo/cgrates.json index 467c951fc..0e0a8b2dc 100644 --- a/data/conf/samples/stats_mongo/cgrates.json +++ b/data/conf/samples/stats_mongo/cgrates.json @@ -12,6 +12,11 @@ "db_port": 27017, }, + "stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 + }, "actions": { "enabled": true, diff --git a/data/conf/samples/stats_mysql/cgrates.json b/data/conf/samples/stats_mysql/cgrates.json index b8179e162..f92d735da 100644 --- a/data/conf/samples/stats_mysql/cgrates.json +++ b/data/conf/samples/stats_mysql/cgrates.json @@ -11,6 +11,10 @@ "db_name": "10", // data_db database name to connect to }, + "stor_db": { + "db_password": "CGRateS.org" + }, + "listen": { "rpc_json": ":2012", // RPC JSON listening address "rpc_gob": ":2013", // RPC GOB listening address diff --git a/data/conf/samples/thresholds_internal/cgrates.json b/data/conf/samples/thresholds_internal/cgrates.json index 25077677c..9d18363f6 100644 --- a/data/conf/samples/thresholds_internal/cgrates.json +++ b/data/conf/samples/thresholds_internal/cgrates.json @@ -10,7 +10,9 @@ "db_type": "*internal", }, - + "stor_db": { + "db_type": "*internal" + }, "actions": { "enabled": true, diff --git a/data/conf/samples/thresholds_mongo/cgrates.json b/data/conf/samples/thresholds_mongo/cgrates.json index 6a95e7fd0..f8ce2b004 100644 --- a/data/conf/samples/thresholds_mongo/cgrates.json +++ b/data/conf/samples/thresholds_mongo/cgrates.json @@ -12,6 +12,12 @@ "db_port": 27017, }, + "stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 + }, + "actions": { "enabled": true, "thresholds_conns": ["*internal"], diff --git a/data/conf/samples/thresholds_mysql/cgrates.json b/data/conf/samples/thresholds_mysql/cgrates.json index a940f9919..464ea8817 100644 --- a/data/conf/samples/thresholds_mysql/cgrates.json +++ b/data/conf/samples/thresholds_mysql/cgrates.json @@ -11,6 +11,9 @@ "db_name": "10", // data_db database name to connect to }, + "stor_db": { + "db_password": "CGRateS.org" + }, "actions": { "enabled": true, diff --git a/data/conf/samples/tls/cgrates.json b/data/conf/samples/tls/cgrates.json index c55536d50..1236e9469 100755 --- a/data/conf/samples/tls/cgrates.json +++ b/data/conf/samples/tls/cgrates.json @@ -42,6 +42,10 @@ "db_name": "10", // data_db database name to connect to }, +"stor_db": { + "db_password": "CGRateS.org" +}, + "rates": { "enabled": true, }, diff --git a/data/conf/samples/tls_gob/cgrates.json b/data/conf/samples/tls_gob/cgrates.json index eebe3d689..d3471fd73 100755 --- a/data/conf/samples/tls_gob/cgrates.json +++ b/data/conf/samples/tls_gob/cgrates.json @@ -42,6 +42,10 @@ "db_name": "10", // data_db database name to connect to }, +"stor_db": { + "db_password": "CGRateS.org" +}, + "rates": { "enabled": true, }, diff --git a/data/conf/samples/tp_internal/cgrates.json b/data/conf/samples/tp_internal/cgrates.json index f18b9bf4a..8989df49e 100644 --- a/data/conf/samples/tp_internal/cgrates.json +++ b/data/conf/samples/tp_internal/cgrates.json @@ -20,6 +20,10 @@ "db_type": "*internal" }, +"stor_db": { + "db_type": "*internal" +}, + "cdrs": { "enabled": true, "chargers_conns":["*internal"] diff --git a/data/conf/samples/tp_mongo/cgrates.json b/data/conf/samples/tp_mongo/cgrates.json index dae5729e0..933881266 100644 --- a/data/conf/samples/tp_mongo/cgrates.json +++ b/data/conf/samples/tp_mongo/cgrates.json @@ -21,6 +21,11 @@ "db_port": 27017, }, +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, "cdrs": { "enabled": true, diff --git a/data/conf/samples/tp_mysql/cgrates.json b/data/conf/samples/tp_mysql/cgrates.json index 26ab8a2f9..9aeecd196 100644 --- a/data/conf/samples/tp_mysql/cgrates.json +++ b/data/conf/samples/tp_mysql/cgrates.json @@ -8,7 +8,6 @@ "reply_timeout": "50s", }, - "listen": { "rpc_json": ":2012", "rpc_gob": ":2013", @@ -21,6 +20,9 @@ "db_name": "10", // data_db database name to connect to }, +"stor_db": { + "db_password": "CGRateS.org" +}, "cdrs": { "enabled": true, diff --git a/data/conf/samples/tut_session_internal/cgrates.json b/data/conf/samples/tut_session_internal/cgrates.json index 7a1279856..8f46380a9 100644 --- a/data/conf/samples/tut_session_internal/cgrates.json +++ b/data/conf/samples/tut_session_internal/cgrates.json @@ -20,8 +20,9 @@ "db_type": "*internal" }, - - +"stor_db": { + "db_type": "*internal" +}, "rals": { "enabled": true, diff --git a/data/conf/samples/tut_session_mongo/cgrates.json b/data/conf/samples/tut_session_mongo/cgrates.json index e06b33914..a1460e007 100644 --- a/data/conf/samples/tut_session_mongo/cgrates.json +++ b/data/conf/samples/tut_session_mongo/cgrates.json @@ -21,7 +21,11 @@ "db_port": 27017, }, - +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, "rals": { "enabled": true, diff --git a/data/conf/samples/tut_session_mysql/cgrates.json b/data/conf/samples/tut_session_mysql/cgrates.json index 07acf2deb..a0b00c97c 100644 --- a/data/conf/samples/tut_session_mysql/cgrates.json +++ b/data/conf/samples/tut_session_mysql/cgrates.json @@ -8,7 +8,6 @@ "reply_timeout": "50s", }, - "listen": { "rpc_json": ":2012", "rpc_gob": ":2013", @@ -21,7 +20,9 @@ "db_name": "10", // data_db database name to connect to }, - +"stor_db": { + "db_password": "CGRateS.org" +}, "rals": { "enabled": true, diff --git a/data/conf/samples/tutinternal/cgrates.json b/data/conf/samples/tutinternal/cgrates.json index e64e0acce..18cee55ef 100644 --- a/data/conf/samples/tutinternal/cgrates.json +++ b/data/conf/samples/tutinternal/cgrates.json @@ -32,6 +32,10 @@ "db_type": "*internal" }, +"stor_db": { + "db_type": "*internal" +}, + "cdrs": { "enabled": true, "chargers_conns":["*internal"] diff --git a/data/conf/samples/tutinternal_gob/cgrates.json b/data/conf/samples/tutinternal_gob/cgrates.json index 174843383..b50bced8e 100644 --- a/data/conf/samples/tutinternal_gob/cgrates.json +++ b/data/conf/samples/tutinternal_gob/cgrates.json @@ -26,6 +26,9 @@ "db_type": "*internal", }, +"stor_db": { + "db_type": "*internal" +}, "rates": { "enabled": true, diff --git a/data/conf/samples/tutinternal_new/cgrates.json b/data/conf/samples/tutinternal_new/cgrates.json index 5308f3df7..9647dd569 100644 --- a/data/conf/samples/tutinternal_new/cgrates.json +++ b/data/conf/samples/tutinternal_new/cgrates.json @@ -1,55 +1,53 @@ { -// CGRateS Configuration file -// -// used by gen/cdre_it_test.go - "general": { "log_level": 7, - "reply_timeout": "50s", + "reply_timeout": "50s" }, "listen": { "rpc_json": ":2012", "rpc_gob": ":2013", - "http": ":2080", + "http": ":2080" }, "data_db": { - "db_type": "*internal", + "db_type": "*internal" }, - +"stor_db": { + "db_type": "*internal" +}, "rals": { "enabled": true, "thresholds_conns": ["*internal"], - "max_increments":3000000, + "max_increments":3000000 }, "schedulers": { "enabled": true, - "cdrs_conns": ["*internal"], + "cdrs_conns": ["*internal"] }, "cdrs": { "enabled": true, - "chargers_conns":["*internal"], + "chargers_conns":["*internal"] }, "attributes": { - "enabled": true, + "enabled": true }, "chargers": { "enabled": true, - "attributes_conns": ["*internal"], + "attributes_conns": ["*internal"] }, @@ -63,12 +61,12 @@ "stats": { "enabled": true, "store_interval": "-1", - "thresholds_conns": ["*internal"], + "thresholds_conns": ["*internal"] }, "thresholds": { "enabled": true, - "store_interval": "-1", + "store_interval": "-1" }, @@ -76,7 +74,7 @@ "enabled": true, "prefix_indexed_fields":["*req.Destination"], "stats_conns": ["*internal"], - "resources_conns": ["*internal"], + "resources_conns": ["*internal"] }, @@ -87,22 +85,22 @@ "attributes_conns": ["*internal"], "rals_conns": ["*internal"], "cdrs_conns": ["*internal"], - "chargers_conns": ["*internal"], + "chargers_conns": ["*internal"] }, "admins": { "enabled": true, - "scheduler_conns": ["*internal"], + "scheduler_conns": ["*internal"] }, "filters": { - "accounts_conns": ["*internal"], + "accounts_conns": ["*internal"] }, "accounts": { "enabled": true -}, +} } diff --git a/data/conf/samples/tutmongo/cgrates.json b/data/conf/samples/tutmongo/cgrates.json index 8b4f1d534..4694950bc 100644 --- a/data/conf/samples/tutmongo/cgrates.json +++ b/data/conf/samples/tutmongo/cgrates.json @@ -21,6 +21,12 @@ "db_port": 27017, }, +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, + "cdrs": { "enabled": true, "chargers_conns":["*internal"], diff --git a/data/conf/samples/tutmongo2/cgrates.json b/data/conf/samples/tutmongo2/cgrates.json index 8fdcd496d..5bf477f69 100644 --- a/data/conf/samples/tutmongo2/cgrates.json +++ b/data/conf/samples/tutmongo2/cgrates.json @@ -21,9 +21,10 @@ "db_port": 27017, }, - - - +"stor_db": { + "db_type": "mongo", + "db_port": 27017 +}, "schedulers": { "enabled": true, diff --git a/data/conf/samples/tutmongo2_gob/cgrates.json b/data/conf/samples/tutmongo2_gob/cgrates.json index f615164d8..c38d40270 100644 --- a/data/conf/samples/tutmongo2_gob/cgrates.json +++ b/data/conf/samples/tutmongo2_gob/cgrates.json @@ -28,8 +28,10 @@ "db_port": 27017, }, - - +"stor_db": { + "db_type": "mongo", + "db_port": 27017 +}, "schedulers": { "enabled": true, diff --git a/data/conf/samples/tutmongo_gob/cgrates.json b/data/conf/samples/tutmongo_gob/cgrates.json index e0ba6659e..5a72e1fc6 100644 --- a/data/conf/samples/tutmongo_gob/cgrates.json +++ b/data/conf/samples/tutmongo_gob/cgrates.json @@ -28,6 +28,12 @@ "db_port": 27017, }, +"stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017 +}, + "rates": { "enabled": true, }, diff --git a/data/conf/samples/tutmongojson/cgrates.json b/data/conf/samples/tutmongojson/cgrates.json index 08da9206c..953f14467 100644 --- a/data/conf/samples/tutmongojson/cgrates.json +++ b/data/conf/samples/tutmongojson/cgrates.json @@ -22,6 +22,12 @@ "db_port": 27017, }, + "stor_db": { + "db_type": "mongo", + "db_name": "cgrates2", + "db_port": 27017 + }, + "cdrs": { "enabled": true, }, diff --git a/data/conf/samples/tutmysql/cgrates.json b/data/conf/samples/tutmysql/cgrates.json index 9295548c1..e6d3b718e 100644 --- a/data/conf/samples/tutmysql/cgrates.json +++ b/data/conf/samples/tutmysql/cgrates.json @@ -21,6 +21,9 @@ "db_name": "10", // data_db database name to connect to }, +"stor_db": { + "db_password": "CGRateS.org" +}, "cdrs": { "enabled": true, diff --git a/data/conf/samples/tutmysqljson/cgrates.json b/data/conf/samples/tutmysqljson/cgrates.json index b4f4f7242..7819b5751 100644 --- a/data/conf/samples/tutmysqljson/cgrates.json +++ b/data/conf/samples/tutmysqljson/cgrates.json @@ -1,114 +1,107 @@ { - // CGRateS Configuration file + +"general": { + "log_level": 7, + "dbdata_encoding": "json", + "reply_timeout": "50s" +}, + +"listen": { + "rpc_json": ":2012", + "rpc_gob": ":2013", + "http": ":2080" +}, + +"data_db": { + "db_type": "redis", + "db_port": 6379, + "db_name": "11" +}, + +"stor_db": { + "db_password": "CGRateS.org" +}, + +"cdrs": { + "enabled": true, + "chargers_conns":["*internal"] +}, + +"attributes": { + "enabled": true, + "stats_conns": ["*localhost"], + "resources_conns": ["*localhost"], + "accounts_conns": ["*localhost"] +}, + +"chargers": { + "enabled": true, + "attributes_conns": ["*internal"] +}, + +"resources": { + "enabled": true, + "store_interval": "1s", + "thresholds_conns": ["*internal"] +}, - "general": { - "log_level": 7, - "dbdata_encoding": "json", - "reply_timeout": "50s", - }, +"stats": { + "enabled": true, + "store_interval": "1s", + "thresholds_conns": ["*internal"] +}, + +"thresholds": { + "enabled": true, + "store_interval": "1s" +}, + +"routes": { + "enabled": true, + "prefix_indexed_fields":["*req.Destination"], + "stats_conns": ["*internal"], + "resources_conns": ["*internal"], + "rates_conns": ["*internal"] +}, + +"sessions": { + "enabled": true, + "routes_conns": ["*internal"], + "resources_conns": ["*internal"], + "attributes_conns": ["*internal"], + "rates_conns": ["*internal"], + "cdrs_conns": ["*internal"], + "chargers_conns": ["*internal"] +}, + +"migrator":{ + "users_filters":["Account"] +}, - "listen": { - "rpc_json": ":2012", - "rpc_gob": ":2013", - "http": ":2080", - }, - - "data_db": { // database used to store runtime data (eg: accounts, cdr stats) - "db_type": "redis", // data_db type: - "db_port": 6379, // data_db port to reach the database - "db_name": "11", // data_db database name to connect to - }, - - "cdrs": { - "enabled": true, - "chargers_conns":["*internal"], - }, +"admins": { + "enabled": true +}, - "attributes": { - "enabled": true, - "stats_conns": ["*localhost"], - "resources_conns": ["*localhost"], - "accounts_conns": ["*localhost"] - }, +"rates": { + "enabled": true +}, - "chargers": { - "enabled": true, - "attributes_conns": ["*internal"], - }, +"actions": { + "enabled": true +}, - "resources": { - "enabled": true, - "store_interval": "1s", - "thresholds_conns": ["*internal"] - }, +"accounts": { + "enabled": true +}, - "stats": { - "enabled": true, - "store_interval": "1s", - "thresholds_conns": ["*internal"], - }, - - "thresholds": { - "enabled": true, - "store_interval": "1s", - }, - - - "routes": { - "enabled": true, - "prefix_indexed_fields":["*req.Destination"], - "stats_conns": ["*internal"], - "resources_conns": ["*internal"], - "rates_conns": ["*internal"], - }, - - - "sessions": { - "enabled": true, - "routes_conns": ["*internal"], - "resources_conns": ["*internal"], - "attributes_conns": ["*internal"], - "rates_conns": ["*internal"], - "cdrs_conns": ["*internal"], - "chargers_conns": ["*internal"], - }, - - - "migrator":{ - "users_filters":["Account"], - }, - - - - "admins": { - "enabled": true, - }, - - - "rates": { - "enabled": true - }, - - - "actions": { - "enabled": true - }, - - - "accounts": { - "enabled": true - }, - - - "filters": { - "accounts_conns": ["*internal"], - }, - +"filters": { + "accounts_conns": ["*internal"] +} } diff --git a/data/conf/samples/tutpostgres/cgrates.json b/data/conf/samples/tutpostgres/cgrates.json index 42fff8299..985758807 100644 --- a/data/conf/samples/tutpostgres/cgrates.json +++ b/data/conf/samples/tutpostgres/cgrates.json @@ -18,6 +18,11 @@ "db_name": "10", // data_db database name to connect to }, +"stor_db": { + "db_type": "postgres", + "db_port": 5432, + "db_password": "CGRateS.org" +}, "cdrs": { "enabled": true, // start the CDR Server service: diff --git a/data/conf/samples/twoengines/engine1/cgrates.json b/data/conf/samples/twoengines/engine1/cgrates.json index 5af433da7..5acdecd3f 100644 --- a/data/conf/samples/twoengines/engine1/cgrates.json +++ b/data/conf/samples/twoengines/engine1/cgrates.json @@ -1,38 +1,39 @@ { + "general": { "log_level": 7, - "node_id": "Engine1", + "node_id": "Engine1" }, - "listen": { "rpc_json": ":2012", "rpc_gob": ":2013", - "http": ":2080", + "http": ":2080" }, - "rpc_conns": { "cacheConn": { "strategy": "*broadcast", "conns": [ {"address": "*internal"}, {"address": "127.0.0.1:20212", "transport":"*json"} - ], - }, + ] + } }, - "data_db": { "db_type": "redis", "db_port": 6379, - "db_name": "10", + "db_name": "10" +}, + +"stor_db": { + "db_password": "CGRateS.org" }, "admins": { "enabled": true, "caches_conns":["cacheConn"] -}, - +} } diff --git a/data/conf/samples/twoengines/engine2/cgrates.json b/data/conf/samples/twoengines/engine2/cgrates.json index 5564b3ef2..138c3324e 100644 --- a/data/conf/samples/twoengines/engine2/cgrates.json +++ b/data/conf/samples/twoengines/engine2/cgrates.json @@ -1,26 +1,27 @@ { "general": { "log_level": 7, - "node_id": "Engine2", + "node_id": "Engine2" }, - "listen": { "rpc_json": ":20212", "rpc_gob": ":20213", - "http": ":20280", + "http": ":20280" }, - "data_db": { "db_type": "redis", "db_port": 6379, - "db_name": "10", + "db_name": "10" +}, + +"stor_db": { + "db_password": "CGRateS.org" }, "admins": { - "enabled": true, -}, - + "enabled": true +} } diff --git a/dispatchers/lib_test.go b/dispatchers/lib_test.go index 58037df04..1506c23b7 100644 --- a/dispatchers/lib_test.go +++ b/dispatchers/lib_test.go @@ -116,7 +116,7 @@ func (d *testDispatcher) initDataDb(t *testing.T) { // Wipe out the cdr database func (d *testDispatcher) resetStorDb(t *testing.T) { if err := engine.InitStorDB(d.Cfg); err != nil { - t.Fatalf("Error at DataDB init:%v\n", err) + t.Fatalf("Error at StorDB init:%v\n", err) } } diff --git a/ees/amqp_it_test.go b/ees/amqp_it_test.go index 17289680b..78c8de3a7 100644 --- a/ees/amqp_it_test.go +++ b/ees/amqp_it_test.go @@ -45,7 +45,7 @@ var ( sTestsAMQP = []func(t *testing.T){ testCreateDirectory, testAMQPLoadConfig, - testAMQPResetDataDB, + testAMQPResetDBs, testAMQPStartEngine, testAMQPRPCConn, @@ -78,10 +78,13 @@ func testAMQPLoadConfig(t *testing.T) { } } -func testAMQPResetDataDB(t *testing.T) { +func testAMQPResetDBs(t *testing.T) { if err := engine.InitDataDB(amqpCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(amqpCfg); err != nil { + t.Fatal(err) + } } func testAMQPStartEngine(t *testing.T) { diff --git a/ees/amqpv1_it_test.go b/ees/amqpv1_it_test.go index e23a25f43..e295fda7e 100644 --- a/ees/amqpv1_it_test.go +++ b/ees/amqpv1_it_test.go @@ -43,7 +43,7 @@ var ( sTestsAMQPv1 = []func(t *testing.T){ testAMQPv1LoadConfig, - testAMQPv1ResetDataDB, + testAMQPv1ResetDBs, testAMQPv1StartEngine, testAMQPv1RPCConn, @@ -82,10 +82,13 @@ func testAMQPv1LoadConfig(t *testing.T) { } } -func testAMQPv1ResetDataDB(t *testing.T) { +func testAMQPv1ResetDBs(t *testing.T) { if err := engine.InitDataDB(amqpv1Cfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(amqpv1Cfg); err != nil { + t.Fatal(err) + } } func testAMQPv1StartEngine(t *testing.T) { diff --git a/ees/elastic_it_test.go b/ees/elastic_it_test.go index c0eec31f4..a214b4e99 100644 --- a/ees/elastic_it_test.go +++ b/ees/elastic_it_test.go @@ -50,7 +50,7 @@ var ( sTestsElastic = []func(t *testing.T){ testCreateDirectory, testElasticLoadConfig, - testElasticResetDataDB, + testElasticResetDBs, testElasticStartEngine, testElasticRPCConn, @@ -84,10 +84,13 @@ func testElasticLoadConfig(t *testing.T) { } } -func testElasticResetDataDB(t *testing.T) { +func testElasticResetDBs(t *testing.T) { if err := engine.InitDataDB(elasticCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(elasticCfg); err != nil { + t.Fatal(err) + } } func testElasticStartEngine(t *testing.T) { diff --git a/ees/filecsv_it_test.go b/ees/filecsv_it_test.go index 131623e22..58ec335d8 100644 --- a/ees/filecsv_it_test.go +++ b/ees/filecsv_it_test.go @@ -51,7 +51,7 @@ var ( sTestsCsv = []func(t *testing.T){ testCreateDirectory, testCsvLoadConfig, - testCsvResetDataDB, + testCsvResetDBs, testCsvStartEngine, testCsvRPCConn, @@ -84,10 +84,13 @@ func testCsvLoadConfig(t *testing.T) { } } -func testCsvResetDataDB(t *testing.T) { +func testCsvResetDBs(t *testing.T) { if err := engine.InitDataDB(csvCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(csvCfg); err != nil { + t.Fatal(err) + } } func testCsvStartEngine(t *testing.T) { diff --git a/ees/filefwv_it_test.go b/ees/filefwv_it_test.go index dc748f0fe..93a8895ab 100644 --- a/ees/filefwv_it_test.go +++ b/ees/filefwv_it_test.go @@ -46,7 +46,7 @@ var ( sTestsFwv = []func(t *testing.T){ testCreateDirectory, testFwvLoadConfig, - testFwvResetDataDB, + testFwvResetDBs, testFwvStartEngine, testFwvRPCConn, @@ -72,10 +72,13 @@ func testFwvLoadConfig(t *testing.T) { } } -func testFwvResetDataDB(t *testing.T) { +func testFwvResetDBs(t *testing.T) { if err := engine.InitDataDB(fwvCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(fwvCfg); err != nil { + t.Fatal(err) + } } func testFwvStartEngine(t *testing.T) { diff --git a/ees/httppost_it_test.go b/ees/httppost_it_test.go index 0ba73118e..2f50cbed0 100644 --- a/ees/httppost_it_test.go +++ b/ees/httppost_it_test.go @@ -47,7 +47,7 @@ var ( sTestsHTTPPost = []func(t *testing.T){ testCreateDirectory, testHTTPPostLoadConfig, - testHTTPPostResetDataDB, + testHTTPPostResetDBs, testHTTPPostStartEngine, testHTTPPostRPCConn, @@ -73,10 +73,13 @@ func testHTTPPostLoadConfig(t *testing.T) { } } -func testHTTPPostResetDataDB(t *testing.T) { +func testHTTPPostResetDBs(t *testing.T) { if err := engine.InitDataDB(httpPostCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(httpPostCfg); err != nil { + t.Fatal(err) + } } func testHTTPPostStartEngine(t *testing.T) { diff --git a/ees/kafka_it_test.go b/ees/kafka_it_test.go index f756a6d34..6c0b73626 100644 --- a/ees/kafka_it_test.go +++ b/ees/kafka_it_test.go @@ -46,7 +46,7 @@ var ( sTestsKafka = []func(t *testing.T){ testCreateDirectory, testKafkaLoadConfig, - testKafkaResetDataDB, + testKafkaResetDBs, testKafkaStartEngine, testKafkaRPCConn, @@ -74,10 +74,13 @@ func testKafkaLoadConfig(t *testing.T) { } } -func testKafkaResetDataDB(t *testing.T) { +func testKafkaResetDBs(t *testing.T) { if err := engine.InitDataDB(kafkaCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(kafkaCfg); err != nil { + t.Fatal(err) + } } func testKafkaStartEngine(t *testing.T) { diff --git a/ees/posterjsonmap_it_test.go b/ees/posterjsonmap_it_test.go index 588e11f05..adc935255 100644 --- a/ees/posterjsonmap_it_test.go +++ b/ees/posterjsonmap_it_test.go @@ -47,7 +47,7 @@ var ( sTestsHTTPJsonMap = []func(t *testing.T){ testCreateDirectory, testHTTPJsonMapLoadConfig, - testHTTPJsonMapResetDataDB, + testHTTPJsonMapResetDBs, testHTTPJsonMapStartEngine, testHTTPJsonMapRPCConn, testHTTPJsonMapStartHTTPServer, @@ -72,10 +72,13 @@ func testHTTPJsonMapLoadConfig(t *testing.T) { } } -func testHTTPJsonMapResetDataDB(t *testing.T) { +func testHTTPJsonMapResetDBs(t *testing.T) { if err := engine.InitDataDB(httpJSONMapCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(httpJSONMapCfg); err != nil { + t.Fatal(err) + } } func testHTTPJsonMapStartEngine(t *testing.T) { diff --git a/ees/sql_it_test.go b/ees/sql_it_test.go index 78160f621..42875239d 100644 --- a/ees/sql_it_test.go +++ b/ees/sql_it_test.go @@ -51,7 +51,7 @@ var ( testCreateDirectory, testSqlEeCreateTable, testSqlEeLoadConfig, - testSqlEeResetDataDB, + testSqlEeResetDBs, testSqlEeStartEngine, testSqlEeRPCConn, testSqlEeExportEventFull, @@ -123,10 +123,13 @@ func testSqlEeLoadConfig(t *testing.T) { } } -func testSqlEeResetDataDB(t *testing.T) { +func testSqlEeResetDBs(t *testing.T) { if err := engine.InitDataDB(sqlEeCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(sqlEeCfg); err != nil { + t.Fatal(err) + } } func testSqlEeStartEngine(t *testing.T) { diff --git a/ees/sqs_it_test.go b/ees/sqs_it_test.go index bbb832832..5b9132141 100644 --- a/ees/sqs_it_test.go +++ b/ees/sqs_it_test.go @@ -47,7 +47,7 @@ var ( sTestsSQS = []func(t *testing.T){ testSQSLoadConfig, - testSQSResetDataDB, + testSQSResetDBs, testSQSStartEngine, testSQSRPCConn, testSQSExportEvent, @@ -80,10 +80,13 @@ func testSQSLoadConfig(t *testing.T) { } } -func testSQSResetDataDB(t *testing.T) { +func testSQSResetDBs(t *testing.T) { if err := engine.InitDataDB(sqsCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(sqsCfg); err != nil { + t.Fatal(err) + } } func testSQSStartEngine(t *testing.T) { diff --git a/ees/virtual_ee_it_test.go b/ees/virtual_ee_it_test.go index 25fa5cd7c..0b6fb6830 100644 --- a/ees/virtual_ee_it_test.go +++ b/ees/virtual_ee_it_test.go @@ -46,7 +46,7 @@ var ( sTestsVirt = []func(t *testing.T){ testCreateDirectory, testVirtLoadConfig, - testVirtResetDataDB, + testVirtResetDBs, testVirtStartEngine, testVirtRPCConn, testVirtExportSupplierEvent, @@ -72,10 +72,13 @@ func testVirtLoadConfig(t *testing.T) { } } -func testVirtResetDataDB(t *testing.T) { +func testVirtResetDBs(t *testing.T) { if err := engine.InitDataDB(virtCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(virtCfg); err != nil { + t.Fatal(err) + } } func testVirtStartEngine(t *testing.T) { diff --git a/efs/efs_it_test.go b/efs/efs_it_test.go index af0de542b..72c5cbd1e 100644 --- a/efs/efs_it_test.go +++ b/efs/efs_it_test.go @@ -52,7 +52,7 @@ var ( sTestsEfs = []func(t *testing.T){ testCreateDirectory, testEfSInitCfg, - testEfsInitDataDb, + testEfsResetDBs, testEfsStartEngine, testEfSRPCConn, //testEfsProcessEvent, @@ -125,10 +125,13 @@ func testEfSInitCfg(t *testing.T) { } } -func testEfsInitDataDb(t *testing.T) { +func testEfsResetDBs(t *testing.T) { if err := engine.InitDataDB(efsCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(efsCfg); err != nil { + t.Fatal(err) + } } // Start CGR Engine diff --git a/general_tests/accountactions_it_test.go b/general_tests/accountactions_it_test.go index 59749e6c1..f41a1d709 100644 --- a/general_tests/accountactions_it_test.go +++ b/general_tests/accountactions_it_test.go @@ -43,7 +43,7 @@ var ( sTestsAccPrf = []func(t *testing.T){ testAccActionsInitCfg, - testAccActionsInitDataDb, + testAccActionsResetDBs, testAccActionsStartEngine, testAccActionsRPCConn, testAccActionsSetActionProfile, @@ -85,10 +85,13 @@ func testAccActionsInitCfg(t *testing.T) { } } -func testAccActionsInitDataDb(t *testing.T) { +func testAccActionsResetDBs(t *testing.T) { if err := engine.InitDataDB(accPrfCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(accPrfCfg); err != nil { + t.Fatal(err) + } } // Start CGR Engine diff --git a/general_tests/accounts_it_test.go b/general_tests/accounts_it_test.go index 5b9dbb651..d86440ac4 100644 --- a/general_tests/accounts_it_test.go +++ b/general_tests/accounts_it_test.go @@ -42,7 +42,7 @@ var ( sTestsAcc = []func(t *testing.T){ testV1AccLoadConfig, - testV1AccInitDataDb, + testV1AccResetDBs, testV1AccStartEngine, testV1AccRpcConn, testV1AccGetAccountBeforeSet, @@ -89,10 +89,13 @@ func testV1AccLoadConfig(t *testing.T) { accDelay = 1000 } -func testV1AccInitDataDb(t *testing.T) { +func testV1AccResetDBs(t *testing.T) { if err := engine.InitDataDB(accCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(accCfg); err != nil { + t.Fatal(err) + } } func testV1AccStartEngine(t *testing.T) { diff --git a/general_tests/all_cfg_rld_it_test.go b/general_tests/all_cfg_rld_it_test.go index d9e0df3c4..5d08c956d 100644 --- a/general_tests/all_cfg_rld_it_test.go +++ b/general_tests/all_cfg_rld_it_test.go @@ -39,7 +39,7 @@ var ( testTestsR = []func(t *testing.T){ testCfgLoadConfig, - testResetDataDB, + testResetDBs, testStartEngine, testRPCConn, @@ -73,10 +73,13 @@ func testCfgLoadConfig(t *testing.T) { } } -func testResetDataDB(t *testing.T) { +func testResetDBs(t *testing.T) { if err := engine.InitDataDB(testCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(testCfg); err != nil { + t.Fatal(err) + } } func testStartEngine(t *testing.T) { diff --git a/general_tests/all_sections_cfg_rld_it_test.go b/general_tests/all_sections_cfg_rld_it_test.go index a0462504d..0cd8431a5 100644 --- a/general_tests/all_sections_cfg_rld_it_test.go +++ b/general_tests/all_sections_cfg_rld_it_test.go @@ -39,7 +39,7 @@ var ( testSectTests = []func(t *testing.T){ testSectLoadConfig, - testSectResetDataDB, + testSectResetDBs, testSectStartEngine, testSectRPCConn, @@ -109,10 +109,13 @@ func testSectLoadConfig(t *testing.T) { } } -func testSectResetDataDB(t *testing.T) { +func testSectResetDBs(t *testing.T) { if err := engine.InitDataDB(testSectCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(testSectCfg); err != nil { + t.Fatal(err) + } } func testSectStartEngine(t *testing.T) { diff --git a/general_tests/analyzers_doc_it_test.go b/general_tests/analyzers_doc_it_test.go index 7d3b85c82..dcfd61156 100644 --- a/general_tests/analyzers_doc_it_test.go +++ b/general_tests/analyzers_doc_it_test.go @@ -46,7 +46,7 @@ var ( sTestsAnzDoc = []func(t *testing.T){ testAnzDocInitCfg, - testAnzDocInitDataDb, + testAnzDocFlushDBs, testAnzDocStartEngine, testAnzDocRPCConn, @@ -80,10 +80,13 @@ func TestAnzDocIT(t *testing.T) { } } -func testAnzDocInitDataDb(t *testing.T) { +func testAnzDocFlushDBs(t *testing.T) { if err := engine.InitDataDB(anzDocCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(anzDocCfg); err != nil { + t.Fatal(err) + } } func testAnzDocStartEngine(t *testing.T) { diff --git a/general_tests/attributes_filters_index_it_test.go b/general_tests/attributes_filters_index_it_test.go index 39a3adaf9..257475b6a 100644 --- a/general_tests/attributes_filters_index_it_test.go +++ b/general_tests/attributes_filters_index_it_test.go @@ -42,7 +42,7 @@ var ( alsPrfFltrConfigDIR string sTestsAlsFltrPrf = []func(t *testing.T){ testAttributeFltrSInitCfg, - testAttributeFltrSInitDataDb, + testAttributeFltrSFlushDBs, testAttributeFltrSStartEngine, testAttributeFltrSRPCConn, @@ -81,10 +81,13 @@ func testAttributeFltrSInitCfg(t *testing.T) { } } -func testAttributeFltrSInitDataDb(t *testing.T) { +func testAttributeFltrSFlushDBs(t *testing.T) { if err := engine.InitDataDB(attrFltrCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(attrFltrCfg); err != nil { + t.Fatal(err) + } } // Start CGR Engine diff --git a/general_tests/attributes_it_test.go b/general_tests/attributes_it_test.go index 91e8f0fc7..8777a0adf 100644 --- a/general_tests/attributes_it_test.go +++ b/general_tests/attributes_it_test.go @@ -42,7 +42,7 @@ var ( alsPrfConfigDIR string sTestsAlsPrf = []func(t *testing.T){ testAttributeSInitCfg, - testAttributeSInitDataDb, + testAttributeSFlushDBs, testAttributeSStartEngine, testAttributeSRPCConn, @@ -89,10 +89,13 @@ func testAttributeSInitCfg(t *testing.T) { attrCfg.DataFolderPath = *dataDir // Share DataFolderPath through config towards StoreDb for Flush() } -func testAttributeSInitDataDb(t *testing.T) { +func testAttributeSFlushDBs(t *testing.T) { if err := engine.InitDataDB(attrCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(attrCfg); err != nil { + t.Fatal(err) + } } // Start CGR Engine diff --git a/general_tests/cacherpl_it_test.go b/general_tests/cacherpl_it_test.go index dbb8402b2..c98dfc4d5 100644 --- a/general_tests/cacherpl_it_test.go +++ b/general_tests/cacherpl_it_test.go @@ -50,8 +50,8 @@ var ( sTestsCacheRpl = []func(t *testing.T){ testCacheRplInitCfg, - testCacheRplInitDataDb, - //testCacheRplStartEngine, + testCacheRplFlushDBs, + testCacheRplStartEngine, testCacheRplRpcConn, testCacheRplAddData, testCacheRplPing, @@ -63,7 +63,7 @@ var ( sTestsCacheRplAA = []func(t *testing.T){ testCacheRplAAInitCfg, - testCacheRplInitDataDb, + testCacheRplFlushDBs, testCacheRplStartEngine, testCacheRplRpcConn, testCacheRplAAAddData, @@ -152,13 +152,19 @@ func testCacheRplAAInitCfg(t *testing.T) { } } -func testCacheRplInitDataDb(t *testing.T) { +func testCacheRplFlushDBs(t *testing.T) { if err := engine.InitDataDB(dspEngine1Cfg); err != nil { t.Fatal(err) } if err := engine.InitDataDB(dspEngine2Cfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(dspEngine1Cfg); err != nil { + t.Fatal(err) + } + if err := engine.InitStorDB(dspEngine2Cfg); err != nil { + t.Fatal(err) + } } func testCacheRplStartEngine(t *testing.T) { diff --git a/general_tests/cdrs_it_test.go b/general_tests/cdrs_it_test.go index c9b2f0212..f8cb0532c 100644 --- a/general_tests/cdrs_it_test.go +++ b/general_tests/cdrs_it_test.go @@ -45,7 +45,7 @@ var ( // subtests to be executed for each confDIR sTestsCDRsIT = []func(t *testing.T){ testCDRsInitConfig, - testCDRsInitDataDb, + testCDRsFlushDBs, testCDRsStartEngine, testCDRsRpcConn, testCDRsLoadTariffPlanFromFolder, @@ -100,10 +100,13 @@ func testCDRsInitConfig(t *testing.T) { } } -func testCDRsInitDataDb(t *testing.T) { +func testCDRsFlushDBs(t *testing.T) { if err := engine.InitDataDB(cdrsCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(cdrsCfg); err != nil { + t.Fatal(err) + } } func testCDRsStartEngine(t *testing.T) { diff --git a/general_tests/cdrs_post_failover_it_test.go b/general_tests/cdrs_post_failover_it_test.go index 24b575599..c12df4d54 100644 --- a/general_tests/cdrs_post_failover_it_test.go +++ b/general_tests/cdrs_post_failover_it_test.go @@ -45,7 +45,7 @@ var ( // subtests to be executed for each confDIR sTestsCDRsPostFailIT = []func(t *testing.T){ testCDRsPostFailoverInitConfig, - testCDRsPostFailoverInitDataDb, + testCDRsPostFailoverFlushDBs, testCDRsPostFailoverStartEngine, testCDRsPostFailoverRpcConn, testCDRsPostFailoverLoadTariffPlanFromFolder, @@ -89,10 +89,13 @@ func testCDRsPostFailoverInitConfig(t *testing.T) { } } -func testCDRsPostFailoverInitDataDb(t *testing.T) { +func testCDRsPostFailoverFlushDBs(t *testing.T) { if err := engine.InitDataDB(cdrsPostFailCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(cdrsPostFailCfg); err != nil { + t.Fatal(err) + } } func testCDRsPostFailoverStartEngine(t *testing.T) { diff --git a/general_tests/cgrloader_it_test.go b/general_tests/cgrloader_it_test.go index 3b7d52ea1..c22791200 100644 --- a/general_tests/cgrloader_it_test.go +++ b/general_tests/cgrloader_it_test.go @@ -43,7 +43,7 @@ var ( sTestsCGRLoaders = []func(t *testing.T){ testCGRLoaderInitConfig, - testCGRLoaderInitDataDb, + testCGRLoaderFlushDBs, testCGRLoaderStartEngine, testCGRLoaderRpcConn, testCGRLoaderLoadData, @@ -83,10 +83,13 @@ func testCGRLoaderInitConfig(t *testing.T) { } } -func testCGRLoaderInitDataDb(t *testing.T) { +func testCGRLoaderFlushDBs(t *testing.T) { if err := engine.InitDataDB(cgrloaderCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(cgrloaderCfg); err != nil { + t.Fatal(err) + } } func testCGRLoaderStartEngine(t *testing.T) { diff --git a/general_tests/config_reload_rates_it_test.go b/general_tests/config_reload_rates_it_test.go index b6b7ebde7..72b40f45c 100644 --- a/general_tests/config_reload_rates_it_test.go +++ b/general_tests/config_reload_rates_it_test.go @@ -39,7 +39,7 @@ var ( testRateTests = []func(t *testing.T){ testRateLoadConfig, - testRateResetDataDB, + testRateFlushDBs, testRateStartEngine, testRateRPCConn, @@ -74,10 +74,13 @@ func testRateLoadConfig(t *testing.T) { } } -func testRateResetDataDB(t *testing.T) { +func testRateFlushDBs(t *testing.T) { if err := engine.InitDataDB(testRateCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(testRateCfg); err != nil { + t.Fatal(err) + } } func testRateStartEngine(t *testing.T) { diff --git a/general_tests/dataconverter_it_test.go b/general_tests/dataconverter_it_test.go index ef0262610..037971764 100644 --- a/general_tests/dataconverter_it_test.go +++ b/general_tests/dataconverter_it_test.go @@ -49,7 +49,7 @@ var ( testDCCreateFolders, testDCInitConfig, - testDCInitDataDb, + testDCFlushDBs, testDCStartEngine, testDCRpcConn, testDCWriteCSVs, @@ -89,10 +89,13 @@ func testDCInitConfig(t *testing.T) { } } -func testDCInitDataDb(t *testing.T) { +func testDCFlushDBs(t *testing.T) { if err := engine.InitDataDB(dcCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(dcCfg); err != nil { + t.Fatal(err) + } } func testDCStartEngine(t *testing.T) { diff --git a/general_tests/dispatcher_opts_it_test.go b/general_tests/dispatcher_opts_it_test.go index ef0f535d0..16208643e 100644 --- a/general_tests/dispatcher_opts_it_test.go +++ b/general_tests/dispatcher_opts_it_test.go @@ -46,7 +46,7 @@ var ( // FIRST APRT OF THE TEST // Start engine without Dispatcher on engine 4012 testDispatcherOptsAdminInitCfg, - testDispatcherOptsAdminInitDataDb, + testDispatcherOptsAdminFlushDBs, testDispatcherOptsAdminStartEngine, testDispatcherOptsAdminRPCConn, @@ -111,10 +111,13 @@ func testDispatcherOptsAdminInitCfg(t *testing.T) { } } -func testDispatcherOptsAdminInitDataDb(t *testing.T) { +func testDispatcherOptsAdminFlushDBs(t *testing.T) { if err := engine.InitDataDB(adminsCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(adminsCfg); err != nil { + t.Fatal(err) + } } // Start CGR Engine woth Dispatcher enabled diff --git a/general_tests/doubleremove_it_test.go b/general_tests/doubleremove_it_test.go index d5688dd23..143cdd8bb 100644 --- a/general_tests/doubleremove_it_test.go +++ b/general_tests/doubleremove_it_test.go @@ -43,7 +43,7 @@ var ( doubleRemoveIT = []func(t *testing.T){ testdoubleRemoveLoadConfig, - testdoubleRemoveInitDataDb, + testdoubleRemoveFlushDBs, testdoubleRemoveStartEngine, testdoubleRemoveRpcConn, @@ -90,10 +90,13 @@ func testdoubleRemoveLoadConfig(t *testing.T) { } } -func testdoubleRemoveInitDataDb(t *testing.T) { +func testdoubleRemoveFlushDBs(t *testing.T) { if err := engine.InitDataDB(doubleRemove); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(doubleRemove); err != nil { + t.Fatal(err) + } } func testdoubleRemoveStartEngine(t *testing.T) { diff --git a/general_tests/ees_blocker_it_test.go b/general_tests/ees_blocker_it_test.go index 806e2de79..0ca050f82 100644 --- a/general_tests/ees_blocker_it_test.go +++ b/general_tests/ees_blocker_it_test.go @@ -42,7 +42,7 @@ var ( eesBlockerTests = []func(t *testing.T){ testEEsBlockerCreateFiles, testEEsBlockerLoadConfig, - testEEsBlockerInitDataDB, + testEEsBlockerFlushDBs, testEEsBlockerStartEngine, testEEsBlockerRpcConn, testEEsBlockerExportEvent, @@ -98,10 +98,13 @@ func testEEsBlockerLoadConfig(t *testing.T) { } } -func testEEsBlockerInitDataDB(t *testing.T) { +func testEEsBlockerFlushDBs(t *testing.T) { if err := engine.InitDataDB(eesBlockerCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(eesBlockerCfg); err != nil { + t.Fatal(err) + } } func testEEsBlockerStartEngine(t *testing.T) { diff --git a/general_tests/export_it_test.go b/general_tests/export_it_test.go index 70e4cf451..88b551f07 100644 --- a/general_tests/export_it_test.go +++ b/general_tests/export_it_test.go @@ -50,7 +50,7 @@ var ( sTestsExp = []func(t *testing.T){ testExpLoadConfig, - testExpResetDataDB, + testExpFlushDBs, testExpStartEngine, testExpRPCConn, testExpLoadTPFromFolder, @@ -101,10 +101,13 @@ func testExpLoadConfig(t *testing.T) { } } -func testExpResetDataDB(t *testing.T) { +func testExpFlushDBs(t *testing.T) { if err := engine.InitDataDB(expCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(expCfg); err != nil { + t.Fatal(err) + } } func testExpStartEngine(t *testing.T) { diff --git a/general_tests/filter_update_it_test.go b/general_tests/filter_update_it_test.go index 8d4bd506c..bf593d923 100644 --- a/general_tests/filter_update_it_test.go +++ b/general_tests/filter_update_it_test.go @@ -42,7 +42,7 @@ var ( testEng1 *exec.Cmd sTestsFilterUpdate = []func(t *testing.T){ testFilterUpdateInitCfg, - testFilterUpdateResetDB, + testFilterUpdateFlushDBs, testFilterUpdateStartEngine, testFilterUpdateRpcConn, testFilterUpdateSetFilterE1, @@ -109,10 +109,13 @@ func testFilterUpdateInitCfg(t *testing.T) { } // Remove data in both rating and accounting db -func testFilterUpdateResetDB(t *testing.T) { +func testFilterUpdateFlushDBs(t *testing.T) { if err := engine.InitDataDB(fltrUpdateCfg1); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(fltrUpdateCfg1); err != nil { + t.Fatal(err) + } } // Start CGR Engine diff --git a/general_tests/filtered_replication_it_test.go b/general_tests/filtered_replication_it_test.go index 940340773..d321af197 100644 --- a/general_tests/filtered_replication_it_test.go +++ b/general_tests/filtered_replication_it_test.go @@ -50,7 +50,7 @@ var ( sTestsFltrRpl = []func(t *testing.T){ testFltrRplInitCfg, - testFltrRplInitDBs, + testFltrRplFlushDBs, testFltrRplStartEngine, testFltrRplRPCConn, @@ -108,15 +108,19 @@ func testFltrRplInitCfg(t *testing.T) { } } -func testFltrRplInitDBs(t *testing.T) { +func testFltrRplFlushDBs(t *testing.T) { if err := engine.InitDataDB(fltrRplEngine1Cfg); err != nil { t.Fatal(err) } - if err := engine.InitDataDB(fltrRplEngine2Cfg); err != nil { t.Fatal(err) } - + if err := engine.InitStorDB(fltrRplEngine1Cfg); err != nil { + t.Fatal(err) + } + if err := engine.InitStorDB(fltrRplEngine2Cfg); err != nil { + t.Fatal(err) + } } func testFltrRplStartEngine(t *testing.T) { diff --git a/general_tests/filters_it_test.go b/general_tests/filters_it_test.go index d07f6c145..d5fbcdbbf 100644 --- a/general_tests/filters_it_test.go +++ b/general_tests/filters_it_test.go @@ -45,7 +45,7 @@ var ( sTestsFltr = []func(t *testing.T){ testV1FltrLoadConfig, - testV1FltrInitDataDb, + testV1FltrFlushDBs, testV1FltrStartEngine, testV1FltrRpcConn, testV1FltrLoadTarrifPlans, @@ -58,7 +58,7 @@ var ( testV1FltrAccounts, testV1FltrAccountsExistsDynamicaly, testV1FltrAttributesPrefix, - testV1FltrInitDataDb, + testV1FltrFlushDBs, testV1FltrChargerSuffix, testV1FltrStopEngine, } @@ -96,10 +96,13 @@ func testV1FltrLoadConfig(t *testing.T) { fltrDelay = 1000 } -func testV1FltrInitDataDb(t *testing.T) { +func testV1FltrFlushDBs(t *testing.T) { if err := engine.InitDataDB(fltrCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(fltrCfg); err != nil { + t.Fatal(err) + } } func testV1FltrStartEngine(t *testing.T) { diff --git a/general_tests/fltr_sep_it_test.go b/general_tests/fltr_sep_it_test.go index 2ed0f7fe1..bcb10fe70 100644 --- a/general_tests/fltr_sep_it_test.go +++ b/general_tests/fltr_sep_it_test.go @@ -48,7 +48,7 @@ var ( testFltrSepCreateFolders, testFltrSepLoadConfig, - testFltrSepInitDataDb, + testFltrSepFlushDBs, testFltrSepStartEngine, testFltrSepRpcConn, @@ -90,10 +90,13 @@ func testFltrSepLoadConfig(t *testing.T) { fltrSepDelay = 1000 } -func testFltrSepInitDataDb(t *testing.T) { +func testFltrSepFlushDBs(t *testing.T) { if err := engine.InitDataDB(fltrSepCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(fltrSepCfg); err != nil { + t.Fatal(err) + } } func testFltrSepStartEngine(t *testing.T) { diff --git a/general_tests/gocs_it_test.go b/general_tests/gocs_it_test.go index f347830ea..d53c057cf 100644 --- a/general_tests/gocs_it_test.go +++ b/general_tests/gocs_it_test.go @@ -46,7 +46,7 @@ var ( auEngine, usEngine, dspEngine *exec.Cmd sTestsGOCS = []func(t *testing.T){ testGOCSInitCfg, - testGOCSResetDB, + testGOCSFlushDBs, testGOCSStartEngine, testGOCSApierRpcConn, testGOCSLoadData, @@ -85,7 +85,7 @@ func testGOCSInitCfg(t *testing.T) { } // Remove data in both rating and accounting db -func testGOCSResetDB(t *testing.T) { +func testGOCSFlushDBs(t *testing.T) { if err := engine.InitDataDB(auCfg); err != nil { t.Fatal(err) } @@ -95,7 +95,15 @@ func testGOCSResetDB(t *testing.T) { if err := engine.InitDataDB(dspCfg); err != nil { t.Fatal(err) } - + if err := engine.InitStorDB(auCfg); err != nil { + t.Fatal(err) + } + if err := engine.InitStorDB(usCfg); err != nil { + t.Fatal(err) + } + if err := engine.InitStorDB(dspCfg); err != nil { + t.Fatal(err) + } } // Start CGR Engine diff --git a/general_tests/kafka_ssl_it_test.go b/general_tests/kafka_ssl_it_test.go index 1c2809a6e..3f31cda2e 100644 --- a/general_tests/kafka_ssl_it_test.go +++ b/general_tests/kafka_ssl_it_test.go @@ -43,7 +43,7 @@ var ( sTestsKafkaSSL = []func(t *testing.T){ testKafkaSSLLoadConfig, - testKafkaSSLResetDataDB, + testKafkaSSLFlushDBs, testKafkaSSLStartEngine, testKafkaSSLRPCConn, @@ -95,10 +95,13 @@ func testKafkaSSLLoadConfig(t *testing.T) { } } -func testKafkaSSLResetDataDB(t *testing.T) { +func testKafkaSSLFlushDBs(t *testing.T) { if err := engine.InitDataDB(kafkaSSLCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(kafkaSSLCfg); err != nil { + t.Fatal(err) + } } func testKafkaSSLStartEngine(t *testing.T) { diff --git a/general_tests/ld_process_match_ac_it_test.go b/general_tests/ld_process_match_ac_it_test.go index b272d172a..70866bdad 100644 --- a/general_tests/ld_process_match_ac_it_test.go +++ b/general_tests/ld_process_match_ac_it_test.go @@ -44,7 +44,7 @@ var ( testLdPrMatchAcTests = []func(t *testing.T){ testLdPrMatchAcLoadConfig, - testLdPrMatchAcResetDataDB, + testLdPrMatchAcFlushDBs, testLdPrMatchAcStartEngine, testLdPrMatchAcRPCConn, @@ -107,10 +107,13 @@ func testLdPrMatchAcLoadConfig(t *testing.T) { } } -func testLdPrMatchAcResetDataDB(t *testing.T) { +func testLdPrMatchAcFlushDBs(t *testing.T) { if err := engine.InitDataDB(testLdPrMatchAcCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(testLdPrMatchAcCfg); err != nil { + t.Fatal(err) + } } func testLdPrMatchAcStartEngine(t *testing.T) { diff --git a/general_tests/ld_process_match_rt_it_test.go b/general_tests/ld_process_match_rt_it_test.go index 984149f8c..611b860bd 100644 --- a/general_tests/ld_process_match_rt_it_test.go +++ b/general_tests/ld_process_match_rt_it_test.go @@ -44,7 +44,7 @@ var ( testLdPrMatchRtTests = []func(t *testing.T){ testLdPrMatchRtLoadConfig, - testLdPrMatchRtResetDataDB, + testLdPrMatchRtFlushDBs, testLdPrMatchRtStartEngine, testLdPrMatchRtRPCConn, @@ -107,10 +107,13 @@ func testLdPrMatchRtLoadConfig(t *testing.T) { } } -func testLdPrMatchRtResetDataDB(t *testing.T) { +func testLdPrMatchRtFlushDBs(t *testing.T) { if err := engine.InitDataDB(testLdPrMatchRtCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(testLdPrMatchRtCfg); err != nil { + t.Fatal(err) + } } func testLdPrMatchRtStartEngine(t *testing.T) { diff --git a/general_tests/loaders_internal_indexes_it_test.go b/general_tests/loaders_internal_indexes_it_test.go index 5a0b63711..53b468e6b 100644 --- a/general_tests/loaders_internal_indexes_it_test.go +++ b/general_tests/loaders_internal_indexes_it_test.go @@ -45,7 +45,7 @@ var ( LoadersIDBIdxTests = []func(t *testing.T){ testLoadersIDBIdxItLoadConfig, - testLoadersIDBIdxItDB, + testLoadersIDBIdxItFlushDBs, testLoadersIDBIdxItStartEngines, testLoadersIDBIdxItRPCConn, testLoadersIDBIdxItLoad, @@ -83,11 +83,13 @@ func testLoadersIDBIdxItLoadConfig(t *testing.T) { } } -func testLoadersIDBIdxItDB(t *testing.T) { +func testLoadersIDBIdxItFlushDBs(t *testing.T) { if err := engine.InitDataDB(loadersIDBIdxCfg); err != nil { t.Fatal(err) } - + if err := engine.InitStorDB(loadersIDBIdxCfg); err != nil { + t.Fatal(err) + } } func testLoadersIDBIdxItStartEngines(t *testing.T) { diff --git a/general_tests/loadersold2new_it_test.go b/general_tests/loadersold2new_it_test.go index 9b53d7403..a9b5a0262 100644 --- a/general_tests/loadersold2new_it_test.go +++ b/general_tests/loadersold2new_it_test.go @@ -46,7 +46,7 @@ var ( testLdro2nRtTests = []func(t *testing.T){ testCreateDirs, testLdro2nRtLoadConfig, - testLdro2nRtResetDataDB, + testLdro2nRtFlushDBs, testLdro2nRtStartEngine, testLdro2nRtRPCConn, @@ -99,10 +99,13 @@ func testLdro2nRtLoadConfig(t *testing.T) { } } -func testLdro2nRtResetDataDB(t *testing.T) { +func testLdro2nRtFlushDBs(t *testing.T) { if err := engine.InitDataDB(testLdro2nRtCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(testLdro2nRtCfg); err != nil { + t.Fatal(err) + } } func testLdro2nRtStartEngine(t *testing.T) { diff --git a/general_tests/resourcesv1_it_test.go b/general_tests/resourcesv1_it_test.go index 000dc1ff3..b3fc5f098 100644 --- a/general_tests/resourcesv1_it_test.go +++ b/general_tests/resourcesv1_it_test.go @@ -39,7 +39,7 @@ var ( sTestsRLSV1 = []func(t *testing.T){ testV1RsLoadConfig, - testV1RsInitDataDb, + testV1RsFlushDBs, testV1RsStartEngine, testV1RsRpcConn, @@ -77,10 +77,13 @@ func testV1RsLoadConfig(t *testing.T) { } } -func testV1RsInitDataDb(t *testing.T) { +func testV1RsFlushDBs(t *testing.T) { if err := engine.InitDataDB(rlsV1Cfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(rlsV1Cfg); err != nil { + t.Fatal(err) + } } func testV1RsStartEngine(t *testing.T) { diff --git a/general_tests/route_it_test.go b/general_tests/route_it_test.go index dc543ead7..284424ba4 100644 --- a/general_tests/route_it_test.go +++ b/general_tests/route_it_test.go @@ -44,7 +44,7 @@ var ( sTestsSupplierSV1 = []func(t *testing.T){ testV1SplSLoadConfig, - testV1SplSInitDataDb, + testV1SplSFlushDBs, testV1SplSStartEngine, testV1SplSRpcConn, testV1SplSLoadTarrifPlans, @@ -91,10 +91,13 @@ func testV1SplSLoadConfig(t *testing.T) { } } -func testV1SplSInitDataDb(t *testing.T) { +func testV1SplSFlushDBs(t *testing.T) { if err := engine.InitDataDB(splSv1Cfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(splSv1Cfg); err != nil { + t.Fatal(err) + } } func testV1SplSStartEngine(t *testing.T) { diff --git a/general_tests/route_stats_it_test.go b/general_tests/route_stats_it_test.go index a64b481ff..361f88616 100644 --- a/general_tests/route_stats_it_test.go +++ b/general_tests/route_stats_it_test.go @@ -44,7 +44,7 @@ var ( sTestsRtStatsSV1 = []func(t *testing.T){ testV1RtStatsLoadConfig, - testV1RtStatsInitDataDb, + testV1RtStatsFlushDBs, testV1RtStatsStartEngine, testV1RtStatsRpcConn, testV1RtStatsFromFolder, @@ -84,10 +84,13 @@ func testV1RtStatsLoadConfig(t *testing.T) { } } -func testV1RtStatsInitDataDb(t *testing.T) { +func testV1RtStatsFlushDBs(t *testing.T) { if err := engine.InitDataDB(RtStatsSv1Cfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(RtStatsSv1Cfg); err != nil { + t.Fatal(err) + } } func testV1RtStatsStartEngine(t *testing.T) { diff --git a/general_tests/routes_cases_it_test.go b/general_tests/routes_cases_it_test.go index c88ecbb05..ce3b45940 100644 --- a/general_tests/routes_cases_it_test.go +++ b/general_tests/routes_cases_it_test.go @@ -43,7 +43,7 @@ var ( sTestsRtsCaseSV1 = []func(t *testing.T){ testV1RtsCaseLoadConfig, - testV1RtsCaseInitDataDb, + testV1RtsCaseFlushDBs, testV1RtsCaseStartEngine, testV1RtsCaseRpcConn, @@ -195,10 +195,13 @@ func testV1RtsCaseLoadConfig(t *testing.T) { } } -func testV1RtsCaseInitDataDb(t *testing.T) { +func testV1RtsCaseFlushDBs(t *testing.T) { if err := engine.InitDataDB(rtsCaseSv1Cfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(rtsCaseSv1Cfg); err != nil { + t.Fatal(err) + } } func testV1RtsCaseStartEngine(t *testing.T) { diff --git a/general_tests/rpccaching_it_test.go b/general_tests/rpccaching_it_test.go index d219209a5..47c25d5de 100644 --- a/general_tests/rpccaching_it_test.go +++ b/general_tests/rpccaching_it_test.go @@ -44,7 +44,7 @@ var ( sTestsRPCMethods = []func(t *testing.T){ testRPCMethodsLoadConfig, - testRPCMethodsInitDataDb, + testRPCMethodsFlushDBs, testRPCMethodsStartEngine, testRPCMethodsRpcConn, testRPCMethodsFromFolder, @@ -56,11 +56,11 @@ var ( // testRPCMethodsProcessCDR, // testRPCMethodsProcessEvent, - testRPCMethodsInitDataDb, + testRPCMethodsFlushDBs, // testRPCMethodsCdrsProcessCDR, - testRPCMethodsInitDataDb, + testRPCMethodsFlushDBs, // testRPCMethodsLoadData, // testRPCMethodsResponderDebit, @@ -97,10 +97,13 @@ func testRPCMethodsLoadConfig(t *testing.T) { } } -func testRPCMethodsInitDataDb(t *testing.T) { +func testRPCMethodsFlushDBs(t *testing.T) { if err := engine.InitDataDB(rpcCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(rpcCfg); err != nil { + t.Fatal(err) + } } func testRPCMethodsStartEngine(t *testing.T) { diff --git a/general_tests/rpcexp_opts_it_test.go b/general_tests/rpcexp_opts_it_test.go index a010b681c..887cb7c87 100644 --- a/general_tests/rpcexp_opts_it_test.go +++ b/general_tests/rpcexp_opts_it_test.go @@ -43,7 +43,7 @@ var ( rrTests = []func(t *testing.T){ testRPCExpLoadConfig, - testRPCExpInitDataDb, + testRPCExpFlushDBs, testRPCExpStartEngine, testRPCExpRPCConn, @@ -93,13 +93,19 @@ func testRPCExpLoadConfig(t *testing.T) { rrDelay = 1000 } -func testRPCExpInitDataDb(t *testing.T) { +func testRPCExpFlushDBs(t *testing.T) { if err := engine.InitDataDB(ng1Cfg); err != nil { t.Fatal(err) } if err := engine.InitDataDB(ng2Cfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(ng1Cfg); err != nil { + t.Fatal(err) + } + if err := engine.InitStorDB(ng2Cfg); err != nil { + t.Fatal(err) + } } func testRPCExpStartEngine(t *testing.T) { diff --git a/general_tests/session2_it_test.go b/general_tests/session2_it_test.go index f2e80fd66..e220a1b32 100644 --- a/general_tests/session2_it_test.go +++ b/general_tests/session2_it_test.go @@ -43,7 +43,7 @@ var ( ses2Tests = []func(t *testing.T){ testSes2ItLoadConfig, - testSes2ItResetDataDB, + testSes2ItFlushDBs, testSes2ItStartEngine, testSes2ItRPCConn, @@ -83,10 +83,13 @@ func testSes2ItLoadConfig(t *testing.T) { } } -func testSes2ItResetDataDB(t *testing.T) { +func testSes2ItFlushDBs(t *testing.T) { if err := engine.InitDataDB(ses2Cfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(ses2Cfg); err != nil { + t.Fatal(err) + } } func testSes2ItStartEngine(t *testing.T) { diff --git a/general_tests/session_graceful_shutdown_it_test.go b/general_tests/session_graceful_shutdown_it_test.go index 0f67a1378..e187dcb10 100644 --- a/general_tests/session_graceful_shutdown_it_test.go +++ b/general_tests/session_graceful_shutdown_it_test.go @@ -47,7 +47,7 @@ var ( testEngine1, testEngine2 *exec.Cmd sTestsSession1 = []func(t *testing.T){ testSessionSRplcInitCfg, - testSessionSRplcResetDB, + testSessionSRplcFlushDBs, testSessionSRplcStartEngine, testSessionSRplcApierRpcConn, testSessionSRplcApierGetActiveSessionsNotFound, @@ -96,11 +96,13 @@ func testSessionSRplcInitCfg(t *testing.T) { } // Remove data in both rating and accounting db -func testSessionSRplcResetDB(t *testing.T) { +func testSessionSRplcFlushDBs(t *testing.T) { if err := engine.InitDataDB(smgRplCfg1); err != nil { t.Fatal(err) } - + if err := engine.InitStorDB(smgRplCfg1); err != nil { + t.Fatal(err) + } } // Start CGR Engine diff --git a/general_tests/session_volume_discount_it_test.go b/general_tests/session_volume_discount_it_test.go index 2c1f90b8f..28e462922 100644 --- a/general_tests/session_volume_discount_it_test.go +++ b/general_tests/session_volume_discount_it_test.go @@ -46,7 +46,7 @@ var ( tSessVolDiscITtests = []func(t *testing.T){ testSessVolDiscInitCfg, - testSessVolDiscResetDataDb, + testSessVolDiscFlushDBs, testSessVolDiscStartEngine, testSessVolDiscApierRpcConn, @@ -102,10 +102,13 @@ func testSessVolDiscInitCfg(t *testing.T) { } // Remove data in both rating and accounting db -func testSessVolDiscResetDataDb(t *testing.T) { +func testSessVolDiscFlushDBs(t *testing.T) { if err := engine.InitDataDB(tSessVolDiscCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(tSessVolDiscCfg); err != nil { + t.Fatal(err) + } } // Start CGR Engine diff --git a/general_tests/tp_it_test.go b/general_tests/tp_it_test.go index a58f43e08..4d74ccd85 100644 --- a/general_tests/tp_it_test.go +++ b/general_tests/tp_it_test.go @@ -42,7 +42,7 @@ var ( sTestTp = []func(t *testing.T){ testTpInitCfg, - testTpResetDataDb, + testTpFlushDBs, testTpStartEngine, testTpRpcConn, testTpLoadTariffPlanFromFolder, @@ -89,10 +89,13 @@ func testTpInitCfg(t *testing.T) { } // Remove data in both rating and accounting db -func testTpResetDataDb(t *testing.T) { +func testTpFlushDBs(t *testing.T) { if err := engine.InitDataDB(tpCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(tpCfg); err != nil { + t.Fatal(err) + } } // Start CGR Engine diff --git a/general_tests/tut_smgeneric_it_test.go b/general_tests/tut_smgeneric_it_test.go index 0e2493caa..d35929623 100644 --- a/general_tests/tut_smgeneric_it_test.go +++ b/general_tests/tut_smgeneric_it_test.go @@ -43,7 +43,7 @@ var ( sTestTutSMG = []func(t *testing.T){ testTutSMGInitCfg, - testTutSMGResetDataDb, + testTutSMGFlushDBs, testTutSMGStartEngine, testTutSMGRpcConn, @@ -83,10 +83,13 @@ func testTutSMGInitCfg(t *testing.T) { } // Remove data in both rating and accounting db -func testTutSMGResetDataDb(t *testing.T) { +func testTutSMGFlushDBs(t *testing.T) { if err := engine.InitDataDB(tutSMGCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(tutSMGCfg); err != nil { + t.Fatal(err) + } } // Start CGR Engine diff --git a/general_tests/twoengines_it_test.go b/general_tests/twoengines_it_test.go index 6d9b1e215..76791dd39 100644 --- a/general_tests/twoengines_it_test.go +++ b/general_tests/twoengines_it_test.go @@ -48,7 +48,7 @@ var ( var sTestsTwoEnginesIT = []func(t *testing.T){ testTwoEnginesInitConfig, - testTwoEnginesInitDataDB, + testTwoEnginesFlushDBs, testTwoEnginesStartEngine, testTwoEnginesRPC, @@ -76,10 +76,13 @@ func testTwoEnginesInitConfig(t *testing.T) { } } -func testTwoEnginesInitDataDB(t *testing.T) { +func testTwoEnginesFlushDBs(t *testing.T) { if err := engine.InitDataDB(engineOneCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(engineOneCfg); err != nil { + t.Fatal(err) + } } func testTwoEnginesStartEngine(t *testing.T) { diff --git a/registrarc/registrarc_it_test.go b/registrarc/registrarc_it_test.go index 15d828a5a..1e08e8973 100644 --- a/registrarc/registrarc_it_test.go +++ b/registrarc/registrarc_it_test.go @@ -97,7 +97,9 @@ func testDsphInitDB(t *testing.T) { if err := engine.InitDataDB(dspCfg); err != nil { t.Fatal(err) } - + if err := engine.InitStorDB(dspCfg); err != nil { + t.Fatal(err) + } } func testDsphStartEngine(t *testing.T) { diff --git a/registrarc/registrarcrpc_it_test.go b/registrarc/registrarcrpc_it_test.go index 133643e5f..32b3d4970 100644 --- a/registrarc/registrarcrpc_it_test.go +++ b/registrarc/registrarcrpc_it_test.go @@ -94,6 +94,9 @@ func testRPCInitDB(t *testing.T) { if err := engine.InitDataDB(rpcsCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(rpcsCfg); err != nil { + t.Fatal(err) + } } func testRPCStartEngine(t *testing.T) { diff --git a/services/cdrs_it_test.go b/services/cdrs_it_test.go index d38dcf6b2..1344169ee 100644 --- a/services/cdrs_it_test.go +++ b/services/cdrs_it_test.go @@ -54,10 +54,12 @@ func TestCdrsReload(t *testing.T) { srvMngr := servmanager.NewServiceManager(shdWg, nil, cfg) srvDep := map[string]*sync.WaitGroup{utils.DataDB: new(sync.WaitGroup)} db := NewDataDBService(cfg, nil, srvDep) + cfg.StorDbCfg().Type = utils.Internal + stordb := NewStorDBService(cfg, srvDep) anz := NewAnalyzerService(cfg, server, filterSChan, make(chan birpc.ClientConnector, 1), srvDep) chrS := NewChargerService(cfg, db, css, filterSChan, server, make(chan birpc.ClientConnector, 1), nil, anz, srvDep) cdrsRPC := make(chan birpc.ClientConnector, 1) - cdrS := NewCDRServer(cfg, db, filterSChan, server, + cdrS := NewCDRServer(cfg, db, stordb, filterSChan, server, cdrsRPC, nil, anz, srvDep) srvMngr.AddServices(cdrS, chrS, NewLoaderService(cfg, db, filterSChan, server, @@ -70,6 +72,9 @@ func TestCdrsReload(t *testing.T) { if db.IsRunning() { t.Errorf("Expected service to be down") } + if stordb.IsRunning() { + t.Errorf("Expected service to be down") + } var reply string cfg.ConfigPath = path.Join("/usr", "share", "cgrates", "conf", "samples", "tutmongo") @@ -92,6 +97,9 @@ func TestCdrsReload(t *testing.T) { if !db.IsRunning() { t.Errorf("Expected service to be running") } + if !stordb.IsRunning() { + t.Errorf("Expected service to be running") + } err := cdrS.Start(ctx, cancel) if err == nil || err != utils.ErrServiceAlreadyRunning { diff --git a/sessions/sessions_birpc_it_test.go b/sessions/sessions_birpc_it_test.go index 4730cfc5b..a78c55097 100644 --- a/sessions/sessions_birpc_it_test.go +++ b/sessions/sessions_birpc_it_test.go @@ -41,7 +41,7 @@ var ( err error sessionsTests = []func(t *testing.T){ testSessionsBiRPCInitCfg, - testSessionsBiRPCResetDataDb, + testSessionsBiRPCFlushDBs, testSessionsBiRPCStartEngine, testSessionsBiRPCApierRpcConn, // testSessionsBiRPCTPFromFolder, @@ -87,10 +87,13 @@ func testSessionsBiRPCInitCfg(t *testing.T) { } // Remove data in both rating and accounting db -func testSessionsBiRPCResetDataDb(t *testing.T) { +func testSessionsBiRPCFlushDBs(t *testing.T) { if err := engine.InitDataDB(sessionsBiRPCCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(sessionsBiRPCCfg); err != nil { + t.Fatal(err) + } } // Start CGR Engine diff --git a/sessions/sessions_data_it_test.go b/sessions/sessions_data_it_test.go index 87464c57f..98e9b4feb 100644 --- a/sessions/sessions_data_it_test.go +++ b/sessions/sessions_data_it_test.go @@ -39,7 +39,7 @@ var ( SessionsDataTests = []func(t *testing.T){ testSessionsDataInitCfg, - testSessionsDataResetDataDb, + testSessionsDataFlushDBs, testSessionsDataStartEngine, testSessionsDataApierRpcConn, /* @@ -87,10 +87,13 @@ func testSessionsDataInitCfg(t *testing.T) { } // Remove data in both rating and accounting db -func testSessionsDataResetDataDb(t *testing.T) { +func testSessionsDataFlushDBs(t *testing.T) { if err := engine.InitDataDB(dataCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(dataCfg); err != nil { + t.Fatal(err) + } } // Start CGR Engine diff --git a/sessions/sessions_it_test.go b/sessions/sessions_it_test.go index 7f302c971..54d5c19fe 100644 --- a/sessions/sessions_it_test.go +++ b/sessions/sessions_it_test.go @@ -39,7 +39,7 @@ var ( sessionsITtests = []func(t *testing.T){ testSessionsItInitCfg, - testSessionsItResetDataDb, + testSessionsItFlushDBs, /* testSessionsItStartEngine, testSessionsItApierRpcConn, @@ -83,10 +83,13 @@ func testSessionsItInitCfg(t *testing.T) { } // Remove data in both rating and accounting db -func testSessionsItResetDataDb(t *testing.T) { +func testSessionsItFlushDBs(t *testing.T) { if err := engine.InitDataDB(sItCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(sItCfg); err != nil { + t.Fatal(err) + } } // Start CGR Engine diff --git a/sessions/sessions_rpl_it_test.go b/sessions/sessions_rpl_it_test.go index c753d3fe6..a0e296063 100644 --- a/sessions/sessions_rpl_it_test.go +++ b/sessions/sessions_rpl_it_test.go @@ -39,7 +39,7 @@ var ( SessionsRplTests = []func(t *testing.T){ testSessionSRplInitCfg, - testSessionSRplResetDB, + testSessionSRplFlushDBs, /* testSessionSRplStartEngine, testSessionSRplApierRpcConn, @@ -90,10 +90,13 @@ func testSessionSRplInitCfg(t *testing.T) { } // Remove data in both rating and accounting db -func testSessionSRplResetDB(t *testing.T) { +func testSessionSRplFlushDBs(t *testing.T) { if err := engine.InitDataDB(smgRplcMasterCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(smgRplcMasterCfg); err != nil { + t.Fatal(err) + } } // Start CGR Engine diff --git a/sessions/sessions_voice_it_test.go b/sessions/sessions_voice_it_test.go index 24b46a28d..b5cb4a99e 100644 --- a/sessions/sessions_voice_it_test.go +++ b/sessions/sessions_voice_it_test.go @@ -39,7 +39,7 @@ var ( sessionsVoiceTests = []func(t *testing.T){ testSessionsVoiceInitCfg, - testSessionsVoiceResetDataDb, + testSessionsVoiceFlushDBs, /* testSessionsVoiceStartEngine, @@ -89,10 +89,13 @@ func testSessionsVoiceInitCfg(t *testing.T) { } // Remove data in both rating and accounting db -func testSessionsVoiceResetDataDb(t *testing.T) { +func testSessionsVoiceFlushDBs(t *testing.T) { if err := engine.InitDataDB(voiceCfg); err != nil { t.Fatal(err) } + if err := engine.InitStorDB(voiceCfg); err != nil { + t.Fatal(err) + } } // Start CGR Engine