Fixup sharedGroup number of columns

This commit is contained in:
DanB
2014-03-17 15:58:33 +01:00
parent 3aecec9bb8
commit 2e80f8a1f4
7 changed files with 18 additions and 10 deletions

View File

@@ -1,5 +1,6 @@
#Tenant,Account,Direction,ActionPlanTag,ActionTriggersTag
cgrates.org,1001,*out,PREPAID_10,STANDARD_TRIGGERS
cgrates.org,1002,*out,PREPAID_10,STANDARD_TRIGGERS
cgrates.org,1003,*out,PREPAID_10,STANDARD_TRIGGERS
cgrates.org,1004,*out,PREPAID_10,STANDARD_TRIGGERS
cgrates.org,1001,*out,PACKAGE_10_SHARED_A_5,STANDARD_TRIGGERS
cgrates.org,1002;1006,*out,PACKAGE_10,STANDARD_TRIGGERS
cgrates.org,1003,*out,PACKAGE_10,STANDARD_TRIGGERS
cgrates.org,1004,*out,PACKAGE_10,STANDARD_TRIGGERS
cgrates.org,1007,*out,USE_SHARED_A,STANDARD_TRIGGERS
1 #Tenant Account Direction ActionPlanTag ActionTriggersTag
2 cgrates.org 1001 *out PREPAID_10 PACKAGE_10_SHARED_A_5 STANDARD_TRIGGERS
3 cgrates.org 1002 1002;1006 *out PREPAID_10 PACKAGE_10 STANDARD_TRIGGERS
4 cgrates.org 1003 *out PREPAID_10 PACKAGE_10 STANDARD_TRIGGERS
5 cgrates.org 1004 *out PREPAID_10 PACKAGE_10 STANDARD_TRIGGERS
6 cgrates.org 1007 *out USE_SHARED_A STANDARD_TRIGGERS

View File

@@ -1,2 +1,5 @@
#Tag,ActionsTag,TimingTag,Weight
PREPAID_10,PREPAID_10,ASAP,10
PACKAGE_10,TOPUP_RST_10,ASAP,10
PACKAGE_10_SHAREDA_5,TOPUP_RST_5,ASAP,10
PACKAGE_10_SHAREDA_5,TOPUP_RST_SHARED_5,ASAP,10
USE_SHARED_A,SHARED_A_0,ASAP,10
1 #Tag ActionsTag TimingTag Weight
2 PREPAID_10 PACKAGE_10 PREPAID_10 TOPUP_RST_10 ASAP 10
3 PACKAGE_10_SHAREDA_5 TOPUP_RST_5 ASAP 10
4 PACKAGE_10_SHAREDA_5 TOPUP_RST_SHARED_5 ASAP 10
5 USE_SHARED_A SHARED_A_0 ASAP 10

View File

@@ -1,3 +1,6 @@
#ActionsTag,Action,BalanceType,Direction,Units,ExpiryTime,DestinationTag,RatingSubject,BalanceWeight,SharedGroup,ExtraParameters,Weight
PREPAID_10,*topup_reset,*monetary,*out,10,*unlimited,*any,,10,,,10
TOPUP_RST_10,*topup_reset,*monetary,*out,10,*unlimited,*any,,10,,,10
TOPUP_RST_5,*topup_reset,*monetary,*out,5,*unlimited,*any,,10,,,10
TOPUP_RST_SHARED_5,*topup_reset,*monetary,*out,5,*unlimited,*any,,20,SHARED_A,,10
SHARED_A_0,*topup_reset,*monetary,*out,0,*unlimited,*any,,10,SHARED_A,,10
LOG_WARNING,*log,,,,,,,,,,10
1 #ActionsTag Action BalanceType Direction Units ExpiryTime DestinationTag RatingSubject BalanceWeight SharedGroup ExtraParameters Weight
2 PREPAID_10 TOPUP_RST_10 *topup_reset *monetary *out 10 *unlimited *any 10 10
3 TOPUP_RST_5 *topup_reset *monetary *out 5 *unlimited *any 10 10
4 TOPUP_RST_SHARED_5 *topup_reset *monetary *out 5 *unlimited *any 20 SHARED_A 10
5 SHARED_A_0 *topup_reset *monetary *out 0 *unlimited *any 10 SHARED_A 10
6 LOG_WARNING *log 10

