@itentialopensource/adapter-sevone 2.3.1 → 2.5.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 (59) hide show
  1. package/AUTH.md +39 -0
  2. package/BROKER.md +199 -0
  3. package/CALLS.md +1808 -0
  4. package/CHANGELOG.md +53 -91
  5. package/CODE_OF_CONDUCT.md +12 -17
  6. package/CONTRIBUTING.md +3 -148
  7. package/ENHANCE.md +69 -0
  8. package/PROPERTIES.md +641 -0
  9. package/README.md +237 -578
  10. package/SUMMARY.md +9 -0
  11. package/SYSTEMINFO.md +11 -0
  12. package/TROUBLESHOOT.md +47 -0
  13. package/adapter.js +377 -596
  14. package/adapterBase.js +854 -408
  15. package/changelogs/CHANGELOG.md +118 -0
  16. package/entities/.generic/action.json +110 -5
  17. package/entities/.generic/schema.json +6 -1
  18. package/entities/device/mockdatafiles/getdeviceerror.json +1 -58
  19. package/error.json +6 -0
  20. package/metadata.json +49 -0
  21. package/package.json +28 -22
  22. package/pronghorn.json +673 -70
  23. package/propertiesDecorators.json +14 -0
  24. package/propertiesSchema.json +827 -6
  25. package/refs?service=git-upload-pack +0 -0
  26. package/report/adapter-openapi.json +26172 -0
  27. package/report/adapter-openapi.yaml +11817 -0
  28. package/report/adapterInfo.json +10 -0
  29. package/report/updateReport1653680202971.json +120 -0
  30. package/report/updateReport1691508994383.json +120 -0
  31. package/report/updateReport1692202309339.json +120 -0
  32. package/report/updateReport1692203396464.json +120 -0
  33. package/report/updateReport1694470055393.json +120 -0
  34. package/report/updateReport1698423190930.json +120 -0
  35. package/sampleProperties.json +153 -3
  36. package/test/integration/adapterTestBasicGet.js +3 -5
  37. package/test/integration/adapterTestConnectivity.js +91 -42
  38. package/test/integration/adapterTestIntegration.js +157 -105
  39. package/test/unit/adapterBaseTestUnit.js +388 -308
  40. package/test/unit/adapterTestUnit.js +548 -310
  41. package/utils/adapterInfo.js +206 -0
  42. package/utils/addAuth.js +94 -0
  43. package/utils/artifactize.js +1 -1
  44. package/utils/basicGet.js +1 -14
  45. package/utils/checkMigrate.js +1 -1
  46. package/utils/entitiesToDB.js +179 -0
  47. package/utils/findPath.js +1 -1
  48. package/utils/methodDocumentor.js +273 -0
  49. package/utils/modify.js +14 -16
  50. package/utils/packModificationScript.js +1 -1
  51. package/utils/patches2bundledDeps.js +90 -0
  52. package/utils/pre-commit.sh +5 -0
  53. package/utils/removeHooks.js +20 -0
  54. package/utils/taskMover.js +309 -0
  55. package/utils/tbScript.js +129 -53
  56. package/utils/tbUtils.js +152 -35
  57. package/utils/testRunner.js +17 -17
  58. package/utils/troubleshootingAdapter.js +10 -31
  59. package/workflows/README.md +0 -3
@@ -41,6 +41,11 @@
41
41
  "minimum": 1,
42
42
  "maximum": 65535
43
43
  },
44
+ "choosepath": {
45
+ "type": "string",
46
+ "description": "choose the path to use -- requires entityPath choices",
47
+ "default": ""
48
+ },
44
49
  "base_path": {
45
50
  "type": "string",
46
51
  "description": "a base path that is consistent across api calls",
@@ -74,6 +79,11 @@
74
79
  "description": "When true the path variables are encoded in the url",
75
80
  "default": true
76
81
  },
