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

@@ -1346,7 +1346,7 @@
// {"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

@@ -105,17 +105,18 @@
{"tag": "ID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true},
{"tag": "FilterIDs", "path": "FilterIDs", "type": "*variable", "value": "~*req.2"},
{"tag": "Weights", "path": "Weights", "type": "*variable", "value": "~*req.3"},
{"tag": "Schedule", "path": "Schedule", "type": "*variable", "value": "~*req.4"},
// {"tag": "TargetType", "path": "TargetType", "type": "*variable", "value": "~*req.5"},
{"tag": "TargetIDs", "path": "Targets[<~*req.5>]", "type": "*variable", "value": "~*req.6"},
// {"tag": "ActionID", "path": "Actions.ID", "type": "*variable", "value": "~*req.7","new_branch":true},
{"tag": "ActionFilterIDs", "path": "Actions[<~*req.7>].FilterIDs", "type": "*variable", "value": "~*req.8", "filters": ["*notempty:~*req.7:"]},
{"tag": "ActionBlocker", "path": "Actions[<~*req.7>].Blocker", "type": "*variable", "value": "~*req.9", "filters": ["*notempty:~*req.7:"]},
{"tag": "ActionTTL", "path": "Actions[<~*req.7>].TTL", "type": "*variable", "value": "~*req.10", "filters": ["*notempty:~*req.7:"]},
{"tag": "ActionType", "path": "Actions[<~*req.7>].Type", "type": "*variable", "value": "~*req.11", "filters": ["*notempty:~*req.7:"]},
{"tag": "ActionOpts", "path": "Actions[<~*req.7>].Opts", "type": "*variable", "value": "~*req.12", "filters": ["*notempty:~*req.7:"]},
{"tag": "ActionPath", "path": "Actions[<~*req.7>].Diktats.Path", "type": "*variable", "value": "~*req.13","new_branch":true, "filters": ["*notempty:~*req.7:"]},
{"tag": "ActionValue", "path": "Actions[<~*req.7>].Diktats.Value", "type": "*variable", "value": "~*req.14", "filters": ["*notempty:~*req.7:"]},
{"tag": "Blockers", "path": "Blockers", "type": "*variable", "value": "~*req.4"},
{"tag": "Schedule", "path": "Schedule", "type": "*variable", "value": "~*req.5"},
// {"tag": "TargetType", "path": "TargetType", "type": "*variable", "value": "~*req.6"},
{"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": "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:"]},
{"tag": "ActionPath", "path": "Actions[<~*req.8>].Diktats.Path", "type": "*variable", "value": "~*req.14","new_branch":true, "filters": ["*notempty:~*req.8:"]},
{"tag": "ActionValue", "path": "Actions[<~*req.8>].Diktats.Value", "type": "*variable", "value": "~*req.15", "filters": ["*notempty:~*req.8:"]},
],
},
],

View File

