@itentialopensource/adapter-winston_syslog 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/BROKER.md +199 -0
  2. package/CALLS.md +162 -0
  3. package/CHANGELOG.md +8 -1
  4. package/CODE_OF_CONDUCT.md +43 -0
  5. package/CONTRIBUTING.md +13 -0
  6. package/ENHANCE.md +69 -0
  7. package/LICENSE +1 -1
  8. package/PROPERTIES.md +641 -0
  9. package/README.md +89 -28
  10. package/SUMMARY.md +9 -0
  11. package/TROUBLESHOOT.md +47 -0
  12. package/adapter.js +566 -0
  13. package/adapterBase.js +549 -879
  14. package/changelogs/CHANGELOG.md +9 -0
  15. package/metadata.json +49 -0
  16. package/package.json +26 -25
  17. package/pronghorn.json +981 -0
  18. package/propertiesSchema.json +506 -51
  19. package/refs?service=git-upload-pack +0 -0
  20. package/report/adapterInfo.json +8 -8
  21. package/report/updateReport1691508888201.json +120 -0
  22. package/report/updateReport1692202203193.json +120 -0
  23. package/report/updateReport1692203305042.json +120 -0
  24. package/report/updateReport1694469210573.json +120 -0
  25. package/report/updateReport1698422912292.json +120 -0
  26. package/sampleProperties.json +210 -12
  27. package/test/integration/adapterTestBasicGet.js +83 -0
  28. package/test/integration/adapterTestConnectivity.js +142 -0
  29. package/test/integration/adapterTestIntegration.js +180 -15
  30. package/test/unit/adapterBaseTestUnit.js +388 -313
  31. package/test/unit/adapterTestUnit.js +465 -106
  32. package/utils/adapterInfo.js +1 -1
  33. package/utils/addAuth.js +1 -1
  34. package/utils/artifactize.js +1 -1
  35. package/utils/checkMigrate.js +1 -1
  36. package/utils/entitiesToDB.js +2 -2
  37. package/utils/findPath.js +1 -1
  38. package/utils/methodDocumentor.js +273 -0
  39. package/utils/modify.js +13 -15
  40. package/utils/packModificationScript.js +1 -1
  41. package/utils/pre-commit.sh +2 -0
  42. package/utils/taskMover.js +309 -0
  43. package/utils/tbScript.js +89 -34
  44. package/utils/tbUtils.js +41 -21
  45. package/utils/testRunner.js +1 -1
  46. package/utils/troubleshootingAdapter.js +9 -6
  47. package/workflows/README.md +0 -3
@@ -14,10 +14,15 @@
14
14
  "port": {
15
15
  "type": "integer",
16
16
  "description": "port on which to connect to the server",
17
- "default": 514,
17
+ "default": 443,
18
18
  "minimum": 1,
19
19
  "maximum": 65535
20
20
  },
21
+ "choosepath": {
22
+ "type": "string",
23
+ "description": "choose the path to use -- requires entityPath choices",
24
+ "default": ""
25
+ },
21
26
  "base_path": {
22
27
  "type": "string",
23
28
  "description": "a base path that is consistent across api calls",
@@ -78,6 +83,14 @@
78
83
  "https"
79
84
  ]
80
85
  },
86
+ "service": {
87
+ "type": "string",
88
+ "description": "Service we are integrating with -- used with AWS Authentication",
89
+ "examples": [
90
+ "ec2",
91
+ "route53"
92
+ ]
93
+ },
81
94
  "logProtocol": {
82
95
  "type": "string",
83
96
  "description": "The protocol to use to connect to the log server",
@@ -100,11 +113,11 @@
100
113
  "RFC5424"
101
114
  ]
102
115
  },
