@itentialopensource/adapter-aruba_airwave 0.2.1 → 0.3.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 (60) hide show
  1. package/.eslintignore +0 -1
  2. package/.jshintrc +3 -0
  3. package/AUTH.md +39 -0
  4. package/BROKER.md +199 -0
  5. package/CALLS.md +349 -0
  6. package/CHANGELOG.md +8 -0
  7. package/CODE_OF_CONDUCT.md +12 -17
  8. package/CONTRIBUTING.md +3 -148
  9. package/ENHANCE.md +69 -0
  10. package/LICENSE +0 -0
  11. package/PROPERTIES.md +641 -0
  12. package/README.md +240 -438
  13. package/SUMMARY.md +9 -0
  14. package/SYSTEMINFO.md +11 -0
  15. package/TROUBLESHOOT.md +47 -0
  16. package/adapter.js +482 -226
  17. package/adapterBase.js +883 -337
  18. package/changelogs/changelog.md +24 -0
  19. package/entities/.generic/action.json +214 -0
  20. package/entities/.generic/schema.json +28 -0
  21. package/error.json +6 -0
  22. package/metadata.json +47 -0
  23. package/package.json +23 -25
  24. package/pronghorn.json +774 -34
  25. package/propertiesDecorators.json +14 -0
  26. package/propertiesSchema.json +866 -6
  27. package/refs?service=git-upload-pack +0 -0
  28. package/report/adapter-openapi.json +1583 -0
  29. package/report/adapter-openapi.yaml +1300 -0
  30. package/report/adapterInfo.json +10 -0
  31. package/report/updateReport1691507584816.json +120 -0
  32. package/report/updateReport1692202582785.json +120 -0
  33. package/report/updateReport1694461838457.json +120 -0
  34. package/report/updateReport1698420960460.json +120 -0
  35. package/sampleProperties.json +163 -4
  36. package/test/integration/adapterTestBasicGet.js +3 -5
  37. package/test/integration/adapterTestConnectivity.js +91 -42
  38. package/test/integration/adapterTestIntegration.js +157 -98
  39. package/test/unit/adapterBaseTestUnit.js +400 -305
  40. package/test/unit/adapterTestUnit.js +917 -158
  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 +63 -0
  46. package/utils/entitiesToDB.js +179 -0
  47. package/utils/findPath.js +74 -0
  48. package/utils/methodDocumentor.js +273 -0
  49. package/utils/modify.js +152 -0
  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/setup.js +0 -0
  55. package/utils/taskMover.js +309 -0
  56. package/utils/tbScript.js +129 -53
  57. package/utils/tbUtils.js +152 -35
  58. package/utils/testRunner.js +17 -17
  59. package/utils/troubleshootingAdapter.js +17 -43
  60. package/workflows/README.md +0 -3
@@ -18,6 +18,11 @@
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",
@@ -51,6 +56,11 @@
51
56
  "description": "When true the path variables are encoded in the url",
52
57
  "default": true
53
58
  },
59
+ "encode_queryvars": {
60
+ "type": "boolean",
61
+ "description": "When true the query parameters are encoded in the url",
62
+ "default": true
63
+ },
54
64
  "save_metric": {
55
65
  "type": [
56
66
  "boolean",
@@ -73,6 +83,14 @@
73
83
  "https"
74
84
  ]
75
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
+ },
76
94
  "authentication": {
77
95
  "$ref": "#/definitions/authentication"
78
96
  },
@@ -93,6 +111,12 @@
93
111
  },
94
112
  "mongo": {
95
113
  "$ref": "#/definitions/mongo"
114
+ },
115
+ "devicebroker": {
116
+ "$ref": "#/definitions/devicebroker"
117
+ },
118
+ "cache": {
119
+ "$ref": "#/definitions/cache"
96
120
  }
97
121
  },
98
122
  "required": [
@@ -114,7 +138,9 @@
114
138
  "static_token",
115
139
  "jwt_token",
116
140
  "request_token",
117
- "no_authentication"
141
+ "no_authentication",
142
+ "multi_step_authentication",
143
+ "aws_authentication"
118
144
  ]