82
+ "encode_queryvars": {
83
+ "type": "boolean",
84
+ "description": "When true the query parameters are encoded in the url",
85
+ "default": true
86
+ },
77
87
  "save_metric": {
78
88
  "type": [
79
89
  "boolean",
@@ -96,6 +106,14 @@
96
106
  "https"
97
107
  ]
98
108
  },
109
+ "service": {
110
+ "type": "string",
111
+ "description": "Service we are integrating with -- used with AWS Authentication",
112
+ "examples": [
113
+ "ec2",
114
+ "route53"
115
+ ]
116
+ },
99
117
  "authentication": {
100
118
  "$ref": "#/definitions/authentication"
101
119
  },
@@ -116,6 +134,12 @@
116
134
  },
117
135
  "mongo": {
118
136
  "$ref": "#/definitions/mongo"
137
+ },
138
+ "devicebroker": {
139
+ "$ref": "#/definitions/devicebroker"
140
+ },
141
+ "cache": {
142
+ "$ref": "#/definitions/cache"
119
143
  }
120
144
  },
121
145
  "required": [
@@ -137,7 +161,9 @@
137
161
  "static_token",
138
162
  "jwt_token",
139
163
  "request_token",
140
- "no_authentication"
164
+ "no_authentication",
165
+ "multi_step_authentication",
166
+ "aws_authentication"
141
167
  ]
142
168
  },
143
169
  "username": {
@@ -270,6 +296,74 @@
270
296
  "type": "string",
271
297
  "description": "The grant type for OAuth requests - can also provide in schema",
272
298
  "default": ""
299
+ },
300
+ "sensitive": {
301
+ "type": "array",
302
+ "description": "List of sensitive keys to search and hide values from being logged",
303
+ "default": [],
304
+ "items": {
305
+ "type": "string"
306
+ }
307
+ },
308
+ "sso": {
309
+ "type": "object",
310
+ "properties": {
311
+ "protocol": {
312
+ "type": "string",
313
+ "description": "the protocol to request token from system",
314
+ "default": "",
315
+ "enum": [
316
+ "http",
317
+ "https",
318
+ ""
319
+ ]
320
+ },
321
+ "host": {
322
+ "type": "string",
323
+ "description": "hostname of the authentication system",
324
+ "default": "",
325
+ "examples": [
326
+ "systemx.customer.com"
327
+ ]
328
+ },
329
+ "port": {
330
+ "type": "integer",
331
+ "description": "port on which to connect to the authentication system",
332
+ "default": 0,
333
+ "minimum": 0,
334
+ "maximum": 65535
335
+ }
336
+ }
337
+ },
338
+ "multiStepAuthCalls": {
339
+ "type": "array",
340
+ "items": {
341
+ "type": "object",
342
+ "properties": {
343
+ "name": {
344
+ "type": "string",
345
+ "description": "Id of the step call",
346
+ "examples": [
347
+ "getAccessToken"
348
+ ]
349
+ },
350
+ "requestFields": {
351
+ "type": "object",
352
+ "description": "The fields set in step request"
353
+ },
354
+ "responseFields": {
355
+ "type": "object",
356
+ "description": "The fields from the step result"
357
+ },
358
+ "successfullResponseCode": {
359
+ "type": "integer",
360
+ "description": "Expected response code for given step, if not set any successfull http response is accepted",
361
+ "examples": [
362
+ 200
363
+ ]
364
+ }
365
+ }
366
+ }
273
367
  }
274
368
  },
275
369
  "required": [
@@ -372,7 +466,13 @@
372
466
  },
373
467
  "query_object": {
374
468
  "type": "object",
375
- "description": "Query object { device: xxxxx } to be placed into the healthcheck, will be converted to query string by the adapter"
469
+ "description": "Query object { device: xxxxx } to be placed into the healthcheck, will be converted to query string by the adapter",
470
+ "default": {}
471
+ },
472
+ "addlHeaders": {
473
+ "type": "object",
474
+ "description": "headers that will be appended to the headers for the call",
475
+ "default": {}
376
476
  }
377
477
  },