103
- "minLogLevel" : {
116
+ "minLogLevel": {
104
117
  "type": "string",
105
118
  "description": "The minimum log level at which to send adapter syslog messages.",
106
- "default" : "info",
107
- "enum" : [
119
+ "default": "info",
120
+ "enum": [
108
121
  "emerg",
109
122
  "alert",
110
123
  "crit",
@@ -138,6 +151,9 @@
138
151
  },
139
152
  "devicebroker": {
140
153
  "$ref": "#/definitions/devicebroker"
154
+ },
155
+ "cache": {
156
+ "$ref": "#/definitions/cache"
141
157
  }
142
158
  },
143
159
  "required": [
@@ -161,7 +177,9 @@
161
177
  "static_token",
162
178
  "jwt_token",
163
179
  "request_token",
164
- "no_authentication"
180
+ "no_authentication",
181
+ "multi_step_authentication",
182
+ "aws_authentication"
165
183
  ]
166
184
  },
167
185
  "username": {
@@ -294,6 +312,74 @@
294
312
  "type": "string",
295
313
  "description": "The grant type for OAuth requests - can also provide in schema",
296
314
  "default": ""
315
+ },
316
+ "sensitive": {
317
+ "type": "array",
318
+ "description": "List of sensitive keys to search and hide values from being logged",
319
+ "default": [],
320
+ "items": {
321
+ "type": "string"
322
+ }
323
+ },
324
+ "sso": {
325
+ "type": "object",
326
+ "properties": {
327
+ "protocol": {
328
+ "type": "string",
329
+ "description": "the protocol to request token from system",
330
+ "default": "",
331
+ "enum": [
332
+ "http",
333
+ "https",
334
+ ""
335
+ ]
336
+ },
337
+ "host": {
338
+ "type": "string",
339
+ "description": "hostname of the authentication system",
340
+ "default": "",
341
+ "examples": [
342
+ "systemx.customer.com"
343
+ ]
344
+ },
345
+ "port": {
346
+ "type": "integer",
347
+ "description": "port on which to connect to the authentication system",
348
+ "default": 0,
349
+ "minimum": 0,
350
+ "maximum": 65535
351
+ }
352
+ }
353
+ },
354
+ "multiStepAuthCalls": {
355
+ "type": "array",
356
+ "items": {
357
+ "type": "object",
358
+ "properties": {
359
+ "name": {
360
+ "type": "string",
361
+ "description": "Id of the step call",
362
+ "examples": [
363
+ "getAccessToken"
364
+ ]
365
+ },
366
+ "requestFields": {
367
+ "type": "object",
368
+ "description": "The fields set in step request"
369
+ },
370
+ "responseFields": {
371
+ "type": "object",
372
+ "description": "The fields from the step result"
373
+ },
374
+ "successfullResponseCode": {
375
+ "type": "integer",
376
+ "description": "Expected response code for given step, if not set any successfull http response is accepted",
377
+ "examples": [
378
+ 200
379
+ ]
380
+ }
381
+ }
382
+ }
297
383
  }
298
384
  },
299
385
  "required": [
@@ -394,7 +480,13 @@
394
480
  },
395
481
  "query_object": {
396
482
  "type": "object",
397
- "description": "Query object { device: xxxxx } to be placed into the healthcheck, will be converted to query string by the adapter"
483
+ "description": "Query object { device: xxxxx } to be placed into the healthcheck, will be converted to query string by the adapter",
484
+ "default": {}
485
+ },
486
+ "addlHeaders": {
487
+ "type": "object",
488
+ "description": "headers that will be appended to the headers for the call",
489
+ "default": {}
398
490
  }
399
491
  },
400
492
  "required": [
@@ -452,7 +544,7 @@
452
544
  },
453
545
  "concurrent_max": {
454
546
  "type": "integer",
455
- "description": "defines the number of request that Pronghorn can send syslog at one time",
547
+ "description": "defines the number of request that Pronghorn can send winston_syslog at one time",
456
548
  "default": 1,
457
549
  "minimum": 0,
458
550
  "maximum": 1000
@@ -466,7 +558,7 @@
466
558
  },
