@itentialopensource/adapter-adtran_mosaic_devicemanager 0.1.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 (52) hide show
  1. package/AUTH.md +39 -0
  2. package/BROKER.md +199 -0
  3. package/CALLS.md +733 -0
  4. package/CHANGELOG.md +17 -2
  5. package/CODE_OF_CONDUCT.md +12 -17
  6. package/CONTRIBUTING.md +3 -148
  7. package/ENHANCE.md +14 -14
  8. package/PROPERTIES.md +483 -89
  9. package/README.md +156 -67
  10. package/SUMMARY.md +2 -2
  11. package/SYSTEMINFO.md +11 -0
  12. package/TROUBLESHOOT.md +4 -3
  13. package/adapter.js +236 -626
  14. package/adapterBase.js +647 -494
  15. package/changelogs/changelog.md +16 -0
  16. package/entities/.generic/action.json +105 -0
  17. package/entities/.generic/schema.json +6 -1
  18. package/metadata.json +47 -0
  19. package/package.json +24 -24
  20. package/pronghorn.json +508 -90
  21. package/propertiesSchema.json +496 -39
  22. package/refs?service=git-upload-pack +0 -0
  23. package/report/adapter-openapi.json +7211 -0
  24. package/report/adapter-openapi.yaml +6459 -0
  25. package/report/adapterInfo.json +10 -0
  26. package/report/updateReport1653138377421.json +120 -0
  27. package/report/updateReport1691507605063.json +120 -0
  28. package/report/updateReport1692202606613.json +120 -0
  29. package/report/updateReport1694462023649.json +120 -0
  30. package/report/updateReport1698421007213.json +120 -0
  31. package/sampleProperties.json +153 -3
  32. package/test/integration/adapterTestBasicGet.js +3 -5
  33. package/test/integration/adapterTestConnectivity.js +91 -42
  34. package/test/integration/adapterTestIntegration.js +1965 -2493
  35. package/test/unit/adapterBaseTestUnit.js +388 -306
  36. package/test/unit/adapterTestUnit.js +364 -231
  37. package/utils/adapterInfo.js +206 -0
  38. package/utils/addAuth.js +1 -1
  39. package/utils/artifactize.js +1 -1
  40. package/utils/checkMigrate.js +1 -1
  41. package/utils/entitiesToDB.js +12 -57
  42. package/utils/findPath.js +1 -1
  43. package/utils/methodDocumentor.js +273 -0
  44. package/utils/modify.js +13 -15
  45. package/utils/packModificationScript.js +1 -1
  46. package/utils/pre-commit.sh +5 -0
  47. package/utils/taskMover.js +309 -0
  48. package/utils/tbScript.js +123 -53
  49. package/utils/tbUtils.js +84 -59
  50. package/utils/testRunner.js +17 -17
  51. package/utils/troubleshootingAdapter.js +9 -6
  52. package/workflows/README.md +0 -3
package/pronghorn.json CHANGED
@@ -62,6 +62,16 @@
62
62
  "title": "action",
63
63
  "type": "string"
64
64
  }
65
+ },
66
+ {
67
+ "name" : "replace",
68
+ "type": "boolean",
69
+ "info": "True to replace entire mock data, false to merge/append",
70
+ "required": false,
71
+ "schema": {
72
+ "title": "replace",
73
+ "type" : "boolean"
74
+ }
65
75
  }
66
76
  ],
67
77
  "output": {
@@ -83,24 +93,30 @@
83
93
  "task": true
84
94
  },
