mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 10:06:24 +05:00
Added *variable to LoaderS template
This commit is contained in:
committed by
Dan Christian Bogos
parent
53018880b8
commit
eec3bbe70c
@@ -459,12 +459,13 @@ func (self *CGRConfig) checkConfigSanity() error {
|
||||
for _, data := range ldrSCfg.Data {
|
||||
if !utils.IsSliceMember([]string{utils.MetaAttributes,
|
||||
utils.MetaResources, utils.MetaFilters, utils.MetaStats,
|
||||
utils.MetaSuppliers, utils.MetaThresholds}, data.Type) {
|
||||
utils.MetaSuppliers, utils.MetaThresholds, utils.MetaChargers,
|
||||
utils.MetaDispatchers, utils.MetaDispatcherHosts}, data.Type) {
|
||||
return fmt.Errorf("<%s> unsupported data type %s", utils.LoaderS, data.Type)
|
||||
}
|
||||
|
||||
for _, field := range data.Fields {
|
||||
if field.Type != utils.META_COMPOSED && field.Type != utils.MetaString {
|
||||
if field.Type != utils.META_COMPOSED && field.Type != utils.MetaString && field.Type != utils.MetaVariable {
|
||||
return fmt.Errorf("<%s> invalid field type %s for %s at %s", utils.LoaderS, field.Type, data.Type, field.Tag)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -546,147 +546,147 @@ const CGRATES_CFG_JSON = `
|
||||
"type": "*attributes", // data source type
|
||||
"file_name": "Attributes.csv", // file name in the tp_in_dir
|
||||
"fields": [
|
||||
{"tag": "TenantID", "field_id": "Tenant", "type": "*composed", "value": "~0", "mandatory": true},
|
||||
{"tag": "ProfileID", "field_id": "ID", "type": "*composed", "value": "~1", "mandatory": true},
|
||||
{"tag": "Contexts", "field_id": "Contexts", "type": "*composed", "value": "~2"},
|
||||
{"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*composed", "value": "~3"},
|
||||
{"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*composed", "value": "~4"},
|
||||
{"tag": "AttributeFilterIDs", "field_id": "AttributeFilterIDs", "type": "*composed", "value": "~5"},
|
||||
{"tag": "FieldName", "field_id": "FieldName", "type": "*composed", "value": "~6"},
|
||||
{"tag": "Type", "field_id": "Type", "type": "*composed", "value": "~7"},
|
||||
{"tag": "Value", "field_id": "Value", "type": "*composed", "value": "~8"},
|
||||
{"tag": "Blocker", "field_id": "Blocker", "type": "*composed", "value": "~9"},
|
||||
{"tag": "Weight", "field_id": "Weight", "type": "*composed", "value": "~10"},
|
||||
{"tag": "TenantID", "field_id": "Tenant", "type": "*variable", "value": "~0", "mandatory": true},
|
||||
{"tag": "ProfileID", "field_id": "ID", "type": "*variable", "value": "~1", "mandatory": true},
|
||||
{"tag": "Contexts", "field_id": "Contexts", "type": "*variable", "value": "~2"},
|
||||
{"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*variable", "value": "~3"},
|
||||
{"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*variable", "value": "~4"},
|
||||
{"tag": "AttributeFilterIDs", "field_id": "AttributeFilterIDs", "type": "*variable", "value": "~5"},
|
||||
{"tag": "FieldName", "field_id": "FieldName", "type": "*variable", "value": "~6"},
|
||||
{"tag": "Type", "field_id": "Type", "type": "*variable", "value": "~7"},
|
||||
{"tag": "Value", "field_id": "Value", "type": "*variable", "value": "~8"},
|
||||
{"tag": "Blocker", "field_id": "Blocker", "type": "*variable", "value": "~9"},
|
||||
{"tag": "Weight", "field_id": "Weight", "type": "*variable", "value": "~10"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"type": "*filters", // data source type
|
||||
"file_name": "Filters.csv", // file name in the tp_in_dir
|
||||
"fields": [
|
||||
{"tag": "Tenant", "field_id": "Tenant", "type": "*composed", "value": "~0", "mandatory": true},
|
||||
{"tag": "ID", "field_id": "ID", "type": "*composed", "value": "~1", "mandatory": true},
|
||||
{"tag": "FilterType", "field_id": "FilterType", "type": "*composed", "value": "~2"},
|
||||
{"tag": "FilterFieldName", "field_id": "FilterFieldName", "type": "*composed", "value": "~3"},
|
||||
{"tag": "FilterFieldValues", "field_id": "FilterFieldValues", "type": "*composed", "value": "~4"},
|
||||
{"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*composed", "value": "~5"},
|
||||
{"tag": "Tenant", "field_id": "Tenant", "type": "*variable", "value": "~0", "mandatory": true},
|
||||
{"tag": "ID", "field_id": "ID", "type": "*variable", "value": "~1", "mandatory": true},
|
||||
{"tag": "FilterType", "field_id": "FilterType", "type": "*variable", "value": "~2"},
|
||||
{"tag": "FilterFieldName", "field_id": "FilterFieldName", "type": "*variable", "value": "~3"},
|
||||
{"tag": "FilterFieldValues", "field_id": "FilterFieldValues", "type": "*variable", "value": "~4"},
|
||||
{"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*variable", "value": "~5"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"type": "*resources", // data source type
|
||||
"file_name": "Resources.csv", // file name in the tp_in_dir
|
||||
"fields": [
|
||||
{"tag": "Tenant", "field_id": "Tenant", "type": "*composed", "value": "~0", "mandatory": true},
|
||||
{"tag": "ID", "field_id": "ID", "type": "*composed", "value": "~1", "mandatory": true},
|
||||
{"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*composed", "value": "~2"},
|
||||
{"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*composed", "value": "~3"},
|
||||
{"tag": "TTL", "field_id": "UsageTTL", "type": "*composed", "value": "~4"},
|
||||
{"tag": "Limit", "field_id": "Limit", "type": "*composed", "value": "~5"},
|
||||
{"tag": "AllocationMessage", "field_id": "AllocationMessage", "type": "*composed", "value": "~6"},
|
||||
{"tag": "Blocker", "field_id": "Blocker", "type": "*composed", "value": "~7"},
|
||||
{"tag": "Stored", "field_id": "Stored", "type": "*composed", "value": "~8"},
|
||||
{"tag": "Weight", "field_id": "Weight", "type": "*composed", "value": "~9"},
|
||||
{"tag": "ThresholdIDs", "field_id": "ThresholdIDs", "type": "*composed", "value": "~10"},
|
||||
{"tag": "Tenant", "field_id": "Tenant", "type": "*variable", "value": "~0", "mandatory": true},
|
||||
{"tag": "ID", "field_id": "ID", "type": "*variable", "value": "~1", "mandatory": true},
|
||||
{"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*variable", "value": "~2"},
|
||||
{"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*variable", "value": "~3"},
|
||||
{"tag": "TTL", "field_id": "UsageTTL", "type": "*variable", "value": "~4"},
|
||||
{"tag": "Limit", "field_id": "Limit", "type": "*variable", "value": "~5"},
|
||||
{"tag": "AllocationMessage", "field_id": "AllocationMessage", "type": "*variable", "value": "~6"},
|
||||
{"tag": "Blocker", "field_id": "Blocker", "type": "*variable", "value": "~7"},
|
||||
{"tag": "Stored", "field_id": "Stored", "type": "*variable", "value": "~8"},
|
||||
{"tag": "Weight", "field_id": "Weight", "type": "*variable", "value": "~9"},
|
||||
{"tag": "ThresholdIDs", "field_id": "ThresholdIDs", "type": "*variable", "value": "~10"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"type": "*stats", // data source type
|
||||
"file_name": "Stats.csv", // file name in the tp_in_dir
|
||||
"fields": [
|
||||
{"tag": "Tenant", "field_id": "Tenant", "type": "*composed", "value": "~0", "mandatory": true},
|
||||
{"tag": "ID", "field_id": "ID", "type": "*composed", "value": "~1", "mandatory": true},
|
||||
{"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*composed", "value": "~2"},
|
||||
{"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*composed", "value": "~3"},
|
||||
{"tag": "QueueLength", "field_id": "QueueLength", "type": "*composed", "value": "~4"},
|
||||
{"tag": "TTL", "field_id": "TTL", "type": "*composed", "value": "~5"},
|
||||
{"tag": "MinItems", "field_id": "MinItems", "type": "*composed", "value": "~6"},
|
||||
{"tag": "MetricIDs", "field_id": "MetricIDs", "type": "*composed", "value": "~7"},
|
||||
{"tag": "MetricFilterIDs", "field_id": "MetricFilterIDs", "type": "*composed", "value": "~8"},
|
||||
{"tag": "Blocker", "field_id": "Blocker", "type": "*composed", "value": "~9"},
|
||||
{"tag": "Stored", "field_id": "Stored", "type": "*composed", "value": "~10"},
|
||||
{"tag": "Weight", "field_id": "Weight", "type": "*composed", "value": "~11"},
|
||||
{"tag": "ThresholdIDs", "field_id": "ThresholdIDs", "type": "*composed", "value": "~12"},
|
||||
{"tag": "Tenant", "field_id": "Tenant", "type": "*variable", "value": "~0", "mandatory": true},
|
||||
{"tag": "ID", "field_id": "ID", "type": "*variable", "value": "~1", "mandatory": true},
|
||||
{"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*variable", "value": "~2"},
|
||||
{"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*variable", "value": "~3"},
|
||||
{"tag": "QueueLength", "field_id": "QueueLength", "type": "*variable", "value": "~4"},
|
||||
{"tag": "TTL", "field_id": "TTL", "type": "*variable", "value": "~5"},
|
||||
{"tag": "MinItems", "field_id": "MinItems", "type": "*variable", "value": "~6"},
|
||||
{"tag": "MetricIDs", "field_id": "MetricIDs", "type": "*variable", "value": "~7"},
|
||||
{"tag": "MetricFilterIDs", "field_id": "MetricFilterIDs", "type": "*variable", "value": "~8"},
|
||||
{"tag": "Blocker", "field_id": "Blocker", "type": "*variable", "value": "~9"},
|
||||
{"tag": "Stored", "field_id": "Stored", "type": "*variable", "value": "~10"},
|
||||
{"tag": "Weight", "field_id": "Weight", "type": "*variable", "value": "~11"},
|
||||
{"tag": "ThresholdIDs", "field_id": "ThresholdIDs", "type": "*variable", "value": "~12"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"type": "*thresholds", // data source type
|
||||
"file_name": "Thresholds.csv", // file name in the tp_in_dir
|
||||
"fields": [
|
||||
{"tag": "Tenant", "field_id": "Tenant", "type": "*composed", "value": "~0", "mandatory": true},
|
||||
{"tag": "ID", "field_id": "ID", "type": "*composed", "value": "~1", "mandatory": true},
|
||||
{"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*composed", "value": "~2"},
|
||||
{"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*composed", "value": "~3"},
|
||||
{"tag": "MaxHits", "field_id": "MaxHits", "type": "*composed", "value": "~4"},
|
||||
{"tag": "MinHits", "field_id": "MinHits", "type": "*composed", "value": "~5"},
|
||||
{"tag": "MinSleep", "field_id": "MinSleep", "type": "*composed", "value": "~6"},
|
||||
{"tag": "Blocker", "field_id": "Blocker", "type": "*composed", "value": "~7"},
|
||||
{"tag": "Weight", "field_id": "Weight", "type": "*composed", "value": "~8"},
|
||||
{"tag": "ActionIDs", "field_id": "ActionIDs", "type": "*composed", "value": "~9"},
|
||||
{"tag": "Async", "field_id": "Async", "type": "*composed", "value": "~10"},
|
||||
{"tag": "Tenant", "field_id": "Tenant", "type": "*variable", "value": "~0", "mandatory": true},
|
||||
{"tag": "ID", "field_id": "ID", "type": "*variable", "value": "~1", "mandatory": true},
|
||||
{"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*variable", "value": "~2"},
|
||||
{"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*variable", "value": "~3"},
|
||||
{"tag": "MaxHits", "field_id": "MaxHits", "type": "*variable", "value": "~4"},
|
||||
{"tag": "MinHits", "field_id": "MinHits", "type": "*variable", "value": "~5"},
|
||||
{"tag": "MinSleep", "field_id": "MinSleep", "type": "*variable", "value": "~6"},
|
||||
{"tag": "Blocker", "field_id": "Blocker", "type": "*variable", "value": "~7"},
|
||||
{"tag": "Weight", "field_id": "Weight", "type": "*variable", "value": "~8"},
|
||||
{"tag": "ActionIDs", "field_id": "ActionIDs", "type": "*variable", "value": "~9"},
|
||||
{"tag": "Async", "field_id": "Async", "type": "*variable", "value": "~10"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"type": "*suppliers", // data source type
|
||||
"file_name": "Suppliers.csv", // file name in the tp_in_dir
|
||||
"fields": [
|
||||
{"tag": "Tenant", "field_id": "Tenant", "type": "*composed", "value": "~0", "mandatory": true},
|
||||
{"tag": "ID", "field_id": "ID", "type": "*composed", "value": "~1", "mandatory": true},
|
||||
{"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*composed", "value": "~2"},
|
||||
{"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*composed", "value": "~3"},
|
||||
{"tag": "Sorting", "field_id": "Sorting", "type": "*composed", "value": "~4"},
|
||||
{"tag": "SortingParamameters", "field_id": "SortingParamameters", "type": "*composed", "value": "~5"},
|
||||
{"tag": "SupplierID", "field_id": "SupplierID", "type": "*composed", "value": "~6"},
|
||||
{"tag": "SupplierFilterIDs", "field_id": "SupplierFilterIDs", "type": "*composed", "value": "~7"},
|
||||
{"tag": "SupplierAccountIDs", "field_id": "SupplierAccountIDs", "type": "*composed", "value": "~8"},
|
||||
{"tag": "SupplierRatingPlanIDs", "field_id": "SupplierRatingPlanIDs", "type": "*composed", "value": "~9"},
|
||||
{"tag": "SupplierResourceIDs", "field_id": "SupplierResourceIDs", "type": "*composed", "value": "~10"},
|
||||
{"tag": "SupplierStatIDs", "field_id": "SupplierStatIDs", "type": "*composed", "value": "~11"},
|
||||
{"tag": "SupplierWeight", "field_id": "SupplierWeight", "type": "*composed", "value": "~12"},
|
||||
{"tag": "SupplierBlocker", "field_id": "SupplierBlocker", "type": "*composed", "value": "~13"},
|
||||
{"tag": "SupplierParameters", "field_id": "SupplierParameters", "type": "*composed", "value": "~14"},
|
||||
{"tag": "Weight", "field_id": "Weight", "type": "*composed", "value": "~15"},
|
||||
{"tag": "Tenant", "field_id": "Tenant", "type": "*variable", "value": "~0", "mandatory": true},
|
||||
{"tag": "ID", "field_id": "ID", "type": "*variable", "value": "~1", "mandatory": true},
|
||||
{"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*variable", "value": "~2"},
|
||||
{"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*variable", "value": "~3"},
|
||||
{"tag": "Sorting", "field_id": "Sorting", "type": "*variable", "value": "~4"},
|
||||
{"tag": "SortingParamameters", "field_id": "SortingParamameters", "type": "*variable", "value": "~5"},
|
||||
{"tag": "SupplierID", "field_id": "SupplierID", "type": "*variable", "value": "~6"},
|
||||
{"tag": "SupplierFilterIDs", "field_id": "SupplierFilterIDs", "type": "*variable", "value": "~7"},
|
||||
{"tag": "SupplierAccountIDs", "field_id": "SupplierAccountIDs", "type": "*variable", "value": "~8"},
|
||||
{"tag": "SupplierRatingPlanIDs", "field_id": "SupplierRatingPlanIDs", "type": "*variable", "value": "~9"},
|
||||
{"tag": "SupplierResourceIDs", "field_id": "SupplierResourceIDs", "type": "*variable", "value": "~10"},
|
||||
{"tag": "SupplierStatIDs", "field_id": "SupplierStatIDs", "type": "*variable", "value": "~11"},
|
||||
{"tag": "SupplierWeight", "field_id": "SupplierWeight", "type": "*variable", "value": "~12"},
|
||||
{"tag": "SupplierBlocker", "field_id": "SupplierBlocker", "type": "*variable", "value": "~13"},
|
||||
{"tag": "SupplierParameters", "field_id": "SupplierParameters", "type": "*variable", "value": "~14"},
|
||||
{"tag": "Weight", "field_id": "Weight", "type": "*variable", "value": "~15"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"type": "*chargers", // data source type
|
||||
"file_name": "Chargers.csv", // file name in the tp_in_dir
|
||||
"fields": [
|
||||
{"tag": "Tenant", "field_id": "Tenant", "type": "*composed", "value": "~0", "mandatory": true},
|
||||
{"tag": "ID", "field_id": "ID", "type": "*composed", "value": "~1", "mandatory": true},
|
||||
{"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*composed", "value": "~2"},
|
||||
{"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*composed", "value": "~3"},
|
||||
{"tag": "RunID", "field_id": "RunID", "type": "*composed", "value": "~4"},
|
||||
{"tag": "AttributeIDs", "field_id": "AttributeIDs", "type": "*composed", "value": "~5"},
|
||||
{"tag": "Weight", "field_id": "Weight", "type": "*composed", "value": "~6"},
|
||||
{"tag": "Tenant", "field_id": "Tenant", "type": "*variable", "value": "~0", "mandatory": true},
|
||||
{"tag": "ID", "field_id": "ID", "type": "*variable", "value": "~1", "mandatory": true},
|
||||
{"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*variable", "value": "~2"},
|
||||
{"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*variable", "value": "~3"},
|
||||
{"tag": "RunID", "field_id": "RunID", "type": "*variable", "value": "~4"},
|
||||
{"tag": "AttributeIDs", "field_id": "AttributeIDs", "type": "*variable", "value": "~5"},
|
||||
{"tag": "Weight", "field_id": "Weight", "type": "*variable", "value": "~6"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"type": "*dispatchers", // data source type
|
||||
"file_name": "DispatcherProfiles.csv", // file name in the tp_in_dir
|
||||
"fields": [
|
||||
{"tag": "Tenant", "field_id": "Tenant", "type": "*composed", "value": "~0", "mandatory": true},
|
||||
{"tag": "ID", "field_id": "ID", "type": "*composed", "value": "~1", "mandatory": true},
|
||||
{"tag": "Contexts", "field_id": "Contexts", "type": "*composed", "value": "~2"},
|
||||
{"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*composed", "value": "~3"},
|
||||
{"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*composed", "value": "~4"},
|
||||
{"tag": "Strategy", "field_id": "Strategy", "type": "*composed", "value": "~5"},
|
||||
{"tag": "StrategyParameters", "field_id": "StrategyParameters", "type": "*composed", "value": "~6"},
|
||||
{"tag": "ConnID", "field_id": "ConnID", "type": "*composed", "value": "~7"},
|
||||
{"tag": "ConnFilterIDs", "field_id": "ConnFilterIDs", "type": "*composed", "value": "~8"},
|
||||
{"tag": "ConnWeight", "field_id": "ConnWeight", "type": "*composed", "value": "~9"},
|
||||
{"tag": "ConnBlocker", "field_id": "ConnBlocker", "type": "*composed", "value": "~10"},
|
||||
{"tag": "ConnParameters", "field_id": "ConnParameters", "type": "*composed", "value": "~11"},
|
||||
{"tag": "Weight", "field_id": "Weight", "type": "*composed", "value": "~12"},
|
||||
{"tag": "Tenant", "field_id": "Tenant", "type": "*variable", "value": "~0", "mandatory": true},
|
||||
{"tag": "ID", "field_id": "ID", "type": "*variable", "value": "~1", "mandatory": true},
|
||||
{"tag": "Contexts", "field_id": "Contexts", "type": "*variable", "value": "~2"},
|
||||
{"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*variable", "value": "~3"},
|
||||
{"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*variable", "value": "~4"},
|
||||
{"tag": "Strategy", "field_id": "Strategy", "type": "*variable", "value": "~5"},
|
||||
{"tag": "StrategyParameters", "field_id": "StrategyParameters", "type": "*variable", "value": "~6"},
|
||||
{"tag": "ConnID", "field_id": "ConnID", "type": "*variable", "value": "~7"},
|
||||
{"tag": "ConnFilterIDs", "field_id": "ConnFilterIDs", "type": "*variable", "value": "~8"},
|
||||
{"tag": "ConnWeight", "field_id": "ConnWeight", "type": "*variable", "value": "~9"},
|
||||
{"tag": "ConnBlocker", "field_id": "ConnBlocker", "type": "*variable", "value": "~10"},
|
||||
{"tag": "ConnParameters", "field_id": "ConnParameters", "type": "*variable", "value": "~11"},
|
||||
{"tag": "Weight", "field_id": "Weight", "type": "*variable", "value": "~12"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"type": "*dispatcher_hosts", // data source type
|
||||
"file_name": "DispatcherHosts.csv", // file name in the tp_in_dir
|
||||
"fields": [
|
||||
{"tag": "Tenant", "field_id": "Tenant", "type": "*composed", "value": "~0", "mandatory": true},
|
||||
{"tag": "ID", "field_id": "ID", "type": "*composed", "value": "~1", "mandatory": true},
|
||||
{"tag": "Address", "field_id": "Address", "type": "*composed", "value": "~2"},
|
||||
{"tag": "Transport", "field_id": "Transport", "type": "*composed", "value": "~3"},
|
||||
{"tag": "TLS", "field_id": "TLS", "type": "*composed", "value": "~4"},
|
||||
{"tag": "Tenant", "field_id": "Tenant", "type": "*variable", "value": "~0", "mandatory": true},
|
||||
{"tag": "ID", "field_id": "ID", "type": "*variable", "value": "~1", "mandatory": true},
|
||||
{"tag": "Address", "field_id": "Address", "type": "*variable", "value": "~2"},
|
||||
{"tag": "Transport", "field_id": "Transport", "type": "*variable", "value": "~3"},
|
||||
{"tag": "TLS", "field_id": "TLS", "type": "*variable", "value": "~4"},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
@@ -892,49 +892,49 @@ func TestDfLoaderJsonCfg(t *testing.T) {
|
||||
Fields: &[]*FcTemplateJsonCfg{
|
||||
{Tag: utils.StringPointer("TenantID"),
|
||||
Field_id: utils.StringPointer(utils.Tenant),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~0"),
|
||||
Mandatory: utils.BoolPointer(true)},
|
||||
{Tag: utils.StringPointer("ProfileID"),
|
||||
Field_id: utils.StringPointer(utils.ID),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~1"),
|
||||
Mandatory: utils.BoolPointer(true)},
|
||||
{Tag: utils.StringPointer("Contexts"),
|
||||
Field_id: utils.StringPointer(utils.Contexts),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~2")},
|
||||
{Tag: utils.StringPointer("FilterIDs"),
|
||||
Field_id: utils.StringPointer(utils.FilterIDs),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~3")},
|
||||
{Tag: utils.StringPointer("ActivationInterval"),
|
||||
Field_id: utils.StringPointer("ActivationInterval"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~4")},
|
||||
{Tag: utils.StringPointer("AttributeFilterIDs"),
|
||||
Field_id: utils.StringPointer("AttributeFilterIDs"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~5")},
|
||||
{Tag: utils.StringPointer("FieldName"),
|
||||
Field_id: utils.StringPointer(utils.FieldName),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~6")},
|
||||
{Tag: utils.StringPointer("Type"),
|
||||
Field_id: utils.StringPointer("Type"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~7")},
|
||||
{Tag: utils.StringPointer("Value"),
|
||||
Field_id: utils.StringPointer("Value"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~8")},
|
||||
{Tag: utils.StringPointer("Blocker"),
|
||||
Field_id: utils.StringPointer("Blocker"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~9")},
|
||||
{Tag: utils.StringPointer("Weight"),
|
||||
Field_id: utils.StringPointer(utils.Weight),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~10")},
|
||||
},
|
||||
},
|
||||
@@ -944,29 +944,29 @@ func TestDfLoaderJsonCfg(t *testing.T) {
|
||||
Fields: &[]*FcTemplateJsonCfg{
|
||||
{Tag: utils.StringPointer(utils.Tenant),
|
||||
Field_id: utils.StringPointer(utils.Tenant),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~0"),
|
||||
Mandatory: utils.BoolPointer(true)},
|
||||
{Tag: utils.StringPointer(utils.ID),
|
||||
Field_id: utils.StringPointer(utils.ID),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~1"),
|
||||
Mandatory: utils.BoolPointer(true)},
|
||||
{Tag: utils.StringPointer("FilterType"),
|
||||
Field_id: utils.StringPointer("FilterType"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~2")},
|
||||
{Tag: utils.StringPointer("FilterFieldName"),
|
||||
Field_id: utils.StringPointer("FilterFieldName"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~3")},
|
||||
{Tag: utils.StringPointer("FilterFieldValues"),
|
||||
Field_id: utils.StringPointer("FilterFieldValues"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~4")},
|
||||
{Tag: utils.StringPointer("ActivationInterval"),
|
||||
Field_id: utils.StringPointer("ActivationInterval"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~5")},
|
||||
},
|
||||
},
|
||||
@@ -976,49 +976,49 @@ func TestDfLoaderJsonCfg(t *testing.T) {
|
||||
Fields: &[]*FcTemplateJsonCfg{
|
||||
{Tag: utils.StringPointer(utils.Tenant),
|
||||
Field_id: utils.StringPointer(utils.Tenant),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~0"),
|
||||
Mandatory: utils.BoolPointer(true)},
|
||||
{Tag: utils.StringPointer(utils.ID),
|
||||
Field_id: utils.StringPointer(utils.ID),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~1"),
|
||||
Mandatory: utils.BoolPointer(true)},
|
||||
{Tag: utils.StringPointer("FilterIDs"),
|
||||
Field_id: utils.StringPointer("FilterIDs"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~2")},
|
||||
{Tag: utils.StringPointer("ActivationInterval"),
|
||||
Field_id: utils.StringPointer("ActivationInterval"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~3")},
|
||||
{Tag: utils.StringPointer("TTL"),
|
||||
Field_id: utils.StringPointer("UsageTTL"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~4")},
|
||||
{Tag: utils.StringPointer("Limit"),
|
||||
Field_id: utils.StringPointer("Limit"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~5")},
|
||||
{Tag: utils.StringPointer("AllocationMessage"),
|
||||
Field_id: utils.StringPointer("AllocationMessage"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~6")},
|
||||
{Tag: utils.StringPointer("Blocker"),
|
||||
Field_id: utils.StringPointer("Blocker"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~7")},
|
||||
{Tag: utils.StringPointer("Stored"),
|
||||
Field_id: utils.StringPointer("Stored"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~8")},
|
||||
{Tag: utils.StringPointer("Weight"),
|
||||
Field_id: utils.StringPointer("Weight"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~9")},
|
||||
{Tag: utils.StringPointer("ThresholdIDs"),
|
||||
Field_id: utils.StringPointer("ThresholdIDs"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~10")},
|
||||
},
|
||||
},
|
||||
@@ -1028,58 +1028,58 @@ func TestDfLoaderJsonCfg(t *testing.T) {
|
||||
Fields: &[]*FcTemplateJsonCfg{
|
||||
{Tag: utils.StringPointer(utils.Tenant),
|
||||
Field_id: utils.StringPointer(utils.Tenant),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~0"),
|
||||
Mandatory: utils.BoolPointer(true)},
|
||||
{Tag: utils.StringPointer(utils.ID),
|
||||
Field_id: utils.StringPointer(utils.ID),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~1"),
|
||||
Mandatory: utils.BoolPointer(true)},
|
||||
{Tag: utils.StringPointer("FilterIDs"),
|
||||
Field_id: utils.StringPointer("FilterIDs"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~2")},
|
||||
{Tag: utils.StringPointer("ActivationInterval"),
|
||||
Field_id: utils.StringPointer("ActivationInterval"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~3")},
|
||||
{Tag: utils.StringPointer("QueueLength"),
|
||||
Field_id: utils.StringPointer("QueueLength"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~4")},
|
||||
{Tag: utils.StringPointer("TTL"),
|
||||
Field_id: utils.StringPointer("TTL"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~5")},
|
||||
{Tag: utils.StringPointer("MinItems"),
|
||||
Field_id: utils.StringPointer("MinItems"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~6")},
|
||||
{Tag: utils.StringPointer("MetricIDs"),
|
||||
Field_id: utils.StringPointer("MetricIDs"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~7")},
|
||||
{Tag: utils.StringPointer("MetricFilterIDs"),
|
||||
Field_id: utils.StringPointer("MetricFilterIDs"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~8")},
|
||||
{Tag: utils.StringPointer("Blocker"),
|
||||
Field_id: utils.StringPointer("Blocker"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~9")},
|
||||
{Tag: utils.StringPointer("Stored"),
|
||||
Field_id: utils.StringPointer("Stored"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~10")},
|
||||
{Tag: utils.StringPointer("Weight"),
|
||||
Field_id: utils.StringPointer("Weight"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~11")},
|
||||
|
||||
{Tag: utils.StringPointer("ThresholdIDs"),
|
||||
Field_id: utils.StringPointer("ThresholdIDs"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~12")},
|
||||
},
|
||||
},
|
||||
@@ -1089,49 +1089,49 @@ func TestDfLoaderJsonCfg(t *testing.T) {
|
||||
Fields: &[]*FcTemplateJsonCfg{
|
||||
{Tag: utils.StringPointer(utils.Tenant),
|
||||
Field_id: utils.StringPointer(utils.Tenant),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~0"),
|
||||
Mandatory: utils.BoolPointer(true)},
|
||||
{Tag: utils.StringPointer(utils.ID),
|
||||
Field_id: utils.StringPointer(utils.ID),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~1"),
|
||||
Mandatory: utils.BoolPointer(true)},
|
||||
{Tag: utils.StringPointer("FilterIDs"),
|
||||
Field_id: utils.StringPointer("FilterIDs"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~2")},
|
||||
{Tag: utils.StringPointer("ActivationInterval"),
|
||||
Field_id: utils.StringPointer("ActivationInterval"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~3")},
|
||||
{Tag: utils.StringPointer("MaxHits"),
|
||||
Field_id: utils.StringPointer("MaxHits"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~4")},
|
||||
{Tag: utils.StringPointer("MinHits"),
|
||||
Field_id: utils.StringPointer("MinHits"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~5")},
|
||||
{Tag: utils.StringPointer("MinSleep"),
|
||||
Field_id: utils.StringPointer("MinSleep"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~6")},
|
||||
{Tag: utils.StringPointer("Blocker"),
|
||||
Field_id: utils.StringPointer("Blocker"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~7")},
|
||||
{Tag: utils.StringPointer("Weight"),
|
||||
Field_id: utils.StringPointer("Weight"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~8")},
|
||||
{Tag: utils.StringPointer("ActionIDs"),
|
||||
Field_id: utils.StringPointer("ActionIDs"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~9")},
|
||||
{Tag: utils.StringPointer("Async"),
|
||||
Field_id: utils.StringPointer("Async"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~10")},
|
||||
},
|
||||
},
|
||||
@@ -1141,69 +1141,69 @@ func TestDfLoaderJsonCfg(t *testing.T) {
|
||||
Fields: &[]*FcTemplateJsonCfg{
|
||||
{Tag: utils.StringPointer(utils.Tenant),
|
||||
Field_id: utils.StringPointer(utils.Tenant),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~0"),
|
||||
Mandatory: utils.BoolPointer(true)},
|
||||
{Tag: utils.StringPointer(utils.ID),
|
||||
Field_id: utils.StringPointer(utils.ID),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~1"),
|
||||
Mandatory: utils.BoolPointer(true)},
|
||||
{Tag: utils.StringPointer("FilterIDs"),
|
||||
Field_id: utils.StringPointer("FilterIDs"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~2")},
|
||||
{Tag: utils.StringPointer("ActivationInterval"),
|
||||
Field_id: utils.StringPointer("ActivationInterval"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~3")},
|
||||
{Tag: utils.StringPointer("Sorting"),
|
||||
Field_id: utils.StringPointer("Sorting"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~4")},
|
||||
{Tag: utils.StringPointer("SortingParamameters"),
|
||||
Field_id: utils.StringPointer("SortingParamameters"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~5")},
|
||||
{Tag: utils.StringPointer("SupplierID"),
|
||||
Field_id: utils.StringPointer("SupplierID"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~6")},
|
||||
{Tag: utils.StringPointer("SupplierFilterIDs"),
|
||||
Field_id: utils.StringPointer("SupplierFilterIDs"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~7")},
|
||||
{Tag: utils.StringPointer("SupplierAccountIDs"),
|
||||
Field_id: utils.StringPointer("SupplierAccountIDs"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~8")},
|
||||
{Tag: utils.StringPointer("SupplierRatingPlanIDs"),
|
||||
Field_id: utils.StringPointer("SupplierRatingPlanIDs"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~9")},
|
||||
{Tag: utils.StringPointer("SupplierResourceIDs"),
|
||||
Field_id: utils.StringPointer("SupplierResourceIDs"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~10")},
|
||||
{Tag: utils.StringPointer("SupplierStatIDs"),
|
||||
Field_id: utils.StringPointer("SupplierStatIDs"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~11")},
|
||||
{Tag: utils.StringPointer("SupplierWeight"),
|
||||
Field_id: utils.StringPointer("SupplierWeight"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~12")},
|
||||
{Tag: utils.StringPointer("SupplierBlocker"),
|
||||
Field_id: utils.StringPointer("SupplierBlocker"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~13")},
|
||||
{Tag: utils.StringPointer("SupplierParameters"),
|
||||
Field_id: utils.StringPointer("SupplierParameters"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~14")},
|
||||
{Tag: utils.StringPointer("Weight"),
|
||||
Field_id: utils.StringPointer("Weight"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~15")},
|
||||
},
|
||||
},
|
||||
@@ -1213,33 +1213,33 @@ func TestDfLoaderJsonCfg(t *testing.T) {
|
||||
Fields: &[]*FcTemplateJsonCfg{
|
||||
{Tag: utils.StringPointer(utils.Tenant),
|
||||
Field_id: utils.StringPointer(utils.Tenant),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~0"),
|
||||
Mandatory: utils.BoolPointer(true)},
|
||||
{Tag: utils.StringPointer(utils.ID),
|
||||
Field_id: utils.StringPointer(utils.ID),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~1"),
|
||||
Mandatory: utils.BoolPointer(true)},
|
||||
{Tag: utils.StringPointer("FilterIDs"),
|
||||
Field_id: utils.StringPointer("FilterIDs"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~2")},
|
||||
{Tag: utils.StringPointer("ActivationInterval"),
|
||||
Field_id: utils.StringPointer("ActivationInterval"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~3")},
|
||||
{Tag: utils.StringPointer("RunID"),
|
||||
Field_id: utils.StringPointer("RunID"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~4")},
|
||||
{Tag: utils.StringPointer("AttributeIDs"),
|
||||
Field_id: utils.StringPointer("AttributeIDs"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~5")},
|
||||
{Tag: utils.StringPointer("Weight"),
|
||||
Field_id: utils.StringPointer("Weight"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~6")},
|
||||
},
|
||||
},
|
||||
@@ -1249,57 +1249,57 @@ func TestDfLoaderJsonCfg(t *testing.T) {
|
||||
Fields: &[]*FcTemplateJsonCfg{
|
||||
{Tag: utils.StringPointer(utils.Tenant),
|
||||
Field_id: utils.StringPointer(utils.Tenant),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~0"),
|
||||
Mandatory: utils.BoolPointer(true)},
|
||||
{Tag: utils.StringPointer(utils.ID),
|
||||
Field_id: utils.StringPointer(utils.ID),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~1"),
|
||||
Mandatory: utils.BoolPointer(true)},
|
||||
{Tag: utils.StringPointer("Contexts"),
|
||||
Field_id: utils.StringPointer("Contexts"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~2")},
|
||||
{Tag: utils.StringPointer("FilterIDs"),
|
||||
Field_id: utils.StringPointer("FilterIDs"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~3")},
|
||||
{Tag: utils.StringPointer("ActivationInterval"),
|
||||
Field_id: utils.StringPointer("ActivationInterval"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~4")},
|
||||
{Tag: utils.StringPointer("Strategy"),
|
||||
Field_id: utils.StringPointer("Strategy"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~5")},
|
||||
{Tag: utils.StringPointer("StrategyParameters"),
|
||||
Field_id: utils.StringPointer("StrategyParameters"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~6")},
|
||||
{Tag: utils.StringPointer("ConnID"),
|
||||
Field_id: utils.StringPointer("ConnID"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~7")},
|
||||
{Tag: utils.StringPointer("ConnFilterIDs"),
|
||||
Field_id: utils.StringPointer("ConnFilterIDs"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~8")},
|
||||
{Tag: utils.StringPointer("ConnWeight"),
|
||||
Field_id: utils.StringPointer("ConnWeight"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~9")},
|
||||
{Tag: utils.StringPointer("ConnBlocker"),
|
||||
Field_id: utils.StringPointer("ConnBlocker"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~10")},
|
||||
{Tag: utils.StringPointer("ConnParameters"),
|
||||
Field_id: utils.StringPointer("ConnParameters"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~11")},
|
||||
{Tag: utils.StringPointer("Weight"),
|
||||
Field_id: utils.StringPointer("Weight"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~12")},
|
||||
},
|
||||
},
|
||||
@@ -1309,25 +1309,25 @@ func TestDfLoaderJsonCfg(t *testing.T) {
|
||||
Fields: &[]*FcTemplateJsonCfg{
|
||||
{Tag: utils.StringPointer(utils.Tenant),
|
||||
Field_id: utils.StringPointer(utils.Tenant),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~0"),
|
||||
Mandatory: utils.BoolPointer(true)},
|
||||
{Tag: utils.StringPointer(utils.ID),
|
||||
Field_id: utils.StringPointer(utils.ID),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~1"),
|
||||
Mandatory: utils.BoolPointer(true)},
|
||||
{Tag: utils.StringPointer("Address"),
|
||||
Field_id: utils.StringPointer("Address"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~2")},
|
||||
{Tag: utils.StringPointer("Transport"),
|
||||
Field_id: utils.StringPointer("Transport"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~3")},
|
||||
{Tag: utils.StringPointer("TLS"),
|
||||
Field_id: utils.StringPointer("TLS"),
|
||||
Type: utils.StringPointer(utils.META_COMPOSED),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~4")},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -1056,49 +1056,49 @@ func TestCgrLoaderCfgITDefaults(t *testing.T) {
|
||||
Fields: []*FCTemplate{
|
||||
{Tag: "TenantID",
|
||||
FieldId: "Tenant",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~0", true, utils.INFIELD_SEP),
|
||||
Mandatory: true},
|
||||
{Tag: "ProfileID",
|
||||
FieldId: "ID",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~1", true, utils.INFIELD_SEP),
|
||||
Mandatory: true},
|
||||
{Tag: "Contexts",
|
||||
FieldId: "Contexts",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~2", true, utils.INFIELD_SEP)},
|
||||
{Tag: "FilterIDs",
|
||||
FieldId: "FilterIDs",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~3", true, utils.INFIELD_SEP)},
|
||||
{Tag: "ActivationInterval",
|
||||
FieldId: "ActivationInterval",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~4", true, utils.INFIELD_SEP)},
|
||||
{Tag: "AttributeFilterIDs",
|
||||
FieldId: "AttributeFilterIDs",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~5", true, utils.INFIELD_SEP)},
|
||||
{Tag: "FieldName",
|
||||
FieldId: "FieldName",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~6", true, utils.INFIELD_SEP)},
|
||||
{Tag: "Type",
|
||||
FieldId: "Type",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~7", true, utils.INFIELD_SEP)},
|
||||
{Tag: "Value",
|
||||
FieldId: "Value",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~8", true, utils.INFIELD_SEP)},
|
||||
{Tag: "Blocker",
|
||||
FieldId: "Blocker",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~9", true, utils.INFIELD_SEP)},
|
||||
{Tag: "Weight",
|
||||
FieldId: "Weight",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~10", true, utils.INFIELD_SEP)},
|
||||
},
|
||||
},
|
||||
@@ -1108,29 +1108,29 @@ func TestCgrLoaderCfgITDefaults(t *testing.T) {
|
||||
Fields: []*FCTemplate{
|
||||
{Tag: "Tenant",
|
||||
FieldId: "Tenant",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~0", true, utils.INFIELD_SEP),
|
||||
Mandatory: true},
|
||||
{Tag: "ID",
|
||||
FieldId: "ID",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~1", true, utils.INFIELD_SEP),
|
||||
Mandatory: true},
|
||||
{Tag: "FilterType",
|
||||
FieldId: "FilterType",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~2", true, utils.INFIELD_SEP)},
|
||||
{Tag: "FilterFieldName",
|
||||
FieldId: "FilterFieldName",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~3", true, utils.INFIELD_SEP)},
|
||||
{Tag: "FilterFieldValues",
|
||||
FieldId: "FilterFieldValues",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~4", true, utils.INFIELD_SEP)},
|
||||
{Tag: "ActivationInterval",
|
||||
FieldId: "ActivationInterval",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~5", true, utils.INFIELD_SEP)},
|
||||
},
|
||||
},
|
||||
@@ -1140,49 +1140,49 @@ func TestCgrLoaderCfgITDefaults(t *testing.T) {
|
||||
Fields: []*FCTemplate{
|
||||
{Tag: "Tenant",
|
||||
FieldId: "Tenant",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~0", true, utils.INFIELD_SEP),
|
||||
Mandatory: true},
|
||||
{Tag: "ID",
|
||||
FieldId: "ID",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~1", true, utils.INFIELD_SEP),
|
||||
Mandatory: true},
|
||||
{Tag: "FilterIDs",
|
||||
FieldId: "FilterIDs",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~2", true, utils.INFIELD_SEP)},
|
||||
{Tag: "ActivationInterval",
|
||||
FieldId: "ActivationInterval",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~3", true, utils.INFIELD_SEP)},
|
||||
{Tag: "TTL",
|
||||
FieldId: "UsageTTL",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~4", true, utils.INFIELD_SEP)},
|
||||
{Tag: "Limit",
|
||||
FieldId: "Limit",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~5", true, utils.INFIELD_SEP)},
|
||||
{Tag: "AllocationMessage",
|
||||
FieldId: "AllocationMessage",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~6", true, utils.INFIELD_SEP)},
|
||||
{Tag: "Blocker",
|
||||
FieldId: "Blocker",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~7", true, utils.INFIELD_SEP)},
|
||||
{Tag: "Stored",
|
||||
FieldId: "Stored",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~8", true, utils.INFIELD_SEP)},
|
||||
{Tag: "Weight",
|
||||
FieldId: "Weight",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~9", true, utils.INFIELD_SEP)},
|
||||
{Tag: "ThresholdIDs",
|
||||
FieldId: "ThresholdIDs",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~10", true, utils.INFIELD_SEP)},
|
||||
},
|
||||
},
|
||||
@@ -1192,58 +1192,58 @@ func TestCgrLoaderCfgITDefaults(t *testing.T) {
|
||||
Fields: []*FCTemplate{
|
||||
{Tag: "Tenant",
|
||||
FieldId: "Tenant",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~0", true, utils.INFIELD_SEP),
|
||||
Mandatory: true},
|
||||
{Tag: "ID",
|
||||
FieldId: "ID",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~1", true, utils.INFIELD_SEP),
|
||||
Mandatory: true},
|
||||
{Tag: "FilterIDs",
|
||||
FieldId: "FilterIDs",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~2", true, utils.INFIELD_SEP)},
|
||||
{Tag: "ActivationInterval",
|
||||
FieldId: "ActivationInterval",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~3", true, utils.INFIELD_SEP)},
|
||||
{Tag: "QueueLength",
|
||||
FieldId: "QueueLength",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~4", true, utils.INFIELD_SEP)},
|
||||
{Tag: "TTL",
|
||||
FieldId: "TTL",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~5", true, utils.INFIELD_SEP)},
|
||||
{Tag: "MinItems",
|
||||
FieldId: "MinItems",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~6", true, utils.INFIELD_SEP)},
|
||||
{Tag: "MetricIDs",
|
||||
FieldId: "MetricIDs",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~7", true, utils.INFIELD_SEP)},
|
||||
{Tag: "MetricFilterIDs",
|
||||
FieldId: "MetricFilterIDs",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~8", true, utils.INFIELD_SEP)},
|
||||
{Tag: "Blocker",
|
||||
FieldId: "Blocker",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~9", true, utils.INFIELD_SEP)},
|
||||
{Tag: "Stored",
|
||||
FieldId: "Stored",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~10", true, utils.INFIELD_SEP)},
|
||||
{Tag: "Weight",
|
||||
FieldId: "Weight",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~11", true, utils.INFIELD_SEP)},
|
||||
|
||||
{Tag: "ThresholdIDs",
|
||||
FieldId: "ThresholdIDs",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~12", true, utils.INFIELD_SEP)},
|
||||
},
|
||||
},
|
||||
@@ -1253,49 +1253,49 @@ func TestCgrLoaderCfgITDefaults(t *testing.T) {
|
||||
Fields: []*FCTemplate{
|
||||
{Tag: "Tenant",
|
||||
FieldId: "Tenant",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~0", true, utils.INFIELD_SEP),
|
||||
Mandatory: true},
|
||||
{Tag: "ID",
|
||||
FieldId: "ID",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~1", true, utils.INFIELD_SEP),
|
||||
Mandatory: true},
|
||||
{Tag: "FilterIDs",
|
||||
FieldId: "FilterIDs",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~2", true, utils.INFIELD_SEP)},
|
||||
{Tag: "ActivationInterval",
|
||||
FieldId: "ActivationInterval",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~3", true, utils.INFIELD_SEP)},
|
||||
{Tag: "MaxHits",
|
||||
FieldId: "MaxHits",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~4", true, utils.INFIELD_SEP)},
|
||||
{Tag: "MinHits",
|
||||
FieldId: "MinHits",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~5", true, utils.INFIELD_SEP)},
|
||||
{Tag: "MinSleep",
|
||||
FieldId: "MinSleep",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~6", true, utils.INFIELD_SEP)},
|
||||
{Tag: "Blocker",
|
||||
FieldId: "Blocker",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~7", true, utils.INFIELD_SEP)},
|
||||
{Tag: "Weight",
|
||||
FieldId: "Weight",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~8", true, utils.INFIELD_SEP)},
|
||||
{Tag: "ActionIDs",
|
||||
FieldId: "ActionIDs",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~9", true, utils.INFIELD_SEP)},
|
||||
{Tag: "Async",
|
||||
FieldId: "Async",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~10", true, utils.INFIELD_SEP)},
|
||||
},
|
||||
},
|
||||
@@ -1305,69 +1305,69 @@ func TestCgrLoaderCfgITDefaults(t *testing.T) {
|
||||
Fields: []*FCTemplate{
|
||||
{Tag: "Tenant",
|
||||
FieldId: "Tenant",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~0", true, utils.INFIELD_SEP),
|
||||
Mandatory: true},
|
||||
{Tag: "ID",
|
||||
FieldId: "ID",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~1", true, utils.INFIELD_SEP),
|
||||
Mandatory: true},
|
||||
{Tag: "FilterIDs",
|
||||
FieldId: "FilterIDs",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~2", true, utils.INFIELD_SEP)},
|
||||
{Tag: "ActivationInterval",
|
||||
FieldId: "ActivationInterval",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~3", true, utils.INFIELD_SEP)},
|
||||
{Tag: "Sorting",
|
||||
FieldId: "Sorting",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~4", true, utils.INFIELD_SEP)},
|
||||
{Tag: "SortingParamameters",
|
||||
FieldId: "SortingParamameters",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~5", true, utils.INFIELD_SEP)},
|
||||
{Tag: "SupplierID",
|
||||
FieldId: "SupplierID",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~6", true, utils.INFIELD_SEP)},
|
||||
{Tag: "SupplierFilterIDs",
|
||||
FieldId: "SupplierFilterIDs",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~7", true, utils.INFIELD_SEP)},
|
||||
{Tag: "SupplierAccountIDs",
|
||||
FieldId: "SupplierAccountIDs",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~8", true, utils.INFIELD_SEP)},
|
||||
{Tag: "SupplierRatingPlanIDs",
|
||||
FieldId: "SupplierRatingPlanIDs",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~9", true, utils.INFIELD_SEP)},
|
||||
{Tag: "SupplierResourceIDs",
|
||||
FieldId: "SupplierResourceIDs",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~10", true, utils.INFIELD_SEP)},
|
||||
{Tag: "SupplierStatIDs",
|
||||
FieldId: "SupplierStatIDs",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~11", true, utils.INFIELD_SEP)},
|
||||
{Tag: "SupplierWeight",
|
||||
FieldId: "SupplierWeight",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~12", true, utils.INFIELD_SEP)},
|
||||
{Tag: "SupplierBlocker",
|
||||
FieldId: "SupplierBlocker",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~13", true, utils.INFIELD_SEP)},
|
||||
{Tag: "SupplierParameters",
|
||||
FieldId: "SupplierParameters",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~14", true, utils.INFIELD_SEP)},
|
||||
{Tag: "Weight",
|
||||
FieldId: "Weight",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~15", true, utils.INFIELD_SEP)},
|
||||
},
|
||||
},
|
||||
@@ -1377,33 +1377,33 @@ func TestCgrLoaderCfgITDefaults(t *testing.T) {
|
||||
Fields: []*FCTemplate{
|
||||
{Tag: "Tenant",
|
||||
FieldId: "Tenant",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~0", true, utils.INFIELD_SEP),
|
||||
Mandatory: true},
|
||||
{Tag: "ID",
|
||||
FieldId: "ID",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~1", true, utils.INFIELD_SEP),
|
||||
Mandatory: true},
|
||||
{Tag: "FilterIDs",
|
||||
FieldId: "FilterIDs",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~2", true, utils.INFIELD_SEP)},
|
||||
{Tag: "ActivationInterval",
|
||||
FieldId: "ActivationInterval",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~3", true, utils.INFIELD_SEP)},
|
||||
{Tag: "RunID",
|
||||
FieldId: "RunID",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~4", true, utils.INFIELD_SEP)},
|
||||
{Tag: "AttributeIDs",
|
||||
FieldId: "AttributeIDs",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~5", true, utils.INFIELD_SEP)},
|
||||
{Tag: "Weight",
|
||||
FieldId: "Weight",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~6", true, utils.INFIELD_SEP)},
|
||||
},
|
||||
},
|
||||
@@ -1413,67 +1413,67 @@ func TestCgrLoaderCfgITDefaults(t *testing.T) {
|
||||
Fields: []*FCTemplate{
|
||||
{Tag: "Tenant",
|
||||
FieldId: "Tenant",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~0", true, utils.INFIELD_SEP),
|
||||
Mandatory: true},
|
||||
{Tag: "ID",
|
||||
FieldId: "ID",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~1", true, utils.INFIELD_SEP),
|
||||
Mandatory: true},
|
||||
{Tag: "Contexts",
|
||||
FieldId: "Contexts",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~2", true, utils.INFIELD_SEP),
|
||||
},
|
||||
{Tag: "FilterIDs",
|
||||
FieldId: "FilterIDs",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~3", true, utils.INFIELD_SEP),
|
||||
},
|
||||
{Tag: "ActivationInterval",
|
||||
FieldId: "ActivationInterval",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~4", true, utils.INFIELD_SEP),
|
||||
},
|
||||
{Tag: "Strategy",
|
||||
FieldId: "Strategy",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~5", true, utils.INFIELD_SEP),
|
||||
},
|
||||
{Tag: "StrategyParameters",
|
||||
FieldId: "StrategyParameters",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~6", true, utils.INFIELD_SEP),
|
||||
},
|
||||
{Tag: "ConnID",
|
||||
FieldId: "ConnID",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~7", true, utils.INFIELD_SEP),
|
||||
},
|
||||
{Tag: "ConnFilterIDs",
|
||||
FieldId: "ConnFilterIDs",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~8", true, utils.INFIELD_SEP),
|
||||
},
|
||||
{Tag: "ConnWeight",
|
||||
FieldId: "ConnWeight",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~9", true, utils.INFIELD_SEP),
|
||||
},
|
||||
{Tag: "ConnBlocker",
|
||||
FieldId: "ConnBlocker",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~10", true, utils.INFIELD_SEP),
|
||||
},
|
||||
{Tag: "ConnParameters",
|
||||
FieldId: "ConnParameters",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~11", true, utils.INFIELD_SEP),
|
||||
},
|
||||
{Tag: "Weight",
|
||||
FieldId: "Weight",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~12", true, utils.INFIELD_SEP),
|
||||
},
|
||||
},
|
||||
@@ -1484,27 +1484,27 @@ func TestCgrLoaderCfgITDefaults(t *testing.T) {
|
||||
Fields: []*FCTemplate{
|
||||
{Tag: "Tenant",
|
||||
FieldId: "Tenant",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~0", true, utils.INFIELD_SEP),
|
||||
Mandatory: true},
|
||||
{Tag: "ID",
|
||||
FieldId: "ID",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~1", true, utils.INFIELD_SEP),
|
||||
Mandatory: true},
|
||||
{Tag: "Address",
|
||||
FieldId: "Address",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~2", true, utils.INFIELD_SEP),
|
||||
},
|
||||
{Tag: "Transport",
|
||||
FieldId: "Transport",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~3", true, utils.INFIELD_SEP),
|
||||
},
|
||||
{Tag: "TLS",
|
||||
FieldId: "TLS",
|
||||
Type: utils.META_COMPOSED,
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~4", true, utils.INFIELD_SEP),
|
||||
},
|
||||
},
|
||||
|
||||
@@ -191,6 +191,7 @@
|
||||
// "synchronous": false, // block processing until export has a result
|
||||
// "attempts": 1, // export attempts
|
||||
// "field_separator": ",", // used field separator in some export formats, eg: *file_csv
|
||||
// "attributes_context": "", // attributes context - empty disables attributes processing
|
||||
// "header_fields": [], // template of the exported header fields
|
||||
// "content_fields": [ // template of the exported content fields
|
||||
// {"tag": "CGRID", "type": "*composed", "value": "~CGRID"},
|
||||
@@ -294,6 +295,7 @@
|
||||
// "session_indexes": [], // index sessions based on these fields for GetActiveSessions API
|
||||
// "client_protocol": 1.0, // version of protocol to use when acting as JSON-PRC client <"0","1.0">
|
||||
// "channel_sync_interval": "0", // sync channels to detect stale sessions (0 to disable)
|
||||
// "terminate_attempts": 5 // attempts to get the session before terminating it
|
||||
// },
|
||||
|
||||
|
||||
@@ -522,145 +524,147 @@
|
||||
// "type": "*attributes", // data source type
|
||||
// "file_name": "Attributes.csv", // file name in the tp_in_dir
|
||||
// "fields": [
|
||||
// {"tag": "TenantID", "field_id": "Tenant", "type": "*composed", "value": "~0", "mandatory": true},
|
||||
// {"tag": "ProfileID", "field_id": "ID", "type": "*composed", "value": "~1", "mandatory": true},
|
||||
// {"tag": "Contexts", "field_id": "Contexts", "type": "*composed", "value": "~2"},
|
||||
// {"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*composed", "value": "~3"},
|
||||
// {"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*composed", "value": "~4"},
|
||||
// {"tag": "AttributeFilterIDs", "field_id": "AttributeFilterIDs", "type": "*composed", "value": "~5"},
|
||||
// {"tag": "FieldName", "field_id": "FieldName", "type": "*composed", "value": "~6"},
|
||||
// {"tag": "Type", "field_id": "Type", "type": "*composed", "value": "~7"},
|
||||
// {"tag": "Value", "field_id": "Value", "type": "*composed", "value": "~8"},
|
||||
// {"tag": "Weight", "field_id": "Weight", "type": "*composed", "value": "~9"},
|
||||
// {"tag": "TenantID", "field_id": "Tenant", "type": "*variable", "value": "~0", "mandatory": true},
|
||||
// {"tag": "ProfileID", "field_id": "ID", "type": "*variable", "value": "~1", "mandatory": true},
|
||||
// {"tag": "Contexts", "field_id": "Contexts", "type": "*variable", "value": "~2"},
|
||||
// {"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*variable", "value": "~3"},
|
||||
// {"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*variable", "value": "~4"},
|
||||
// {"tag": "AttributeFilterIDs", "field_id": "AttributeFilterIDs", "type": "*variable", "value": "~5"},
|
||||
// {"tag": "FieldName", "field_id": "FieldName", "type": "*variable", "value": "~6"},
|
||||
// {"tag": "Type", "field_id": "Type", "type": "*variable", "value": "~7"},
|
||||
// {"tag": "Value", "field_id": "Value", "type": "*variable", "value": "~8"},
|
||||
// {"tag": "Blocker", "field_id": "Blocker", "type": "*variable", "value": "~9"},
|
||||
// {"tag": "Weight", "field_id": "Weight", "type": "*variable", "value": "~10"},
|
||||
// ],
|
||||
// },
|
||||
// {
|
||||
// "type": "*filters", // data source type
|
||||
// "file_name": "Filters.csv", // file name in the tp_in_dir
|
||||
// "fields": [
|
||||
// {"tag": "Tenant", "field_id": "Tenant", "type": "*composed", "value": "~0", "mandatory": true},
|
||||
// {"tag": "ID", "field_id": "ID", "type": "*composed", "value": "~1", "mandatory": true},
|
||||
// {"tag": "FilterType", "field_id": "FilterType", "type": "*composed", "value": "~2"},
|
||||
// {"tag": "FilterFieldName", "field_id": "FilterFieldName", "type": "*composed", "value": "~3"},
|
||||
// {"tag": "FilterFieldValues", "field_id": "FilterFieldValues", "type": "*composed", "value": "~4"},
|
||||
// {"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*composed", "value": "~5"},
|
||||
// {"tag": "Tenant", "field_id": "Tenant", "type": "*variable", "value": "~0", "mandatory": true},
|
||||
// {"tag": "ID", "field_id": "ID", "type": "*variable", "value": "~1", "mandatory": true},
|
||||
// {"tag": "FilterType", "field_id": "FilterType", "type": "*variable", "value": "~2"},
|
||||
// {"tag": "FilterFieldName", "field_id": "FilterFieldName", "type": "*variable", "value": "~3"},
|
||||
// {"tag": "FilterFieldValues", "field_id": "FilterFieldValues", "type": "*variable", "value": "~4"},
|
||||
// {"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*variable", "value": "~5"},
|
||||
// ],
|
||||
// },
|
||||
// {
|
||||
// "type": "*resources", // data source type
|
||||
// "file_name": "Resources.csv", // file name in the tp_in_dir
|
||||
// "fields": [
|
||||
// {"tag": "Tenant", "field_id": "Tenant", "type": "*composed", "value": "~0", "mandatory": true},
|
||||
// {"tag": "ID", "field_id": "ID", "type": "*composed", "value": "~1", "mandatory": true},
|
||||
// {"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*composed", "value": "~2"},
|
||||
// {"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*composed", "value": "~3"},
|
||||
// {"tag": "TTL", "field_id": "UsageTTL", "type": "*composed", "value": "~4"},
|
||||
// {"tag": "Limit", "field_id": "Limit", "type": "*composed", "value": "~5"},
|
||||
// {"tag": "AllocationMessage", "field_id": "AllocationMessage", "type": "*composed", "value": "~6"},
|
||||
// {"tag": "Blocker", "field_id": "Blocker", "type": "*composed", "value": "~7"},
|
||||
// {"tag": "Stored", "field_id": "Stored", "type": "*composed", "value": "~8"},
|
||||
// {"tag": "Weight", "field_id": "Weight", "type": "*composed", "value": "~9"},
|
||||
// {"tag": "ThresholdIDs", "field_id": "ThresholdIDs", "type": "*composed", "value": "~10"},
|
||||
// {"tag": "Tenant", "field_id": "Tenant", "type": "*variable", "value": "~0", "mandatory": true},
|
||||
// {"tag": "ID", "field_id": "ID", "type": "*variable", "value": "~1", "mandatory": true},
|
||||
// {"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*variable", "value": "~2"},
|
||||
// {"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*variable", "value": "~3"},
|
||||
// {"tag": "TTL", "field_id": "UsageTTL", "type": "*variable", "value": "~4"},
|
||||
// {"tag": "Limit", "field_id": "Limit", "type": "*variable", "value": "~5"},
|
||||
// {"tag": "AllocationMessage", "field_id": "AllocationMessage", "type": "*variable", "value": "~6"},
|
||||
// {"tag": "Blocker", "field_id": "Blocker", "type": "*variable", "value": "~7"},
|
||||
// {"tag": "Stored", "field_id": "Stored", "type": "*variable", "value": "~8"},
|
||||
// {"tag": "Weight", "field_id": "Weight", "type": "*variable", "value": "~9"},
|
||||
// {"tag": "ThresholdIDs", "field_id": "ThresholdIDs", "type": "*variable", "value": "~10"},
|
||||
// ],
|
||||
// },
|
||||
// {
|
||||
// "type": "*stats", // data source type
|
||||
// "file_name": "Stats.csv", // file name in the tp_in_dir
|
||||
// "fields": [
|
||||
// {"tag": "Tenant", "field_id": "Tenant", "type": "*composed", "value": "~0", "mandatory": true},
|
||||
// {"tag": "ID", "field_id": "ID", "type": "*composed", "value": "~1", "mandatory": true},
|
||||
// {"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*composed", "value": "~2"},
|
||||
// {"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*composed", "value": "~3"},
|
||||
// {"tag": "QueueLength", "field_id": "QueueLength", "type": "*composed", "value": "~4"},
|
||||
// {"tag": "TTL", "field_id": "TTL", "type": "*composed", "value": "~5"},
|
||||
// {"tag": "Metrics", "field_id": "Metrics", "type": "*composed", "value": "~6"},
|
||||
// {"tag": "Blocker", "field_id": "Blocker", "type": "*composed", "value": "~7"},
|
||||
// {"tag": "Stored", "field_id": "Stored", "type": "*composed", "value": "~8"},
|
||||
// {"tag": "Weight", "field_id": "Weight", "type": "*composed", "value": "~9"},
|
||||
// {"tag": "MinItems", "field_id": "MinItems", "type": "*composed", "value": "~10"},
|
||||
// {"tag": "ThresholdIDs", "field_id": "ThresholdIDs", "type": "*composed", "value": "~11"},
|
||||
// {"tag": "Tenant", "field_id": "Tenant", "type": "*variable", "value": "~0", "mandatory": true},
|
||||
// {"tag": "ID", "field_id": "ID", "type": "*variable", "value": "~1", "mandatory": true},
|
||||
// {"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*variable", "value": "~2"},
|
||||
// {"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*variable", "value": "~3"},
|
||||
// {"tag": "QueueLength", "field_id": "QueueLength", "type": "*variable", "value": "~4"},
|
||||
// {"tag": "TTL", "field_id": "TTL", "type": "*variable", "value": "~5"},
|
||||
// {"tag": "MinItems", "field_id": "MinItems", "type": "*variable", "value": "~6"},
|
||||
// {"tag": "MetricIDs", "field_id": "MetricIDs", "type": "*variable", "value": "~7"},
|
||||
// {"tag": "MetricFilterIDs", "field_id": "MetricFilterIDs", "type": "*variable", "value": "~8"},
|
||||
// {"tag": "Blocker", "field_id": "Blocker", "type": "*variable", "value": "~9"},
|
||||
// {"tag": "Stored", "field_id": "Stored", "type": "*variable", "value": "~10"},
|
||||
// {"tag": "Weight", "field_id": "Weight", "type": "*variable", "value": "~11"},
|
||||
// {"tag": "ThresholdIDs", "field_id": "ThresholdIDs", "type": "*variable", "value": "~12"},
|
||||
// ],
|
||||
// },
|
||||
// {
|
||||
// "type": "*thresholds", // data source type
|
||||
// "file_name": "Thresholds.csv", // file name in the tp_in_dir
|
||||
// "fields": [
|
||||
// {"tag": "Tenant", "field_id": "Tenant", "type": "*composed", "value": "~0", "mandatory": true},
|
||||
// {"tag": "ID", "field_id": "ID", "type": "*composed", "value": "~1", "mandatory": true},
|
||||
// {"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*composed", "value": "~2"},
|
||||
// {"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*composed", "value": "~3"},
|
||||
// {"tag": "MaxHits", "field_id": "MaxHits", "type": "*composed", "value": "~4"},
|
||||
// {"tag": "MinHits", "field_id": "MinHits", "type": "*composed", "value": "~5"},
|
||||
// {"tag": "MinSleep", "field_id": "MinSleep", "type": "*composed", "value": "~6"},
|
||||
// {"tag": "Blocker", "field_id": "Blocker", "type": "*composed", "value": "~7"},
|
||||
// {"tag": "Weight", "field_id": "Weight", "type": "*composed", "value": "~8"},
|
||||
// {"tag": "ActionIDs", "field_id": "ActionIDs", "type": "*composed", "value": "~9"},
|
||||
// {"tag": "Async", "field_id": "Async", "type": "*composed", "value": "~10"},
|
||||
// {"tag": "Tenant", "field_id": "Tenant", "type": "*variable", "value": "~0", "mandatory": true},
|
||||
// {"tag": "ID", "field_id": "ID", "type": "*variable", "value": "~1", "mandatory": true},
|
||||
// {"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*variable", "value": "~2"},
|
||||
// {"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*variable", "value": "~3"},
|
||||
// {"tag": "MaxHits", "field_id": "MaxHits", "type": "*variable", "value": "~4"},
|
||||
// {"tag": "MinHits", "field_id": "MinHits", "type": "*variable", "value": "~5"},
|
||||
// {"tag": "MinSleep", "field_id": "MinSleep", "type": "*variable", "value": "~6"},
|
||||
// {"tag": "Blocker", "field_id": "Blocker", "type": "*variable", "value": "~7"},
|
||||
// {"tag": "Weight", "field_id": "Weight", "type": "*variable", "value": "~8"},
|
||||
// {"tag": "ActionIDs", "field_id": "ActionIDs", "type": "*variable", "value": "~9"},
|
||||
// {"tag": "Async", "field_id": "Async", "type": "*variable", "value": "~10"},
|
||||
// ],
|
||||
// },
|
||||
// {
|
||||
// "type": "*suppliers", // data source type
|
||||
// "file_name": "Suppliers.csv", // file name in the tp_in_dir
|
||||
// "fields": [
|
||||
// {"tag": "Tenant", "field_id": "Tenant", "type": "*composed", "value": "~0", "mandatory": true},
|
||||
// {"tag": "ID", "field_id": "ID", "type": "*composed", "value": "~1", "mandatory": true},
|
||||
// {"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*composed", "value": "~2"},
|
||||
// {"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*composed", "value": "~3"},
|
||||
// {"tag": "Sorting", "field_id": "Sorting", "type": "*composed", "value": "~4"},
|
||||
// {"tag": "SortingParamameters", "field_id": "SortingParamameters", "type": "*composed", "value": "~5"},
|
||||
// {"tag": "SupplierID", "field_id": "SupplierID", "type": "*composed", "value": "~6"},
|
||||
// {"tag": "SupplierFilterIDs", "field_id": "SupplierFilterIDs", "type": "*composed", "value": "~7"},
|
||||
// {"tag": "SupplierAccountIDs", "field_id": "SupplierAccountIDs", "type": "*composed", "value": "~8"},
|
||||
// {"tag": "SupplierRatingPlanIDs", "field_id": "SupplierRatingPlanIDs", "type": "*composed", "value": "~9"},
|
||||
// {"tag": "SupplierResourceIDs", "field_id": "SupplierResourceIDs", "type": "*composed", "value": "~10"},
|
||||
// {"tag": "SupplierStatIDs", "field_id": "SupplierStatIDs", "type": "*composed", "value": "~11"},
|
||||
// {"tag": "SupplierWeight", "field_id": "SupplierWeight", "type": "*composed", "value": "~12"},
|
||||
// {"tag": "SupplierBlocker", "field_id": "SupplierBlocker", "type": "*composed", "value": "~13"},
|
||||
// {"tag": "SupplierParameters", "field_id": "SupplierParameters", "type": "*composed", "value": "~14"},
|
||||
// {"tag": "Weight", "field_id": "Weight", "type": "*composed", "value": "~15"},
|
||||
// {"tag": "Tenant", "field_id": "Tenant", "type": "*variable", "value": "~0", "mandatory": true},
|
||||
// {"tag": "ID", "field_id": "ID", "type": "*variable", "value": "~1", "mandatory": true},
|
||||
// {"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*variable", "value": "~2"},
|
||||
// {"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*variable", "value": "~3"},
|
||||
// {"tag": "Sorting", "field_id": "Sorting", "type": "*variable", "value": "~4"},
|
||||
// {"tag": "SortingParamameters", "field_id": "SortingParamameters", "type": "*variable", "value": "~5"},
|
||||
// {"tag": "SupplierID", "field_id": "SupplierID", "type": "*variable", "value": "~6"},
|
||||
// {"tag": "SupplierFilterIDs", "field_id": "SupplierFilterIDs", "type": "*variable", "value": "~7"},
|
||||
// {"tag": "SupplierAccountIDs", "field_id": "SupplierAccountIDs", "type": "*variable", "value": "~8"},
|
||||
// {"tag": "SupplierRatingPlanIDs", "field_id": "SupplierRatingPlanIDs", "type": "*variable", "value": "~9"},
|
||||
// {"tag": "SupplierResourceIDs", "field_id": "SupplierResourceIDs", "type": "*variable", "value": "~10"},
|
||||
// {"tag": "SupplierStatIDs", "field_id": "SupplierStatIDs", "type": "*variable", "value": "~11"},
|
||||
// {"tag": "SupplierWeight", "field_id": "SupplierWeight", "type": "*variable", "value": "~12"},
|
||||
// {"tag": "SupplierBlocker", "field_id": "SupplierBlocker", "type": "*variable", "value": "~13"},
|
||||
// {"tag": "SupplierParameters", "field_id": "SupplierParameters", "type": "*variable", "value": "~14"},
|
||||
// {"tag": "Weight", "field_id": "Weight", "type": "*variable", "value": "~15"},
|
||||
// ],
|
||||
// },
|
||||
// {
|
||||
// "type": "*chargers", // data source type
|
||||
// "file_name": "Chargers.csv", // file name in the tp_in_dir
|
||||
// "fields": [
|
||||
// {"tag": "Tenant", "field_id": "Tenant", "type": "*composed", "value": "~0", "mandatory": true},
|
||||
// {"tag": "ID", "field_id": "ID", "type": "*composed", "value": "~1", "mandatory": true},
|
||||
// {"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*composed", "value": "~2"},
|
||||
// {"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*composed", "value": "~3"},
|
||||
// {"tag": "RunID", "field_id": "RunID", "type": "*composed", "value": "~4"},
|
||||
// {"tag": "AttributeIDs", "field_id": "AttributeIDs", "type": "*composed", "value": "~5"},
|
||||
// {"tag": "Weight", "field_id": "Weight", "type": "*composed", "value": "~6"},
|
||||
// {"tag": "Tenant", "field_id": "Tenant", "type": "*variable", "value": "~0", "mandatory": true},
|
||||
// {"tag": "ID", "field_id": "ID", "type": "*variable", "value": "~1", "mandatory": true},
|
||||
// {"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*variable", "value": "~2"},
|
||||
// {"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*variable", "value": "~3"},
|
||||
// {"tag": "RunID", "field_id": "RunID", "type": "*variable", "value": "~4"},
|
||||
// {"tag": "AttributeIDs", "field_id": "AttributeIDs", "type": "*variable", "value": "~5"},
|
||||
// {"tag": "Weight", "field_id": "Weight", "type": "*variable", "value": "~6"},
|
||||
// ],
|
||||
// },
|
||||
// {
|
||||
// "type": "*dispatchers", // data source type
|
||||
// "file_name": "DispatcherProfiles.csv", // file name in the tp_in_dir
|
||||
// "fields": [
|
||||
// {"tag": "Tenant", "field_id": "Tenant", "type": "*composed", "value": "~0", "mandatory": true},
|
||||
// {"tag": "ID", "field_id": "ID", "type": "*composed", "value": "~1", "mandatory": true},
|
||||
// {"tag": "Contexts", "field_id": "Contexts", "type": "*composed", "value": "~2"},
|
||||
// {"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*composed", "value": "~3"},
|
||||
// {"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*composed", "value": "~4"},
|
||||
// {"tag": "Strategy", "field_id": "Strategy", "type": "*composed", "value": "~5"},
|
||||
// {"tag": "StrategyParameters", "field_id": "StrategyParameters", "type": "*composed", "value": "~6"},
|
||||
// {"tag": "ConnID", "field_id": "ConnID", "type": "*composed", "value": "~7"},
|
||||
// {"tag": "ConnFilterIDs", "field_id": "ConnFilterIDs", "type": "*composed", "value": "~8"},
|
||||
// {"tag": "ConnWeight", "field_id": "ConnWeight", "type": "*composed", "value": "~9"},
|
||||
// {"tag": "ConnBlocker", "field_id": "ConnBlocker", "type": "*composed", "value": "~10"},
|
||||
// {"tag": "ConnParameters", "field_id": "ConnParameters", "type": "*composed", "value": "~11"},
|
||||
// {"tag": "Weight", "field_id": "Weight", "type": "*composed", "value": "~12"},
|
||||
// {"tag": "Tenant", "field_id": "Tenant", "type": "*variable", "value": "~0", "mandatory": true},
|
||||
// {"tag": "ID", "field_id": "ID", "type": "*variable", "value": "~1", "mandatory": true},
|
||||
// {"tag": "Contexts", "field_id": "Contexts", "type": "*variable", "value": "~2"},
|
||||
// {"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*variable", "value": "~3"},
|
||||
// {"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*variable", "value": "~4"},
|
||||
// {"tag": "Strategy", "field_id": "Strategy", "type": "*variable", "value": "~5"},
|
||||
// {"tag": "StrategyParameters", "field_id": "StrategyParameters", "type": "*variable", "value": "~6"},
|
||||
// {"tag": "ConnID", "field_id": "ConnID", "type": "*variable", "value": "~7"},
|
||||
// {"tag": "ConnFilterIDs", "field_id": "ConnFilterIDs", "type": "*variable", "value": "~8"},
|
||||
// {"tag": "ConnWeight", "field_id": "ConnWeight", "type": "*variable", "value": "~9"},
|
||||
// {"tag": "ConnBlocker", "field_id": "ConnBlocker", "type": "*variable", "value": "~10"},
|
||||
// {"tag": "ConnParameters", "field_id": "ConnParameters", "type": "*variable", "value": "~11"},
|
||||
// {"tag": "Weight", "field_id": "Weight", "type": "*variable", "value": "~12"},
|
||||
// ],
|
||||
// },
|
||||
// {
|
||||
// "type": "*dispatcher_hosts", // data source type
|
||||
// "file_name": "DispatcherHosts.csv", // file name in the tp_in_dir
|
||||
// "fields": [
|
||||
// {"tag": "Tenant", "field_id": "Tenant", "type": "*composed", "value": "~0", "mandatory": true},
|
||||
// {"tag": "ID", "field_id": "ID", "type": "*composed", "value": "~1", "mandatory": true},
|
||||
// {"tag": "Address", "field_id": "Address", "type": "*composed", "value": "~2"},
|
||||
// {"tag": "Transport", "field_id": "Transport", "type": "*composed", "value": "~3"},
|
||||
// {"tag": "TLS", "field_id": "TLS", "type": "*composed", "value": "~4"},
|
||||
// {"tag": "Tenant", "field_id": "Tenant", "type": "*variable", "value": "~0", "mandatory": true},
|
||||
// {"tag": "ID", "field_id": "ID", "type": "*variable", "value": "~1", "mandatory": true},
|
||||
// {"tag": "Address", "field_id": "Address", "type": "*variable", "value": "~2"},
|
||||
// {"tag": "Transport", "field_id": "Transport", "type": "*variable", "value": "~3"},
|
||||
// {"tag": "TLS", "field_id": "TLS", "type": "*variable", "value": "~4"},
|
||||
// ],
|
||||
// },
|
||||
// ],
|
||||
@@ -759,6 +763,7 @@
|
||||
// "scheduler_conns": [ // connections to SchedulerS for reloads
|
||||
// {"address": "*internal"}
|
||||
// ],
|
||||
// "attributes_conns": [], // connections to AttributeS for CDRExporter
|
||||
// },
|
||||
|
||||
}
|
||||
|
||||
@@ -136,17 +136,17 @@
|
||||
"type": "*attributes", // data source type
|
||||
"file_name": "Attributes.csv", // file name in the tp_in_dir
|
||||
"fields": [
|
||||
{"tag": "TenantID", "field_id": "Tenant", "type": "*composed", "value": "~0", "mandatory": true},
|
||||
{"tag": "ProfileID", "field_id": "ID", "type": "*composed", "value": "~1", "mandatory": true},
|
||||
{"tag": "Contexts", "field_id": "Contexts", "type": "*composed", "value": "~2"},
|
||||
{"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*composed", "value": "~3"},
|
||||
{"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*composed", "value": "~4"},
|
||||
{"tag": "AttributeFilterIDs", "field_id": "AttributeFilterIDs", "type": "*composed", "value": "~5"},
|
||||
{"tag": "FieldName", "field_id": "FieldName", "type": "*composed", "value": "~6"},
|
||||
{"tag": "Type", "field_id": "Type", "type": "*composed", "value": "~7"},
|
||||
{"tag": "Value", "field_id": "Value", "type": "*composed", "value": "~8"},
|
||||
{"tag": "Blocker", "field_id": "Blocker", "type": "*composed", "value": "~9"},
|
||||
{"tag": "Weight", "field_id": "Weight", "type": "*composed", "value": "~10"},
|
||||
{"tag": "TenantID", "field_id": "Tenant", "type": "*variable", "value": "~0", "mandatory": true},
|
||||
{"tag": "ProfileID", "field_id": "ID", "type": "*variable", "value": "~1", "mandatory": true},
|
||||
{"tag": "Contexts", "field_id": "Contexts", "type": "*variable", "value": "~2"},
|
||||
{"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*variable", "value": "~3"},
|
||||
{"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*variable", "value": "~4"},
|
||||
{"tag": "AttributeFilterIDs", "field_id": "AttributeFilterIDs", "type": "*variable", "value": "~5"},
|
||||
{"tag": "FieldName", "field_id": "FieldName", "type": "*variable", "value": "~6"},
|
||||
{"tag": "Type", "field_id": "Type", "type": "*variable", "value": "~7"},
|
||||
{"tag": "Value", "field_id": "Value", "type": "*variable", "value": "~8"},
|
||||
{"tag": "Blocker", "field_id": "Blocker", "type": "*variable", "value": "~9"},
|
||||
{"tag": "Weight", "field_id": "Weight", "type": "*variable", "value": "~10"},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
@@ -87,17 +87,17 @@
|
||||
"type": "*attributes", // data source type
|
||||
"file_name": "Attributes.csv", // file name in the tp_in_dir
|
||||
"fields": [
|
||||
{"tag": "TenantID", "field_id": "Tenant", "type": "*composed", "value": "~0", "mandatory": true},
|
||||
{"tag": "ProfileID", "field_id": "ID", "type": "*composed", "value": "~1", "mandatory": true},
|
||||
{"tag": "Contexts", "field_id": "Contexts", "type": "*composed", "value": "~2"},
|
||||
{"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*composed", "value": "~3"},
|
||||
{"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*composed", "value": "~4"},
|
||||
{"tag": "AttributeFilterIDs", "field_id": "AttributeFilterIDs", "type": "*composed", "value": "~5"},
|
||||
{"tag": "FieldName", "field_id": "FieldName", "type": "*composed", "value": "~6"},
|
||||
{"tag": "Type", "field_id": "Type", "type": "*composed", "value": "~7"},
|
||||
{"tag": "Value", "field_id": "Value", "type": "*composed", "value": "~8"},
|
||||
{"tag": "Blocker", "field_id": "Blocker", "type": "*composed", "value": "~9"},
|
||||
{"tag": "Weight", "field_id": "Weight", "type": "*composed", "value": "~10"},
|
||||
{"tag": "TenantID", "field_id": "Tenant", "type": "*variable", "value": "~0", "mandatory": true},
|
||||
{"tag": "ProfileID", "field_id": "ID", "type": "*variable", "value": "~1", "mandatory": true},
|
||||
{"tag": "Contexts", "field_id": "Contexts", "type": "*variable", "value": "~2"},
|
||||
{"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*variable", "value": "~3"},
|
||||
{"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*variable", "value": "~4"},
|
||||
{"tag": "AttributeFilterIDs", "field_id": "AttributeFilterIDs", "type": "*variable", "value": "~5"},
|
||||
{"tag": "FieldName", "field_id": "FieldName", "type": "*variable", "value": "~6"},
|
||||
{"tag": "Type", "field_id": "Type", "type": "*variable", "value": "~7"},
|
||||
{"tag": "Value", "field_id": "Value", "type": "*variable", "value": "~8"},
|
||||
{"tag": "Blocker", "field_id": "Blocker", "type": "*variable", "value": "~9"},
|
||||
{"tag": "Weight", "field_id": "Weight", "type": "*variable", "value": "~10"},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
@@ -86,75 +86,75 @@
|
||||
"type": "*resources", // data source type
|
||||
"file_name": "Resources.csv", // file name in the tp_in_dir
|
||||
"fields": [
|
||||
{"tag": "Tenant", "field_id": "Tenant", "type": "*composed", "value": "~0", "mandatory": true},
|
||||
{"tag": "ID", "field_id": "ID", "type": "*composed", "value": "~1", "mandatory": true},
|
||||
{"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*composed", "value": "~2"},
|
||||
{"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*composed", "value": "~3"},
|
||||
{"tag": "TTL", "field_id": "UsageTTL", "type": "*composed", "value": "~4"},
|
||||
{"tag": "Limit", "field_id": "Limit", "type": "*composed", "value": "~5"},
|
||||
{"tag": "AllocationMessage", "field_id": "AllocationMessage", "type": "*composed", "value": "~6"},
|
||||
{"tag": "Blocker", "field_id": "Blocker", "type": "*composed", "value": "~7"},
|
||||
{"tag": "Stored", "field_id": "Stored", "type": "*composed", "value": "~8"},
|
||||
{"tag": "Weight", "field_id": "Weight", "type": "*composed", "value": "~9"},
|
||||
{"tag": "ThresholdIDs", "field_id": "ThresholdIDs", "type": "*composed", "value": "~10"},
|
||||
{"tag": "Tenant", "field_id": "Tenant", "type": "*variable", "value": "~0", "mandatory": true},
|
||||
{"tag": "ID", "field_id": "ID", "type": "*variable", "value": "~1", "mandatory": true},
|
||||
{"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*variable", "value": "~2"},
|
||||
{"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*variable", "value": "~3"},
|
||||
{"tag": "TTL", "field_id": "UsageTTL", "type": "*variable", "value": "~4"},
|
||||
{"tag": "Limit", "field_id": "Limit", "type": "*variable", "value": "~5"},
|
||||
{"tag": "AllocationMessage", "field_id": "AllocationMessage", "type": "*variable", "value": "~6"},
|
||||
{"tag": "Blocker", "field_id": "Blocker", "type": "*variable", "value": "~7"},
|
||||
{"tag": "Stored", "field_id": "Stored", "type": "*variable", "value": "~8"},
|
||||
{"tag": "Weight", "field_id": "Weight", "type": "*variable", "value": "~9"},
|
||||
{"tag": "ThresholdIDs", "field_id": "ThresholdIDs", "type": "*variable", "value": "~10"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"type": "*stats", // data source type
|
||||
"file_name": "Stats.csv", // file name in the tp_in_dir
|
||||
"fields": [
|
||||
{"tag": "Tenant", "field_id": "Tenant", "type": "*composed", "value": "~0", "mandatory": true},
|
||||
{"tag": "ID", "field_id": "ID", "type": "*composed", "value": "~1", "mandatory": true},
|
||||
{"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*composed", "value": "~2"},
|
||||
{"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*composed", "value": "~3"},
|
||||
{"tag": "QueueLength", "field_id": "QueueLength", "type": "*composed", "value": "~4"},
|
||||
{"tag": "TTL", "field_id": "TTL", "type": "*composed", "value": "~5"},
|
||||
{"tag": "Metrics", "field_id": "Metrics", "type": "*composed", "value": "~6"},
|
||||
{"tag": "MetricParams", "field_id": "Parameters", "type": "*composed", "value": "~7"},
|
||||
{"tag": "Blocker", "field_id": "Blocker", "type": "*composed", "value": "~8"},
|
||||
{"tag": "Stored", "field_id": "Stored", "type": "*composed", "value": "~9"},
|
||||
{"tag": "Weight", "field_id": "Weight", "type": "*composed", "value": "~10"},
|
||||
{"tag": "MinItems", "field_id": "MinItems", "type": "*composed", "value": "~11"},
|
||||
{"tag": "ThresholdIDs", "field_id": "ThresholdIDs", "type": "*composed", "value": "~12"},
|
||||
{"tag": "Tenant", "field_id": "Tenant", "type": "*variable", "value": "~0", "mandatory": true},
|
||||
{"tag": "ID", "field_id": "ID", "type": "*variable", "value": "~1", "mandatory": true},
|
||||
{"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*variable", "value": "~2"},
|
||||
{"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*variable", "value": "~3"},
|
||||
{"tag": "QueueLength", "field_id": "QueueLength", "type": "*variable", "value": "~4"},
|
||||
{"tag": "TTL", "field_id": "TTL", "type": "*variable", "value": "~5"},
|
||||
{"tag": "Metrics", "field_id": "Metrics", "type": "*variable", "value": "~6"},
|
||||
{"tag": "MetricParams", "field_id": "Parameters", "type": "*variable", "value": "~7"},
|
||||
{"tag": "Blocker", "field_id": "Blocker", "type": "*variable", "value": "~8"},
|
||||
{"tag": "Stored", "field_id": "Stored", "type": "*variable", "value": "~9"},
|
||||
{"tag": "Weight", "field_id": "Weight", "type": "*variable", "value": "~10"},
|
||||
{"tag": "MinItems", "field_id": "MinItems", "type": "*variable", "value": "~11"},
|
||||
{"tag": "ThresholdIDs", "field_id": "ThresholdIDs", "type": "*variable", "value": "~12"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"type": "*thresholds", // data source type
|
||||
"file_name": "Thresholds.csv", // file name in the tp_in_dir
|
||||
"fields": [
|
||||
{"tag": "Tenant", "field_id": "Tenant", "type": "*composed", "value": "~0", "mandatory": true},
|
||||
{"tag": "ID", "field_id": "ID", "type": "*composed", "value": "~1", "mandatory": true},
|
||||
{"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*composed", "value": "~2"},
|
||||
{"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*composed", "value": "~3"},
|
||||
{"tag": "MaxHits", "field_id": "MaxHits", "type": "*composed", "value": "~4"},
|
||||
{"tag": "MinHits", "field_id": "MinHits", "type": "*composed", "value": "~5"},
|
||||
{"tag": "MinSleep", "field_id": "MinSleep", "type": "*composed", "value": "~6"},
|
||||
{"tag": "Blocker", "field_id": "Blocker", "type": "*composed", "value": "~7"},
|
||||
{"tag": "Weight", "field_id": "Weight", "type": "*composed", "value": "~8"},
|
||||
{"tag": "ActionIDs", "field_id": "ActionIDs", "type": "*composed", "value": "~9"},
|
||||
{"tag": "Async", "field_id": "Async", "type": "*composed", "value": "~10"},
|
||||
{"tag": "Tenant", "field_id": "Tenant", "type": "*variable", "value": "~0", "mandatory": true},
|
||||
{"tag": "ID", "field_id": "ID", "type": "*variable", "value": "~1", "mandatory": true},
|
||||
{"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*variable", "value": "~2"},
|
||||
{"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*variable", "value": "~3"},
|
||||
{"tag": "MaxHits", "field_id": "MaxHits", "type": "*variable", "value": "~4"},
|
||||
{"tag": "MinHits", "field_id": "MinHits", "type": "*variable", "value": "~5"},
|
||||
{"tag": "MinSleep", "field_id": "MinSleep", "type": "*variable", "value": "~6"},
|
||||
{"tag": "Blocker", "field_id": "Blocker", "type": "*variable", "value": "~7"},
|
||||
{"tag": "Weight", "field_id": "Weight", "type": "*variable", "value": "~8"},
|
||||
{"tag": "ActionIDs", "field_id": "ActionIDs", "type": "*variable", "value": "~9"},
|
||||
{"tag": "Async", "field_id": "Async", "type": "*variable", "value": "~10"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"type": "*suppliers", // data source type
|
||||
"file_name": "Suppliers.csv", // file name in the tp_in_dir
|
||||
"fields": [
|
||||
{"tag": "Tenant", "field_id": "Tenant", "type": "*composed", "value": "~0", "mandatory": true},
|
||||
{"tag": "ID", "field_id": "ID", "type": "*composed", "value": "~1", "mandatory": true},
|
||||
{"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*composed", "value": "~2"},
|
||||
{"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*composed", "value": "~3"},
|
||||
{"tag": "Sorting", "field_id": "Sorting", "type": "*composed", "value": "~4"},
|
||||
{"tag": "SortingParamameters", "field_id": "SortingParamameters", "type": "*composed", "value": "~5"},
|
||||
{"tag": "SupplierID", "field_id": "SupplierID", "type": "*composed", "value": "~6"},
|
||||
{"tag": "SupplierFilterIDs", "field_id": "SupplierFilterIDs", "type": "*composed", "value": "~7"},
|
||||
{"tag": "SupplierAccountIDs", "field_id": "SupplierAccountIDs", "type": "*composed", "value": "~8"},
|
||||
{"tag": "SupplierRatingPlanIDs", "field_id": "SupplierRatingPlanIDs", "type": "*composed", "value": "~9"},
|
||||
{"tag": "SupplierResourceIDs", "field_id": "SupplierResourceIDs", "type": "*composed", "value": "~10"},
|
||||
{"tag": "SupplierStatIDs", "field_id": "SupplierStatIDs", "type": "*composed", "value": "~11"},
|
||||
{"tag": "SupplierWeight", "field_id": "SupplierWeight", "type": "*composed", "value": "~12"},
|
||||
{"tag": "SupplierBlocker", "field_id": "SupplierBlocker", "type": "*composed", "value": "~13"},
|
||||
{"tag": "SupplierParameters", "field_id": "SupplierParameters", "type": "*composed", "value": "~14"},
|
||||
{"tag": "Weight", "field_id": "Weight", "type": "*composed", "value": "~15"},
|
||||
{"tag": "Tenant", "field_id": "Tenant", "type": "*variable", "value": "~0", "mandatory": true},
|
||||
{"tag": "ID", "field_id": "ID", "type": "*variable", "value": "~1", "mandatory": true},
|
||||
{"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*variable", "value": "~2"},
|
||||
{"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*variable", "value": "~3"},
|
||||
{"tag": "Sorting", "field_id": "Sorting", "type": "*variable", "value": "~4"},
|
||||
{"tag": "SortingParamameters", "field_id": "SortingParamameters", "type": "*variable", "value": "~5"},
|
||||
{"tag": "SupplierID", "field_id": "SupplierID", "type": "*variable", "value": "~6"},
|
||||
{"tag": "SupplierFilterIDs", "field_id": "SupplierFilterIDs", "type": "*variable", "value": "~7"},
|
||||
{"tag": "SupplierAccountIDs", "field_id": "SupplierAccountIDs", "type": "*variable", "value": "~8"},
|
||||
{"tag": "SupplierRatingPlanIDs", "field_id": "SupplierRatingPlanIDs", "type": "*variable", "value": "~9"},
|
||||
{"tag": "SupplierResourceIDs", "field_id": "SupplierResourceIDs", "type": "*variable", "value": "~10"},
|
||||
{"tag": "SupplierStatIDs", "field_id": "SupplierStatIDs", "type": "*variable", "value": "~11"},
|
||||
{"tag": "SupplierWeight", "field_id": "SupplierWeight", "type": "*variable", "value": "~12"},
|
||||
{"tag": "SupplierBlocker", "field_id": "SupplierBlocker", "type": "*variable", "value": "~13"},
|
||||
{"tag": "SupplierParameters", "field_id": "SupplierParameters", "type": "*variable", "value": "~14"},
|
||||
{"tag": "Weight", "field_id": "Weight", "type": "*variable", "value": "~15"},
|
||||
],
|
||||
},
|
||||
],
|
||||
@@ -176,12 +176,12 @@
|
||||
"type": "*filters", // data source type
|
||||
"file_name": "Filters.csv", // file name in the tp_in_dir
|
||||
"fields": [
|
||||
{"tag": "Tenant", "field_id": "Tenant", "type": "*composed", "value": "~0", "mandatory": true},
|
||||
{"tag": "ID", "field_id": "ID", "type": "*composed", "value": "~1", "mandatory": true},
|
||||
{"tag": "FilterType", "field_id": "FilterType", "type": "*composed", "value": "~2"},
|
||||
{"tag": "FilterFieldName", "field_id": "FilterFieldName", "type": "*composed", "value": "~3"},
|
||||
{"tag": "FilterFieldValues", "field_id": "FilterFieldValues", "type": "*composed", "value": "~4"},
|
||||
{"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*composed", "value": "~5"},
|
||||
{"tag": "Tenant", "field_id": "Tenant", "type": "*variable", "value": "~0", "mandatory": true},
|
||||
{"tag": "ID", "field_id": "ID", "type": "*variable", "value": "~1", "mandatory": true},
|
||||
{"tag": "FilterType", "field_id": "FilterType", "type": "*variable", "value": "~2"},
|
||||
{"tag": "FilterFieldName", "field_id": "FilterFieldName", "type": "*variable", "value": "~3"},
|
||||
{"tag": "FilterFieldValues", "field_id": "FilterFieldValues", "type": "*variable", "value": "~4"},
|
||||
{"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*variable", "value": "~5"},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
@@ -35,5 +35,8 @@ mgr=$?
|
||||
echo 'go test github.com/cgrates/cgrates/dispatchers -tags=integration'
|
||||
go test github.com/cgrates/cgrates/dispatchers -tags=integration
|
||||
dis=$?
|
||||
echo 'go test github.com/cgrates/cgrates/loaders -tags=integration'
|
||||
go test github.com/cgrates/cgrates/loaders -tags=integration
|
||||
lds=$?
|
||||
|
||||
exit $gen && $ap1 && $ap2 && $en && $cdrc && $cfg && $utl && $gnr && $agts && $smg && $mgr && $dis
|
||||
exit $gen && $ap1 && $ap2 && $en && $cdrc && $cfg && $utl && $gnr && $agts && $smg && $mgr && $dis && $lds
|
||||
|
||||
@@ -65,6 +65,8 @@ func (ld LoaderData) UpdateFromCSV(fileName string, record []string,
|
||||
valOrig += out
|
||||
ld[cfgFld.FieldId] = valOrig
|
||||
}
|
||||
case utils.MetaVariable:
|
||||
ld[cfgFld.FieldId] = out
|
||||
case utils.MetaString:
|
||||
if _, has := ld[cfgFld.FieldId]; !has {
|
||||
ld[cfgFld.FieldId] = out
|
||||
|
||||
@@ -116,6 +116,96 @@ func TestDataUpdateFromCSVOneFile(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestDataUpdateFromCSVOneFile2(t *testing.T) {
|
||||
attrSFlds := []*config.FCTemplate{
|
||||
&config.FCTemplate{Tag: "TenantID",
|
||||
FieldId: "Tenant",
|
||||
Type: utils.MetaVariable,
|
||||
Value: config.NewRSRParsersMustCompile("~0", true, utils.INFIELD_SEP),
|
||||
Mandatory: true},
|
||||
&config.FCTemplate{Tag: "ProfileID",
|
||||
FieldId: "ID",
|
||||
Type: utils.MetaVariable,
|
||||
Value: config.NewRSRParsersMustCompile("~1", true, utils.INFIELD_SEP),
|
||||
Mandatory: true},
|
||||
&config.FCTemplate{Tag: "Contexts",
|
||||
FieldId: "Contexts",
|
||||
Type: utils.MetaVariable,
|
||||
Value: config.NewRSRParsersMustCompile("~2", true, utils.INFIELD_SEP)},
|
||||
&config.FCTemplate{Tag: "FilterIDs",
|
||||
FieldId: "FilterIDs",
|
||||
Type: utils.MetaVariable,
|
||||
Value: config.NewRSRParsersMustCompile("~3", true, utils.INFIELD_SEP)},
|
||||
&config.FCTemplate{Tag: "ActivationInterval",
|
||||
FieldId: "ActivationInterval",
|
||||
Type: utils.MetaVariable,
|
||||
Value: config.NewRSRParsersMustCompile("~4", true, utils.INFIELD_SEP)},
|
||||
&config.FCTemplate{Tag: "FieldName",
|
||||
FieldId: "FieldName",
|
||||
Type: utils.MetaVariable,
|
||||
Value: config.NewRSRParsersMustCompile("~5", true, utils.INFIELD_SEP)},
|
||||
&config.FCTemplate{Tag: "Initial",
|
||||
FieldId: "Initial",
|
||||
Type: utils.MetaVariable,
|
||||
Value: config.NewRSRParsersMustCompile("~6", true, utils.INFIELD_SEP)},
|
||||
&config.FCTemplate{Tag: "Substitute",
|
||||
FieldId: "Substitute",
|
||||
Type: utils.MetaVariable,
|
||||
Value: config.NewRSRParsersMustCompile("~7", true, utils.INFIELD_SEP)},
|
||||
&config.FCTemplate{Tag: "Append",
|
||||
FieldId: "Append",
|
||||
Type: utils.MetaVariable,
|
||||
Value: config.NewRSRParsersMustCompile("~8", true, utils.INFIELD_SEP)},
|
||||
&config.FCTemplate{Tag: "Weight",
|
||||
FieldId: "Weight",
|
||||
Type: utils.MetaVariable,
|
||||
Value: config.NewRSRParsersMustCompile("~9", true, utils.INFIELD_SEP)},
|
||||
}
|
||||
|
||||
rows := [][]string{
|
||||
[]string{"cgrates.org", "ATTR_1", "*sessions;*cdrs", "*string:Account:1007", "2014-01-14T00:00:00Z", "Account", "*any", "1001", "false", "10"},
|
||||
[]string{"cgrates.org", "ATTR_1", "", "", "", "Subject", "*any", "1001", "true", ""},
|
||||
}
|
||||
lData := make(LoaderData)
|
||||
if err := lData.UpdateFromCSV("Attributes.csv", rows[0], attrSFlds,
|
||||
config.NewRSRParsersMustCompile("cgrates.org", true, utils.INFIELD_SEP), nil); err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
eLData := LoaderData{"Tenant": "cgrates.org",
|
||||
"ID": "ATTR_1",
|
||||
"Contexts": "*sessions;*cdrs",
|
||||
"FilterIDs": "*string:Account:1007",
|
||||
"ActivationInterval": "2014-01-14T00:00:00Z",
|
||||
"FieldName": "Account",
|
||||
"Initial": "*any",
|
||||
"Substitute": "1001",
|
||||
"Append": "false",
|
||||
"Weight": "10",
|
||||
}
|
||||
if !reflect.DeepEqual(eLData, lData) {
|
||||
t.Errorf("expecting: %+v, received: %+v", eLData, lData)
|
||||
}
|
||||
lData = make(LoaderData)
|
||||
if err := lData.UpdateFromCSV("Attributes.csv", rows[1], attrSFlds,
|
||||
config.NewRSRParsersMustCompile("cgrates.org", true, utils.INFIELD_SEP), nil); err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
eLData = LoaderData{"Tenant": "cgrates.org",
|
||||
"ID": "ATTR_1",
|
||||
"Contexts": "",
|
||||
"FilterIDs": "",
|
||||
"ActivationInterval": "",
|
||||
"FieldName": "Subject",
|
||||
"Initial": "*any",
|
||||
"Substitute": "1001",
|
||||
"Append": "true",
|
||||
"Weight": "",
|
||||
}
|
||||
if !reflect.DeepEqual(eLData, lData) {
|
||||
t.Errorf("expecting: %+v, received: %+v", eLData, lData)
|
||||
}
|
||||
}
|
||||
|
||||
func TestDataUpdateFromCSVMultiFiles(t *testing.T) {
|
||||
attrSFlds := []*config.FCTemplate{
|
||||
&config.FCTemplate{Tag: "TenantID",
|
||||
|
||||
Reference in New Issue
Block a user