119
145
  },
120
146
  "username": {
@@ -227,6 +253,94 @@
227
253
  "Basic {b64}{username}:{password}{/b64}",
228
254
  "token={token}"
229
255
  ]
256
+ },
257
+ "auth_logging": {
258
+ "type": "boolean",
259
+ "description": "This property turns on logging of Authentication Information and should only be true when debugging authentication and connectivity",
260
+ "default": false
261
+ },
262
+ "client_id": {
263
+ "type": "string",
264
+ "description": "The client id for OAuth requests - can also use username depending on schema",
265
+ "default": ""
266
+ },
267
+ "client_secret": {
268
+ "type": "string",
269
+ "description": "The client secret for OAuth requests - can also use password depending on schema",
270
+ "default": ""
271
+ },
272
+ "grant_type": {
273
+ "type": "string",
274
+ "description": "The grant type for OAuth requests - can also provide in schema",
275
+ "default": ""
276
+ },
277
+ "sensitive": {
278
+ "type": "array",
279
+ "description": "List of sensitive keys to search and hide values from being logged",
280
+ "default": [],
281
+ "items": {
282
+ "type": "string"
283
+ }
284
+ },
285
+ "sso": {
286
+ "type": "object",
287
+ "properties": {
288
+ "protocol": {
289
+ "type": "string",
290
+ "description": "the protocol to request token from system",
291
+ "default": "",
292
+ "enum": [
293
+ "http",
294
+ "https",
295
+ ""
296
+ ]
297
+ },
298
+ "host": {
299
+ "type": "string",
300
+ "description": "hostname of the authentication system",
301
+ "default": "",
302
+ "examples": [
303
+ "systemx.customer.com"
304
+ ]
305
+ },
306
+ "port": {
307
+ "type": "integer",
308
+ "description": "port on which to connect to the authentication system",
309
+ "default": 0,
310
+ "minimum": 0,
311
+ "maximum": 65535
312
+ }
313
+ }
314
+ },
315
+ "multiStepAuthCalls": {
316
+ "type": "array",
317
+ "items": {
318
+ "type": "object",
319
+ "properties": {
320
+ "name": {
321
+ "type": "string",
322
+ "description": "Id of the step call",
323
+ "examples": [
324
+ "getAccessToken"
325
+ ]
326
+ },
327
+ "requestFields": {
328
+ "type": "object",
329
+ "description": "The fields set in step request"
330
+ },
331
+ "responseFields": {
332
+ "type": "object",
333
+ "description": "The fields from the step result"
334
+ },
335
+ "successfullResponseCode": {
336
+ "type": "integer",
337
+ "description": "Expected response code for given step, if not set any successfull http response is accepted",
338
+ "examples": [
339
+ 200
340
+ ]
341
+ }
342
+ }
343
+ }
230
344
  }
231
345
  },
232
346
  "required": [
@@ -326,6 +440,16 @@
326
440
  "examples": [
327
441
  "/api/version/ping"
328
442
  ]
443
+ },
444
+ "query_object": {
445
+ "type": "object",
446
+ "description": "Query object { device: xxxxx } to be placed into the healthcheck, will be converted to query string by the adapter",
447
+ "default": {}
448
+ },
449
+ "addlHeaders": {
450
+ "type": "object",
451
+ "description": "headers that will be appended to the headers for the call",
452
+ "default": {}
329
453
  }
330
454
  },
