@itentialopensource/adapter-aws_cloudformation 0.1.3 → 0.2.2

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 (87) hide show
  1. package/.eslintignore +1 -0
  2. package/AUTH.md +53 -0
  3. package/BROKER.md +199 -0
  4. package/CALLS.md +620 -0
  5. package/CHANGELOG.md +3 -18
  6. package/CODE_OF_CONDUCT.md +12 -17
  7. package/CONTRIBUTING.md +3 -148
  8. package/ENHANCE.md +69 -0
  9. package/PROPERTIES.md +641 -0
  10. package/README.md +240 -423
  11. package/SUMMARY.md +9 -0
  12. package/TROUBLESHOOT.md +47 -0
  13. package/adapter.js +4788 -1315
  14. package/adapterBase.js +979 -278
  15. package/changelogs/CHANGELOG.md +48 -0
  16. package/entities/.generic/action.json +214 -0
  17. package/entities/.generic/schema.json +28 -0
  18. package/entities/.system/action.json +1 -1
  19. package/entities/Account/action.json +42 -0
  20. package/entities/Account/mockdatafiles/describePublisher-default.xml +6 -0
  21. package/entities/Account/mockdatafiles/registerPublisher-default.xml +6 -0
  22. package/entities/Account/schema.json +3 -1
  23. package/entities/ChangeSet/action.json +21 -0
  24. package/entities/ChangeSet/mockdatafiles/describeChangeSetHooks-default.xml +6 -0
  25. package/entities/ChangeSet/schema.json +2 -1
  26. package/entities/Organization/action.json +67 -0
  27. package/entities/Organization/mockdatafiles/activateOrganizationsAccess-default.xml +6 -0
  28. package/entities/Organization/mockdatafiles/deactivateOrganizationsAccess-default.xml +6 -0
  29. package/entities/Organization/mockdatafiles/describeOrganizationsAccess-default.xml +8 -0
  30. package/entities/Organization/schema.json +21 -0
  31. package/entities/Resource/action.json +21 -0
  32. package/entities/Resource/mockdatafiles/recordHandlerProgress-default.xml +6 -0
  33. package/entities/Resource/schema.json +2 -1
  34. package/entities/Stack/action.json +42 -0
  35. package/entities/Stack/mockdatafiles/importStacksToStackSet-default.xml +6 -0
  36. package/entities/Stack/mockdatafiles/rollbackStack-default.xml +6 -0
  37. package/entities/Stack/schema.json +3 -1
  38. package/entities/Type/action.json +126 -0
  39. package/entities/Type/mockdatafiles/activateType-default.xml +6 -0
  40. package/entities/Type/mockdatafiles/batchDescribeTypeConfigurations-default.xml +6 -0
  41. package/entities/Type/mockdatafiles/deactivateType-default.xml +6 -0
  42. package/entities/Type/mockdatafiles/publishType-default.xml +6 -0
  43. package/entities/Type/mockdatafiles/setTypeConfiguration-default.xml +6 -0
  44. package/entities/Type/mockdatafiles/testType-default.xml +6 -0
  45. package/entities/Type/schema.json +7 -1
  46. package/error.json +12 -0
  47. package/metadata.json +44 -0
  48. package/package.json +41 -20
  49. package/pronghorn.json +8996 -1335
  50. package/propertiesDecorators.json +14 -0
  51. package/propertiesSchema.json +877 -9
  52. package/refs?service=git-upload-pack +0 -0
  53. package/report/adapter-openapi.json +25034 -0
  54. package/report/adapter-openapi.yaml +22498 -0
  55. package/report/adapterInfo.json +10 -0
  56. package/report/updateReport1614638977739.json +95 -0
  57. package/report/updateReport1691507502657.json +120 -0
  58. package/report/updateReport1692202523445.json +120 -0
  59. package/report/updateReport1694461395239.json +120 -0
  60. package/report/updateReport1698420779793.json +120 -0
  61. package/sampleProperties.json +166 -9
  62. package/storage/metrics.json +1141 -0
  63. package/test/integration/adapterTestBasicGet.js +83 -0
  64. package/test/integration/adapterTestConnectivity.js +142 -0
  65. package/test/integration/adapterTestIntegration.js +541 -103
  66. package/test/unit/adapterBaseTestUnit.js +1024 -0
  67. package/test/unit/adapterTestUnit.js +1273 -218
  68. package/utils/adapterInfo.js +206 -0
  69. package/utils/addAuth.js +94 -0
  70. package/utils/artifactize.js +1 -1
  71. package/utils/basicGet.js +50 -0
  72. package/utils/checkMigrate.js +63 -0
  73. package/utils/entitiesToDB.js +179 -0
  74. package/utils/findPath.js +74 -0
  75. package/utils/methodDocumentor.js +273 -0
  76. package/utils/modify.js +152 -0
  77. package/utils/packModificationScript.js +2 -2
  78. package/utils/patches2bundledDeps.js +90 -0
  79. package/utils/pre-commit.sh +5 -0
  80. package/utils/removeHooks.js +20 -0
  81. package/utils/taskMover.js +309 -0
  82. package/utils/tbScript.js +239 -0
  83. package/utils/tbUtils.js +489 -0
  84. package/utils/testRunner.js +17 -17
  85. package/utils/troubleshootingAdapter.js +193 -0
  86. package/img/adapter.jpg +0 -0
  87. package/workflows/README.md +0 -3
