Remove AccountSummary from config.cdrs

This commit is contained in:
TeoV
2017-11-13 14:02:07 +02:00
committed by Dan Christian Bogos
parent 26b95954c2
commit c37015a09c
6 changed files with 17 additions and 24 deletions

View File

@@ -942,9 +942,6 @@ func (self *CGRConfig) loadFromJsonCfg(jsnCfg *CgrJsonCfg) (err error) {
if jsnCdrsCfg.Store_cdrs != nil {
self.CDRSStoreCdrs = *jsnCdrsCfg.Store_cdrs
}
if jsnCdrsCfg.Cdr_account_summary != nil {
self.CDRScdrAccountSummary = *jsnCdrsCfg.Cdr_account_summary
}
if jsnCdrsCfg.Sm_cost_retries != nil {
self.CDRSSMCostRetries = *jsnCdrsCfg.Sm_cost_retries
}

View File

@@ -152,7 +152,6 @@ const CGRATES_CFG_JSON = `
"enabled": false, // start the CDR Server service: <true|false>
"extra_fields": [], // extra fields to store in CDRs for non-generic CDRs
"store_cdrs": true, // store cdrs in storDb
"cdr_account_summary": false, // add account information from dataDB
"sm_cost_retries": 5, // number of queries to sm_costs before recalculating CDR
"rals_conns": [
{"address": "*internal"} // address where to reach the Rater for cost calculation, empty to disable functionality: <""|*internal|x.y.z.y:1234>

View File

@@ -230,11 +230,10 @@ func TestDfSchedulerJsonCfg(t *testing.T) {
func TestDfCdrsJsonCfg(t *testing.T) {
eCfg := &CdrsJsonCfg{
Enabled: utils.BoolPointer(false),
Extra_fields: utils.StringSlicePointer([]string{}),
Store_cdrs: utils.BoolPointer(true),
Cdr_account_summary: utils.BoolPointer(false),
Sm_cost_retries: utils.IntPointer(5),
Enabled: utils.BoolPointer(false),
Extra_fields: utils.StringSlicePointer([]string{}),
Store_cdrs: utils.BoolPointer(true),
Sm_cost_retries: utils.IntPointer(5),
Rals_conns: &[]*HaPoolJsonCfg{
&HaPoolJsonCfg{
Address: utils.StringPointer("*internal"),

View File

@@ -99,19 +99,18 @@ type SchedulerJsonCfg struct {
// Cdrs config section
type CdrsJsonCfg struct {
Enabled *bool
Extra_fields *[]string
Store_cdrs *bool
Cdr_account_summary *bool
Sm_cost_retries *int
Rals_conns *[]*HaPoolJsonCfg
Pubsubs_conns *[]*HaPoolJsonCfg
Users_conns *[]*HaPoolJsonCfg
Aliases_conns *[]*HaPoolJsonCfg
Cdrstats_conns *[]*HaPoolJsonCfg
Thresholds_conns *[]*HaPoolJsonCfg
Stats_conns *[]*HaPoolJsonCfg
Online_cdr_exports *[]string
Enabled *bool
Extra_fields *[]string
Store_cdrs *bool
Sm_cost_retries *int
Rals_conns *[]*HaPoolJsonCfg
Pubsubs_conns *[]*HaPoolJsonCfg
Users_conns *[]*HaPoolJsonCfg
Aliases_conns *[]*HaPoolJsonCfg
Cdrstats_conns *[]*HaPoolJsonCfg
Thresholds_conns *[]*HaPoolJsonCfg
Stats_conns *[]*HaPoolJsonCfg
Online_cdr_exports *[]string
}
type CdrReplicationJsonCfg struct {

View File

@@ -110,7 +110,6 @@
// "enabled": false, // start the CDR Server service: <true|false>
// "extra_fields": [], // extra fields to store in CDRs for non-generic CDRs
// "store_cdrs": true, // store cdrs in storDb
// "cdr_account_summary": false, // add account information from dataDB
// "sm_cost_retries": 5, // number of queries to sm_costs before recalculating CDR
// "rals_conns": [
// {"address": "*internal"} // address where to reach the Rater for cost calculation, empty to disable functionality: <""|*internal|x.y.z.y:1234>

View File

@@ -1332,7 +1332,7 @@ func TestTutITPrepaidCDRWithSMCost(t *testing.T) {
OriginHost: cdr.OriginHost,
OriginID: cdr.OriginID,
CostSource: "TestTutITPrepaidCDRWithSMCost",
Usage: cdr.Usage.Seconds(),
Usage: cdr.Usage,
CostDetails: &engine.CallCost{
Direction: utils.OUT,
Destination: "1003",