View File

@@ -122,8 +122,8 @@ cgrates.directvoip.co.uk,call,*out,*any,2013-01-06T00:00:00Z,RP_UK,
cgrates.directvoip.co.uk,call,*out,discounted_minutes,2013-01-06T00:00:00Z,RP_UK_Mobile_BIG5_PKG,
`
sharedGroups = `
SG1,*any,*lowest_first,,
SG2,*any,*lowest_first,EVENING,
SG1,*any,*lowest_first,
SG2,*any,*lowest_first,EVENING
`
actions = `

View File

@@ -203,7 +203,7 @@ var FileValidators = map[string]*FileLineRegexValidator{
regexp.MustCompile(``),
""},
utils.ACTIONS_CSV: &FileLineRegexValidator{utils.ACTIONS_NRCOLS,
regexp.MustCompile(`^(?:\w+\s*),(?:\*\w+\s*),(?:\*\w+\s*)?,(?:\*out\s*)?,(?:\d+\s*)?,(?:\*\w+\s*|\+\d+[smh]\s*|\d+\s*)?,(?:\*any|\w+\s*)?,(?:\*?\w+\s*)?,(?:\w+\s*)?,(?:\d+\.?\d*\s*)?,(?:\S+\s*)?,(?:\d+\.?\d*\s*)$`),
regexp.MustCompile(`^(?:\w+\s*),(?:\*\w+\s*),(?:\*\w+\s*)?,(?:\*out\s*)?,(?:\d+\s*)?,(?:\*\w+\s*|\+\d+[smh]\s*|\d+\s*)?,(?:\*any|\w+\s*)?,(?:\*?\w+\s*)?,(?:\d+\.?\d*\s*)?,(?:\w+\s*)?,(?:\S+\s*)?,(?:\d+\.?\d*\s*)$`),
"Tag([0-9A-Za-z_]),Action([0-9A-Za-z_]),BalanceType([*a-z_]),Direction(*out),Units([0-9]),ExpiryTime(*[a-z_]|+[0-9][smh]|[0-9])DestinationTag([0-9A-Za-z_]|*all),RatingSubject([0-9A-Za-z_]),BalanceWeight([0-9.]),ExtraParameters([0-9A-Za-z_:;]),Weight([0-9.])"},
utils.ACTION_PLANS_CSV: &FileLineRegexValidator{utils.ACTION_PLANS_NRCOLS,
regexp.MustCompile(`(?:\w+\s*,\s*){3}(?:\d+\.?\d*){1}`),

View File

@@ -63,6 +63,7 @@ WARN_HTTP,*call_url,,,,,,,,,http://localhost:8000,10
LOG_BALANCE,*log,,,,,,,,,,10
DUMMY,INVALID;DATA
PREPAID_10,*topup_reset,*monetary,*out,5,*unlimited,*any,,10,,10
TOPUP_RST_SHARED_5,*topup_reset,*monetary,*out,5,*unlimited,*any,subj,20,SHARED_A,param&some,10
`
var actionTimingsSample = `#Tag,ActionsTag,TimingTag,Weight

View File

@@ -52,7 +52,7 @@ const (
DESTINATION_RATES_NRCOLS = 3
DESTRATE_TIMINGS_NRCOLS = 4
RATE_PROFILES_NRCOLS = 7
SHARED_GROUPS_NRCOLS = 5
SHARED_GROUPS_NRCOLS = 4
ACTIONS_NRCOLS = 12
ACTION_PLANS_NRCOLS = 4
ACTION_TRIGGERS_NRCOLS = 8