@@ -26,6 +26,11 @@
26
26
  "minimum": 1,
27
27
  "maximum": 65535
28
28
  },
29
+ "choosepath": {
30
+ "type": "string",
31
+ "description": "choose the path to use -- requires entityPath choices",
32
+ "default": ""
33
+ },
29
34
  "base_path": {
30
35
  "type": "string",
31
36
  "description": "a base path that is consistent across api calls",
@@ -101,6 +106,25 @@
101
106
  },
102
107
  "mongo": {
103
108
  "$ref": "#/definitions/mongo"
109
+ },
110
+ "encode_queryvars": {
111
+ "type": "boolean",
112
+ "description": "When true the query parameters are encoded in the url",
113
+ "default": true
114
+ },
115
+ "devicebroker": {
116
+ "$ref": "#/definitions/devicebroker"
117
+ },
118
+ "cache": {
119
+ "$ref": "#/definitions/cache"
120
+ },
121
+ "service": {
122
+ "type": "string",
123
+ "description": "Service we are integrating with -- used with AWS Authentication",
124
+ "examples": [
125
+ "ec2",
126
+ "route53"
127
+ ]
104
128
  }
105
129
  },
106
130
  "required": [
@@ -120,8 +144,11 @@
120
144
  "enum": [
121
145
  "basic user_password",
122
146
  "static_token",
147
+ "jwt_token",
123
148
  "request_token",
124
- "no_authentication"
149
+ "no_authentication",
150
+ "multi_step_authentication",
151
+ "aws_authentication"
125
152
  ]
126
153
  },
127
154
  "username": {
@@ -206,7 +233,10 @@
206
233
  ]
207
234
  },
208
235
  "auth_field": {
209
- "type": "string",
236
+ "type": [
237
+ "string",
238
+ "array"
239
+ ],
210
240
  "description": "The field in which to pass the token",
211
241
  "default": "header.headers.X-AUTH-TOKEN",
212
242
  "examples": [
@@ -218,7 +248,10 @@
218
248
  ]
219
249
  },
220
250
  "auth_field_format": {
221
- "type": "string",
251
+ "type": [
252
+ "string",
253
+ "array"
254
+ ],
222
255
  "description": "The format used to pass the authentication -- variables {token}, {username}, {password} will be replaced with the proper values. {b64}...{/b64} will base64 encode everything between the start and end tag.",
223
256
  "default": "{token}",
224
257
  "examples": [
@@ -229,6 +262,11 @@
229
262
  "token={token}"
230
263
  ]
231
264
  },