331
455
  "required": [
@@ -405,6 +529,7 @@
405
529
  "priorities": {
406
530
  "type": "array",
407
531
  "description": "define your priorities here",
532
+ "default": [],
408
533
  "items": {
409
534
  "type": "object",
410
535
  "properties": {
@@ -475,6 +600,7 @@
475
600
  "failover_codes": {
476
601
  "type": "array",
477
602
  "description": "An array of codes where it is ok to try another method",
603
+ "default": [],
478
604
  "items": {
479
605
  "type": "integer"
480
606
  }
@@ -492,19 +618,23 @@
492
618
  "properties": {
493
619
  "payload": {
494
620
  "type": "object",
495
- "description": "payload fields that will be appended to the provided payload (excluding GET calls)"
621
+ "description": "payload fields that will be appended to the provided payload (excluding GET calls)",
622
+ "default": {}
496
623
  },
497
624
  "uriOptions": {
498
625
  "type": "object",
499
- "description": "options that will be appended to all GET calls"
626
+ "description": "options that will be appended to all GET calls",
627
+ "default": {}
500
628
  },
501
629
  "addlHeaders": {
502
630
  "type": "object",
503
- "description": "headers that will be appended to the headers for the call"
631
+ "description": "headers that will be appended to the headers for the call",
632
+ "default": {}
504
633
  },
505
634
  "authData": {
506
635
  "type": "object",
507
- "description": "authentication data that will be appended to the payload for authentication calls"
636
+ "description": "authentication data that will be appended to the payload for authentication calls",
637
+ "default": {}
508
638
  }
509
639
  }
510
640
  },
@@ -522,6 +652,11 @@
522
652
  "type": "boolean",
523
653
  "description": "Archives each request/response and corresponding metrics",
524
654
  "default": false
655
+ },
656
+ "return_request": {
657
+ "type": "boolean",
658
+ "description": "This property turns on returning the response information - need to be carefull in case credentials are in the path",
659
+ "default": false
525
660
  }
526
661
  },
527
662
  "required": [
@@ -565,6 +700,16 @@
565
700
  "socks5",
566
701
  "tls"
567
702
  ]
703
+ },
704
+ "username": {
705
+ "type": "string",
706
+ "description": "username for proxy authentication",
707
+ "default": ""
708
+ },
709
+ "password": {
710
+ "type": "string",
711
+ "description": "password for proxy authentication",
712
+ "default": ""
568
713
  }
569
714
  },
570
715
  "required": [
@@ -796,6 +941,721 @@
796
941
  }
797
942
  }
798
943
  }