467
559
  "avg_runtime": {
468
560
  "type": "integer",
469
- "description": "an approximate average of how long it takes syslog to handle each request",
561
+ "description": "an approximate average of how long it takes winston_syslog to handle each request",
470
562
  "default": 200,
471
563
  "minimum": 50,
472
564
  "maximum": 60000
@@ -474,6 +566,7 @@
474
566
  "priorities": {
475
567
  "type": "array",
476
568
  "description": "define your priorities here",
569
+ "default": [],
477
570
  "items": {
478
571
  "type": "object",
479
572
  "properties": {
@@ -544,6 +637,7 @@
544
637
  "failover_codes": {
545
638
  "type": "array",
546
639
  "description": "An array of codes where it is ok to try another method",
640
+ "default": [],
547
641
  "items": {
548
642
  "type": "integer"
549
643
  }
@@ -561,19 +655,23 @@
561
655
  "properties": {
562
656
  "payload": {
563
657
  "type": "object",
564
- "description": "payload fields that will be appended to the provided payload (excluding GET calls)"
658
+ "description": "payload fields that will be appended to the provided payload (excluding GET calls)",
659
+ "default": {}
565
660
  },
566
661
  "uriOptions": {
567
662
  "type": "object",
568
- "description": "options that will be appended to all GET calls"
663
+ "description": "options that will be appended to all GET calls",
664
+ "default": {}
569
665
  },
570
666
  "addlHeaders": {
571
667
  "type": "object",
572
- "description": "headers that will be appended to the headers for the call"
668
+ "description": "headers that will be appended to the headers for the call",
669
+ "default": {}
573
670
  },
574
671
  "authData": {
575
672
  "type": "object",
576
- "description": "authentication data that will be appended to the payload for authentication calls"
673
+ "description": "authentication data that will be appended to the payload for authentication calls",
674
+ "default": {}
577
675
  }
578
676
  }
579
677
  },
@@ -888,6 +986,7 @@
888
986
  "type": "array",
889
987
  "description": "Broker call(s) to getDevice",
890
988
  "items": {
989
+ "type": "object",
891
990
  "properties": {
892
991
  "path": {
893
992
  "type": "string",
@@ -903,26 +1002,38 @@
903
1002
  "type": "object",
904
1003
  "description": "The json object with query parameters of the call to getDevice",
905
1004
  "additionalProperties": {
906
- "type": "string"
1005
+ "type": [
1006
+ "string",
1007
+ "number"
1008
+ ]
907
1009
  }
908
1010
  },
909
1011
  "body": {
910
1012
  "type": "object",
911
1013
  "description": "The json object with body of the call to getDevice",
912
1014
  "additionalProperties": {
913
- "type": "string"
1015
+ "type": [
1016
+ "string",
1017
+ "number"
1018
+ ]
914
1019
  }
915
1020
  },
916
1021
  "headers": {
917
1022
  "type": "object",
918
1023
  "description": "The json object with headers of the call to getDevice",
919
1024
  "additionalProperties": {
920
- "type": "string"
1025
+ "type": [
1026
+ "string",
1027
+ "number"
1028
+ ]
921
1029
  }
922
1030
  },
923
1031
  "handleFailure": {
924
1032
  "type": "string",
925
- "enum": ["ignore", "fail"],
1033
+ "enum": [
1034
+ "ignore",
1035
+ "fail"
1036
+ ],
926
1037
  "description": "return failure or ignore failure",
927
1038
  "default": "ignore"
928
1039
  },
@@ -930,15 +1041,26 @@
930
1041
  "type": "object",
931
1042
  "description": "The json object with response fields of the call to getDevice",
932
1043
  "additionalProperties": {
933
- "type": "string"
1044
+ "type": [
1045
+ "string",
1046
+ "number"
1047
+ ]
934
1048
  },
935
1049
  "properties": {}
936
1050
  },
1051
+ "responseDatakey": {
1052
+ "type": "string",
1053
+ "description": "place in the response where the data is - supports jsonquery",
1054
+ "default": ""
1055
+ },
937
1056
  "responseFields": {
938
1057
  "type": "object",
939
1058
  "description": "The json object with response fields of the call to getDevice",
940
1059
  "additionalProperties": {
941
- "type": "string"
1060
+ "type": [
1061
+ "string",
1062
+ "number"
1063
+ ]
942
1064
  },
943
1065
  "properties": {
944
1066
  "name": {
@@ -961,7 +1083,7 @@
961
1083
  "description": "The field in response to getDevice that contains the port of the device",
962
1084
  "default": ""
963
1085
  },
964
- "ip": {
1086
+ "ipaddress": {
965
1087
  "type": "string",
966
1088
  "description": "The field in response to getDevice that contains the ip address of the device",
967
1089
  "default": ""
@@ -975,6 +1097,7 @@
975
1097
  "type": "array",
976
1098
  "description": "Broker call(s) to getDevicesFiltered",
977
1099
  "items": {
1100
+ "type": "object",
978
1101
  "properties": {
979
1102
  "path": {
980
1103
  "type": "string",
@@ -986,30 +1109,74 @@
986
1109
  "description": "The method of the call to getDevicesFiltered",
987
1110
  "default": "GET"
988
1111
  },
1112
+ "pagination": {
1113
+ "type": "object",
1114
+ "description": "todo",
1115
+ "properties": {
1116
+ "offsetVar": {
1117
+ "type": "string",
1118
+ "description": "Name of variable that defines how to go to next set of results"
1119
+ },
1120
+ "limitVar": {
1121
+ "type": "string",
1122
+ "description": "Name of variable that defines the max results returned in a request"
1123
+ },
1124
+ "incrementBy": {
1125
+ "type": "string",
1126
+ "enum": [
1127
+ "limit",
1128
+ "page"
1129
+ ],
1130
+ "description": "How to incremenet offset. Default limit",
1131
+ "default": "limit"
1132
+ },
1133
+ "requestLocation": {
1134
+ "type": "string",
1135
+ "enum": [
1136
+ "query",
1137
+ "body"
1138
+ ],
1139
+ "description": "Where in request the pagination data goes",
1140
+ "default": "query"
1141
+ }
1142
+ }
1143
+ },
989
1144
  "query": {
990
1145
  "type": "object",
991
1146
  "description": "The json object with query parameters of the call to getDevicesFiltered",
992
1147
  "additionalProperties": {
993
- "type": "string"
1148
+ "type": [
1149
+ "string",
1150
+ "number"
1151
+ ]
994
1152
  }
995
1153
  },
996
1154
  "body": {
997
1155
  "type": "object",
998
1156
  "description": "The json object with body of the call to getDevicesFiltered",
999
1157
  "additionalProperties": {
1000
- "type": "string"
1158
+ "type": [
1159
+ "string",
1160
+ "number"
1161
+ ]
1001
1162
  }
1002
1163
  },
1003
1164
  "headers": {
1004
1165
  "type": "object",
1005
1166
  "description": "The json object with headers of the call to getDevicesFiltered",
1006
1167
  "additionalProperties": {
1007
- "type": "string"
1168
+ "type": [
1169
+ "string",
1170
+ "number"
1171
+ ]
1008
1172
  }
1009
1173
  },
1010
1174
  "handleFailure": {
1011
1175
  "type": "string",
1012
- "enum": ["ignore", "fail"],
1176
+ "enum": [
1177
+ "ignore",
1178
+ "fail"
1179
+ ],
1013
1180
  "description": "return failure or ignore failure",
1014
1181
  "default": "ignore"
1015
1182
  },
@@ -1017,15 +1184,26 @@
1017
1184
  "type": "object",
1018
1185
  "description": "The json object with response fields of the call to getDevice",
1019
1186
  "additionalProperties": {
1020
- "type": "string"
1187
+ "type": [
1188
+ "string",
1189
+ "number"
1190
+ ]
1021
1191
  },
1022
1192
  "properties": {}
1023
1193
  },
1194
+ "responseDatakey": {
1195
+ "type": "string",
1196
+ "description": "place in the response where the data is - supports jsonquery",
1197
+ "default": ""
1198
+ },
1024
1199
  "responseFields": {
1025
1200
  "type": "object",
1026
1201
  "description": "The json object with response fields of the call to getDevicesFiltered",
1027
1202
  "additionalProperties": {
1028
- "type": "string"
1203
+ "type": [
1204
+ "string",
1205
+ "number"
1206
+ ]
1029
1207
  },
1030
1208
  "properties": {
1031
1209
  "name": {
@@ -1043,12 +1221,12 @@
1043
1221
  "description": "Any prefix that should be added to the ostype of the device (e.g. aws-)",
1044
1222
  "default": ""
1045
1223
  },
1046
- "port_field": {
1224
+ "port": {
1047
1225
  "type": "string",
1048
1226
  "description": "The field in response to getDevicesFiltered that contains the port of the device",
1049
1227
  "default": ""
1050
1228
  },
1051
- "ip_field": {
1229
+ "ipaddress": {
1052
1230
  "type": "string",
1053
1231
  "description": "The field in response to getDevicesFiltered that contains the ip address of the device",
1054
1232
  "default": ""
@@ -1062,6 +1240,7 @@
1062
1240
  "type": "array",
1063
1241
  "description": "Broker call(s) to determine if the device isAlive",
1064
1242
  "items": {
1243
+ "type": "object",
1065
1244
  "properties": {
1066
1245
  "path": {
1067
1246
  "type": "string",
@@ -1077,53 +1256,76 @@
1077
1256
  "type": "object",
1078
1257
  "description": "The json object with query parameters of the call to isAlive",
1079
1258
  "additionalProperties": {
1080
- "type": "string"
1259
+ "type": [
1260
+ "string",
1261
+ "number"
1262
+ ]
1081
1263
  }
1082
1264
  },
1083
1265
  "body": {
1084
1266
  "type": "object",
1085
1267
  "description": "The json object with body of the call to isAlive",
1086
1268
  "additionalProperties": {
1087
- "type": "string"
1269
+ "type": [
1270
+ "string",
1271
+ "number"
1272
+ ]
1088
1273
  }
1089
1274
  },
1090
1275
  "headers": {
1091
1276
  "type": "object",
1092
1277
  "description": "The json object with headers of the call to isAlive",
1093
1278
  "additionalProperties": {
1094
- "type": "string"
1279
+ "type": [
1280
+ "string",
1281
+ "number"
1282
+ ]
1095
1283
  }
1096
1284
  },
1097
1285
  "handleFailure": {
1098
1286
  "type": "string",
1099
- "enum": ["ignore", "fail"],
1287
+ "enum": [
1288
+ "ignore",
1289
+ "fail"
1290
+ ],
1100
1291
  "description": "return failure or ignore isAlive",
1101
1292
  "default": "ignore"
1102
1293
  },
1103
- "statusValue": {
1104
- "type": "string",
1105
- "description": "The expected value in the status field",
1106
- "default": "true"
1107
- },
1108
1294
  "requestFields": {
1109
1295
  "type": "object",
1110
1296
  "description": "The json object with response fields of the call to getDevice",
1111
1297
  "additionalProperties": {
1112
- "type": "string"
1298
+ "type": [
1299
+ "string",
1300
+ "number"
1301
+ ]
1113
1302
  },
1114
1303
  "properties": {}
1115
1304
  },
1305
+ "responseDatakey": {
1306
+ "type": "string",
1307
+ "description": "place in the response where the data is - supports jsonquery",
1308
+ "default": ""
1309
+ },
1116
1310
  "responseFields": {
1117
1311
  "type": "object",
1118
1312
  "description": "The json object with response fields of the call to isAlive",
1119
1313
  "additionalProperties": {
1120
- "type": "string"
1314
+ "type": [
1315
+ "string",
1316
+ "number"
1317
+ ]
1121
1318
  },
1122
1319
  "properties": {
1123
1320
  "status": {
1124
1321
  "type": "string",
1125
1322
  "description": "The field in response to isAlive that contains the status of the device",
1126
1323
  "default": "name"
1324
+ },
1325
+ "statusValue": {
1326
+ "type": "string",
1327
+ "description": "The expected value in the status field",
1328
+ "default": "true"
1127
1329
  }
1128
1330
  }
1129
1331
  }
@@ -1134,6 +1336,7 @@
1134
1336
  "type": "array",
1135
1337
  "description": "Broker call(s) to getConfig",
1136
1338
  "items": {
1339
+ "type": "object",
1137
1340
  "properties": {
1138
1341
  "path": {
1139
1342
  "type": "string",
@@ -1149,26 +1352,38 @@
1149
1352
  "type": "object",
1150
1353
  "description": "The json object with query parameters of the call to getConfig",
1151
1354
  "additionalProperties": {
1152
- "type": "string"
1355
+ "type": [
1356
+ "string",
1357
+ "number"
1358
+ ]
1153
1359
  }
1154
1360
  },
1155
1361
  "body": {
1156
1362
  "type": "object",
1157
1363
  "description": "The json object with body of the call to getConfig",
1158
1364
  "additionalProperties": {
1159
- "type": "string"
1365
+ "type": [
1366
+ "string",
1367
+ "number"
1368
+ ]
1160
1369
  }
1161
1370
  },
1162
1371
  "headers": {
1163
1372
  "type": "object",
1164
1373
  "description": "The json object with headers of the call to getConfig",
1165
1374
  "additionalProperties": {
1166
- "type": "string"
1375
+ "type": [
1376
+ "string",
1377
+ "number"
1378
+ ]
1167
1379
  }
1168
1380
  },
1169
1381
  "handleFailure": {
1170
1382
  "type": "string",
1171
- "enum": ["ignore", "fail"],
1383
+ "enum": [
1384
+ "ignore",
1385
+ "fail"
1386
+ ],
1172
1387
  "description": "return failure or ignore getConfig",
1173
1388
  "default": "ignore"
1174
1389
  },
@@ -1176,18 +1391,28 @@
1176
1391
  "type": "object",
1177
1392
  "description": "The json object with response fields of the call to getDevice",
1178
1393
  "additionalProperties": {
1179
- "type": "string"
1394
+ "type": [
1395
+ "string",
1396
+ "number"
1397
+ ]
1180
1398
  },
1181
1399
  "properties": {}
1182
1400
  },
1401
+ "responseDatakey": {
1402
+ "type": "string",
1403
+ "description": "place in the response where the data is - supports jsonquery",
1404
+ "default": ""
1405
+ },
1183
1406
  "responseFields": {
1184
1407
  "type": "object",
1185
1408
  "description": "The json object with response fields of the call to getConfig",
1186
1409
  "additionalProperties": {
1187
- "type": "string"
1410
+ "type": [
1411
+ "string",
1412
+ "number"
1413
+ ]
1188
1414
  },
1189
- "properties": {
1190
- }
1415
+ "properties": {}
1191
1416
  }
1192
1417
  }
1193
1418
  }
@@ -1196,6 +1421,7 @@
1196
1421
  "type": "array",
1197
1422
  "description": "Broker call(s) to getCount",
1198
1423
  "items": {
1424
+ "type": "object",
1199
1425
  "properties": {
1200
1426
  "path": {
1201
1427
  "type": "string",
@@ -1211,28 +1437,257 @@
1211
1437
  "type": "object",
1212
1438
  "description": "The json object with query parameters of the call to getCount",
1213
1439
  "additionalProperties": {
1214
- "type": "string"
1440
+ "type": [
1441
+ "string",
1442
+ "number"
1443
+ ]
1215
1444
  }
1216
1445
  },
1217
1446
  "body": {
1218
1447
  "type": "object",
1219
1448
  "description": "The json object with body of the call to getCount",
1220
1449
  "additionalProperties": {
1221
- "type": "string"
1450
+ "type": [
1451
+ "string",
1452
+ "number"
1453
+ ]
1222
1454
  }
1223
1455
  },
1224
1456
  "headers": {
1225
1457
  "type": "object",
1226
1458
  "description": "The json object with headers of the call to getCount",
1227
1459
  "additionalProperties": {
1228
- "type": "string"
1460
+ "type": [
1461
+ "string",
1462
+ "number"
1463
+ ]
1229
1464
  }
1230
1465
  },
1231
1466
  "handleFailure": {
1232
1467
  "type": "string",
1233
- "enum": ["ignore", "fail"],
1468
+ "enum": [
1469
+ "ignore",
1470
+ "fail"
1471
+ ],
1234
1472
  "description": "return failure or ignore getCount",
1235
1473
  "default": "ignore"
1474
+ },
1475
+ "requestFields": {
1476
+ "type": "object",
1477
+ "description": "The json object with response fields of the call to getDevice",
1478
+ "additionalProperties": {
1479
+ "type": [
1480
+ "string",
1481
+ "number"
1482
+ ]
1483
+ },
1484
+ "properties": {}
1485
+ },
1486
+ "responseDatakey": {
1487
+ "type": "string",
1488
+ "description": "place in the response where the data is - supports jsonquery",
1489
+ "default": ""
1490
+ },
1491
+ "responseFields": {
1492
+ "type": "object",
1493
+ "description": "The json object with response fields of the call to getConfig",
1494
+ "additionalProperties": {
1495
+ "type": [
1496
+ "string",
1497
+ "number"
1498
+ ]
1499
+ },
1500
+ "properties": {}
1501
+ }
1502
+ }
1503
+ }
1504
+ }
1505
+ }
1506
+ },
1507
+ "cache": {
1508
+ "type": "object",
1509
+ "properties": {
1510
+ "enabled": {
1511
+ "type": "boolean",
1512
+ "description": "Whether or not cache is enabled for adapter",
1513
+ "default": false
1514
+ },
1515
+ "entities": {
1516
+ "type": "array",
1517
+ "description": "Information for the cached entities",
1518
+ "items": {
1519
+ "type": "object",
1520
+ "properties": {
1521
+ "entityType": {
1522
+ "type": "string",
1523
+ "description": "The name of the entity - should match adapter entity configuration or a broker (e.g. Device)",
1524
+ "default": ""
1525
+ },
1526
+ "frequency": {
1527
+ "type": "integer",
1528
+ "description": "how long (in minutes) we wait to re-populate the cache",
1529
+ "default": 1440,
1530
+ "maximum": 10080
1531
+ },
1532
+ "flushOnFail": {
1533
+ "type": "boolean",
1534
+ "description": "Whether to clear the cache we have if the populate failed",
1535
+ "default": false
1536
+ },
1537
+ "limit": {
1538
+ "type": "integer",
1539
+ "description": "maximum number of items to keep in cache",
1540
+ "default": 1000
1541
+ },
1542
+ "retryAttempts": {
1543
+ "type": "integer",
1544
+ "description": "number of times to retry the populate call before failure",
1545
+ "default": 5
1546
+ },
1547
+ "sort": {
1548
+ "type": "boolean",
1549
+ "description": "whether to sort the data or not",
1550
+ "default": true
1551
+ },
1552
+ "populate": {
1553
+ "type": "array",
1554
+ "description": "Information for the call(s) used to populate the cache",
1555
+ "items": {
1556
+ "type": "object",
1557
+ "properties": {
1558
+ "path": {
1559
+ "type": "string",
1560
+ "description": "The fully qualified path of the call to getDevice (e.g. /rest/api/device/{deviceid})",
1561
+ "default": ""
1562
+ },
1563
+ "method": {
1564
+ "type": "string",
1565
+ "description": "The method of the call to getDevice",
1566
+ "default": "GET"
1567
+ },
1568
+ "pagination": {
1569
+ "type": "object",
1570
+ "description": "todo",
1571
+ "properties": {
1572
+ "offsetVar": {
1573
+ "type": "string",
1574
+ "description": "Name of variable that defines how to go to next set of results"
1575
+ },
1576
+ "limitVar": {
1577
+ "type": "string",
1578
+ "description": "Name of variable that defines the max results returned in a request"
1579
+ },
1580
+ "incrementBy": {
1581
+ "type": "string",
1582
+ "enum": [
1583
+ "limit",
1584
+ "page"
1585
+ ],
1586
+ "description": "How to incremenet offset. Default limit",
1587
+ "default": "limit"
1588
+ },
1589
+ "requestLocation": {
1590
+ "type": "string",
1591
+ "enum": [
1592
+ "query",
1593
+ "body"
1594
+ ],
1595
+ "description": "Where in request the pagination data goes",
1596
+ "default": "query"
1597
+ }
1598
+ }
1599
+ },
1600
+ "query": {
1601
+ "type": "object",
1602
+ "description": "The json object with query parameters of the call to getDevice",
1603
+ "additionalProperties": {
1604
+ "type": [
1605
+ "string",
1606
+ "number"
1607
+ ]
1608
+ }
1609
+ },
1610
+ "body": {
1611
+ "type": "object",
1612
+ "description": "The json object with body of the call to getDevice",
1613
+ "additionalProperties": {
1614
+ "type": [
1615
+ "string",
1616
+ "number"
1617
+ ]
1618
+ }
1619
+ },
1620
+ "headers": {
1621
+ "type": "object",
1622
+ "description": "The json object with headers of the call to getDevice",
1623
+ "additionalProperties": {
1624
+ "type": [
1625
+ "string",
1626
+ "number"
1627
+ ]
1628
+ }
1629
+ },
1630
+ "handleFailure": {
1631
+ "type": "string",
1632
+ "enum": [
1633
+ "ignore",
1634
+ "fail"
1635
+ ],
1636
+ "description": "return failure or ignore failure",
1637
+ "default": "ignore"
1638
+ },
1639
+ "requestFields": {
1640
+ "type": "object",
1641
+ "description": "The json object with response fields of the call to getDevice",
1642
+ "additionalProperties": {
1643
+ "type": [
1644
+ "string",
1645
+ "number"
1646
+ ]
1647
+ },
1648
+ "properties": {}
1649
+ },
1650
+ "responseDatakey": {
1651
+ "type": "string",
1652
+ "description": "place in the response where the data is - supports jsonquery",
1653
+ "default": ""
1654
+ },
1655
+ "responseFields": {
1656
+ "type": "object",
1657
+ "description": "The json object with response fields of the call to getDevice",
1658
+ "additionalProperties": {
1659
+ "type": [
1660
+ "string",
1661
+ "number"
1662
+ ]
1663
+ }
1664
+ }
1665
+ }
1666
+ }
1667
+ },
1668
+ "cachedTasks": {
1669
+ "type": "array",
1670
+ "description": "Information for the call(s) used to populate the cache",
1671
+ "items": {
1672
+ "type": "object",
1673
+ "properties": {
1674
+ "name": {
1675
+ "type": "string",
1676
+ "description": "the name of the task/action that should utilize cached information",
1677
+ "default": ""
1678
+ },
1679
+ "filterField": {
1680
+ "type": "string",
1681
+ "description": "the field that contains filter information for this call",
1682
+ "default": ""
1683
+ },
1684
+ "filterLoc": {
1685
+ "type": "string",
1686
+ "description": "the field that contains the location of the filter field",
1687
+ "default": ""
1688
+ }
1689
+ }
1690
+ }
1236
1691
  }
1237
1692
  }
1238
1693
  }
@@ -1240,4 +1695,4 @@
1240
1695
  }
1241
1696
  }
1242
1697
  }
1243
- }
1698
+ }