265
+ "auth_logging": {
266
+ "type": "boolean",
267
+ "description": "This property turns on logging of Authentication Information and should only be true when debugging authentication and connectivity",
268
+ "default": false
269
+ },
232
270
  "aws_access_key": {
233
271
  "type": "string",
234
272
  "description": "AWS access key for authentication",
@@ -244,6 +282,89 @@
244
282
  "examples": [
245
283
  "secretkey"
246
284
  ]
285
+ },
286
+ "client_id": {
287
+ "type": "string",
288
+ "description": "The client id for OAuth requests - can also use username depending on schema",
289
+ "default": ""
290
+ },
291
+ "client_secret": {
292
+ "type": "string",
293
+ "description": "The client secret for OAuth requests - can also use password depending on schema",
294
+ "default": ""
295
+ },
296
+ "grant_type": {
297
+ "type": "string",
298
+ "description": "The grant type for OAuth requests - can also provide in schema",
299
+ "default": ""
300
+ },
301
+ "sensitive": {
302
+ "type": "array",
303
+ "description": "List of sensitive keys to search and hide values from being logged",
304
+ "default": [],
305
+ "items": {
306
+ "type": "string"
307
+ }
308
+ },
309
+ "sso": {
310
+ "type": "object",
311
+ "properties": {
312
+ "protocol": {
313
+ "type": "string",
314
+ "description": "the protocol to request token from system",
315
+ "default": "",
316
+ "enum": [
317
+ "http",
318
+ "https",
319
+ ""
320
+ ]
321
+ },
322
+ "host": {
323
+ "type": "string",
324
+ "description": "hostname of the authentication system",
325
+ "default": "",
326
+ "examples": [
327
+ "systemx.customer.com"
328
+ ]
329
+ },
330
+ "port": {
331
+ "type": "integer",
332
+ "description": "port on which to connect to the authentication system",
333
+ "default": 0,
334
+ "minimum": 0,
335
+ "maximum": 65535
336
+ }
337
+ }
338
+ },
339
+ "multiStepAuthCalls": {
340
+ "type": "array",
341
+ "items": {
342
+ "type": "object",
343
+ "properties": {
344
+ "name": {
345
+ "type": "string",
346
+ "description": "Id of the step call",
347
+ "examples": [
348
+ "getAccessToken"
349
+ ]
350
+ },
351
+ "requestFields": {
352
+ "type": "object",
353
+ "description": "The fields set in step request"
354
+ },
355
+ "responseFields": {
356
+ "type": "object",
357
+ "description": "The fields from the step result"
358
+ },
359
+ "successfullResponseCode": {
360
+ "type": "integer",
361
+ "description": "Expected response code for given step, if not set any successfull http response is accepted",
362
+ "examples": [
363
+ 200
364
+ ]
365
+ }
366
+ }
367
+ }
247
368
  }
248
369
  },
249
370
  "required": [
@@ -343,6 +464,16 @@
343
464
  "examples": [
344
465
  "/api/version/ping"
345
466
  ]
467
+ },
468
+ "query_object": {
469
+ "type": "object",
470
+ "description": "Query object { device: xxxxx } to be placed into the healthcheck, will be converted to query string by the adapter",
471
+ "default": {}
472
+ },
473
+ "addlHeaders": {
474
+ "type": "object",
475
+ "description": "headers that will be appended to the headers for the call",
476
+ "default": {}
346
477
  }
347
478
  },
348
479
  "required": [
@@ -402,7 +533,7 @@
402
533
  "type": "integer",
403
534
  "description": "defines the number of request that Pronghorn can send aws_cloudformation at one time",
404
535
  "default": 1,
405
- "minimum": 1,
536
+ "minimum": 0,
406
537
  "maximum": 1000
407
538
  },
408
539
  "expire_timeout": {
@@ -422,6 +553,7 @@
422
553
  "priorities": {
423
554
  "type": "array",
424
555
  "description": "define your priorities here",
556
+ "default": [],
425
557
  "items": {
426
558
  "type": "object",
427
559
  "properties": {
@@ -492,6 +624,7 @@
492
624
  "failover_codes": {
493
625
  "type": "array",
494
626
  "description": "An array of codes where it is ok to try another method",
627
+ "default": [],
495
628
  "items": {
496
629
  "type": "integer"
497
630
  }
@@ -509,19 +642,23 @@
509
642
  "properties": {
510
643
  "payload": {
511
644
  "type": "object",
512
- "description": "payload fields that will be appended to the provided payload (excluding GET calls)"
645
+ "description": "payload fields that will be appended to the provided payload (excluding GET calls)",
646
+ "default": {}
513
647
  },
514
648
  "uriOptions": {
515
649
  "type": "object",
516
- "description": "options that will be appended to all GET calls"
650
+ "description": "options that will be appended to all GET calls",
651
+ "default": {}
517
652
  },
518
653
  "addlHeaders": {
519
654
  "type": "object",
520
- "description": "headers that will be appended to the headers for the call"
655
+ "description": "headers that will be appended to the headers for the call",
656
+ "default": {}
521
657
  },
522
658
  "authData": {
523
659
  "type": "object",
524
- "description": "authentication data that will be appended to the payload for authentication calls"
660
+ "description": "authentication data that will be appended to the payload for authentication calls",
661
+ "default": {}
525
662
  }
526
663
  }
527
664
  },
@@ -539,6 +676,11 @@
539
676
  "type": "boolean",
540
677
  "description": "Archives each request/response and corresponding metrics",
541
678
  "default": false
679
+ },
680
+ "return_request": {
681
+ "type": "boolean",
682
+ "description": "This property turns on returning the response information - need to be carefull in case credentials are in the path",
683
+ "default": false
542
684
  }
543
685
  },
544
686
  "required": [
@@ -579,8 +721,19 @@
579
721
  "http",
580
722
  "https",
581
723
  "socks4",
582
- "socks5"
724
+ "socks5",
725
+ "tls"
583
726
  ]
727
+ },
728
+ "username": {
729
+ "type": "string",
730
+ "description": "username for proxy authentication",
731
+ "default": ""
732
+ },
733
+ "password": {
734
+ "type": "string",
735
+ "description": "password for proxy authentication",
736
+ "default": ""
584
737
  }
585
738
  },