378
478
  "required": [
@@ -452,6 +552,7 @@
452
552
  "priorities": {
453
553
  "type": "array",
454
554
  "description": "define your priorities here",
555
+ "default": [],
455
556
  "items": {
456
557
  "type": "object",
457
558
  "properties": {
@@ -522,6 +623,7 @@
522
623
  "failover_codes": {
523
624
  "type": "array",
524
625
  "description": "An array of codes where it is ok to try another method",
626
+ "default": [],
525
627
  "items": {
526
628
  "type": "integer"
527
629
  }
@@ -539,19 +641,23 @@
539
641
  "properties": {
540
642
  "payload": {
541
643
  "type": "object",
542
- "description": "payload fields that will be appended to the provided payload (excluding GET calls)"
644
+ "description": "payload fields that will be appended to the provided payload (excluding GET calls)",
645
+ "default": {}
543
646
  },
544
647
  "uriOptions": {
545
648
  "type": "object",
546
- "description": "options that will be appended to all GET calls"
649
+ "description": "options that will be appended to all GET calls",
650
+ "default": {}
547
651
  },
548
652
  "addlHeaders": {
549
653
  "type": "object",
550
- "description": "headers that will be appended to the headers for the call"
654
+ "description": "headers that will be appended to the headers for the call",
655
+ "default": {}
551
656
  },
552
657
  "authData": {
553
658
  "type": "object",
554
- "description": "authentication data that will be appended to the payload for authentication calls"
659
+ "description": "authentication data that will be appended to the payload for authentication calls",
660
+ "default": {}
555
661
  }
556
662
  }
557
663
  },
@@ -858,6 +964,721 @@
858
964
  }
859
965
  }
860
966
  }
967
+ },
968
+ "devicebroker": {
969
+ "type": "object",
970
+ "properties": {
971
+ "getDevice": {
972
+ "type": "array",
973
+ "description": "Broker call(s) to getDevice",
974
+ "items": {
975
+ "type": "object",
976
+ "properties": {
977
+ "path": {
978
+ "type": "string",
979
+ "description": "The fully qualified path of the call to getDevice (e.g. /rest/api/device/{deviceid})",
980
+ "default": ""
981
+ },
982
+ "method": {
983
+ "type": "string",
984
+ "description": "The method of the call to getDevice",
985
+ "default": "GET"
986
+ },
987
+ "query": {
988
+ "type": "object",
989
+ "description": "The json object with query parameters of the call to getDevice",
990
+ "additionalProperties": {
991
+ "type": [
992
+ "string",
993
+ "number"
994
+ ]
995
+ }
996
+ },
997
+ "body": {
998
+ "type": "object",
999
+ "description": "The json object with body of the call to getDevice",
1000
+ "additionalProperties": {
1001
+ "type": [
1002
+ "string",
1003
+ "number"
1004
+ ]
1005
+ }
1006
+ },
1007
+ "headers": {
1008
+ "type": "object",
1009
+ "description": "The json object with headers of the call to getDevice",
1010
+ "additionalProperties": {
1011
+ "type": [
1012
+ "string",
1013
+ "number"
1014
+ ]
1015
+ }
1016
+ },
1017
+ "handleFailure": {
1018
+ "type": "string",
1019
+ "enum": [
1020
+ "ignore",
1021
+ "fail"
1022
+ ],
1023
+ "description": "return failure or ignore failure",
1024
+ "default": "ignore"
1025
+ },
1026
+ "requestFields": {
1027
+ "type": "object",
1028
+ "description": "The json object with response fields of the call to getDevice",
1029
+ "additionalProperties": {
1030
+ "type": [
1031
+ "string",
1032
+ "number"
1033
+ ]
1034
+ },
1035
+ "properties": {}
1036
+ },
1037
+ "responseDatakey": {
1038
+ "type": "string",
1039
+ "description": "place in the response where the data is - supports jsonquery",
1040
+ "default": ""
1041
+ },
1042
+ "responseFields": {
1043
+ "type": "object",
1044
+ "description": "The json object with response fields of the call to getDevice",
1045
+ "additionalProperties": {
1046
+ "type": [
1047
+ "string",
1048
+ "number"
1049
+ ]
1050
+ },
1051
+ "properties": {
1052
+ "name": {
1053
+ "type": "string",
1054
+ "description": "The field in response to getDevice that contains the name of the device",
1055
+ "default": "name"
1056
+ },
1057
+ "ostype": {
1058
+ "type": "string",
1059
+ "description": "The field in response to getDevice that contains the ostype of the device",
1060
+ "default": "ostype"
1061
+ },
1062
+ "ostypePrefix": {
1063
+ "type": "string",
1064
+ "description": "Any prefix that should be added to the ostype of the device (e.g. aws-)",
1065
+ "default": ""
1066
+ },
1067
+ "port": {
1068
+ "type": "string",
1069
+ "description": "The field in response to getDevice that contains the port of the device",
1070
+ "default": ""
1071
+ },
1072
+ "ipaddress": {
1073
+ "type": "string",
1074
+ "description": "The field in response to getDevice that contains the ip address of the device",
1075
+ "default": ""
1076
+ }
1077
+ }
1078
+ }
1079
+ }
1080
+ }
1081
+ },
1082
+ "getDevicesFiltered": {
1083
+ "type": "array",
1084
+ "description": "Broker call(s) to getDevicesFiltered",
1085
+ "items": {
1086
+ "type": "object",
1087
+ "properties": {
1088
+ "path": {
1089
+ "type": "string",
1090
+ "description": "The fully qualified path of the call to getDevicesFiltered (e.g. /rest/api/device/{deviceid})",
1091
+ "default": ""
1092
+ },
1093
+ "method": {
1094
+ "type": "string",
1095
+ "description": "The method of the call to getDevicesFiltered",
1096
+ "default": "GET"
1097
+ },
1098
+ "pagination": {
1099
+ "type": "object",
1100
+ "description": "todo",
1101
+ "properties": {
1102
+ "offsetVar": {
1103
+ "type": "string",
1104
+ "description": "Name of variable that defines how to go to next set of results"
1105
+ },
1106
+ "limitVar": {
1107
+ "type": "string",
1108
+ "description": "Name of variable that defines the max results returned in a request"
1109
+ },
1110
+ "incrementBy": {
1111
+ "type": "string",
1112
+ "enum": [
1113
+ "limit",
1114
+ "page"
1115
+ ],
1116
+ "description": "How to incremenet offset. Default limit",
1117
+ "default": "limit"
1118
+ },
1119
+ "requestLocation": {
1120
+ "type": "string",
1121
+ "enum": [
1122
+ "query",
1123
+ "body"
1124
+ ],
1125
+ "description": "Where in request the pagination data goes",
1126
+ "default": "query"
1127
+ }
1128
+ }
1129
+ },
1130
+ "query": {
1131
+ "type": "object",
1132
+ "description": "The json object with query parameters of the call to getDevicesFiltered",
1133
+ "additionalProperties": {
1134
+ "type": [
1135
+ "string",
1136
+ "number"
1137
+ ]
1138
+ }
1139
+ },
1140
+ "body": {
1141
+ "type": "object",
1142
+ "description": "The json object with body of the call to getDevicesFiltered",
1143
+ "additionalProperties": {
1144
+ "type": [
1145
+ "string",
1146
+ "number"
1147
+ ]
1148
+ }
1149
+ },
1150
+ "headers": {
1151
+ "type": "object",
1152
+ "description": "The json object with headers of the call to getDevicesFiltered",
1153
+ "additionalProperties": {
1154
+ "type": [
1155
+ "string",
1156
+ "number"
1157
+ ]
1158
+ }
1159
+ },
1160
+ "handleFailure": {
1161
+ "type": "string",
1162
+ "enum": [
1163
+ "ignore",
1164
+ "fail"
1165
+ ],
1166
+ "description": "return failure or ignore failure",
1167
+ "default": "ignore"
1168
+ },
1169
+ "requestFields": {
1170
+ "type": "object",
1171
+ "description": "The json object with response fields of the call to getDevice",
1172
+ "additionalProperties": {
1173
+ "type": [
1174
+ "string",
1175
+ "number"
1176
+ ]
1177
+ },
1178
+ "properties": {}
1179
+ },
1180
+ "responseDatakey": {
1181
+ "type": "string",
1182
+ "description": "place in the response where the data is - supports jsonquery",
1183
+ "default": ""
1184
+ },
1185
+ "responseFields": {
1186
+ "type": "object",
1187
+ "description": "The json object with response fields of the call to getDevicesFiltered",
1188
+ "additionalProperties": {
1189
+ "type": [
1190
+ "string",
1191
+ "number"
1192
+ ]
1193
+ },
1194
+ "properties": {
1195
+ "name": {
1196
+ "type": "string",
1197
+ "description": "The field in response to getDevicesFiltered that contains the name of the device",
1198
+ "default": "name"
1199
+ },
1200
+ "ostype": {
1201
+ "type": "string",
1202
+ "description": "The field in response to getDevicesFiltered that contains the ostype of the device",
1203
+ "default": "ostype"
1204
+ },
1205
+ "ostypePrefix": {
1206
+ "type": "string",
1207
+ "description": "Any prefix that should be added to the ostype of the device (e.g. aws-)",
1208
+ "default": ""
1209
+ },
1210
+ "port": {
1211
+ "type": "string",
1212
+ "description": "The field in response to getDevicesFiltered that contains the port of the device",
1213
+ "default": ""
1214
+ },
1215
+ "ipaddress": {
1216
+ "type": "string",
1217
+ "description": "The field in response to getDevicesFiltered that contains the ip address of the device",
1218
+ "default": ""
1219
+ }
1220
+ }
1221
+ }
1222
+ }
1223
+ }
1224
+ },
1225
+ "isAlive": {
1226
+ "type": "array",
1227
+ "description": "Broker call(s) to determine if the device isAlive",
1228
+ "items": {
1229
+ "type": "object",
1230
+ "properties": {
1231
+ "path": {
1232
+ "type": "string",
1233
+ "description": "The fully qualified path of the call to isAlive (e.g. /rest/api/device/{deviceid})",
1234
+ "default": ""
1235
+ },
1236
+ "method": {
1237
+ "type": "string",
1238
+ "description": "The method of the call to isAlive",
1239
+ "default": "GET"
1240
+ },
1241
+ "query": {
1242
+ "type": "object",
1243
+ "description": "The json object with query parameters of the call to isAlive",
1244
+ "additionalProperties": {
1245
+ "type": [
1246
+ "string",
1247
+ "number"
1248
+ ]
1249
+ }
1250
+ },
1251
+ "body": {
1252
+ "type": "object",
1253
+ "description": "The json object with body of the call to isAlive",
1254
+ "additionalProperties": {
1255
+ "type": [
1256
+ "string",
1257
+ "number"
1258
+ ]
1259
+ }
1260
+ },
1261
+ "headers": {
1262
+ "type": "object",
1263
+ "description": "The json object with headers of the call to isAlive",
1264
+ "additionalProperties": {
1265
+ "type": [
1266
+ "string",
1267
+ "number"
1268
+ ]
1269
+ }
1270
+ },
1271
+ "handleFailure": {
1272
+ "type": "string",
1273
+ "enum": [
1274
+ "ignore",
1275
+ "fail"
1276
+ ],
1277
+ "description": "return failure or ignore isAlive",
1278
+ "default": "ignore"
1279
+ },
1280
+ "requestFields": {
1281
+ "type": "object",
1282
+ "description": "The json object with response fields of the call to getDevice",
1283
+ "additionalProperties": {
1284
+ "type": [
1285
+ "string",
1286
+ "number"
1287
+ ]
1288
+ },
1289
+ "properties": {}
1290
+ },
1291
+ "responseDatakey": {
1292
+ "type": "string",
1293
+ "description": "place in the response where the data is - supports jsonquery",
1294
+ "default": ""
1295
+ },
1296
+ "responseFields": {
1297
+ "type": "object",
1298
+ "description": "The json object with response fields of the call to isAlive",
1299
+ "additionalProperties": {
1300
+ "type": [
1301
+ "string",
1302
+ "number"
1303
+ ]
1304
+ },
1305
+ "properties": {
1306
+ "status": {
1307
+ "type": "string",
1308
+ "description": "The field in response to isAlive that contains the status of the device",
1309
+ "default": "name"
1310
+ },
1311
+ "statusValue": {
1312
+ "type": "string",
1313
+ "description": "The expected value in the status field",
1314
+ "default": "true"
1315
+ }
1316
+ }
1317
+ }
1318
+ }
1319
+ }
1320
+ },
1321
+ "getConfig": {
1322
+ "type": "array",
1323
+ "description": "Broker call(s) to getConfig",
1324
+ "items": {
1325
+ "type": "object",
1326
+ "properties": {
1327
+ "path": {
1328
+ "type": "string",
1329
+ "description": "The fully qualified path of the call to getConfig (e.g. /rest/api/device/{deviceid})",
1330
+ "default": ""
1331
+ },
1332
+ "method": {
1333
+ "type": "string",
1334
+ "description": "The method of the call to getConfig",
1335
+ "default": "GET"
1336
+ },
1337
+ "query": {
1338
+ "type": "object",
1339
+ "description": "The json object with query parameters of the call to getConfig",
1340
+ "additionalProperties": {
1341
+ "type": [
1342
+ "string",
1343
+ "number"
1344
+ ]
1345
+ }
1346
+ },
1347
+ "body": {
1348
+ "type": "object",
1349
+ "description": "The json object with body of the call to getConfig",
1350
+ "additionalProperties": {
1351
+ "type": [
1352
+ "string",
1353
+ "number"
1354
+ ]
1355
+ }
1356
+ },
1357
+ "headers": {
1358
+ "type": "object",
1359
+ "description": "The json object with headers of the call to getConfig",
1360
+ "additionalProperties": {
1361
+ "type": [
1362
+ "string",
1363
+ "number"
1364
+ ]
1365
+ }
1366
+ },
1367
+ "handleFailure": {
1368
+ "type": "string",
1369
+ "enum": [
1370
+ "ignore",
1371
+ "fail"
1372
+ ],
1373
+ "description": "return failure or ignore getConfig",
1374
+ "default": "ignore"
1375
+ },
1376
+ "requestFields": {
1377
+ "type": "object",
1378
+ "description": "The json object with response fields of the call to getDevice",
1379
+ "additionalProperties": {
1380
+ "type": [
1381
+ "string",
1382
+ "number"
1383
+ ]
1384
+ },
1385
+ "properties": {}
1386
+ },
1387
+ "responseDatakey": {
1388
+ "type": "string",
1389
+ "description": "place in the response where the data is - supports jsonquery",
1390
+ "default": ""
1391
+ },
1392
+ "responseFields": {
1393
+ "type": "object",
1394
+ "description": "The json object with response fields of the call to getConfig",
1395
+ "additionalProperties": {
1396
+ "type": [
1397
+ "string",
1398
+ "number"
1399
+ ]
1400
+ },
1401
+ "properties": {}
1402
+ }
1403
+ }
1404
+ }
1405
+ },
1406
+ "getCount": {
1407
+ "type": "array",
1408
+ "description": "Broker call(s) to getCount",
1409
+ "items": {
1410
+ "type": "object",
1411
+ "properties": {
1412
+ "path": {
1413
+ "type": "string",
1414
+ "description": "The fully qualified path of the call to getCount (e.g. /rest/api/device/{deviceid})",
1415
+ "default": ""
1416
+ },
1417
+ "method": {
1418
+ "type": "string",
1419
+ "description": "The method of the call to getCount",
1420
+ "default": "GET"
1421
+ },
1422
+ "query": {
1423
+ "type": "object",
1424
+ "description": "The json object with query parameters of the call to getCount",
1425
+ "additionalProperties": {
1426
+ "type": [
1427
+ "string",
1428
+ "number"
1429
+ ]
1430
+ }
1431
+ },
1432
+ "body": {
1433
+ "type": "object",
1434
+ "description": "The json object with body of the call to getCount",
1435
+ "additionalProperties": {
1436
+ "type": [
1437
+ "string",
1438
+ "number"
1439
+ ]
1440
+ }
1441
+ },
1442
+ "headers": {
1443
+ "type": "object",
1444
+ "description": "The json object with headers of the call to getCount",
1445
+ "additionalProperties": {
1446
+ "type": [
1447
+ "string",
1448
+ "number"
1449
+ ]
1450
+ }
1451
+ },
1452
+ "handleFailure": {
1453
+ "type": "string",
1454
+ "enum": [
1455
+ "ignore",
1456
+ "fail"
1457
+ ],
1458
+ "description": "return failure or ignore getCount",
1459
+ "default": "ignore"
1460
+ },
1461
+ "requestFields": {
1462
+ "type": "object",
1463
+ "description": "The json object with response fields of the call to getDevice",
1464
+ "additionalProperties": {
1465
+ "type": [
1466
+ "string",
1467
+ "number"
1468
+ ]
1469
+ },
1470
+ "properties": {}
1471
+ },
1472
+ "responseDatakey": {
1473
+ "type": "string",
1474
+ "description": "place in the response where the data is - supports jsonquery",
1475
+ "default": ""
1476
+ },
1477
+ "responseFields": {
1478
+ "type": "object",
1479
+ "description": "The json object with response fields of the call to getConfig",
1480
+ "additionalProperties": {
1481
+ "type": [
1482
+ "string",
1483
+ "number"
1484
+ ]
1485
+ },
1486
+ "properties": {}
1487
+ }
1488
+ }
1489
+ }
1490
+ }
1491
+ }
1492
+ },
1493
+ "cache": {
1494
+ "type": "object",
1495
+ "properties": {
1496
+ "enabled": {
1497
+ "type": "boolean",
1498
+ "description": "Whether or not cache is enabled for adapter",
1499
+ "default": false
1500
+ },
1501
+ "entities": {
1502
+ "type": "array",
1503
+ "description": "Information for the cached entities",
1504
+ "items": {
1505
+ "type": "object",
1506
+ "properties": {
1507
+ "entityType": {
1508
+ "type": "string",
1509
+ "description": "The name of the entity - should match adapter entity configuration or a broker (e.g. Device)",
1510
+ "default": ""
1511
+ },
1512
+ "frequency": {
1513
+ "type": "integer",
1514
+ "description": "how long (in minutes) we wait to re-populate the cache",
1515
+ "default": 1440,
1516
+ "maximum": 10080
1517
+ },
1518
+ "flushOnFail": {
1519
+ "type": "boolean",
1520
+ "description": "Whether to clear the cache we have if the populate failed",
1521
+ "default": false
1522
+ },
1523
+ "limit": {
1524
+ "type": "integer",
1525
+ "description": "maximum number of items to keep in cache",
1526
+ "default": 1000
1527
+ },
1528
+ "retryAttempts": {
1529
+ "type": "integer",
1530
+ "description": "number of times to retry the populate call before failure",
1531
+ "default": 5
1532
+ },
1533
+ "sort": {
1534
+ "type": "boolean",
1535
+ "description": "whether to sort the data or not",
1536
+ "default": true
1537
+ },
1538
+ "populate": {
1539
+ "type": "array",
1540
+ "description": "Information for the call(s) used to populate the cache",
1541
+ "items": {
1542
+ "type": "object",
1543
+ "properties": {
1544
+ "path": {
1545
+ "type": "string",
1546
+ "description": "The fully qualified path of the call to getDevice (e.g. /rest/api/device/{deviceid})",
1547
+ "default": ""
1548
+ },
1549
+ "method": {
1550
+ "type": "string",
1551
+ "description": "The method of the call to getDevice",
1552
+ "default": "GET"
1553
+ },
1554
+ "pagination": {
1555
+ "type": "object",
1556
+ "description": "todo",
1557
+ "properties": {
1558
+ "offsetVar": {
1559
+ "type": "string",
1560
+ "description": "Name of variable that defines how to go to next set of results"
1561
+ },
1562
+ "limitVar": {
1563
+ "type": "string",
1564
+ "description": "Name of variable that defines the max results returned in a request"
1565
+ },
1566
+ "incrementBy": {
1567
+ "type": "string",
1568
+ "enum": [
1569
+ "limit",
1570
+ "page"
1571
+ ],
1572
+ "description": "How to incremenet offset. Default limit",
1573
+ "default": "limit"
1574
+ },
1575
+ "requestLocation": {
1576
+ "type": "string",
1577
+ "enum": [
1578
+ "query",
1579
+ "body"
1580
+ ],
1581
+ "description": "Where in request the pagination data goes",
1582
+ "default": "query"
1583
+ }
1584
+ }
1585
+ },
1586
+ "query": {
1587
+ "type": "object",
1588
+ "description": "The json object with query parameters of the call to getDevice",
1589
+ "additionalProperties": {
1590
+ "type": [
1591
+ "string",
1592
+ "number"
1593
+ ]
1594
+ }
1595
+ },
1596
+ "body": {
1597
+ "type": "object",
1598
+ "description": "The json object with body of the call to getDevice",
1599
+ "additionalProperties": {
1600
+ "type": [
1601
+ "string",
1602
+ "number"
1603
+ ]
1604
+ }
1605
+ },
1606
+ "headers": {
1607
+ "type": "object",
1608
+ "description": "The json object with headers of the call to getDevice",
1609
+ "additionalProperties": {
1610
+ "type": [
1611
+ "string",
1612
+ "number"
1613
+ ]
1614
+ }
1615
+ },
1616
+ "handleFailure": {
1617
+ "type": "string",
1618
+ "enum": [
1619
+ "ignore",
1620
+ "fail"
1621
+ ],
1622
+ "description": "return failure or ignore failure",
1623
+ "default": "ignore"
1624
+ },
1625
+ "requestFields": {
1626
+ "type": "object",
1627
+ "description": "The json object with response fields of the call to getDevice",
1628
+ "additionalProperties": {
1629
+ "type": [
1630
+ "string",
1631
+ "number"
1632
+ ]
1633
+ },
1634
+ "properties": {}
1635
+ },
1636
+ "responseDatakey": {
1637
+ "type": "string",
1638
+ "description": "place in the response where the data is - supports jsonquery",
1639
+ "default": ""
1640
+ },
1641
+ "responseFields": {
1642
+ "type": "object",
1643
+ "description": "The json object with response fields of the call to getDevice",
1644
+ "additionalProperties": {
1645
+ "type": [
1646
+ "string",
1647
+ "number"
1648
+ ]
1649
+ }
1650
+ }
1651
+ }
1652
+ }
1653
+ },
1654
+ "cachedTasks": {
1655
+ "type": "array",
1656
+ "description": "Information for the call(s) used to populate the cache",
1657
+ "items": {
1658
+ "type": "object",
1659
+ "properties": {
1660
+ "name": {
1661
+ "type": "string",
1662
+ "description": "the name of the task/action that should utilize cached information",
1663
+ "default": ""
1664
+ },
1665
+ "filterField": {
1666
+ "type": "string",
1667
+ "description": "the field that contains filter information for this call",
1668
+ "default": ""
1669
+ },
1670
+ "filterLoc": {
1671
+ "type": "string",
1672
+ "description": "the field that contains the location of the filter field",
1673
+ "default": ""
1674
+ }
1675
+ }
1676
+ }
1677
+ }
1678
+ }
1679
+ }
1680
+ }
1681
+ }
861
1682
  }
862
1683
  }
863
1684
  }