85
95
  {
86
- "name": "iapFindAdapterPath",
87
- "summary": "Provides the ability to see if a particular API path is supported by the adapter",
88
- "description": "Provides the ability to see if a particular API path is supported by the adapter",
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
- }],
96
+ "name": "iapSuspendAdapter",
97
+ "summary": "Suspends the adapter",
98
+ "description": "Suspends the adapter",
99
+ "input": [
100
+ {
101
+ "name": "mode",
102
+ "type": "enum",
103
+ "enumerals": [
104
+ "pause",
105
+ "error"
106
+ ],
107
+ "info": "How incoming requests are handled. Defaults to 'pause'",
108
+ "description": "How incoming requests are handled. Defaults to 'pause'",
109
+ "schema": {
110
+ "title": "mode",
111
+ "type": "string"
112
+ },
113
+ "required": false
114
+ }
115
+ ],
100
116
  "output": {
101
117
  "name": "result",
102
118
  "type": "object",
103
- "description": "A JSON Object containing the result",
119
+ "description": "A JSON Object containing the adapter suspended status",
104
120
  "schema": {
105
121
  "title": "result",
106
122
  "type": "object"
@@ -111,26 +127,15 @@
111
127
  ],
112
128
  "route": {
113
129
  "verb": "POST",
114
- "path": "/iapFindAdapterPath"
130
+ "path": "/iapSuspendAdapter"
115
131
  },
116
132
  "task": true
117
133
  },
118
134
  {
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"
131
- },
132
- "required": false
133
- }],
135
+ "name": "iapUnsuspendAdapter",
136
+ "summary": "Unsuspends the adapter",
137
+ "description": "Unsuspends the adapter",
138
+ "input": [],
134
139
  "output": {
135
140
  "name": "result",
136
141
  "type": "object",
@@ -145,19 +150,19 @@
145
150
  ],
146
151
  "route": {
147
152
  "verb": "POST",
148
- "path": "/iapSuspendAdapter"
153
+ "path": "/iapUnsuspendAdapter"
149
154
  },
150
155
  "task": true
151
156
  },
152
157
  {
153
- "name": "iapUnsuspendAdapter",
154
- "summary": "Unsuspends the adapter",
155
- "description": "Unsuspends the adapter",
158
+ "name": "iapGetAdapterQueue",
159
+ "summary": "Return the requests that are waiting in the queue if throttling is enabled",
160
+ "description": "Return the requests that are waiting in the queue if throttling is enabled",
156
161
  "input": [],
157
162
  "output": {
158
163
  "name": "result",
159
164
  "type": "object",
160
- "description": "A JSON Object containing the adapter suspended status",
165
+ "description": "A JSON Object containing the adapter queue",
161
166
  "schema": {
162
167
  "title": "result",
163
168
  "type": "object"
@@ -168,19 +173,31 @@
168
173
  ],
169
174
  "route": {
170
175
  "verb": "POST",
171
- "path": "/iapUnsuspendAdapter"
176
+ "path": "/iapGetAdapterQueue"
172
177
  },
173
178
  "task": true
174
179
  },
175
180
  {
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",
179
- "input": [],
181
+ "name": "iapFindAdapterPath",
182
+ "summary": "Provides the ability to see if a particular API path is supported by the adapter",
183
+ "description": "Provides the ability to see if a particular API path is supported by the adapter",
184
+ "input": [
185
+ {
186
+ "name": "apiPath",
187
+ "type": "string",
188
+ "info": "The API Path you want to check - make sure to not include base path and version",
189
+ "description": "The API Path you want to check - make sure to not include base path and version",
190
+ "schema": {
191
+ "title": "apiPath",
192
+ "type": "string"
193
+ },
194
+ "required": true
195
+ }
196
+ ],
180
197
  "output": {
181
198
  "name": "result",
182
199
  "type": "object",
183
- "description": "A JSON Object containing the adapter queue",
200
+ "description": "A JSON Object containing the result",
184
201
  "schema": {
185
202
  "title": "result",
186
203
  "type": "object"
@@ -191,7 +208,7 @@
191
208
  ],
192
209
  "route": {
193
210
  "verb": "POST",
194
- "path": "/iapGetAdapterQueue"
211
+ "path": "/iapFindAdapterPath"
195
212
  },
196
213
  "task": true
197
214
  },
@@ -214,7 +231,11 @@
214
231
  "name": "persistFlag",
215
232
  "type": "boolean",
216
233
  "info": "Whether the input properties should be saved",
217
- "required": true
234
+ "required": true,
235
+ "schema": {
236
+ "title": "persistFlag",
237
+ "type": "boolean"
238
+ }
218
239
  }
219
240
  ],
