@itentialopensource/adapter-meraki 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. package/.eslintignore +1 -0
  2. package/.eslintrc.js +12 -12
  3. package/CHANGELOG.md +32 -0
  4. package/README.md +270 -68
  5. package/adapter.js +2786 -24
  6. package/adapterBase.js +544 -17
  7. package/entities/.generic/action.json +109 -0
  8. package/entities/.generic/schema.json +23 -0
  9. package/entities/.system/action.json +1 -1
  10. package/entities/CameraQualityRetentionProfiles/action.json +3 -0
  11. package/entities/ConnectivityMonitoringDestinations/action.json +1 -0
  12. package/entities/DashboardBrandingPolicies/action.json +4 -0
  13. package/entities/Floorplans/action.json +3 -0
  14. package/entities/Licenses/action.json +5 -0
  15. package/entities/LinkAggregations/action.json +3 -0
  16. package/entities/MGConnectivityMonitoringDestinations/action.json +1 -0
  17. package/entities/MGDHCPSettings/action.json +1 -0
  18. package/entities/MGLANSettings/action.json +1 -0
  19. package/entities/MGPortforwardingRules/action.json +1 -0
  20. package/entities/MGSubnetPoolSettings/action.json +1 -0
  21. package/entities/MGUplinkSettings/action.json +1 -0
  22. package/entities/MXVLANPorts/action.json +1 -0
  23. package/entities/MXWarmSpareSettings/action.json +2 -0
  24. package/entities/NetFlowSettings/action.json +1 -0
  25. package/entities/Switch settings/action.json +9 -0
  26. package/entities/SwitchACLs/action.json +1 -0
  27. package/entities/SwitchPortsSchedules/action.json +3 -0
  28. package/entities/TrafficAnalysisSettings/action.json +1 -0
  29. package/entities/WirelessSettings/action.json +1 -0
  30. package/error.json +6 -0
  31. package/package.json +45 -23
  32. package/pronghorn.json +586 -16
  33. package/propertiesSchema.json +84 -11
  34. package/refs?service=git-upload-pack +0 -0
  35. package/report/meraki-newcalls-OpenApi3Json.json +5460 -0
  36. package/report/updateReport1594225126093.json +95 -0
  37. package/report/updateReport1615384306128.json +95 -0
  38. package/report/updateReport1642739939352.json +95 -0
  39. package/sampleProperties.json +20 -5
  40. package/test/integration/adapterTestBasicGet.js +85 -0
  41. package/test/integration/adapterTestConnectivity.js +93 -0
  42. package/test/integration/adapterTestIntegration.js +30 -11
  43. package/test/unit/adapterBaseTestUnit.js +944 -0
  44. package/test/unit/adapterTestUnit.js +638 -12
  45. package/utils/addAuth.js +94 -0
  46. package/utils/artifactize.js +9 -14
  47. package/utils/basicGet.js +50 -0
  48. package/utils/checkMigrate.js +63 -0
  49. package/utils/entitiesToDB.js +224 -0
  50. package/utils/findPath.js +74 -0
  51. package/utils/modify.js +154 -0
  52. package/utils/packModificationScript.js +1 -1
  53. package/utils/patches2bundledDeps.js +90 -0
  54. package/utils/pre-commit.sh +1 -1
  55. package/utils/removeHooks.js +20 -0
  56. package/utils/tbScript.js +169 -0
  57. package/utils/tbUtils.js +451 -0
  58. package/utils/troubleshootingAdapter.js +190 -0
  59. package/gl-code-quality-report.json +0 -1
@@ -46,8 +46,16 @@
46
46
  "none"
47
47
  ]
48
48
  },
49
- "save_metric": {
49
+ "encode_pathvars": {
50
50
  "type": "boolean",
51
+ "description": "When true the path variables are encoded in the url",
52
+ "default": true
53
+ },
54
+ "save_metric": {
55
+ "type": [
56
+ "boolean",
57
+ "string"
58
+ ],
51
59
  "description": "When true the metrics collected by the adapter will be stored in mongo or on the filesystem",
52
60
  "default": false
53
61
  },
@@ -104,6 +112,7 @@
104
112
  "enum": [
105
113
  "basic user_password",
106
114
  "static_token",
115
+ "jwt_token",
107
116
  "request_token",
108
117
  "no_authentication"
109
118
  ]
@@ -190,7 +199,10 @@
190
199
  ]
191
200
  },
192
201
  "auth_field": {
193
- "type": "string",
202
+ "type": [
203
+ "string",
204
+ "array"
205
+ ],
194
206
  "description": "The field in which to pass the token",
195
207
  "default": "header.headers.X-AUTH-TOKEN",
196
208
  "examples": [
@@ -202,7 +214,10 @@
202
214
  ]
203
215
  },