586
739
  "required": [
@@ -812,6 +965,721 @@
812
965
  }
813
966
  }
814
967
  }
968
+ },
969
+ "devicebroker": {
970
+ "type": "object",
971
+ "properties": {
972
+ "getDevice": {
973
+ "type": "array",
974
+ "description": "Broker call(s) to getDevice",
975
+ "items": {
976
+ "type": "object",
977
+ "properties": {
978
+ "path": {
979
+ "type": "string",
980
+ "description": "The fully qualified path of the call to getDevice (e.g. /rest/api/device/{deviceid})",
981
+ "default": ""
982
+ },
983
+ "method": {
984
+ "type": "string",
985
+ "description": "The method of the call to getDevice",
986
+ "default": "GET"
987
+ },
988
+ "query": {
989
+ "type": "object",
990
+ "description": "The json object with query parameters of the call to getDevice",
991
+ "additionalProperties": {
992
+ "type": [
993
+ "string",
994
+ "number"
995
+ ]
996
+ }
997
+ },
998
+ "body": {
999
+ "type": "object",
1000
+ "description": "The json object with body of the call to getDevice",
1001
+ "additionalProperties": {
1002
+ "type": [
1003
+ "string",
1004
+ "number"
1005
+ ]
1006
+ }
1007
+ },
1008
+ "headers": {
1009
+ "type": "object",
1010
+ "description": "The json object with headers of the call to getDevice",
1011
+ "additionalProperties": {
1012
+ "type": [
1013
+ "string",
1014
+ "number"
1015
+ ]
1016
+ }
1017
+ },
1018
+ "handleFailure": {
1019
+ "type": "string",
1020
+ "enum": [
1021
+ "ignore",
1022
+ "fail"
1023
+ ],
1024
+ "description": "return failure or ignore failure",
1025
+ "default": "ignore"
1026
+ },
1027
+ "requestFields": {
1028
+ "type": "object",
1029
+ "description": "The json object with response fields of the call to getDevice",
1030
+ "additionalProperties": {
1031
+ "type": [
1032
+ "string",
1033
+ "number"
1034
+ ]
1035
+ },
1036
+ "properties": {}
1037
+ },
1038
+ "responseDatakey": {
1039
+ "type": "string",
1040
+ "description": "place in the response where the data is - supports jsonquery",
1041
+ "default": ""
1042
+ },
1043
+ "responseFields": {
1044
+ "type": "object",
1045
+ "description": "The json object with response fields of the call to getDevice",
1046
+ "additionalProperties": {
1047
+ "type": [
1048
+ "string",
1049
+ "number"
1050
+ ]
1051
+ },
1052
+ "properties": {
1053
+ "name": {
1054
+ "type": "string",
1055
+ "description": "The field in response to getDevice that contains the name of the device",
1056
+ "default": "name"
1057
+ },
1058
+ "ostype": {
1059
+ "type": "string",
1060
+ "description": "The field in response to getDevice that contains the ostype of the device",
1061
+ "default": "ostype"
1062
+ },
1063
+ "ostypePrefix": {
1064
+ "type": "string",
1065
+ "description": "Any prefix that should be added to the ostype of the device (e.g. aws-)",
1066
+ "default": ""
1067
+ },
1068
+ "port": {
1069
+ "type": "string",
1070
+ "description": "The field in response to getDevice that contains the port of the device",
1071
+ "default": ""
1072
+ },
1073
+ "ipaddress": {
1074
+ "type": "string",
1075
+ "description": "The field in response to getDevice that contains the ip address of the device",
1076
+ "default": ""
1077
+ }
1078
+ }
1079
+ }
1080
+ }
1081
+ }
1082
+ },
1083
+ "getDevicesFiltered": {
1084
+ "type": "array",
1085
+ "description": "Broker call(s) to getDevicesFiltered",
1086
+ "items": {
1087
+ "type": "object",
1088
+ "properties": {
1089
+ "path": {
1090
+ "type": "string",
1091
+ "description": "The fully qualified path of the call to getDevicesFiltered (e.g. /rest/api/device/{deviceid})",
1092
+ "default": ""
1093
+ },
1094
+ "method": {
1095
+ "type": "string",
1096
+ "description": "The method of the call to getDevicesFiltered",
1097
+ "default": "GET"
1098
+ },
1099
+ "pagination": {
1100
+ "type": "object",
1101
+ "description": "todo",
1102
+ "properties": {
1103
+ "offsetVar": {
1104
+ "type": "string",
1105
+ "description": "Name of variable that defines how to go to next set of results"
1106
+ },
1107
+ "limitVar": {
1108
+ "type": "string",
1109
+ "description": "Name of variable that defines the max results returned in a request"
1110
+ },
1111
+ "incrementBy": {
1112
+ "type": "string",
1113
+ "enum": [
1114
+ "limit",
1115
+ "page"
1116
+ ],
1117
+ "description": "How to incremenet offset. Default limit",
1118
+ "default": "limit"
1119
+ },
1120
+ "requestLocation": {
1121
+ "type": "string",
1122
+ "enum": [
1123
+ "query",
1124
+ "body"
1125
+ ],
1126
+ "description": "Where in request the pagination data goes",
1127
+ "default": "query"
1128
+ }
1129
+ }
1130
+ },
1131
+ "query": {
1132
+ "type": "object",
1133
+ "description": "The json object with query parameters of the call to getDevicesFiltered",
1134
+ "additionalProperties": {
1135
+ "type": [
1136
+ "string",
1137
+ "number"
1138
+ ]
1139
+ }
1140
+ },
1141
+ "body": {
1142
+ "type": "object",
1143
+ "description": "The json object with body of the call to getDevicesFiltered",
1144
+ "additionalProperties": {
1145
+ "type": [
1146
+ "string",
1147
+ "number"
1148
+ ]
1149
+ }
1150
+ },
1151
+ "headers": {
1152
+ "type": "object",
1153
+ "description": "The json object with headers of the call to getDevicesFiltered",
1154
+ "additionalProperties": {
1155
+ "type": [
1156
+ "string",
1157
+ "number"
1158
+ ]
1159
+ }
1160
+ },
1161
+ "handleFailure": {
1162
+ "type": "string",
1163
+ "enum": [
1164
+ "ignore",
1165
+ "fail"
1166
+ ],
1167
+ "description": "return failure or ignore failure",
1168
+ "default": "ignore"
1169
+ },
1170
+ "requestFields": {
1171
+ "type": "object",
1172
+ "description": "The json object with response fields of the call to getDevice",
1173
+ "additionalProperties": {
1174
+ "type": [
1175
+ "string",
1176
+ "number"
1177
+ ]
1178
+ },
1179
+ "properties": {}
1180
+ },
1181
+ "responseDatakey": {
1182
+ "type": "string",
1183
+ "description": "place in the response where the data is - supports jsonquery",
1184
+ "default": ""
1185
+ },
1186
+ "responseFields": {
1187
+ "type": "object",
1188
+ "description": "The json object with response fields of the call to getDevicesFiltered",
1189
+ "additionalProperties": {
1190
+ "type": [
1191
+ "string",
1192
+ "number"
1193
+ ]
1194
+ },
1195
+ "properties": {
1196
+ "name": {
1197
+ "type": "string",
1198
+ "description": "The field in response to getDevicesFiltered that contains the name of the device",
1199
+ "default": "name"
1200
+ },
1201
+ "ostype": {
1202
+ "type": "string",
1203
+ "description": "The field in response to getDevicesFiltered that contains the ostype of the device",
1204
+ "default": "ostype"
1205
+ },
1206
+ "ostypePrefix": {
1207
+ "type": "string",
1208
+ "description": "Any prefix that should be added to the ostype of the device (e.g. aws-)",
1209
+ "default": ""
1210
+ },
1211
+ "port": {
1212
+ "type": "string",
1213
+ "description": "The field in response to getDevicesFiltered that contains the port of the device",
1214
+ "default": ""
1215
+ },
1216
+ "ipaddress": {
1217
+ "type": "string",
1218
+ "description": "The field in response to getDevicesFiltered that contains the ip address of the device",
1219
+ "default": ""
1220
+ }
1221
+ }
1222
+ }
1223
+ }
1224
+ }
1225
+ },
1226
+ "isAlive": {
1227
+ "type": "array",
1228
+ "description": "Broker call(s) to determine if the device isAlive",
1229
+ "items": {
1230
+ "type": "object",
1231
+ "properties": {
1232
+ "path": {
1233
+ "type": "string",
1234
+ "description": "The fully qualified path of the call to isAlive (e.g. /rest/api/device/{deviceid})",
1235
+ "default": ""
1236
+ },
1237
+ "method": {
1238
+ "type": "string",
1239
+ "description": "The method of the call to isAlive",
1240
+ "default": "GET"
1241
+ },
1242
+ "query": {
1243
+ "type": "object",
1244
+ "description": "The json object with query parameters of the call to isAlive",
1245
+ "additionalProperties": {
1246
+ "type": [
1247
+ "string",
1248
+ "number"
1249
+ ]
1250
+ }
1251
+ },
1252
+ "body": {
1253
+ "type": "object",
1254
+ "description": "The json object with body of the call to isAlive",
1255
+ "additionalProperties": {
1256
+ "type": [
1257
+ "string",
1258
+ "number"
1259
+ ]
1260
+ }
1261
+ },
1262
+ "headers": {
1263
+ "type": "object",
1264
+ "description": "The json object with headers of the call to isAlive",
1265
+ "additionalProperties": {
1266
+ "type": [
1267
+ "string",
1268
+ "number"
1269
+ ]
1270
+ }
1271
+ },
1272
+ "handleFailure": {
1273
+ "type": "string",
1274
+ "enum": [
1275
+ "ignore",
1276
+ "fail"
1277
+ ],
1278
+ "description": "return failure or ignore isAlive",
1279
+ "default": "ignore"
1280
+ },
1281
+ "requestFields": {
1282
+ "type": "object",
1283
+ "description": "The json object with response fields of the call to getDevice",
1284
+ "additionalProperties": {
1285
+ "type": [
1286
+ "string",
1287
+ "number"
1288
+ ]
1289
+ },
1290
+ "properties": {}
1291
+ },
1292
+ "responseDatakey": {
1293
+ "type": "string",
1294
+ "description": "place in the response where the data is - supports jsonquery",
1295
+ "default": ""
1296
+ },
1297
+ "responseFields": {
1298
+ "type": "object",
1299
+ "description": "The json object with response fields of the call to isAlive",
1300
+ "additionalProperties": {
1301
+ "type": [
1302
+ "string",
1303
+ "number"
1304
+ ]
1305
+ },
1306
+ "properties": {
1307
+ "status": {
1308
+ "type": "string",
1309
+ "description": "The field in response to isAlive that contains the status of the device",
1310
+ "default": "name"
1311
+ },
1312
+ "statusValue": {
1313
+ "type": "string",
1314
+ "description": "The expected value in the status field",
1315
+ "default": "true"
1316
+ }
1317
+ }
1318
+ }
1319
+ }
1320
+ }
1321
+ },
1322
+ "getConfig": {
1323
+ "type": "array",
1324
+ "description": "Broker call(s) to getConfig",
1325
+ "items": {
1326
+ "type": "object",
1327
+ "properties": {
1328
+ "path": {
1329
+ "type": "string",
1330
+ "description": "The fully qualified path of the call to getConfig (e.g. /rest/api/device/{deviceid})",
1331
+ "default": ""
1332
+ },
1333
+ "method": {
1334
+ "type": "string",
1335
+ "description": "The method of the call to getConfig",
1336
+ "default": "GET"
1337
+ },
1338
+ "query": {
1339
+ "type": "object",
1340
+ "description": "The json object with query parameters of the call to getConfig",
1341
+ "additionalProperties": {
1342
+ "type": [
1343
+ "string",
1344
+ "number"
1345
+ ]
1346
+ }
1347
+ },
1348
+ "body": {
1349
+ "type": "object",
1350
+ "description": "The json object with body of the call to getConfig",
1351
+ "additionalProperties": {
1352
+ "type": [
1353
+ "string",
1354
+ "number"
1355
+ ]
1356
+ }
1357
+ },
1358
+ "headers": {
1359
+ "type": "object",
1360
+ "description": "The json object with headers of the call to getConfig",
1361
+ "additionalProperties": {
1362
+ "type": [
1363
+ "string",
1364
+ "number"
1365
+ ]
1366
+ }
1367
+ },
1368
+ "handleFailure": {
1369
+ "type": "string",
1370
+ "enum": [
1371
+ "ignore",
1372
+ "fail"
1373
+ ],
1374
+ "description": "return failure or ignore getConfig",
1375
+ "default": "ignore"
1376
+ },
1377
+ "requestFields": {
1378
+ "type": "object",
1379
+ "description": "The json object with response fields of the call to getDevice",
1380
+ "additionalProperties": {
1381
+ "type": [
1382
+ "string",
1383
+ "number"
1384
+ ]
1385
+ },
1386
+ "properties": {}
1387
+ },
1388
+ "responseDatakey": {
1389
+ "type": "string",
1390
+ "description": "place in the response where the data is - supports jsonquery",
1391
+ "default": ""
1392
+ },
1393
+ "responseFields": {
1394
+ "type": "object",
1395
+ "description": "The json object with response fields of the call to getConfig",
1396
+ "additionalProperties": {
1397
+ "type": [
1398
+ "string",
1399
+ "number"
1400
+ ]
1401
+ },
1402
+ "properties": {}
1403
+ }
1404
+ }
1405
+ }
1406
+ },
1407
+ "getCount": {
1408
+ "type": "array",
1409
+ "description": "Broker call(s) to getCount",
1410
+ "items": {
1411
+ "type": "object",
1412
+ "properties": {
1413
+ "path": {
1414
+ "type": "string",
1415
+ "description": "The fully qualified path of the call to getCount (e.g. /rest/api/device/{deviceid})",
1416
+ "default": ""
1417
+ },
1418
+ "method": {
1419
+ "type": "string",
1420
+ "description": "The method of the call to getCount",
1421
+ "default": "GET"
1422
+ },
1423
+ "query": {
1424
+ "type": "object",
1425
+ "description": "The json object with query parameters of the call to getCount",
1426
+ "additionalProperties": {
1427
+ "type": [
1428
+ "string",
1429
+ "number"
1430
+ ]
1431
+ }
1432
+ },
1433
+ "body": {
1434
+ "type": "object",
1435
+ "description": "The json object with body of the call to getCount",
1436
+ "additionalProperties": {
1437
+ "type": [
1438
+ "string",
1439
+ "number"
1440
+ ]
1441
+ }
1442
+ },
1443
+ "headers": {
1444
+ "type": "object",
1445
+ "description": "The json object with headers of the call to getCount",
1446
+ "additionalProperties": {
1447
+ "type": [
1448
+ "string",
1449
+ "number"
1450
+ ]
1451
+ }
1452
+ },
1453
+ "handleFailure": {
1454
+ "type": "string",
1455
+ "enum": [
1456
+ "ignore",
1457
+ "fail"
1458
+ ],
1459
+ "description": "return failure or ignore getCount",
1460
+ "default": "ignore"
1461
+ },
1462
+ "requestFields": {
1463
+ "type": "object",
1464
+ "description": "The json object with response fields of the call to getDevice",
1465
+ "additionalProperties": {
1466
+ "type": [
1467
+ "string",
1468
+ "number"
1469
+ ]
1470
+ },
1471
+ "properties": {}
1472
+ },
1473
+ "responseDatakey": {
1474
+ "type": "string",
1475
+ "description": "place in the response where the data is - supports jsonquery",
1476
+ "default": ""
1477
+ },
1478
+ "responseFields": {
1479
+ "type": "object",
1480
+ "description": "The json object with response fields of the call to getConfig",
1481
+ "additionalProperties": {
1482
+ "type": [
1483
+ "string",
1484
+ "number"
1485
+ ]
1486
+ },
1487
+ "properties": {}
1488
+ }
1489
+ }
1490
+ }
1491
+ }
1492
+ }
1493
+ },
1494
+ "cache": {
1495
+ "type": "object",
1496
+ "properties": {
1497
+ "enabled": {
1498
+ "type": "boolean",
1499
+ "description": "Whether or not cache is enabled for adapter",
1500
+ "default": false
1501
+ },
1502
+ "entities": {
1503
+ "type": "array",
1504
+ "description": "Information for the cached entities",
1505
+ "items": {
1506
+ "type": "object",
1507
+ "properties": {
1508
+ "entityType": {
1509
+ "type": "string",
1510
+ "description": "The name of the entity - should match adapter entity configuration or a broker (e.g. Device)",
1511
+ "default": ""
1512
+ },
1513
+ "frequency": {
1514
+ "type": "integer",
1515
+ "description": "how long (in minutes) we wait to re-populate the cache",
1516
+ "default": 1440,
1517
+ "maximum": 10080
1518
+ },
1519
+ "flushOnFail": {
1520
+ "type": "boolean",
1521
+ "description": "Whether to clear the cache we have if the populate failed",
1522
+ "default": false
1523
+ },
1524
+ "limit": {
1525
+ "type": "integer",
1526
+ "description": "maximum number of items to keep in cache",
1527
+ "default": 1000
1528
+ },
1529
+ "retryAttempts": {
1530
+ "type": "integer",
1531
+ "description": "number of times to retry the populate call before failure",
1532
+ "default": 5
1533
+ },
1534
+ "sort": {
1535
+ "type": "boolean",
1536
+ "description": "whether to sort the data or not",
1537
+ "default": true
1538
+ },
1539
+ "populate": {
1540
+ "type": "array",
1541
+ "description": "Information for the call(s) used to populate the cache",
1542
+ "items": {
1543
+ "type": "object",
1544
+ "properties": {
1545
+ "path": {
1546
+ "type": "string",
1547
+ "description": "The fully qualified path of the call to getDevice (e.g. /rest/api/device/{deviceid})",
1548
+ "default": ""
1549
+ },
1550
+ "method": {
1551
+ "type": "string",
1552
+ "description": "The method of the call to getDevice",
1553
+ "default": "GET"
1554
+ },
1555
+ "pagination": {
1556
+ "type": "object",
1557
+ "description": "todo",
1558
+ "properties": {
1559
+ "offsetVar": {
1560
+ "type": "string",
1561
+ "description": "Name of variable that defines how to go to next set of results"
1562
+ },
1563
+ "limitVar": {
1564
+ "type": "string",
1565
+ "description": "Name of variable that defines the max results returned in a request"
1566
+ },
1567
+ "incrementBy": {
1568
+ "type": "string",
1569
+ "enum": [
1570
+ "limit",
1571
+ "page"
1572
+ ],
1573
+ "description": "How to incremenet offset. Default limit",
1574
+ "default": "limit"
1575
+ },
1576
+ "requestLocation": {
1577
+ "type": "string",
1578
+ "enum": [
1579
+ "query",
1580
+ "body"
1581
+ ],
1582
+ "description": "Where in request the pagination data goes",
1583
+ "default": "query"
1584
+ }
1585
+ }
1586
+ },
1587
+ "query": {
1588
+ "type": "object",
1589
+ "description": "The json object with query parameters of the call to getDevice",
1590
+ "additionalProperties": {
1591
+ "type": [
1592
+ "string",
1593
+ "number"
1594
+ ]
1595
+ }
1596
+ },
1597
+ "body": {
1598
+ "type": "object",
1599
+ "description": "The json object with body of the call to getDevice",
1600
+ "additionalProperties": {
1601
+ "type": [
1602
+ "string",
1603
+ "number"
1604
+ ]
1605
+ }
1606
+ },
1607
+ "headers": {
1608
+ "type": "object",
1609
+ "description": "The json object with headers of the call to getDevice",
1610
+ "additionalProperties": {
1611
+ "type": [
1612
+ "string",
1613
+ "number"
1614
+ ]
1615
+ }
1616
+ },
1617
+ "handleFailure": {
1618
+ "type": "string",
1619
+ "enum": [
1620
+ "ignore",
1621
+ "fail"
1622
+ ],
1623
+ "description": "return failure or ignore failure",
1624
+ "default": "ignore"
1625
+ },
1626
+ "requestFields": {
1627
+ "type": "object",
1628
+ "description": "The json object with response fields of the call to getDevice",
1629
+ "additionalProperties": {
1630
+ "type": [
1631
+ "string",
1632
+ "number"
1633
+ ]
1634
+ },
1635
+ "properties": {}
1636
+ },
1637
+ "responseDatakey": {
1638
+ "type": "string",
1639
+ "description": "place in the response where the data is - supports jsonquery",
1640
+ "default": ""
1641
+ },
1642
+ "responseFields": {
1643
+ "type": "object",
1644
+ "description": "The json object with response fields of the call to getDevice",
1645
+ "additionalProperties": {
1646
+ "type": [
1647
+ "string",
1648
+ "number"
1649
+ ]
1650
+ }
1651
+ }
1652
+ }
1653
+ }
1654
+ },
1655
+ "cachedTasks": {
1656
+ "type": "array",
1657
+ "description": "Information for the call(s) used to populate the cache",
1658
+ "items": {
1659
+ "type": "object",
1660
+ "properties": {
1661
+ "name": {
1662
+ "type": "string",
1663
+ "description": "the name of the task/action that should utilize cached information",
1664
+ "default": ""
1665
+ },
1666
+ "filterField": {
1667
+ "type": "string",
1668
+ "description": "the field that contains filter information for this call",
1669
+ "default": ""
1670
+ },
1671
+ "filterLoc": {
1672
+ "type": "string",
1673
+ "description": "the field that contains the location of the filter field",
1674
+ "default": ""
1675
+ }
1676
+ }
1677
+ }
1678
+ }
1679
+ }
1680
+ }
1681
+ }
1682
+ }
815
1683
  }
816
1684
  }
817
1685
  }