220
241
  "output": {
@@ -243,7 +264,11 @@
243
264
  "output": {
244
265
  "name": "result",
245
266
  "type": "boolean",
246
- "description": "Whether healthcheck passed or failed"
267
+ "description": "Whether healthcheck passed or failed",
268
+ "schema": {
269
+ "title": "result",
270
+ "type": "boolean"
271
+ }
247
272
  },
248
273
  "roles": [
249
274
  "admin"
@@ -324,64 +349,129 @@
324
349
  "task": true
325
350
  },
326
351
  {
327
- "name": "genericAdapterRequest",
328
- "summary": "Makes the requested generic call",
329
- "description": "Makes the requested generic call",
352
+ "name": "iapDeactivateTasks",
353
+ "summary": "Deactivate the inputted tasks",
354
+ "description": "Deactivate the inputted tasks",
330
355
  "input": [
331
356
  {
332
- "name": "uriPath",
333
- "type": "string",
334
- "info": "the path of the api call - do not include the host, port, base path or version",
335
- "description": "the path of the api call",
357
+ "name": "tasks",
358
+ "type": "array",
359
+ "description": "Tasks to deactivate",
336
360
  "schema": {
337
- "title": "uriPath",
338
- "type": "string"
339
- },
340
- "required": true
341
- },
361
+ "title": "tasks",
362
+ "type": "array"
363
+ }
364
+ }
365
+ ],
366
+ "output": {
367
+ "name": "result",
368
+ "type": "object",
369
+ "description": "A JSON Object containing success status",
370
+ "schema": {
371
+ "title": "result",
372
+ "type": "object"
373
+ }
374
+ },
375
+ "roles": [
376
+ "admin"
377
+ ],
378
+ "route": {
379
+ "verb": "POST",
380
+ "path": "/iapDeactivateTasks"
381
+ },
382
+ "task": true
383
+ },
384
+ {
385
+ "name": "iapActivateTasks",
386
+ "summary": "Activate the inputted tasks",
387
+ "description": "activate the inputted tasks",
388
+ "input": [
342
389
  {
343
- "name": "restMethod",
344
- "type": "string",
345
- "info": "the rest method (GET, POST, PUT, PATCH, DELETE)",
346
- "description": "the rest method (GET, POST, PUT, PATCH, DELETE)",
390
+ "name": "tasks",
391
+ "type": "array",
392
+ "description": "Tasks to activate",
347
393
  "schema": {
348
- "title": "restMethod",
349
- "type": "string"
350
- },
351
- "required": true
352
- },
394
+ "title": "tasks",
395
+ "type": "array"
396
+ }
397
+ }
398
+ ],
399
+ "output": {
400
+ "name": "result",
401
+ "type": "object",
402
+ "description": "A JSON Object containing success status",
403
+ "schema": {
404
+ "title": "result",
405
+ "type": "object"
406
+ }
407
+ },
408
+ "roles": [
409
+ "admin"
410
+ ],
411
+ "route": {
412
+ "verb": "POST",
413
+ "path": "/iapActivateTasks"
414
+ },
415
+ "task": true
416
+ },
417
+ {
418
+ "name": "iapPopulateEntityCache",
419
+ "summary": "Populate the cache for the given entities",
420
+ "description": "Populate the cache for the given entities",
421
+ "input": [
353
422
  {
354
- "name": "queryData",
355
- "type": "object",
356
- "info": "the query parameters to be put on the url (optional)",
357
- "description": "the query parameters to be put on the url (optional)",
423
+ "name": "entityTypes",
424
+ "type": "array",
425
+ "info": "the entity type(s) to populate",
426
+ "required": true,
358
427
  "schema": {
359
- "title": "queryData",
360
- "type": "object"
361
- },
362
- "required": false
363
- },
428
+ "title": "entityTypes",
429
+ "type": "array"
430
+ }
431
+ }
432
+ ],
433
+ "output": {
434
+ "name": "result",
435
+ "type": "object",
436
+ "description": "A JSON Object containing status, code and the result",
437
+ "schema": {
438
+ "title": "result",
439
+ "type": "object"
440
+ }
441
+ },
442
+ "roles": [
443
+ "admin"
444
+ ],
445
+ "route": {
446
+ "verb": "POST",
447
+ "path": "/iapPopulateEntityCache"
448
+ },
449
+ "task": true
450
+ },
451
+ {
452
+ "name": "iapRetrieveEntitiesCache",
453
+ "summary": "Retrieves data from cache for specified entity type",
454
+ "description": "Retrieves data from cache for specified entity type",
455
+ "input": [
364
456
  {
365
- "name": "requestBody",
366
- "type": "object",
367
- "info": "the payload to be sent with the request (optional)",
368
- "description": "the payload to be sent with the request (optional)",
457
+ "name": "entityType",
458
+ "type": "string",
459
+ "info": "entity of which to retrieve",
460
+ "required": true,
369
461
  "schema": {
370
- "title": "requestBody",
371
- "type": "object"
372
- },
373
- "required": false
462
+ "title": "entityType",
463
+ "type": "string"
464
+ }
374
465
  },
375
466
  {
376
- "name": "addlHeaders",
467
+ "name": "options",
377
468
  "type": "object",
378
- "info": "additional headers to be put on the call (optional)",
379
- "description": "additional headers to be put on the call (optional)",
469
+ "info": "settings of which data to return and how to return it",
470
+ "required": false,
380
471
  "schema": {
381
- "title": "addlHeaders",
472
+ "title": "options",
382
473
  "type": "object"
383
- },
384
- "required": false
474
+ }
385
475
  }