@@ -283,7 +283,7 @@ CREATE TABLE tp_action_profiles (
`target_ids` varchar(64) NOT NULL,
`action_id` varchar(64) NOT NULL,
`action_filter_ids` varchar(64) NOT NULL,
`action_blocker` BOOLEAN NOT NULL,
`action_blockers` varchar(64) NOT NULL,
`action_ttl` varchar(64) NOT NULL,
`action_type` varchar(64) NOT NULL,
`action_opts` varchar(256) NOT NULL,

View File

@@ -272,7 +272,7 @@ CREATE TABLE tp_action_profiles (
"target_ids" varchar(64) NOT NULL,
"action_id" varchar(64) NOT NULL,
"action_filter_ids" varchar(64) NOT NULL,
"action_blocker" BOOLEAN NOT NULL,
"action_blockers" varchar(64) NOT NULL,
"action_ttl" varchar(64) NOT NULL,
"action_type" varchar(64) NOT NULL,
"action_opts" varchar(256) NOT NULL,

View File

@@ -1,8 +1,8 @@
#Tenant,ID,FilterIDs,Weights,Blocker,Schedule,TargetType,TargetIDs,ActionID,ActionFilterIDs,ActionBlocker,ActionTTL,ActionType,ActionOpts,ActionPath,ActionValue
cgrates.org,ONE_TIME_ACT,,;10,,*asap,*accounts,1001;1002,TOPUP,,false,0s,*add_balance,,*balance.TestBalance.Units,10
cgrates.org,ONE_TIME_ACT,,,,,,,SET_BALANCE_TEST_DATA,,false,0s,*set_balance,,*balance.TestDataBalance.Type,*data
cgrates.org,ONE_TIME_ACT,,,,,,,TOPUP_TEST_DATA,,false,0s,*add_balance,,*balance.TestDataBalance.Units,1024
cgrates.org,ONE_TIME_ACT,,,,,,,SET_BALANCE_TEST_VOICE,,false,0s,*set_balance,,*balance.TestVoiceBalance.Type,*voice
cgrates.org,ONE_TIME_ACT,,,,,,,TOPUP_TEST_VOICE,,false,0s,*add_balance,,*balance.TestVoiceBalance.Units,15m15s
cgrates.org,ONE_TIME_ACT,,,,,,,SET_BALANCE_TEST_FILTERS,,false,0s,*set_balance,,*balance.TestVoiceBalance.Filters,*string:~*req.CustomField:500
cgrates.org,ONE_TIME_ACT,,,,,,,TOPUP_REM_VOICE,,false,0s,*rem_balance,,TestVoiceBalance2,
#Tenant,ID,FilterIDs,Weights,Blocker,Schedule,TargetType,TargetIDs,ActionID,ActionFilterIDs,ActionBlockers,ActionTTL,ActionType,ActionOpts,ActionPath,ActionValue
cgrates.org,ONE_TIME_ACT,,;10,,*asap,*accounts,1001;1002,TOPUP,,;false,0s,*add_balance,,*balance.TestBalance.Units,10
cgrates.org,ONE_TIME_ACT,,,,,,,SET_BALANCE_TEST_DATA,,;false,0s,*set_balance,,*balance.TestDataBalance.Type,*data
cgrates.org,ONE_TIME_ACT,,,,,,,TOPUP_TEST_DATA,,;false,0s,*add_balance,,*balance.TestDataBalance.Units,1024
cgrates.org,ONE_TIME_ACT,,,,,,,SET_BALANCE_TEST_VOICE,,;false,0s,*set_balance,,*balance.TestVoiceBalance.Type,*voice
cgrates.org,ONE_TIME_ACT,,,,,,,TOPUP_TEST_VOICE,,;false,0s,*add_balance,,*balance.TestVoiceBalance.Units,15m15s
cgrates.org,ONE_TIME_ACT,,,,,,,SET_BALANCE_TEST_FILTERS,,;false,0s,*set_balance,,*balance.TestVoiceBalance.Filters,*string:~*req.CustomField:500
cgrates.org,ONE_TIME_ACT,,,,,,,TOPUP_REM_VOICE,,;false,0s,*rem_balance,,TestVoiceBalance2,
1 #Tenant ID FilterIDs Weights Blocker Schedule TargetType TargetIDs ActionID ActionFilterIDs ActionBlocker ActionBlockers ActionTTL ActionType ActionOpts ActionPath ActionValue
2 cgrates.org ONE_TIME_ACT ;10 *asap *accounts 1001;1002 TOPUP false ;false 0s *add_balance *balance.TestBalance.Units 10
3 cgrates.org ONE_TIME_ACT SET_BALANCE_TEST_DATA false ;false 0s *set_balance *balance.TestDataBalance.Type *data
4 cgrates.org ONE_TIME_ACT TOPUP_TEST_DATA false ;false 0s *add_balance *balance.TestDataBalance.Units 1024
5 cgrates.org ONE_TIME_ACT SET_BALANCE_TEST_VOICE false ;false 0s *set_balance *balance.TestVoiceBalance.Type *voice
6 cgrates.org ONE_TIME_ACT TOPUP_TEST_VOICE false ;false 0s *add_balance *balance.TestVoiceBalance.Units 15m15s
7 cgrates.org ONE_TIME_ACT SET_BALANCE_TEST_FILTERS false ;false 0s *set_balance *balance.TestVoiceBalance.Filters *string:~*req.CustomField:500
8 cgrates.org ONE_TIME_ACT TOPUP_REM_VOICE false ;false 0s *rem_balance TestVoiceBalance2

View File

@@ -1,8 +1,8 @@
#Tenant,ID,FilterIDs,Weights,Blockers,Schedule,TargetType,TargetIDs,ActionID,ActionFilterIDs,ActionBlocker,ActionTTL,ActionType,ActionOpts,ActionPath,ActionValue
cgrates.org,ONE_TIME_ACT,,;10,,*asap,*accounts,1001;1002,TOPUP,,false,0s,*add_balance,,*balance.TestBalance.Units,10
cgrates.org,ONE_TIME_ACT,,,,,,,SET_BALANCE_TEST_DATA,,false,0s,*set_balance,,*balance.TestDataBalance.Type,*data
cgrates.org,ONE_TIME_ACT,,,,,,,TOPUP_TEST_DATA,,false,0s,*add_balance,,*balance.TestDataBalance.Units,1024
cgrates.org,ONE_TIME_ACT,,,,,,,SET_BALANCE_TEST_VOICE,,false,0s,*set_balance,,*balance.TestVoiceBalance.Type,*voice
cgrates.org,ONE_TIME_ACT,,,,,,,TOPUP_TEST_VOICE,,false,0s,*add_balance,,*balance.TestVoiceBalance.Units,15m15s
cgrates.org,ONE_TIME_ACT,,,,,,,SET_BALANCE_TEST_FILTERS,,false,0s,*set_balance,,*balance.TestVoiceBalance.Filters,*string:~*req.CustomField:500
cgrates.org,ONE_TIME_ACT,,,,,,,TOPUP_REM_VOICE,,false,0s,*rem_balance,,TestVoiceBalance2,
#Tenant,ID,FilterIDs,Weights,Blockers,Schedule,TargetType,TargetIDs,ActionID,ActionFilterIDs,ActionBlockers,ActionTTL,ActionType,ActionOpts,ActionPath,ActionValue
cgrates.org,ONE_TIME_ACT,,;10,,*asap,*accounts,1001;1002,TOPUP,,;false,0s,*add_balance,,*balance.TestBalance.Units,10
cgrates.org,ONE_TIME_ACT,,,,,,,SET_BALANCE_TEST_DATA,,;false,0s,*set_balance,,*balance.TestDataBalance.Type,*data
cgrates.org,ONE_TIME_ACT,,,,,,,TOPUP_TEST_DATA,,;false,0s,*add_balance,,*balance.TestDataBalance.Units,1024
cgrates.org,ONE_TIME_ACT,,,,,,,SET_BALANCE_TEST_VOICE,,;false,0s,*set_balance,,*balance.TestVoiceBalance.Type,*voice
cgrates.org,ONE_TIME_ACT,,,,,,,TOPUP_TEST_VOICE,,;false,0s,*add_balance,,*balance.TestVoiceBalance.Units,15m15s
cgrates.org,ONE_TIME_ACT,,,,,,,SET_BALANCE_TEST_FILTERS,,;false,0s,*set_balance,,*balance.TestVoiceBalance.Filters,*string:~*req.CustomField:500
cgrates.org,ONE_TIME_ACT,,,,,,,TOPUP_REM_VOICE,,;false,0s,*rem_balance,,TestVoiceBalance2,
1 #Tenant ID FilterIDs Weights Blockers Schedule TargetType TargetIDs ActionID ActionFilterIDs ActionBlocker ActionBlockers ActionTTL ActionType ActionOpts ActionPath ActionValue
2 cgrates.org ONE_TIME_ACT ;10 *asap *accounts 1001;1002 TOPUP false ;false 0s *add_balance *balance.TestBalance.Units 10
3 cgrates.org ONE_TIME_ACT SET_BALANCE_TEST_DATA false ;false 0s *set_balance *balance.TestDataBalance.Type *data
4 cgrates.org ONE_TIME_ACT TOPUP_TEST_DATA false ;false 0s *add_balance *balance.TestDataBalance.Units 1024
5 cgrates.org ONE_TIME_ACT SET_BALANCE_TEST_VOICE false ;false 0s *set_balance *balance.TestVoiceBalance.Type *voice
6 cgrates.org ONE_TIME_ACT TOPUP_TEST_VOICE false ;false 0s *add_balance *balance.TestVoiceBalance.Units 15m15s
7 cgrates.org ONE_TIME_ACT SET_BALANCE_TEST_FILTERS false ;false 0s *set_balance *balance.TestVoiceBalance.Filters *string:~*req.CustomField:500
8 cgrates.org ONE_TIME_ACT TOPUP_REM_VOICE false ;false 0s *rem_balance TestVoiceBalance2