@itentialopensource/adapter-viptela 0.7.0 → 0.9.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 (42) hide show
  1. package/.eslintignore +1 -0
  2. package/CHANGELOG.md +32 -0
  3. package/README.md +182 -24
  4. package/adapter.js +7374 -666
  5. package/adapterBase.js +285 -7
  6. package/entities/.generic/action.json +109 -0
  7. package/entities/.generic/schema.json +23 -0
  8. package/entities/.system/action.json +5 -4
  9. package/entities/.system/schemaTokenReq.json +2 -2
  10. package/entities/.system/schemaTokenResp.json +12 -0
  11. package/entities/MonitoringDeviceDetails/action.json +4 -2
  12. package/entities/Statistic/action.json +24 -0
  13. package/entities/Statistic/schema.json +19 -0
  14. package/entities/System/action.json +311 -0
  15. package/entities/System/schema.json +33 -0
  16. package/entities/Template/action.json +1417 -1
  17. package/entities/Template/schema.json +71 -2
  18. package/error.json +6 -0
  19. package/package.json +40 -19
  20. package/pronghorn.json +3509 -560
  21. package/propertiesSchema.json +51 -4
  22. package/refs?service=git-upload-pack +0 -0
  23. package/report/updateReport1612559221344.json +95 -0
  24. package/report/updateReport1642735010496.json +95 -0
  25. package/sampleProperties.json +21 -5
  26. package/test/integration/adapterTestBasicGet.js +85 -0
  27. package/test/integration/adapterTestConnectivity.js +93 -0
  28. package/test/integration/adapterTestIntegration.js +1690 -7
  29. package/test/unit/adapterBaseTestUnit.js +944 -0
  30. package/test/unit/adapterTestUnit.js +2007 -12
  31. package/utils/addAuth.js +94 -0
  32. package/utils/basicGet.js +50 -0
  33. package/utils/checkMigrate.js +63 -0
  34. package/utils/entitiesToDB.js +224 -0
  35. package/utils/findPath.js +74 -0
  36. package/utils/modify.js +154 -0
  37. package/utils/packModificationScript.js +1 -1
  38. package/utils/patches2bundledDeps.js +90 -0
  39. package/utils/removeHooks.js +20 -0
  40. package/utils/tbScript.js +169 -0
  41. package/utils/tbUtils.js +451 -0
  42. package/utils/troubleshootingAdapter.js +190 -0