386
476
  ],
387
477
  "output": {
@@ -398,7 +488,7 @@
398
488
  ],
399
489
  "route": {
400
490
  "verb": "POST",
401
- "path": "/genericAdapterRequest"
491
+ "path": "/iapRetrieveEntitiesCache"
402
492
  },
403
493
  "task": true
404
494
  },
@@ -571,6 +661,334 @@
571
661
  },
572
662
  "task": false
573
663
  },
664
+ {
665
+ "name": "iapExpandedGenericAdapterRequest",
666
+ "summary": "Makes the requested generic call with additional options",
667
+ "description": "Makes the requested generic call with additional options via metadata",
668
+ "input": [
669
+ {
670
+ "name": "metadata",
671
+ "type": "object",
672
+ "info": "metadata for the call (optional)",
673
+ "description": "metadata for the call - allows for many enhancements (optional)",
674
+ "schema": {
675
+ "title": "metadata",
676
+ "type": "object"
677
+ },
678
+ "required": false
679
+ },
680
+ {
681
+ "name": "uriPath",
682
+ "type": "string",
683
+ "info": "the path of the api call - do not include the host, port, base path or version",
684
+ "description": "the path of the api call",
685
+ "schema": {
686
+ "title": "uriPath",
687
+ "type": "string"
688
+ },
689
+ "required": false
690
+ },
691
+ {
692
+ "name": "restMethod",
693
+ "type": "string",
694
+ "info": "the rest method (GET, POST, PUT, PATCH, DELETE)",
695
+ "description": "the rest method (GET, POST, PUT, PATCH, DELETE)",
696
+ "schema": {
697
+ "title": "restMethod",
698
+ "type": "string"
699
+ },
700
+ "required": false
701
+ },
702
+ {
703
+ "name": "pathVars",
704
+ "type": "object",
705
+ "info": "the parameters to be put within the url path (optional)",
706
+ "description": "the parameters to be put within the url path (optional)",
707
+ "schema": {
708
+ "title": "pathVars",
709
+ "type": "object"
710
+ },
711
+ "required": false
712
+ },
713
+ {
714
+ "name": "queryData",
715
+ "type": "object",
716
+ "info": "the query parameters to be put on the url (optional)",
717
+ "description": "the query parameters to be put on the url (optional)",
718
+ "schema": {
719
+ "title": "queryData",
720
+ "type": "object"
721
+ },
722
+ "required": false
723
+ },
724
+ {
725
+ "name": "requestBody",
726
+ "type": "object",
727
+ "info": "the payload to be sent with the request (optional)",
728
+ "description": "the payload to be sent with the request (optional)",
729
+ "schema": {
730
+ "title": "requestBody",
731
+ "type": "object"
732
+ },
733
+ "required": false
734
+ },
735
+ {
736
+ "name": "addlHeaders",
737
+ "type": "object",
738
+ "info": "additional headers to be put on the call (optional)",
739
+ "description": "additional headers to be put on the call (optional)",
740
+ "schema": {
741
+ "title": "addlHeaders",
742
+ "type": "object"
743
+ },
744
+ "required": false
745
+ }
746
+ ],
747
+ "output": {
748
+ "name": "result",
749
+ "type": "object",
750
+ "description": "A JSON Object containing status, code and the result",
751
+ "schema": {
752
+ "title": "result",
753
+ "type": "object"
754
+ }
755
+ },
756
+ "roles": [
757
+ "admin"
758
+ ],
759
+ "route": {
760
+ "verb": "POST",
761
+ "path": "/iapExpandedGenericAdapterRequest"
762
+ },
763
+ "task": true
764
+ },
765
+ {
766
+ "name": "genericAdapterRequest",
767
+ "summary": "Makes the requested generic call",
768
+ "description": "Makes the requested generic call",
769
+ "input": [
770
+ {
771
+ "name": "uriPath",
772
+ "type": "string",
773
+ "info": "the path of the api call - do not include the host, port, base path or version",
774
+ "description": "the path of the api call",
775
+ "schema": {
776
+ "title": "uriPath",
777
+ "type": "string"
778
+ },
779
+ "required": true
780
+ },
781
+ {
782
+ "name": "restMethod",
783
+ "type": "string",
784
+ "info": "the rest method (GET, POST, PUT, PATCH, DELETE)",
785
+ "description": "the rest method (GET, POST, PUT, PATCH, DELETE)",
786
+ "schema": {
787
+ "title": "restMethod",
788
+ "type": "string"
789
+ },
790
+ "required": true
791
+ },
792
+ {
793
+ "name": "queryData",
794
+ "type": "object",
795
+ "info": "the query parameters to be put on the url (optional)",
796
+ "description": "the query parameters to be put on the url (optional)",
797
+ "schema": {
798
+ "title": "queryData",
799
+ "type": "object"
800
+ },
801
+ "required": false
802
+ },
803
+ {
804
+ "name": "requestBody",
805
+ "type": "object",
806
+ "info": "the payload to be sent with the request (optional)",
807
+ "description": "the payload to be sent with the request (optional)",
808
+ "schema": {
809
+ "title": "requestBody",
810
+ "type": "object"
811
+ },
812
+ "required": false
813
+ },
814
+ {
815
+ "name": "addlHeaders",
816
+ "type": "object",
817
+ "info": "additional headers to be put on the call (optional)",
818
+ "description": "additional headers to be put on the call (optional)",
819
+ "schema": {
820
+ "title": "addlHeaders",
821
+ "type": "object"
822
+ },
823
+ "required": false
824
+ }
825
+ ],
826
+ "output": {
827
+ "name": "result",
828
+ "type": "object",
829
+ "description": "A JSON Object containing status, code and the result",
830
+ "schema": {
831
+ "title": "result",
832
+ "type": "object"
833
+ }
834
+ },
835
+ "roles": [
836
+ "admin"
837
+ ],
838
+ "route": {
839
+ "verb": "POST",
840
+ "path": "/genericAdapterRequest"
841
+ },
842
+ "task": true
843
+ },
844
+ {
845
+ "name": "genericAdapterRequestNoBasePath",
846
+ "summary": "Makes the requested generic call",
847
+ "description": "Makes the requested generic call",
848
+ "input": [
849
+ {
850
+ "name": "uriPath",
851
+ "type": "string",
852
+ "info": "the path of the api call - do not include the host, port, base path or version",
853
+ "description": "the path of the api call",
854
+ "schema": {
855
+ "title": "uriPath",
856
+ "type": "string"
857
+ },
858
+ "required": true
859
+ },
860
+ {
861
+ "name": "restMethod",
862
+ "type": "string",
863
+ "info": "the rest method (GET, POST, PUT, PATCH, DELETE)",
864
+ "description": "the rest method (GET, POST, PUT, PATCH, DELETE)",
865
+ "schema": {
866
+ "title": "restMethod",
867
+ "type": "string"
868
+ },
869
+ "required": true
870
+ },
871
+ {
872
+ "name": "queryData",
873
+ "type": "object",
874
+ "info": "the query parameters to be put on the url (optional)",
875
+ "description": "the query parameters to be put on the url (optional)",
876
+ "schema": {
877
+ "title": "queryData",
878
+ "type": "object"
879
+ },
880
+ "required": false
881
+ },
882
+ {
883
+ "name": "requestBody",
884
+ "type": "object",
885
+ "info": "the payload to be sent with the request (optional)",
886
+ "description": "the payload to be sent with the request (optional)",
887
+ "schema": {
888
+ "title": "requestBody",
889
+ "type": "object"
890
+ },
891
+ "required": false
892
+ },
893
+ {
894
+ "name": "addlHeaders",
895
+ "type": "object",
896
+ "info": "additional headers to be put on the call (optional)",
897
+ "description": "additional headers to be put on the call (optional)",
898
+ "schema": {
899
+ "title": "addlHeaders",
900
+ "type": "object"
901
+ },
902
+ "required": false
903
+ }
904
+ ],
905
+ "output": {
906
+ "name": "result",
907
+ "type": "object",
908
+ "description": "A JSON Object containing status, code and the result",
909
+ "schema": {
910
+ "title": "result",
911
+ "type": "object"
912
+ }
913
+ },
914
+ "roles": [
915
+ "admin"
916
+ ],
917
+ "route": {
918
+ "verb": "POST",
919
+ "path": "/genericAdapterRequestNoBasePath"
920
+ },
921
+ "task": true
922
+ },
923
+ {
924
+ "name": "iapRunAdapterLint",
925
+ "summary": "Run the adapter lint script to return the results",
926
+ "description": "Run the adapter lint script to return the results",
927
+ "input": [],
928
+ "output": {
929
+ "name": "result",
930
+ "type": "string",
931
+ "description": "A string containing the run results",
932
+ "schema": {
933
+ "title": "result",
934
+ "type": "string"
935
+ }
936
+ },
937
+ "roles": [
938
+ "admin"
939
+ ],
940
+ "route": {
941
+ "verb": "GET",
942
+ "path": "/iapRunAdapterLint"
943
+ },
944
+ "task": true
945
+ },
946
+ {
947
+ "name": "iapRunAdapterTests",
948
+ "summary": "Run the adapter test scripts (baseunit and unit) to return the results",
949
+ "description": "Run the adapter test scripts (baseunit and unit) to return the results",
950
+ "input": [],
951
+ "output": {
952
+ "name": "result",
953
+ "type": "object",
954
+ "description": "A JSON Object containing status, code and the result",
955
+ "schema": {
956
+ "title": "result",
957
+ "type": "object"
958
+ }
959
+ },
960
+ "roles": [
961
+ "admin"
962
+ ],
963
+ "route": {
964
+ "verb": "GET",
965
+ "path": "/iapRunAdapterTests"
966
+ },
967
+ "task": true
968
+ },
969
+ {
970
+ "name": "iapGetAdapterInventory",
971
+ "summary": "Provide inventory information abbout the adapter",
972
+ "description": "Provide inventory information abbout the adapter",
973
+ "input": [],
974
+ "output": {
975
+ "name": "result",
976
+ "type": "object",
977
+ "description": "A JSON Object containing status, code and the result",
978
+ "schema": {
979
+ "title": "result",
980
+ "type": "object"
981
+ }
982
+ },
983
+ "roles": [
984
+ "admin"
985
+ ],
986
+ "route": {
987
+ "verb": "GET",
988
+ "path": "/iapGetAdapterInventory"
989
+ },
990
+ "task": true
991
+ },
574
992
  {
575
993
  "name": "updateListOfDevicesConnectedToACS",
576
994
  "summary": "Add a new device to the list of devices connected to the ACS",