From e3ff0a5965ec5ff6cf83d72f0ca54adf0937783c Mon Sep 17 00:00:00 2001 From: TeoV Date: Sun, 21 Jul 2019 13:14:47 +0300 Subject: [PATCH] Update loader section from tutmysql --- data/conf/samples/tutmysql/cgrates.json | 88 +++++-------------------- 1 file changed, 15 insertions(+), 73 deletions(-) diff --git a/data/conf/samples/tutmysql/cgrates.json b/data/conf/samples/tutmysql/cgrates.json index cafad76e2..8ee63d3de 100644 --- a/data/conf/samples/tutmysql/cgrates.json +++ b/data/conf/samples/tutmysql/cgrates.json @@ -5,7 +5,7 @@ "general": { "log_level": 7, - "reply_timeout": "20s", + "reply_timeout": "50s", }, @@ -71,8 +71,8 @@ "loaders": [ { - "id": "TeoLoader", // identifier of the Loader - "enabled": false, // starts as service: . + "id": "CustomLoader", // identifier of the Loader + "enabled": true, // starts as service: . "dry_run": false, // do not send the CDRs to CDRS, just parse them "run_delay": 0, // sleep interval in seconds between consecutive runs, 0 to use automation via inotify "lock_filename": ".cgr.lock", // Filename containing concurrency lock in case of delayed processing @@ -84,78 +84,20 @@ "tp_out_dir": "/tmp/Out", // absolute path towards the directory where processed CDRs will be moved "data":[ { - "type": "*resources", // data source type - "file_name": "Resources.csv", // file name in the tp_in_dir + "type": "*attributes", // data source type + "file_name": "Attributes.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"}, - ], - }, - { - "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": "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": "MinItems", "field_id": "MinItems", "type": "*composed", "value": "~11"}, - {"tag": "ThresholdIDs", "field_id": "ThresholdIDs", "type": "*composed", "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"}, - ], - }, - { - "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"}, ], }, ],