@@ -0,0 +1,311 @@
1
+ {
2
+ "actions": [
3
+ {
4
+ "name": "resetVedgeCloud",
5
+ "protocol": "REST",
6
+ "method": "PUT",
7
+ "entitypath": "{base_path}/{version}/system/device/reset/{pathv1}?{query}",
8
+ "requestSchema": "schema.json",
9
+ "responseSchema": "schema.json",
10
+ "timeout": 0,
11
+ "sendEmpty": false,
12
+ "requestDatatype": "JSON",
13
+ "responseDatatype": "JSON",
14
+ "headers": {},
15
+ "responseObjects": [
16
+ {
17
+ "type": "default",
18
+ "key": "",
19
+ "mockFile": ""
20
+ }
21
+ ]
22
+ },
23
+ {
24
+ "name": "generateBootstrapConfigForVedges",
25
+ "protocol": "REST",
26
+ "method": "POST",
27
+ "entitypath": "{base_path}/{version}/system/device/bootstrap/devices?{query}",
28
+ "requestSchema": "schema.json",
29
+ "responseSchema": "schema.json",
30
+ "timeout": 0,
31
+ "sendEmpty": false,
32
+ "requestDatatype": "PLAIN",
33
+ "responseDatatype": "JSON",
34
+ "headers": {},
35
+ "responseObjects": [
36
+ {
37
+ "type": "default",
38
+ "key": "",
39
+ "mockFile": ""
40
+ }
41
+ ]
42
+ },
43
+ {
44
+ "name": "decommissionVedgeCloud",
45
+ "protocol": "REST",
46
+ "method": "PUT",
47
+ "entitypath": "{base_path}/{version}/system/device/decommission/{pathv1}?{query}",
48
+ "requestSchema": "schema.json",
49
+ "responseSchema": "schema.json",
50
+ "timeout": 0,
51
+ "sendEmpty": false,
52
+ "requestDatatype": "JSON",
53
+ "responseDatatype": "JSON",
54
+ "headers": {},
55
+ "responseObjects": [
56
+ {
57
+ "type": "default",
58
+ "key": "",
59
+ "mockFile": ""
60
+ }
61
+ ]
62
+ },
63
+ {
64
+ "name": "generateBootstrapConfigForVedge",
65
+ "protocol": "REST",
66
+ "method": "GET",
67
+ "entitypath": "{base_path}/{version}/system/device/bootstrap/device/{pathv1}?{query}",
68
+ "requestSchema": "schema.json",
69
+ "responseSchema": "schema.json",
70
+ "timeout": 0,
71
+ "sendEmpty": false,
72
+ "sendGetBody": false,
73
+ "requestDatatype": "JSON",
74
+ "responseDatatype": "JSON",
75
+ "headers": {},
76
+ "responseObjects": [
77
+ {
78
+ "type": "default",
79
+ "key": "",
80
+ "mockFile": ""
81
+ }
82
+ ]
83
+ },
84
+ {
85
+ "name": "getBootstrapConfigZip",
86
+ "protocol": "REST",
87
+ "method": "GET",
88
+ "entitypath": "{base_path}/{version}/system/device/bootstrap/download/{pathv1}?{query}",
89
+ "requestSchema": "schema.json",
90
+ "responseSchema": "schema.json",
91
+ "timeout": 0,
92
+ "sendEmpty": false,
93
+ "sendGetBody": false,
94
+ "requestDatatype": "JSON",
95
+ "responseDatatype": "JSON",
96
+ "headers": {},
97
+ "responseObjects": [
98
+ {
99
+ "type": "default",
100
+ "key": "",
101
+ "mockFile": ""
102
+ }
103
+ ]
104
+ },
105
+ {
106
+ "name": "formPost",
107
+ "protocol": "REST",
108
+ "method": "POST",
109
+ "entitypath": "{base_path}/{version}/system/device/fileupload?{query}",
110
+ "requestSchema": "schema.json",
111
+ "responseSchema": "schema.json",
112
+ "timeout": 0,
113
+ "sendEmpty": false,
114
+ "requestDatatype": "JSON",
115
+ "responseDatatype": "JSON",
116
+ "headers": {},
117
+ "responseObjects": [
118
+ {
119
+ "type": "default",
120
+ "key": "",
121
+ "mockFile": ""
122
+ }
123
+ ]
124
+ },
125
+ {
126
+ "name": "getDevicesDetails",
127
+ "protocol": "REST",
128
+ "method": "GET",
129
+ "entitypath": "{base_path}/{version}/system/device/{pathv1}?{query}",
130
+ "requestSchema": "schema.json",
131
+ "responseSchema": "schema.json",
132
+ "timeout": 0,
133
+ "sendEmpty": false,
134
+ "sendGetBody": false,
135
+ "requestDatatype": "JSON",
136
+ "responseDatatype": "JSON",
137
+ "headers": {},
138
+ "responseObjects": [
139
+ {
140
+ "type": "default",
141
+ "key": "",
142
+ "mockFile": ""
143
+ }
144
+ ]
145
+ },
146
+ {
147
+ "name": "createDevice",
148
+ "protocol": "REST",
149
+ "method": "POST",
150
+ "entitypath": "{base_path}/{version}/system/device?{query}",
151
+ "requestSchema": "schema.json",
152
+ "responseSchema": "schema.json",
153
+ "timeout": 0,
154
+ "sendEmpty": false,
155
+ "requestDatatype": "JSON",
156
+ "responseDatatype": "JSON",
157
+ "headers": {},
158
+ "responseObjects": [
159
+ {
160
+ "type": "default",
161
+ "key": "",
162
+ "mockFile": ""
163
+ }
164
+ ]
165
+ },
166
+ {
167
+ "name": "getManagementSystemIPInfo",
168
+ "protocol": "REST",
169
+ "method": "GET",
170
+ "entitypath": "{base_path}/{version}/system/device/management/systemip?{query}",
171
+ "requestSchema": "schema.json",
172
+ "responseSchema": "schema.json",
173
+ "timeout": 0,
174
+ "sendEmpty": false,
175
+ "sendGetBody": false,
176
+ "requestDatatype": "JSON",
177
+ "responseDatatype": "JSON",
178
+ "headers": {},
179
+ "responseObjects": [
180
+ {
181
+ "type": "default",
182
+ "key": "",
183
+ "mockFile": ""
184
+ }
185
+ ]
186
+ },
187
+ {
188
+ "name": "deleteDevice",
189
+ "protocol": "REST",
190
+ "method": "DELETE",
191
+ "entitypath": "{base_path}/{version}/system/device/{pathv1}?{query}",
192
+ "requestSchema": "schema.json",
193
+ "responseSchema": "schema.json",
194
+ "timeout": 0,
195
+ "sendEmpty": false,
196
+ "requestDatatype": "JSON",
197
+ "responseDatatype": "JSON",
198
+ "headers": {},
199
+ "responseObjects": [
200
+ {
201
+ "type": "default",
202
+ "key": "",
203
+ "mockFile": ""
204
+ }
205
+ ]
206
+ },
207
+ {
208
+ "name": "editDevice",
209
+ "protocol": "REST",
210
+ "method": "PUT",
211
+ "entitypath": "{base_path}/{version}/system/device/{pathv1}?{query}",
212
+ "requestSchema": "schema.json",
213
+ "responseSchema": "schema.json",
214
+ "timeout": 0,
215
+ "sendEmpty": false,
216
+ "requestDatatype": "PLAIN",
217
+ "responseDatatype": "JSON",
218
+ "headers": {},
219
+ "responseObjects": [
220
+ {
221
+ "type": "default",
222
+ "key": "",
223
+ "mockFile": ""
224
+ }
225
+ ]
226
+ },
227
+ {
228
+ "name": "getControllerVEdgeSyncStatus",
229
+ "protocol": "REST",
230
+ "method": "GET",
231
+ "entitypath": "{base_path}/{version}/system/device/controllers/vedge/status?{query}",
232
+ "requestSchema": "schema.json",
233
+ "responseSchema": "schema.json",
234
+ "timeout": 0,
235
+ "sendEmpty": false,
236
+ "sendGetBody": false,
237
+ "requestDatatype": "JSON",
238
+ "responseDatatype": "JSON",
239
+ "headers": {},
240
+ "responseObjects": [
241
+ {
242
+ "type": "default",
243
+ "key": "",
244
+ "mockFile": ""
245
+ }
246
+ ]
247
+ },
248
+ {
249
+ "name": "getRootCertStatusAll",
250
+ "protocol": "REST",
251
+ "method": "GET",
252
+ "entitypath": "{base_path}/{version}/system/device/rootcertchain/status?{query}",
253
+ "requestSchema": "schema.json",
254
+ "responseSchema": "schema.json",
255
+ "timeout": 0,
256
+ "sendEmpty": false,
257
+ "sendGetBody": false,
258
+ "requestDatatype": "JSON",
259
+ "responseDatatype": "JSON",
260
+ "headers": {},
261
+ "responseObjects": [
262
+ {
263
+ "type": "default",
264
+ "key": "",
265
+ "mockFile": ""
266
+ }
267
+ ]
268
+ },
269
+ {
270
+ "name": "syncDevices",
271
+ "protocol": "REST",
272
+ "method": "POST",
273
+ "entitypath": "{base_path}/{version}/system/device/smartaccount/sync?{query}",
274
+ "requestSchema": "schema.json",
275
+ "responseSchema": "schema.json",
276
+ "timeout": 0,
277
+ "sendEmpty": false,
278
+ "requestDatatype": "JSON",
279
+ "responseDatatype": "JSON",
280
+ "headers": {},
281
+ "responseObjects": [
282
+ {
283
+ "type": "default",
284
+ "key": "",
285
+ "mockFile": ""
286
+ }
287
+ ]
288
+ },
289
+ {
290
+ "name": "getCloudDockDataBasedOnDeviceType",
291
+ "protocol": "REST",
292
+ "method": "GET",
293
+ "entitypath": "{base_path}/{version}/system/device/type/{pathv1}?{query}",
294
+ "requestSchema": "schema.json",
295
+ "responseSchema": "schema.json",
296
+ "timeout": 0,
297
+ "sendEmpty": false,
298
+ "sendGetBody": false,
299
+ "requestDatatype": "JSON",
300
+ "responseDatatype": "JSON",
301
+ "headers": {},
302
+ "responseObjects": [
303
+ {
304
+ "type": "default",
305
+ "key": "",
306
+ "mockFile": ""
307
+ }
308
+ ]
309
+ }
310
+ ]
311
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "$id": "schema.json",
3
+ "type": "object",
4
+ "schema": "http://json-schema.org/draft-07/schema#",
5
+ "translate": false,
6
+ "dynamicfields": true,
7
+ "properties": {
8
+ "ph_request_type": {
9
+ "type": "string",
10
+ "description": "type of request (internal to adapter)",
11
+ "default": "",
12
+ "enum": [
13
+ "resetVedgeCloud",
14
+ "generateBootstrapConfigForVedges",
15
+ "decommissionVedgeCloud",
16
+ "generateBootstrapConfigForVedge",
17
+ "getBootstrapConfigZip",
18
+ "formPost",
19
+ "getDevicesDetails",
20
+ "createDevice",
21
+ "getManagementSystemIPInfo",
22
+ "deleteDevice",
23
+ "editDevice",
24
+ "getControllerVEdgeSyncStatus",
25
+ "getRootCertStatusAll",
26
+ "syncDevices",
27
+ "getCloudDockDataBasedOnDeviceType"
28
+ ],
29
+ "external_name": "ph_request_type"
30
+ }
31
+ },
32
+ "definitions": {}
33
+ }