Change blocker type from bool to DynamicBlockers for APActions

This commit is contained in:
ionutboangiu
2022-04-28 17:53:03 +03:00
committed by Dan Christian Bogos
parent 718f529ffa
commit 065ffcfbdf
22 changed files with 208 additions and 141 deletions

View File

@@ -1370,7 +1370,7 @@ const CGRATES_CFG_JSON = `
{"tag": "TargetIDs", "path": "Targets[<~*req.6>]", "type": "*variable", "value": "~*req.7"},
// {"tag": "ActionID", "path": "Actions.ID", "type": "*variable", "value": "~*req.8","new_branch":true},
{"tag": "ActionFilterIDs", "path": "Actions[<~*req.8>].FilterIDs", "type": "*variable", "value": "~*req.9", "filters": ["*notempty:~*req.8:"]},
{"tag": "ActionBlocker", "path": "Actions[<~*req.8>].Blocker", "type": "*variable", "value": "~*req.10", "filters": ["*notempty:~*req.8:"]},
{"tag": "ActionBlockers", "path": "Actions[<~*req.8>].Blockers", "type": "*variable", "value": "~*req.10", "filters": ["*notempty:~*req.8:"]},
{"tag": "ActionTTL", "path": "Actions[<~*req.8>].TTL", "type": "*variable", "value": "~*req.11", "filters": ["*notempty:~*req.8:"]},
{"tag": "ActionType", "path": "Actions[<~*req.8>].Type", "type": "*variable", "value": "~*req.12", "filters": ["*notempty:~*req.8:"]},
{"tag": "ActionOpts", "path": "Actions[<~*req.8>].Opts", "type": "*variable", "value": "~*req.13", "filters": ["*notempty:~*req.8:"]},

View File

@@ -1593,8 +1593,8 @@ func TestDfLoaderJsonCfg(t *testing.T) {
Type: utils.StringPointer(utils.MetaVariable),
Filters: &[]string{"*notempty:~*req.8:"},
Value: utils.StringPointer("~*req.9")},
{Tag: utils.StringPointer("ActionBlocker"),
Path: utils.StringPointer("Actions[<~*req.8>].Blocker"),
{Tag: utils.StringPointer("ActionBlockers"),
Path: utils.StringPointer("Actions[<~*req.8>].Blockers"),
Type: utils.StringPointer(utils.MetaVariable),
Filters: &[]string{"*notempty:~*req.8:"},
Value: utils.StringPointer("~*req.10")},

File diff suppressed because one or more lines are too long

View File

@@ -775,8 +775,8 @@ func TestLoaderSCfgloadFromJsonCfgCase1(t *testing.T) {
Filters: []string{"*notempty:~*req.8:"},
Value: NewRSRParsersMustCompile("~*req.9", utils.InfieldSep),
Layout: time.RFC3339},
{Tag: "ActionBlocker",
Path: "Actions[<~*req.8>].Blocker",
{Tag: "ActionBlockers",
Path: "Actions[<~*req.8>].Blockers",
Type: utils.MetaVariable,
Filters: []string{"*notempty:~*req.8:"},
Value: NewRSRParsersMustCompile("~*req.10", utils.InfieldSep),
@@ -1900,8 +1900,8 @@ func TestLoaderCfgAsMapInterfaceCase1(t *testing.T) {
utils.ValueCfg: "~*req.9",
},
{
utils.TagCfg: "ActionBlocker",
utils.PathCfg: "Actions[<~*req.8>].Blocker",
utils.TagCfg: "ActionBlockers",
utils.PathCfg: "Actions[<~*req.8>].Blockers",
utils.FiltersCfg: []string{"*notempty:~*req.8:"},
utils.TypeCfg: "*variable",
utils.ValueCfg: "~*req.10",