204
216
  "auth_field_format": {
205
- "type": "string",
217
+ "type": [
218
+ "string",
219
+ "array"
220
+ ],
206
221
  "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.",
207
222
  "default": "{token}",
208
223
  "examples": [
@@ -212,6 +227,26 @@
212
227
  "Basic {b64}{username}:{password}{/b64}",
213
228
  "token={token}"
214
229
  ]
230
+ },
231
+ "auth_logging": {
232
+ "type": "boolean",
233
+ "description": "This property turns on logging of Authentication Information and should only be true when debugging authentication and connectivity",
234
+ "default": false
235
+ },
236
+ "client_id": {
237
+ "type": "string",
238
+ "description": "The client id for OAuth requests - can also use username depending on schema",
239
+ "default": ""
240
+ },
241
+ "client_secret": {
242
+ "type": "string",
243
+ "description": "The client secret for OAuth requests - can also use password depending on schema",
244
+ "default": ""
245
+ },
246
+ "grant_type": {
247
+ "type": "string",
248
+ "description": "The grant type for OAuth requests - can also provide in schema",
249
+ "default": ""
215
250
  }
216
251
  },
217
252
  "required": [
@@ -311,6 +346,10 @@
311
346
  "examples": [
312
347
  "/api/version/ping"
313
348
  ]
349
+ },
350
+ "query_object": {
351
+ "type": "object",
352
+ "description": "Query object { device: xxxxx } to be placed into the healthcheck, will be converted to query string by the adapter"
314
353
  }
315
354
  },
316
355
  "required": [
@@ -370,7 +409,7 @@
370
409
  "type": "integer",
371
410
  "description": "defines the number of request that Pronghorn can send meraki at one time",
372
411
  "default": 1,
373
- "minimum": 1,
412
+ "minimum": 0,
374
413
  "maximum": 1000
375
414
  },
376
415
  "expire_timeout": {
@@ -386,6 +425,23 @@
386
425
  "default": 200,
387
426
  "minimum": 50,
388
427
  "maximum": 60000
428
+ },
429
+ "priorities": {
430
+ "type": "array",
431
+ "description": "define your priorities here",
432
+ "items": {
433
+ "type": "object",
434
+ "properties": {
435
+ "value": {
436
+ "type": "number",
437
+ "description": "Defines a priority - this number is what is passed in on a priority request"
438
+ },
439
+ "percent": {
440
+ "type": "number",
441
+ "description": "this is the percent of the queue that comes before the priority request (0 is front of queue, 100 is last in queue)"
442
+ }
443
+ }
444
+ }
389
445
  }
390
446
  },
391
447
  "required": [
@@ -433,11 +489,12 @@
433
489
  "maximum": 20
434
490
  },
435
491
  "limit_retry_error": {
436
- "type": "integer",
437
- "description": "http error status number which defines that no capacity was available and thus after waiting a short interval the adapter can retry the request",
438
- "default": 0,
439
- "minimum": 0,
440
- "maximum": 1000
492
+ "type": [
493
+ "integer",
494
+ "array"
495
+ ],
496
+ "description": "http error status number which defines that no capacity was available and thus after waiting a short interval the adapter can retry the request. Supports an array of numbers or strings including a range provided as '###-###'",
497
+ "default": 0
441
498
  },
442
499
  "failover_codes": {
443
500
  "type": "array",
@@ -489,6 +546,11 @@
489
546
  "type": "boolean",
490
547
  "description": "Archives each request/response and corresponding metrics",
491
548
  "default": false
549
+ },
550
+ "return_request": {
551
+ "type": "boolean",
552
+ "description": "This property turns on returning the response information - need to be carefull in case credentials are in the path",
553
+ "default": false
492
554
  }
493
555
  },
494
556
  "required": [
@@ -529,8 +591,19 @@
529
591
  "http",
530
592
  "https",
531
593
  "socks4",
532
- "socks5"
594
+ "socks5",
595
+ "tls"
533
596
  ]
597
+ },
598
+ "username": {
599
+ "type": "string",
600
+ "description": "username for proxy authentication",
601
+ "default": ""
602
+ },
603
+ "password": {
604
+ "type": "string",
605
+ "description": "password for proxy authentication",
606
+ "default": ""
534
607
  }
535
608
  },
536
609
  "required": [
@@ -582,7 +655,7 @@
582
655
  "description": "The fully qualified path name to the CA file used for SSL",
583
656
  "default": "",
584
657
  "examples": [
585
- "keys/key.pem"
658
+ "security/ca.pem"
586
659
  ]
587
660
  },
588
661
  "key_file": {
Binary file