@itentialopensource/adapter-meraki 0.7.2 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- package/AUTH.md +40 -0
- package/CALLS.md +100 -0
- package/CHANGELOG.md +24 -0
- package/ENHANCE.md +69 -0
- package/PROPERTIES.md +247 -0
- package/README.md +113 -470
- package/SUMMARY.md +9 -0
- package/SYSTEMINFO.md +11 -0
- package/TROUBLESHOOT.md +46 -0
- package/adapter.js +911 -64
- package/adapterBase.js +294 -271
- package/entities/.generic/action.json +5 -5
- package/error.json +12 -0
- package/package.json +18 -13
- package/pronghorn.json +289 -104
- package/propertiesSchema.json +238 -0
- package/refs?service=git-upload-pack +0 -0
- package/report/updateReport1642739939352.json +95 -0
- package/sampleProperties.json +4 -1
- package/test/integration/adapterTestBasicGet.js +1 -1
- package/test/integration/adapterTestIntegration.js +11 -2
- package/test/unit/adapterBaseTestUnit.js +27 -26
- package/test/unit/adapterTestUnit.js +632 -11
- package/utils/addAuth.js +94 -0
- package/utils/basicGet.js +1 -14
- package/utils/entitiesToDB.js +224 -0
- package/utils/modify.js +1 -1
- package/utils/packModificationScript.js +1 -1
- package/utils/patches2bundledDeps.js +90 -0
- package/utils/removeHooks.js +20 -0
- package/utils/tbScript.js +14 -8
- package/utils/tbUtils.js +98 -19
- package/utils/troubleshootingAdapter.js +2 -26
package/pronghorn.json
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
],
|
10
10
|
"methods": [
|
11
11
|
{
|
12
|
-
"name": "
|
12
|
+
"name": "iapUpdateAdapterConfiguration",
|
13
13
|
"summary": "Updates the adapter configuration",
|
14
14
|
"description": "Updates the adapter configuration file with the provided changes",
|
15
15
|
"input": [
|
@@ -78,27 +78,25 @@
|
|
78
78
|
],
|
79
79
|
"route": {
|
80
80
|
"verb": "POST",
|
81
|
-
"path": "/
|
81
|
+
"path": "/iapUpdateAdapterConfiguration"
|
82
82
|
},
|
83
83
|
"task": true
|
84
84
|
},
|
85
85
|
{
|
86
|
-
"name": "
|
86
|
+
"name": "iapFindAdapterPath",
|
87
87
|
"summary": "Provides the ability to see if a particular API path is supported by the adapter",
|
88
88
|
"description": "Provides the ability to see if a particular API path is supported by the adapter",
|
89
|
-
"input": [
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
"
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
}
|
101
|
-
],
|
89
|
+
"input": [{
|
90
|
+
"name": "apiPath",
|
91
|
+
"type": "string",
|
92
|
+
"info": "The API Path you want to check - make sure to not include base path and version",
|
93
|
+
"description": "The API Path you want to check - make sure to not include base path and version",
|
94
|
+
"schema": {
|
95
|
+
"title": "apiPath",
|
96
|
+
"type": "string"
|
97
|
+
},
|
98
|
+
"required": true
|
99
|
+
}],
|
102
100
|
"output": {
|
103
101
|
"name": "result",
|
104
102
|
"type": "object",
|
@@ -113,36 +111,30 @@
|
|
113
111
|
],
|
114
112
|
"route": {
|
115
113
|
"verb": "POST",
|
116
|
-
"path": "/
|
114
|
+
"path": "/iapFindAdapterPath"
|
117
115
|
},
|
118
116
|
"task": true
|
119
117
|
},
|
120
118
|
{
|
121
|
-
"name": "
|
122
|
-
"summary": "
|
123
|
-
"description": "
|
124
|
-
"input": [
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
}
|
119
|
+
"name": "iapSuspendAdapter",
|
120
|
+
"summary": "Suspends the adapter",
|
121
|
+
"description": "Suspends the adapter",
|
122
|
+
"input": [{
|
123
|
+
"name": "mode",
|
124
|
+
"type": "enum",
|
125
|
+
"enumerals": ["pause", "error"],
|
126
|
+
"info": "How incoming requests are handled. Defaults to 'pause'",
|
127
|
+
"description": "How incoming requests are handled. Defaults to 'pause'",
|
128
|
+
"schema": {
|
129
|
+
"title": "mode",
|
130
|
+
"type": "string"
|
134
131
|
},
|
135
|
-
|
136
|
-
|
137
|
-
"type": "boolean",
|
138
|
-
"info": "Whether the input properties should be saved",
|
139
|
-
"required": true
|
140
|
-
}
|
141
|
-
],
|
132
|
+
"required": false
|
133
|
+
}],
|
142
134
|
"output": {
|
143
135
|
"name": "result",
|
144
136
|
"type": "object",
|
145
|
-
"description": "A JSON Object containing the
|
137
|
+
"description": "A JSON Object containing the adapter suspended status",
|
146
138
|
"schema": {
|
147
139
|
"title": "result",
|
148
140
|
"type": "object"
|
@@ -153,38 +145,42 @@
|
|
153
145
|
],
|
154
146
|
"route": {
|
155
147
|
"verb": "POST",
|
156
|
-
"path": "/
|
148
|
+
"path": "/iapSuspendAdapter"
|
157
149
|
},
|
158
150
|
"task": true
|
159
151
|
},
|
160
152
|
{
|
161
|
-
"name": "
|
162
|
-
"summary": "
|
163
|
-
"description": "
|
153
|
+
"name": "iapUnsuspendAdapter",
|
154
|
+
"summary": "Unsuspends the adapter",
|
155
|
+
"description": "Unsuspends the adapter",
|
164
156
|
"input": [],
|
165
157
|
"output": {
|
166
158
|
"name": "result",
|
167
|
-
"type": "
|
168
|
-
"description": "
|
159
|
+
"type": "object",
|
160
|
+
"description": "A JSON Object containing the adapter suspended status",
|
161
|
+
"schema": {
|
162
|
+
"title": "result",
|
163
|
+
"type": "object"
|
164
|
+
}
|
169
165
|
},
|
170
166
|
"roles": [
|
171
167
|
"admin"
|
172
168
|
],
|
173
169
|
"route": {
|
174
170
|
"verb": "POST",
|
175
|
-
"path": "/
|
171
|
+
"path": "/iapUnsuspendAdapter"
|
176
172
|
},
|
177
173
|
"task": true
|
178
174
|
},
|
179
175
|
{
|
180
|
-
"name": "
|
181
|
-
"summary": "
|
182
|
-
"description": "
|
176
|
+
"name": "iapGetAdapterQueue",
|
177
|
+
"summary": "Return the requests that are waiting in the queue if throttling is enabled",
|
178
|
+
"description": "Return the requests that are waiting in the queue if throttling is enabled",
|
183
179
|
"input": [],
|
184
180
|
"output": {
|
185
181
|
"name": "result",
|
186
182
|
"type": "object",
|
187
|
-
"description": "A JSON Object containing the
|
183
|
+
"description": "A JSON Object containing the adapter queue",
|
188
184
|
"schema": {
|
189
185
|
"title": "result",
|
190
186
|
"type": "object"
|
@@ -195,15 +191,32 @@
|
|
195
191
|
],
|
196
192
|
"route": {
|
197
193
|
"verb": "POST",
|
198
|
-
"path": "/
|
194
|
+
"path": "/iapGetAdapterQueue"
|
199
195
|
},
|
200
196
|
"task": true
|
201
197
|
},
|
202
198
|
{
|
203
|
-
"name": "
|
204
|
-
"summary": "Runs
|
205
|
-
"description": "Runs
|
206
|
-
"input": [
|
199
|
+
"name": "iapTroubleshootAdapter",
|
200
|
+
"summary": "Runs troubleshoot script for adapter",
|
201
|
+
"description": "Runs troubleshoot script for adapter",
|
202
|
+
"input": [
|
203
|
+
{
|
204
|
+
"name": "props",
|
205
|
+
"type": "object",
|
206
|
+
"info": "Object containing configuration, healthcheck and auth properties {'connProps':{'host': 'api.service.com', 'base_path': '/', 'protocol': 'http', 'port': 443, 'version': 'v1'},'healthCheckEndpoint': '/healthcheck', 'auth': {'auth_method': 'no authentication', 'username': 'username', 'password': 'password'}}",
|
207
|
+
"required": true,
|
208
|
+
"schema": {
|
209
|
+
"title": "props",
|
210
|
+
"type": "object"
|
211
|
+
}
|
212
|
+
},
|
213
|
+
{
|
214
|
+
"name": "persistFlag",
|
215
|
+
"type": "boolean",
|
216
|
+
"info": "Whether the input properties should be saved",
|
217
|
+
"required": true
|
218
|
+
}
|
219
|
+
],
|
207
220
|
"output": {
|
208
221
|
"name": "result",
|
209
222
|
"type": "object",
|
@@ -218,35 +231,38 @@
|
|
218
231
|
],
|
219
232
|
"route": {
|
220
233
|
"verb": "POST",
|
221
|
-
"path": "/
|
234
|
+
"path": "/iapTroubleshootAdapter"
|
222
235
|
},
|
223
236
|
"task": true
|
224
237
|
},
|
225
238
|
{
|
226
|
-
"name": "
|
227
|
-
"summary": "
|
228
|
-
"description": "
|
229
|
-
"input": [
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
"info": "How incoming requests are handled. Defaults to 'pause'",
|
238
|
-
"description": "How incoming requests are handled. Defaults to 'pause'",
|
239
|
-
"schema": {
|
240
|
-
"title": "mode",
|
241
|
-
"type": "string"
|
242
|
-
},
|
243
|
-
"required": false
|
244
|
-
}
|
239
|
+
"name": "iapRunAdapterHealthcheck",
|
240
|
+
"summary": "Runs healthcheck script for adapter",
|
241
|
+
"description": "Runs healthcheck script for adapter",
|
242
|
+
"input": [],
|
243
|
+
"output": {
|
244
|
+
"name": "result",
|
245
|
+
"type": "boolean",
|
246
|
+
"description": "Whether healthcheck passed or failed"
|
247
|
+
},
|
248
|
+
"roles": [
|
249
|
+
"admin"
|
245
250
|
],
|
251
|
+
"route": {
|
252
|
+
"verb": "POST",
|
253
|
+
"path": "/iapRunAdapterHealthcheck"
|
254
|
+
},
|
255
|
+
"task": true
|
256
|
+
},
|
257
|
+
{
|
258
|
+
"name": "iapRunAdapterConnectivity",
|
259
|
+
"summary": "Runs connectivity check script for adapter",
|
260
|
+
"description": "Runs connectivity check script for adapter",
|
261
|
+
"input": [],
|
246
262
|
"output": {
|
247
263
|
"name": "result",
|
248
264
|
"type": "object",
|
249
|
-
"description": "A JSON Object containing the
|
265
|
+
"description": "A JSON Object containing the test results",
|
250
266
|
"schema": {
|
251
267
|
"title": "result",
|
252
268
|
"type": "object"
|
@@ -257,19 +273,19 @@
|
|
257
273
|
],
|
258
274
|
"route": {
|
259
275
|
"verb": "POST",
|
260
|
-
"path": "/
|
276
|
+
"path": "/iapRunAdapterConnectivity"
|
261
277
|
},
|
262
278
|
"task": true
|
263
279
|
},
|
264
280
|
{
|
265
|
-
"name": "
|
266
|
-
"summary": "
|
267
|
-
"description": "
|
281
|
+
"name": "iapRunAdapterBasicGet",
|
282
|
+
"summary": "Runs basicGet script for adapter",
|
283
|
+
"description": "Runs basicGet script for adapter",
|
268
284
|
"input": [],
|
269
285
|
"output": {
|
270
286
|
"name": "result",
|
271
287
|
"type": "object",
|
272
|
-
"description": "A JSON Object containing the
|
288
|
+
"description": "A JSON Object containing the test results",
|
273
289
|
"schema": {
|
274
290
|
"title": "result",
|
275
291
|
"type": "object"
|
@@ -280,21 +296,21 @@
|
|
280
296
|
],
|
281
297
|
"route": {
|
282
298
|
"verb": "POST",
|
283
|
-
"path": "/
|
299
|
+
"path": "/iapRunAdapterBasicGet"
|
284
300
|
},
|
285
301
|
"task": true
|
286
302
|
},
|
287
303
|
{
|
288
|
-
"name": "
|
289
|
-
"summary": "
|
290
|
-
"description": "
|
304
|
+
"name": "iapMoveAdapterEntitiesToDB",
|
305
|
+
"summary": "Moves entities from an adapter into the IAP database",
|
306
|
+
"description": "Moves entities from an adapter into the IAP database",
|
291
307
|
"input": [],
|
292
308
|
"output": {
|
293
|
-
"name": "
|
309
|
+
"name": "res",
|
294
310
|
"type": "object",
|
295
|
-
"description": "A JSON Object containing the
|
311
|
+
"description": "A JSON Object containing status, code and the response from the mongo transaction",
|
296
312
|
"schema": {
|
297
|
-
"title": "
|
313
|
+
"title": "res",
|
298
314
|
"type": "object"
|
299
315
|
}
|
300
316
|
},
|
@@ -303,7 +319,7 @@
|
|
303
319
|
],
|
304
320
|
"route": {
|
305
321
|
"verb": "POST",
|
306
|
-
"path": "/
|
322
|
+
"path": "/iapMoveAdapterEntitiesToDB"
|
307
323
|
},
|
308
324
|
"task": true
|
309
325
|
},
|
@@ -386,6 +402,175 @@
|
|
386
402
|
},
|
387
403
|
"task": true
|
388
404
|
},
|
405
|
+
{
|
406
|
+
"name": "getDevice",
|
407
|
+
"summary": "Get the Appliance",
|
408
|
+
"description": "Get the Appliance",
|
409
|
+
"input": [
|
410
|
+
{
|
411
|
+
"name": "deviceName",
|
412
|
+
"type": "string",
|
413
|
+
"info": "An Appliance Device Name",
|
414
|
+
"required": true,
|
415
|
+
"schema": {
|
416
|
+
"title": "deviceName",
|
417
|
+
"type": "string"
|
418
|
+
}
|
419
|
+
}
|
420
|
+
],
|
421
|
+
"output": {
|
422
|
+
"name": "result",
|
423
|
+
"type": "object",
|
424
|
+
"description": "A JSON Object containing status, code and the result",
|
425
|
+
"schema": {
|
426
|
+
"title": "result",
|
427
|
+
"type": "object"
|
428
|
+
}
|
429
|
+
},
|
430
|
+
"roles": [
|
431
|
+
"admin"
|
432
|
+
],
|
433
|
+
"route": {
|
434
|
+
"verb": "POST",
|
435
|
+
"path": "/getDevice"
|
436
|
+
},
|
437
|
+
"task": false
|
438
|
+
},
|
439
|
+
{
|
440
|
+
"name": "getDevicesFiltered",
|
441
|
+
"summary": "Get Appliances that match the filter",
|
442
|
+
"description": "Get Appliances that match the filter",
|
443
|
+
"input": [
|
444
|
+
{
|
445
|
+
"name": "options",
|
446
|
+
"type": "object",
|
447
|
+
"info": "options - e.g. { 'start': 1, 'limit': 20, 'filter': { 'name': 'abc123' } }",
|
448
|
+
"required": true,
|
449
|
+
"schema": {
|
450
|
+
"title": "options",
|
451
|
+
"type": "object"
|
452
|
+
}
|
453
|
+
}
|
454
|
+
],
|
455
|
+
"output": {
|
456
|
+
"name": "result",
|
457
|
+
"type": "array",
|
458
|
+
"description": "A JSON Object containing status, code and the result",
|
459
|
+
"schema": {
|
460
|
+
"title": "result",
|
461
|
+
"type": "array"
|
462
|
+
}
|
463
|
+
},
|
464
|
+
"roles": [
|
465
|
+
"admin"
|
466
|
+
],
|
467
|
+
"route": {
|
468
|
+
"verb": "POST",
|
469
|
+
"path": "/getDevicesFiltered"
|
470
|
+
},
|
471
|
+
"task": false
|
472
|
+
},
|
473
|
+
{
|
474
|
+
"name": "isAlive",
|
475
|
+
"summary": "Checks the status for the provided Appliance",
|
476
|
+
"description": "Checks the status for the provided Appliance",
|
477
|
+
"input": [
|
478
|
+
{
|
479
|
+
"name": "deviceName",
|
480
|
+
"type": "string",
|
481
|
+
"info": "An Appliance Device Name",
|
482
|
+
"required": true,
|
483
|
+
"schema": {
|
484
|
+
"title": "deviceName",
|
485
|
+
"type": "string"
|
486
|
+
}
|
487
|
+
}
|
488
|
+
],
|
489
|
+
"output": {
|
490
|
+
"name": "result",
|
491
|
+
"type": "boolean",
|
492
|
+
"description": "A JSON Object containing status, code and the result",
|
493
|
+
"schema": {
|
494
|
+
"title": "result",
|
495
|
+
"type": "boolean"
|
496
|
+
}
|
497
|
+
},
|
498
|
+
"roles": [
|
499
|
+
"admin"
|
500
|
+
],
|
501
|
+
"route": {
|
502
|
+
"verb": "POST",
|
503
|
+
"path": "/isAlive"
|
504
|
+
},
|
505
|
+
"task": false
|
506
|
+
},
|
507
|
+
{
|
508
|
+
"name": "getConfig",
|
509
|
+
"summary": "Gets a config for the provided Appliance",
|
510
|
+
"description": "Gets a config for the provided Appliance",
|
511
|
+
"input": [
|
512
|
+
{
|
513
|
+
"name": "deviceName",
|
514
|
+
"type": "string",
|
515
|
+
"info": "An Appliance Device Name",
|
516
|
+
"required": true,
|
517
|
+
"schema": {
|
518
|
+
"title": "deviceName",
|
519
|
+
"type": "string"
|
520
|
+
}
|
521
|
+
},
|
522
|
+
{
|
523
|
+
"name": "format",
|
524
|
+
"type": "string",
|
525
|
+
"info": "The format to be returned - this is ignored as we always return json",
|
526
|
+
"required": false,
|
527
|
+
"schema": {
|
528
|
+
"title": "format",
|
529
|
+
"type": "string"
|
530
|
+
}
|
531
|
+
}
|
532
|
+
],
|
533
|
+
"output": {
|
534
|
+
"name": "result",
|
535
|
+
"type": "object",
|
536
|
+
"description": "A JSON Object containing status, code and the result",
|
537
|
+
"schema": {
|
538
|
+
"title": "result",
|
539
|
+
"type": "object"
|
540
|
+
}
|
541
|
+
},
|
542
|
+
"roles": [
|
543
|
+
"admin"
|
544
|
+
],
|
545
|
+
"route": {
|
546
|
+
"verb": "POST",
|
547
|
+
"path": "/getConfig"
|
548
|
+
},
|
549
|
+
"task": false
|
550
|
+
},
|
551
|
+
{
|
552
|
+
"name": "iapGetDeviceCount",
|
553
|
+
"summary": "Gets a device count from the system",
|
554
|
+
"description": "Gets a device count from the system",
|
555
|
+
"input": [],
|
556
|
+
"output": {
|
557
|
+
"name": "result",
|
558
|
+
"type": "object",
|
559
|
+
"description": "A JSON Object containing status, code and the result",
|
560
|
+
"schema": {
|
561
|
+
"title": "result",
|
562
|
+
"type": "object"
|
563
|
+
}
|
564
|
+
},
|
565
|
+
"roles": [
|
566
|
+
"admin"
|
567
|
+
],
|
568
|
+
"route": {
|
569
|
+
"verb": "POST",
|
570
|
+
"path": "/iapGetDeviceCount"
|
571
|
+
},
|
572
|
+
"task": false
|
573
|
+
},
|
389
574
|
{
|
390
575
|
"name": "createOrganizationActionBatch",
|
391
576
|
"summary": "Create an action batch",
|
@@ -14092,12 +14277,12 @@
|
|
14092
14277
|
"input": [
|
14093
14278
|
{
|
14094
14279
|
"name": "body",
|
14095
|
-
"type": "
|
14096
|
-
"info": "
|
14280
|
+
"type": "object",
|
14281
|
+
"info": "object",
|
14097
14282
|
"required": false,
|
14098
14283
|
"schema": {
|
14099
14284
|
"title": "body",
|
14100
|
-
"type": "
|
14285
|
+
"type": "object"
|
14101
14286
|
}
|
14102
14287
|
},
|
14103
14288
|
{
|
@@ -14156,12 +14341,12 @@
|
|
14156
14341
|
},
|
14157
14342
|
{
|
14158
14343
|
"name": "body",
|
14159
|
-
"type": "
|
14160
|
-
"info": "
|
14344
|
+
"type": "object",
|
14345
|
+
"info": "object",
|
14161
14346
|
"required": false,
|
14162
14347
|
"schema": {
|
14163
14348
|
"title": "body",
|
14164
|
-
"type": "
|
14349
|
+
"type": "object"
|
14165
14350
|
}
|
14166
14351
|
}
|
14167
14352
|
],
|
@@ -14200,12 +14385,12 @@
|
|
14200
14385
|
},
|
14201
14386
|
{
|
14202
14387
|
"name": "body",
|
14203
|
-
"type": "
|
14204
|
-
"info": "
|
14388
|
+
"type": "object",
|
14389
|
+
"info": "object",
|
14205
14390
|
"required": false,
|
14206
14391
|
"schema": {
|
14207
14392
|
"title": "body",
|
14208
|
-
"type": "
|
14393
|
+
"type": "object"
|
14209
14394
|
}
|
14210
14395
|
}
|
14211
14396
|
],
|
@@ -14234,12 +14419,12 @@
|
|
14234
14419
|
"input": [
|
14235
14420
|
{
|
14236
14421
|
"name": "body",
|
14237
|
-
"type": "
|
14238
|
-
"info": "
|
14422
|
+
"type": "object",
|
14423
|
+
"info": "object",
|
14239
14424
|
"required": false,
|
14240
14425
|
"schema": {
|
14241
14426
|
"title": "body",
|
14242
|
-
"type": "
|
14427
|
+
"type": "object"
|
14243
14428
|
}
|
14244
14429
|
},
|
14245
14430
|
{
|
@@ -14278,12 +14463,12 @@
|
|
14278
14463
|
"input": [
|
14279
14464
|
{
|
14280
14465
|
"name": "body",
|
14281
|
-
"type": "
|
14282
|
-
"info": "
|
14466
|
+
"type": "object",
|
14467
|
+
"info": "object",
|
14283
14468
|
"required": false,
|
14284
14469
|
"schema": {
|
14285
14470
|
"title": "body",
|
14286
|
-
"type": "
|
14471
|
+
"type": "object"
|
14287
14472
|
}
|
14288
14473
|
},
|
14289
14474
|
{
|
@@ -16293,4 +16478,4 @@
|
|
16293
16478
|
}
|
16294
16479
|
],
|
16295
16480
|
"views": []
|
16296
|
-
}
|
16481
|
+
}
|