944
+ },
945
+ "devicebroker": {
946
+ "type": "object",
947
+ "properties": {
948
+ "getDevice": {
949
+ "type": "array",
950
+ "description": "Broker call(s) to getDevice",
951
+ "items": {
952
+ "type": "object",
953
+ "properties": {
954
+ "path": {
955
+ "type": "string",
956
+ "description": "The fully qualified path of the call to getDevice (e.g. /rest/api/device/{deviceid})",
957
+ "default": ""
958
+ },
959
+ "method": {
960
+ "type": "string",
961
+ "description": "The method of the call to getDevice",
962
+ "default": "GET"
963
+ },
964
+ "query": {
965
+ "type": "object",
966
+ "description": "The json object with query parameters of the call to getDevice",
967
+ "additionalProperties": {
968
+ "type": [
969
+ "string",
970
+ "number"
971
+ ]
972
+ }
973
+ },
974
+ "body": {
975
+ "type": "object",
976
+ "description": "The json object with body of the call to getDevice",
977
+ "additionalProperties": {
978
+ "type": [
979
+ "string",
980
+ "number"
981
+ ]
982
+ }
983
+ },
984
+ "headers": {
985
+ "type": "object",
986
+ "description": "The json object with headers of the call to getDevice",
987
+ "additionalProperties": {
988
+ "type": [
989
+ "string",
990
+ "number"
991
+ ]
992
+ }
993
+ },
994
+ "handleFailure": {
995
+ "type": "string",
996
+ "enum": [
997
+ "ignore",
998
+ "fail"
999
+ ],
1000
+ "description": "return failure or ignore failure",
1001
+ "default": "ignore"
1002
+ },
1003
+ "requestFields": {
1004
+ "type": "object",
1005
+ "description": "The json object with response fields of the call to getDevice",
1006
+ "additionalProperties": {
1007
+ "type": [
1008
+ "string",
1009
+ "number"
1010
+ ]
1011
+ },
1012
+ "properties": {}
1013
+ },
1014
+ "responseDatakey": {
1015
+ "type": "string",
1016
+ "description": "place in the response where the data is - supports jsonquery",
1017
+ "default": ""
1018
+ },
1019
+ "responseFields": {
1020
+ "type": "object",
1021
+ "description": "The json object with response fields of the call to getDevice",
1022
+ "additionalProperties": {
1023
+ "type": [
1024
+ "string",
1025
+ "number"
1026
+ ]
1027
+ },
1028
+ "properties": {
1029
+ "name": {
1030
+ "type": "string",
1031
+ "description": "The field in response to getDevice that contains the name of the device",
1032
+ "default": "name"
1033
+ },
1034
+ "ostype": {
1035
+ "type": "string",
1036
+ "description": "The field in response to getDevice that contains the ostype of the device",
1037
+ "default": "ostype"
1038
+ },
1039
+ "ostypePrefix": {
1040
+ "type": "string",
1041
+ "description": "Any prefix that should be added to the ostype of the device (e.g. aws-)",
1042
+ "default": ""
1043
+ },
1044
+ "port": {
1045
+ "type": "string",
1046
+ "description": "The field in response to getDevice that contains the port of the device",
1047
+ "default": ""
1048
+ },
1049
+ "ipaddress": {
1050
+ "type": "string",
1051
+ "description": "The field in response to getDevice that contains the ip address of the device",
1052
+ "default": ""
1053
+ }
1054
+ }
1055
+ }
1056
+ }
1057
+ }
1058
+ },
1059
+ "getDevicesFiltered": {
1060
+ "type": "array",
1061
+ "description": "Broker call(s) to getDevicesFiltered",
1062
+ "items": {
1063
+ "type": "object",
1064
+ "properties": {
1065
+ "path": {
1066
+ "type": "string",
1067
+ "description": "The fully qualified path of the call to getDevicesFiltered (e.g. /rest/api/device/{deviceid})",
1068
+ "default": ""
1069
+ },
1070
+ "method": {
1071
+ "type": "string",
1072
+ "description": "The method of the call to getDevicesFiltered",
1073
+ "default": "GET"
1074
+ },
1075
+ "pagination": {
1076
+ "type": "object",
1077
+ "description": "todo",
1078
+ "properties": {
1079
+ "offsetVar": {
1080
+ "type": "string",
1081
+ "description": "Name of variable that defines how to go to next set of results"
1082
+ },
1083
+ "limitVar": {
1084
+ "type": "string",
1085
+ "description": "Name of variable that defines the max results returned in a request"
1086
+ },
1087
+ "incrementBy": {
1088
+ "type": "string",
1089
+ "enum": [
1090
+ "limit",
1091
+ "page"
1092
+ ],
1093
+ "description": "How to incremenet offset. Default limit",
1094
+ "default": "limit"
1095
+ },
1096
+ "requestLocation": {
1097
+ "type": "string",
1098
+ "enum": [
1099
+ "query",
1100
+ "body"
1101
+ ],
1102
+ "description": "Where in request the pagination data goes",
1103
+ "default": "query"
1104
+ }
1105
+ }
1106
+ },
1107
+ "query": {
1108
+ "type": "object",
1109
+ "description": "The json object with query parameters of the call to getDevicesFiltered",
1110
+ "additionalProperties": {
1111
+ "type": [
1112
+ "string",
1113
+ "number"
1114
+ ]
1115
+ }
1116
+ },
1117
+ "body": {
1118
+ "type": "object",
1119
+ "description": "The json object with body of the call to getDevicesFiltered",
1120
+ "additionalProperties": {
1121
+ "type": [
1122
+ "string",
1123
+ "number"
1124
+ ]
1125
+ }
1126
+ },
1127
+ "headers": {
1128
+ "type": "object",
1129
+ "description": "The json object with headers of the call to getDevicesFiltered",
1130
+ "additionalProperties": {
1131
+ "type": [
1132
+ "string",
1133
+ "number"
1134
+ ]
1135
+ }
1136
+ },
1137
+ "handleFailure": {
1138
+ "type": "string",
1139
+ "enum": [
1140
+ "ignore",
1141
+ "fail"
1142
+ ],
1143
+ "description": "return failure or ignore failure",
1144
+ "default": "ignore"
1145
+ },
1146
+ "requestFields": {
1147
+ "type": "object",
1148
+ "description": "The json object with response fields of the call to getDevice",
1149
+ "additionalProperties": {
1150
+ "type": [
1151
+ "string",
1152
+ "number"
1153
+ ]
1154
+ },
1155
+ "properties": {}
1156
+ },
1157
+ "responseDatakey": {
1158
+ "type": "string",
1159
+ "description": "place in the response where the data is - supports jsonquery",
1160
+ "default": ""
1161
+ },
1162
+ "responseFields": {
1163
+ "type": "object",
1164
+ "description": "The json object with response fields of the call to getDevicesFiltered",
1165
+ "additionalProperties": {
1166
+ "type": [
1167
+ "string",
1168
+ "number"
1169
+ ]
1170
+ },
1171
+ "properties": {
1172
+ "name": {
1173
+ "type": "string",
1174
+ "description": "The field in response to getDevicesFiltered that contains the name of the device",
1175
+ "default": "name"
1176
+ },
1177
+ "ostype": {
1178
+ "type": "string",
1179
+ "description": "The field in response to getDevicesFiltered that contains the ostype of the device",
1180
+ "default": "ostype"
1181
+ },
1182
+ "ostypePrefix": {
1183
+ "type": "string",
1184
+ "description": "Any prefix that should be added to the ostype of the device (e.g. aws-)",
1185
+ "default": ""
1186
+ },
1187
+ "port": {
1188
+ "type": "string",
1189
+ "description": "The field in response to getDevicesFiltered that contains the port of the device",
1190
+ "default": ""
1191
+ },
1192
+ "ipaddress": {
1193
+ "type": "string",
1194
+ "description": "The field in response to getDevicesFiltered that contains the ip address of the device",
1195
+ "default": ""
1196
+ }
1197
+ }
1198
+ }
1199
+ }
1200
+ }
1201
+ },
1202
+ "isAlive": {
1203
+ "type": "array",
1204
+ "description": "Broker call(s) to determine if the device isAlive",
1205
+ "items": {
1206
+ "type": "object",
1207
+ "properties": {
1208
+ "path": {
1209
+ "type": "string",
1210
+ "description": "The fully qualified path of the call to isAlive (e.g. /rest/api/device/{deviceid})",
1211
+ "default": ""
1212
+ },
1213
+ "method": {
1214
+ "type": "string",
1215
+ "description": "The method of the call to isAlive",
1216
+ "default": "GET"
1217
+ },
1218
+ "query": {
1219
+ "type": "object",
1220
+ "description": "The json object with query parameters of the call to isAlive",
1221
+ "additionalProperties": {
1222
+ "type": [
1223
+ "string",
1224
+ "number"
1225
+ ]
1226
+ }
1227
+ },
1228
+ "body": {
1229
+ "type": "object",
1230
+ "description": "The json object with body of the call to isAlive",
1231
+ "additionalProperties": {
1232
+ "type": [
1233
+ "string",
1234
+ "number"
1235
+ ]
1236
+ }
1237
+ },
1238
+ "headers": {
1239
+ "type": "object",
1240
+ "description": "The json object with headers of the call to isAlive",
1241
+ "additionalProperties": {
1242
+ "type": [
1243
+ "string",
1244
+ "number"
1245
+ ]
1246
+ }
1247
+ },
1248
+ "handleFailure": {
1249
+ "type": "string",
1250
+ "enum": [
1251
+ "ignore",
1252
+ "fail"
1253
+ ],
1254
+ "description": "return failure or ignore isAlive",
1255
+ "default": "ignore"
1256
+ },
1257
+ "requestFields": {
1258
+ "type": "object",
1259
+ "description": "The json object with response fields of the call to getDevice",
1260
+ "additionalProperties": {
1261
+ "type": [
1262
+ "string",
1263
+ "number"
1264
+ ]
1265
+ },
1266
+ "properties": {}
1267
+ },
1268
+ "responseDatakey": {
1269
+ "type": "string",
1270
+ "description": "place in the response where the data is - supports jsonquery",
1271
+ "default": ""
1272
+ },
1273
+ "responseFields": {
1274
+ "type": "object",
1275
+ "description": "The json object with response fields of the call to isAlive",
1276
+ "additionalProperties": {
1277
+ "type": [
1278
+ "string",
1279
+ "number"
1280
+ ]
1281
+ },
1282
+ "properties": {
1283
+ "status": {
1284
+ "type": "string",
1285
+ "description": "The field in response to isAlive that contains the status of the device",
1286
+ "default": "name"
1287
+ },
1288
+ "statusValue": {
1289
+ "type": "string",
1290
+ "description": "The expected value in the status field",
1291
+ "default": "true"
1292
+ }
1293
+ }
1294
+ }
1295
+ }
1296
+ }
1297
+ },
1298
+ "getConfig": {
1299
+ "type": "array",
1300
+ "description": "Broker call(s) to getConfig",
1301
+ "items": {
1302
+ "type": "object",
1303
+ "properties": {
1304
+ "path": {
1305
+ "type": "string",
1306
+ "description": "The fully qualified path of the call to getConfig (e.g. /rest/api/device/{deviceid})",
1307
+ "default": ""
1308
+ },
1309
+ "method": {
1310
+ "type": "string",
1311
+ "description": "The method of the call to getConfig",
1312
+ "default": "GET"
1313
+ },
1314
+ "query": {
1315
+ "type": "object",
1316
+ "description": "The json object with query parameters of the call to getConfig",
1317
+ "additionalProperties": {
1318
+ "type": [
1319
+ "string",
1320
+ "number"
1321
+ ]
1322
+ }
1323
+ },
1324
+ "body": {
1325
+ "type": "object",
1326
+ "description": "The json object with body of the call to getConfig",
1327
+ "additionalProperties": {
1328
+ "type": [
1329
+ "string",
1330
+ "number"
1331
+ ]
1332
+ }
1333
+ },
1334
+ "headers": {
1335
+ "type": "object",
1336
+ "description": "The json object with headers of the call to getConfig",
1337
+ "additionalProperties": {
1338
+ "type": [
1339
+ "string",
1340
+ "number"
1341
+ ]
1342
+ }
1343
+ },
1344
+ "handleFailure": {
1345
+ "type": "string",
1346
+ "enum": [
1347
+ "ignore",
1348
+ "fail"
1349
+ ],
1350
+ "description": "return failure or ignore getConfig",
1351
+ "default": "ignore"
1352
+ },
1353
+ "requestFields": {
1354
+ "type": "object",
1355
+ "description": "The json object with response fields of the call to getDevice",
1356
+ "additionalProperties": {
1357
+ "type": [
1358
+ "string",
1359
+ "number"
1360
+ ]
1361
+ },
1362
+ "properties": {}
1363
+ },
1364
+ "responseDatakey": {
1365
+ "type": "string",
1366
+ "description": "place in the response where the data is - supports jsonquery",
1367
+ "default": ""
1368
+ },
1369
+ "responseFields": {
1370
+ "type": "object",
1371
+ "description": "The json object with response fields of the call to getConfig",
1372
+ "additionalProperties": {
1373
+ "type": [
1374
+ "string",
1375
+ "number"
1376
+ ]
1377
+ },
1378
+ "properties": {}
1379
+ }
1380
+ }
1381
+ }
1382
+ },
1383
+ "getCount": {
1384
+ "type": "array",
1385
+ "description": "Broker call(s) to getCount",
1386
+ "items": {
1387
+ "type": "object",
1388
+ "properties": {
1389
+ "path": {
1390
+ "type": "string",
1391
+ "description": "The fully qualified path of the call to getCount (e.g. /rest/api/device/{deviceid})",
1392
+ "default": ""
1393
+ },
1394
+ "method": {
1395
+ "type": "string",
1396
+ "description": "The method of the call to getCount",
1397
+ "default": "GET"
1398
+ },
1399
+ "query": {
1400
+ "type": "object",
1401
+ "description": "The json object with query parameters of the call to getCount",
1402
+ "additionalProperties": {
1403
+ "type": [
1404
+ "string",
1405
+ "number"
1406
+ ]
1407
+ }
1408
+ },
1409
+ "body": {
1410
+ "type": "object",
1411
+ "description": "The json object with body of the call to getCount",
1412
+ "additionalProperties": {
1413
+ "type": [
1414
+ "string",
1415
+ "number"
1416
+ ]
1417
+ }
1418
+ },
1419
+ "headers": {
1420
+ "type": "object",
1421
+ "description": "The json object with headers of the call to getCount",
1422
+ "additionalProperties": {
1423
+ "type": [
1424
+ "string",
1425
+ "number"
1426
+ ]
1427
+ }
1428
+ },
1429
+ "handleFailure": {
1430
+ "type": "string",
1431
+ "enum": [
1432
+ "ignore",
1433
+ "fail"
1434
+ ],
1435
+ "description": "return failure or ignore getCount",
1436
+ "default": "ignore"
1437
+ },
1438
+ "requestFields": {
1439
+ "type": "object",
1440
+ "description": "The json object with response fields of the call to getDevice",
1441
+ "additionalProperties": {
1442
+ "type": [
1443
+ "string",
1444
+ "number"
1445
+ ]
1446
+ },
1447
+ "properties": {}
1448
+ },
1449
+ "responseDatakey": {
1450
+ "type": "string",
1451
+ "description": "place in the response where the data is - supports jsonquery",
1452
+ "default": ""
1453
+ },
1454
+ "responseFields": {
1455
+ "type": "object",
1456
+ "description": "The json object with response fields of the call to getConfig",
1457
+ "additionalProperties": {
1458
+ "type": [
1459
+ "string",
1460
+ "number"
1461
+ ]
1462
+ },
1463
+ "properties": {}
1464
+ }
1465
+ }
1466
+ }
1467
+ }
1468
+ }
1469
+ },
1470
+ "cache": {
1471
+ "type": "object",
1472
+ "properties": {
1473
+ "enabled": {
1474
+ "type": "boolean",
1475
+ "description": "Whether or not cache is enabled for adapter",
1476
+ "default": false
1477
+ },
1478
+ "entities": {
1479
+ "type": "array",
1480
+ "description": "Information for the cached entities",
1481
+ "items": {
1482
+ "type": "object",
1483
+ "properties": {
1484
+ "entityType": {
1485
+ "type": "string",
1486
+ "description": "The name of the entity - should match adapter entity configuration or a broker (e.g. Device)",
1487
+ "default": ""
1488
+ },
1489
+ "frequency": {
1490
+ "type": "integer",
1491
+ "description": "how long (in minutes) we wait to re-populate the cache",
1492
+ "default": 1440,
1493
+ "maximum": 10080
1494
+ },
1495
+ "flushOnFail": {
1496
+ "type": "boolean",
1497
+ "description": "Whether to clear the cache we have if the populate failed",
1498
+ "default": false
1499
+ },
1500
+ "limit": {
1501
+ "type": "integer",
1502
+ "description": "maximum number of items to keep in cache",
1503
+ "default": 1000
1504
+ },
1505
+ "retryAttempts": {
1506
+ "type": "integer",
1507
+ "description": "number of times to retry the populate call before failure",
1508
+ "default": 5
1509
+ },
1510
+ "sort": {
1511
+ "type": "boolean",
1512
+ "description": "whether to sort the data or not",
1513
+ "default": true
1514
+ },
1515
+ "populate": {
1516
+ "type": "array",
1517
+ "description": "Information for the call(s) used to populate the cache",
1518
+ "items": {
1519
+ "type": "object",
1520
+ "properties": {
1521
+ "path": {
1522
+ "type": "string",
1523
+ "description": "The fully qualified path of the call to getDevice (e.g. /rest/api/device/{deviceid})",
1524
+ "default": ""
1525
+ },
1526
+ "method": {
1527
+ "type": "string",
1528
+ "description": "The method of the call to getDevice",
1529
+ "default": "GET"
1530
+ },
1531
+ "pagination": {
1532
+ "type": "object",
1533
+ "description": "todo",
1534
+ "properties": {
1535
+ "offsetVar": {
1536
+ "type": "string",
1537
+ "description": "Name of variable that defines how to go to next set of results"
1538
+ },
1539
+ "limitVar": {
1540
+ "type": "string",
1541
+ "description": "Name of variable that defines the max results returned in a request"
1542
+ },
1543
+ "incrementBy": {
1544
+ "type": "string",
1545
+ "enum": [
1546
+ "limit",
1547
+ "page"
1548
+ ],
1549
+ "description": "How to incremenet offset. Default limit",
1550
+ "default": "limit"
1551
+ },
1552
+ "requestLocation": {
1553
+ "type": "string",
1554
+ "enum": [
1555
+ "query",
1556
+ "body"
1557
+ ],
1558
+ "description": "Where in request the pagination data goes",
1559
+ "default": "query"
1560
+ }
1561
+ }
1562
+ },
1563
+ "query": {
1564
+ "type": "object",
1565
+ "description": "The json object with query parameters of the call to getDevice",
1566
+ "additionalProperties": {
1567
+ "type": [
1568
+ "string",
1569
+ "number"
1570
+ ]
1571
+ }
1572
+ },
1573
+ "body": {
1574
+ "type": "object",
1575
+ "description": "The json object with body of the call to getDevice",
1576
+ "additionalProperties": {
1577
+ "type": [
1578
+ "string",
1579
+ "number"
1580
+ ]
1581
+ }
1582
+ },
1583
+ "headers": {
1584
+ "type": "object",
1585
+ "description": "The json object with headers of the call to getDevice",
1586
+ "additionalProperties": {
1587
+ "type": [
1588
+ "string",
1589
+ "number"
1590
+ ]
1591
+ }
1592
+ },
1593
+ "handleFailure": {
1594
+ "type": "string",
1595
+ "enum": [
1596
+ "ignore",
1597
+ "fail"
1598
+ ],
1599
+ "description": "return failure or ignore failure",
1600
+ "default": "ignore"
1601
+ },
1602
+ "requestFields": {
1603
+ "type": "object",
1604
+ "description": "The json object with response fields of the call to getDevice",
1605
+ "additionalProperties": {
1606
+ "type": [
1607
+ "string",
1608
+ "number"
1609
+ ]
1610
+ },
1611
+ "properties": {}
1612
+ },
1613
+ "responseDatakey": {
1614
+ "type": "string",
1615
+ "description": "place in the response where the data is - supports jsonquery",
1616
+ "default": ""
1617
+ },
1618
+ "responseFields": {
1619
+ "type": "object",
1620
+ "description": "The json object with response fields of the call to getDevice",
1621
+ "additionalProperties": {
1622
+ "type": [
1623
+ "string",
1624
+ "number"
1625
+ ]
1626
+ }
1627
+ }
1628
+ }
1629
+ }
1630
+ },
1631
+ "cachedTasks": {
1632
+ "type": "array",
1633
+ "description": "Information for the call(s) used to populate the cache",
1634
+ "items": {
1635
+ "type": "object",
1636
+ "properties": {
1637
+ "name": {
1638
+ "type": "string",
1639
+ "description": "the name of the task/action that should utilize cached information",
1640
+ "default": ""
1641
+ },
1642
+ "filterField": {
1643
+ "type": "string",
1644
+ "description": "the field that contains filter information for this call",
1645
+ "default": ""
1646
+ },
1647
+ "filterLoc": {
1648
+ "type": "string",
1649
+ "description": "the field that contains the location of the filter field",
1650
+ "default": ""
1651
+ }
1652
+ }
1653
+ }
1654
+ }
1655
+ }
1656
+ }
1657
+ }
1658
+ }
799
1659
  }
800
1660
  }
801
- }
1661
+ }