@itentialopensource/adapter-f5_bigiq 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 (77) hide show
  1. package/AUTH.md +39 -0
  2. package/BROKER.md +199 -0
  3. package/CALLS.md +169 -0
  4. package/CHANGELOG.md +17 -2
  5. package/CODE_OF_CONDUCT.md +12 -17
  6. package/CONTRIBUTING.md +88 -74
  7. package/ENHANCE.md +69 -0
  8. package/PROPERTIES.md +641 -0
  9. package/README.md +223 -569
  10. package/SUMMARY.md +9 -0
  11. package/SYSTEMINFO.md +11 -0
  12. package/TROUBLESHOOT.md +47 -0
  13. package/adapter.js +6393 -60
  14. package/adapterBase.js +1021 -245
  15. package/entities/.generic/action.json +110 -5
  16. package/entities/.generic/schema.json +6 -1
  17. package/entities/BIGIPDeviceClustering/action.json +46 -0
  18. package/entities/BIGIPDeviceClustering/schema.json +20 -0
  19. package/entities/BIGIPDeviceReferenceLookup/action.json +25 -0
  20. package/entities/BIGIPDeviceReferenceLookup/schema.json +19 -0
  21. package/entities/BIGIPIHealth/action.json +313 -0
  22. package/entities/BIGIPIHealth/schema.json +33 -0
  23. package/entities/BIGIPSoftwareImageManagement/action.json +46 -0
  24. package/entities/BIGIPSoftwareImageManagement/schema.json +20 -0
  25. package/entities/BIGIPTMSHScripting/action.json +107 -0
  26. package/entities/BIGIPTMSHScripting/schema.json +23 -0
  27. package/entities/BIGIPUUIDLookup/action.json +25 -0
  28. package/entities/BIGIPUUIDLookup/schema.json +19 -0
  29. package/entities/BIGIQSystemClusterStatus/action.json +46 -0
  30. package/entities/BIGIQSystemClusterStatus/schema.json +20 -0
  31. package/entities/Configuration/action.json +24 -0
  32. package/entities/Configuration/schema.json +19 -0
  33. package/entities/Device/action.json +63 -0
  34. package/entities/Device/schema.json +4 -1
  35. package/entities/DeviceBackups/action.json +148 -0
  36. package/entities/DeviceBackups/schema.json +25 -0
  37. package/entities/DeviceImport/action.json +86 -0
  38. package/entities/DeviceImport/schema.json +22 -0
  39. package/entities/DeviceInfo/action.json +45 -0
  40. package/entities/DeviceInfo/schema.json +20 -0
  41. package/entities/DeviceUpgrades/action.json +45 -0
  42. package/entities/DeviceUpgrades/schema.json +20 -0
  43. package/entities/Licensing/action.json +66 -0
  44. package/entities/Licensing/schema.json +21 -0
  45. package/entities/Qkview/action.json +148 -0
  46. package/entities/Qkview/schema.json +25 -0
  47. package/entities/SSLManagement/action.json +330 -0
  48. package/entities/SSLManagement/schema.json +34 -0
  49. package/entities/SoftwareManagement/action.json +46 -0
  50. package/entities/SoftwareManagement/schema.json +20 -0
  51. package/error.json +6 -0
  52. package/package.json +17 -11
  53. package/pronghorn.json +3386 -578
  54. package/propertiesDecorators.json +14 -0
  55. package/propertiesSchema.json +422 -1
  56. package/refs?service=git-upload-pack +0 -0
  57. package/report/AdditionalF5.OpenApi3Json.json +3886 -0
  58. package/report/adapterInfo.json +10 -0
  59. package/report/updateReport1653154920166.json +120 -0
  60. package/sampleProperties.json +94 -3
  61. package/test/integration/adapterTestBasicGet.js +1 -1
  62. package/test/integration/adapterTestIntegration.js +2055 -105
  63. package/test/unit/adapterBaseTestUnit.js +30 -25
  64. package/test/unit/adapterTestUnit.js +1759 -200
  65. package/utils/adapterInfo.js +206 -0
  66. package/utils/addAuth.js +94 -0
  67. package/utils/artifactize.js +0 -0
  68. package/utils/basicGet.js +1 -14
  69. package/utils/entitiesToDB.js +179 -0
  70. package/utils/modify.js +1 -1
  71. package/utils/patches2bundledDeps.js +90 -0
  72. package/utils/pre-commit.sh +3 -0
  73. package/utils/removeHooks.js +20 -0
  74. package/utils/tbScript.js +43 -22
  75. package/utils/tbUtils.js +126 -29
  76. package/utils/testRunner.js +16 -16
  77. package/utils/troubleshootingAdapter.js +2 -26
@@ -0,0 +1,330 @@
1
+ {
2
+ "actions": [
3
+ {
4
+ "name": "retrieveallLTMcertificateobjects",
5
+ "protocol": "REST",
6
+ "method": "GET",
7
+ "entitypath": "{base_path}/{version}/mgmt/tm/sys/crypto/cert?{query}",
8
+ "requestSchema": "schema.json",
9
+ "responseSchema": "schema.json",
10
+ "timeout": 0,
11
+ "sendEmpty": false,
12
+ "sendGetBody": false,
13
+ "requestDatatype": "JSON",
14
+ "responseDatatype": "JSON",
15
+ "headers": {},
16
+ "responseObjects": [
17
+ {
18
+ "type": "default",
19
+ "key": "",
20
+ "mockFile": ""
21
+ }
22
+ ]
23
+ },
24
+ {
25
+ "name": "createOverwriteSSLCertificatefromUpload",
26
+ "protocol": "REST",
27
+ "method": "POST",
28
+ "entitypath": "{base_path}/{version}/mgmt/tm/sys/crypto/cert?{query}",
29
+ "requestSchema": "schema.json",
30
+ "responseSchema": "schema.json",
31
+ "timeout": 0,
32
+ "sendEmpty": false,
33
+ "requestDatatype": "JSON",
34
+ "responseDatatype": "JSON",
35
+ "headers": {},
36
+ "responseObjects": [
37
+ {
38
+ "type": "default",
39
+ "key": "",
40
+ "mockFile": ""
41
+ }
42
+ ]
43
+ },
44
+ {
45
+ "name": "retrieveallLTMprivatekeyobjects",
46
+ "protocol": "REST",
47
+ "method": "GET",
48
+ "entitypath": "{base_path}/{version}/mgmt/tm/sys/crypto/key?{query}",
49
+ "requestSchema": "schema.json",
50
+ "responseSchema": "schema.json",
51
+ "timeout": 0,
52
+ "sendEmpty": false,
53
+ "sendGetBody": false,
54
+ "requestDatatype": "JSON",
55
+ "responseDatatype": "JSON",
56
+ "headers": {},
57
+ "responseObjects": [
58
+ {
59
+ "type": "default",
60
+ "key": "",
61
+ "mockFile": ""
62
+ }
63
+ ]
64
+ },
65
+ {
66
+ "name": "createOverwriteSSLKeyfromUpload",
67
+ "protocol": "REST",
68
+ "method": "POST",
69
+ "entitypath": "{base_path}/{version}/mgmt/tm/sys/crypto/key?{query}",
70
+ "requestSchema": "schema.json",
71
+ "responseSchema": "schema.json",
72
+ "timeout": 0,
73
+ "sendEmpty": false,
74
+ "requestDatatype": "JSON",
75
+ "responseDatatype": "JSON",
76
+ "headers": {},
77
+ "responseObjects": [
78
+ {
79
+ "type": "default",
80
+ "key": "",
81
+ "mockFile": ""
82
+ }
83
+ ]
84
+ },
85
+ {
86
+ "name": "retrieveallcertificatefiles",
87
+ "protocol": "REST",
88
+ "method": "GET",
89
+ "entitypath": "{base_path}/{version}/mgmt/tm/sys/file/ssl-cert?{query}",
90
+ "requestSchema": "schema.json",
91
+ "responseSchema": "schema.json",
92
+ "timeout": 0,
93
+ "sendEmpty": false,
94
+ "sendGetBody": false,
95
+ "requestDatatype": "JSON",
96
+ "responseDatatype": "JSON",
97
+ "headers": {},
98
+ "responseObjects": [
99
+ {
100
+ "type": "default",
101
+ "key": "",
102
+ "mockFile": ""
103
+ }
104
+ ]
105
+ },
106
+ {
107
+ "name": "retrieveallkeyfiles",
108
+ "protocol": "REST",
109
+ "method": "GET",
110
+ "entitypath": "{base_path}/{version}/mgmt/tm/sys/file/ssl-key?{query}",
111
+ "requestSchema": "schema.json",
112
+ "responseSchema": "schema.json",
113
+ "timeout": 0,
114
+ "sendEmpty": false,
115
+ "sendGetBody": false,
116
+ "requestDatatype": "JSON",
117
+ "responseDatatype": "JSON",
118
+ "headers": {},
119
+ "responseObjects": [
120
+ {
121
+ "type": "default",
122
+ "key": "",
123
+ "mockFile": ""
124
+ }
125
+ ]
126
+ },
127
+ {
128
+ "name": "retrieveallclientSSLprofiles",
129
+ "protocol": "REST",
130
+ "method": "GET",
131
+ "entitypath": "{base_path}/{version}/mgmt/tm/ltm/profile/client-ssl?{query}",
132
+ "requestSchema": "schema.json",
133
+ "responseSchema": "schema.json",
134
+ "timeout": 0,
135
+ "sendEmpty": false,
136
+ "sendGetBody": false,
137
+ "requestDatatype": "JSON",
138
+ "responseDatatype": "JSON",
139
+ "headers": {},
140
+ "responseObjects": [
141
+ {
142
+ "type": "default",
143
+ "key": "",
144
+ "mockFile": ""
145
+ }
146
+ ]
147
+ },
148
+ {
149
+ "name": "createClientSSLProfile",
150
+ "protocol": "REST",
151
+ "method": "POST",
152
+ "entitypath": "{base_path}/{version}/mgmt/tm/ltm/profile/client-ssl?{query}",
153
+ "requestSchema": "schema.json",
154
+ "responseSchema": "schema.json",
155
+ "timeout": 0,
156
+ "sendEmpty": false,
157
+ "requestDatatype": "JSON",
158
+ "responseDatatype": "JSON",
159
+ "headers": {},
160
+ "responseObjects": [
161
+ {
162
+ "type": "default",
163
+ "key": "",
164
+ "mockFile": ""
165
+ }
166
+ ]
167
+ },
168
+ {
169
+ "name": "getClientSSLProfileAPIExample",
170
+ "protocol": "REST",
171
+ "method": "GET",
172
+ "entitypath": "{base_path}/{version}/mgmt/tm/ltm/profile/client-ssl/example?{query}",
173
+ "requestSchema": "schema.json",
174
+ "responseSchema": "schema.json",
175
+ "timeout": 0,
176
+ "sendEmpty": false,
177
+ "sendGetBody": false,
178
+ "requestDatatype": "JSON",
179
+ "responseDatatype": "JSON",
180
+ "headers": {},
181
+ "responseObjects": [
182
+ {
183
+ "type": "default",
184
+ "key": "",
185
+ "mockFile": ""
186
+ }
187
+ ]
188
+ },
189
+ {
190
+ "name": "uploadSSLCertificate",
191
+ "protocol": "REST",
192
+ "method": "POST",
193
+ "entitypath": "{base_path}/{version}/mgmt/shared/file-transfer/uploads/mysslcertificate.crt?{query}",
194
+ "requestSchema": "schema.json",
195
+ "responseSchema": "schema.json",
196
+ "timeout": 0,
197
+ "sendEmpty": false,
198
+ "requestDatatype": "FORM",
199
+ "responseDatatype": "JSON",
200
+ "headers": {},
201
+ "responseObjects": [
202
+ {
203
+ "type": "default",
204
+ "key": "",
205
+ "mockFile": ""
206
+ }
207
+ ]
208
+ },
209
+ {
210
+ "name": "uploadSSLKey",
211
+ "protocol": "REST",
212
+ "method": "POST",
213
+ "entitypath": "{base_path}/{version}/mgmt/shared/file-transfer/uploads/mysslcertificate.key?{query}",
214
+ "requestSchema": "schema.json",
215
+ "responseSchema": "schema.json",
216
+ "timeout": 0,
217
+ "sendEmpty": false,
218
+ "requestDatatype": "FORM",
219
+ "responseDatatype": "JSON",
220
+ "headers": {},
221
+ "responseObjects": [
222
+ {
223
+ "type": "default",
224
+ "key": "",
225
+ "mockFile": ""
226
+ }
227
+ ]
228
+ },
229
+ {
230
+ "name": "attachClientSSLProfiletoVirtualServer",
231
+ "protocol": "REST",
232
+ "method": "POST",
233
+ "entitypath": "{base_path}/{version}/mgmt/tm/ltm/virtual/myvirtualserver/profiles?{query}",
234
+ "requestSchema": "schema.json",
235
+ "responseSchema": "schema.json",
236
+ "timeout": 0,
237
+ "sendEmpty": false,
238
+ "requestDatatype": "JSON",
239
+ "responseDatatype": "JSON",
240
+ "headers": {},
241
+ "responseObjects": [
242
+ {
243
+ "type": "default",
244
+ "key": "",
245
+ "mockFile": ""
246
+ }
247
+ ]
248
+ },
249
+ {
250
+ "name": "detachClientSSLProfilefromVirtualServer",
251
+ "protocol": "REST",
252
+ "method": "DELETE",
253
+ "entitypath": "{base_path}/{version}/mgmt/tm/ltm/virtual/myvirtualserver/profiles/myclientsslprofile?{query}",
254
+ "requestSchema": "schema.json",
255
+ "responseSchema": "schema.json",
256
+ "timeout": 0,
257
+ "sendEmpty": 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": "deleteClientSSLProfile",
271
+ "protocol": "REST",
272
+ "method": "DELETE",
273
+ "entitypath": "{base_path}/{version}/mgmt/tm/ltm/profile/client-ssl/myclientsslprofile?{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": "deleteSSLCertificate",
291
+ "protocol": "REST",
292
+ "method": "DELETE",
293
+ "entitypath": "{base_path}/{version}/mgmt/tm/sys/crypto/cert/mysslcertificate?{query}",
294
+ "requestSchema": "schema.json",
295
+ "responseSchema": "schema.json",
296
+ "timeout": 0,
297
+ "sendEmpty": false,
298
+ "requestDatatype": "JSON",
299
+ "responseDatatype": "JSON",
300
+ "headers": {},
301
+ "responseObjects": [
302
+ {
303
+ "type": "default",
304
+ "key": "",
305
+ "mockFile": ""
306
+ }
307
+ ]
308
+ },
309
+ {
310
+ "name": "deleteCryptoSSLKey",
311
+ "protocol": "REST",
312
+ "method": "DELETE",
313
+ "entitypath": "{base_path}/{version}/mgmt/tm/sys/crypto/key/mysslcertificate?{query}",
314
+ "requestSchema": "schema.json",
315
+ "responseSchema": "schema.json",
316
+ "timeout": 0,
317
+ "sendEmpty": false,
318
+ "requestDatatype": "JSON",
319
+ "responseDatatype": "JSON",
320
+ "headers": {},
321
+ "responseObjects": [
322
+ {
323
+ "type": "default",
324
+ "key": "",
325
+ "mockFile": ""
326
+ }
327
+ ]
328
+ }
329
+ ]
330
+ }
@@ -0,0 +1,34 @@
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
+ "retrieveallLTMcertificateobjects",
14
+ "createOverwriteSSLCertificatefromUpload",
15
+ "retrieveallLTMprivatekeyobjects",
16
+ "createOverwriteSSLKeyfromUpload",
17
+ "retrieveallcertificatefiles",
18
+ "retrieveallkeyfiles",
19
+ "retrieveallclientSSLprofiles",
20
+ "createClientSSLProfile",
21
+ "getClientSSLProfileAPIExample",
22
+ "uploadSSLCertificate",
23
+ "uploadSSLKey",
24
+ "attachClientSSLProfiletoVirtualServer",
25
+ "detachClientSSLProfilefromVirtualServer",
26
+ "deleteClientSSLProfile",
27
+ "deleteSSLCertificate",
28
+ "deleteCryptoSSLKey"
29
+ ],
30
+ "external_name": "ph_request_type"
31
+ }
32
+ },
33
+ "definitions": {}
34
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "actions": [
3
+ {
4
+ "name": "retrieveallsoftwareimages",
5
+ "protocol": "REST",
6
+ "method": "GET",
7
+ "entitypath": "{base_path}/{version}/mgmt/tm/sys/software/image?{query}",
8
+ "requestSchema": "schema.json",
9
+ "responseSchema": "schema.json",
10
+ "timeout": 0,
11
+ "sendEmpty": false,
12
+ "sendGetBody": false,
13
+ "requestDatatype": "JSON",
14
+ "responseDatatype": "JSON",
15
+ "headers": {},
16
+ "responseObjects": [
17
+ {
18
+ "type": "default",
19
+ "key": "",
20
+ "mockFile": ""
21
+ }
22
+ ]
23
+ },
24
+ {
25
+ "name": "retrieveallhotfiximages",
26
+ "protocol": "REST",
27
+ "method": "GET",
28
+ "entitypath": "{base_path}/{version}/mgmt/tm/sys/software/hotfix?{query}",
29
+ "requestSchema": "schema.json",
30
+ "responseSchema": "schema.json",
31
+ "timeout": 0,
32
+ "sendEmpty": false,
33
+ "sendGetBody": false,
34
+ "requestDatatype": "JSON",
35
+ "responseDatatype": "JSON",
36
+ "headers": {},
37
+ "responseObjects": [
38
+ {
39
+ "type": "default",
40
+ "key": "",
41
+ "mockFile": ""
42
+ }
43
+ ]
44
+ }
45
+ ]
46
+ }
@@ -0,0 +1,20 @@
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
+ "retrieveallsoftwareimages",
14
+ "retrieveallhotfiximages"
15
+ ],
16
+ "external_name": "ph_request_type"
17
+ }
18
+ },
19
+ "definitions": {}
20
+ }
package/error.json CHANGED
@@ -96,6 +96,12 @@
96
96
  "displayString": "Invalid properties: $VARIABLE$",
97
97
  "recommendation": "Verify the properties for the adapter"
98
98
  },
99
+ {
100
+ "key": "Missing Properties",
101
+ "icode": "AD.306",
102
+ "displayString": "Property $VARIABLE$ is required",
103
+ "recommendation": "Please provide the required property"
104
+ },
99
105
  {
100
106
  "key": "Query Not Translated",
101
107
  "icode": "AD.310",
package/package.json CHANGED
@@ -1,14 +1,15 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-f5_bigiq",
3
- "version": "0.1.1",
3
+ "version": "0.3.0",
4
4
  "description": "This adapter integrates with system described as: f5Big-iqApi.",
5
5
  "main": "adapter.js",
6
- "wizardVersion": "2.43.15",
7
- "engineVersion": "1.59.14",
6
+ "systemName": "f5 BIG-IQ",
7
+ "wizardVersion": "2.44.7",
8
+ "engineVersion": "1.61.6",
8
9
  "adapterType": "http",
9
10
  "scripts": {
10
11
  "artifactize": "npm i && node utils/packModificationScript.js",
11
- "preinstall": "node utils/setup.js",
12
+ "preinstall": "node utils/setup.js && npm install --package-lock-only --ignore-scripts && npx npm-force-resolutions",
12
13
  "lint": "node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js",
13
14
  "lint:errors": "node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js --quiet",
14
15
  "test:baseunit": "mocha test/unit/adapterBaseTestUnit.js --LOG=error",
@@ -16,7 +17,7 @@
16
17
  "test:integration": "mocha test/integration/adapterTestIntegration.js --LOG=error",
17
18
  "test:cover": "nyc --reporter html --reporter text mocha --reporter dot test/*",
18
19
  "test": "npm run test:baseunit && npm run test:unit && npm run test:integration",
19
- "adapter:install": "node utils/tbScript.js install",
20
+ "adapter:install": "npm i && node utils/tbScript.js install",
20
21
  "adapter:checkMigrate": "node utils/checkMigrate.js",
21
22
  "adapter:findPath": "node utils/findPath.js",
22
23
  "adapter:migrate": "node utils/modify.js -m",
@@ -26,7 +27,7 @@
26
27
  "healthcheck": "node utils/tbScript.js healthcheck",
27
28
  "basicget": "node utils/tbScript.js basicget",
28
29
  "connectivity": "node utils/tbScript.js connectivity",
29
- "deploy": "npm publish --registry=http://registry.npmjs.org --access=public",
30
+ "deploy": "npm publish --registry=https://registry.npmjs.org --access=public",
30
31
  "build": "npm run deploy"
31
32
  },
32
33
  "keywords": [
@@ -54,13 +55,15 @@
54
55
  "author": "Itential",
55
56
  "homepage": "https://gitlab.com/itentialopensource/adapters/controller-orchestrator/adapter-f5_bigiq#readme",
56
57
  "dependencies": {
57
- "@itentialopensource/adapter-utils": "^4.41.0",
58
+ "@itentialopensource/adapter-utils": "^4.45.6",
58
59
  "ajv": "^6.12.0",
59
60
  "axios": "^0.21.0",
60
61
  "commander": "^2.20.0",
61
62
  "fs-extra": "^8.1.0",
62
- "mocha": "^8.1.1",
63
+ "json-query": "^2.2.2",
64
+ "mocha": "^9.0.1",
63
65
  "mocha-param": "^2.0.1",
66
+ "mongodb": "^4.1.0",
64
67
  "network-diagnostics": "^0.5.3",
65
68
  "nyc": "^15.1.0",
66
69
  "readline-sync": "^1.4.10",
@@ -69,14 +72,17 @@
69
72
  },
70
73
  "devDependencies": {
71
74
  "@babel/helper-function-name": "^7.14.2",
72
- "chai": "^4.2.0",
73
- "eslint": "^7.26.0",
75
+ "chai": "^4.3.4",
76
+ "eslint": "^7.29.0",
74
77
  "eslint-config-airbnb-base": "^14.2.1",
75
78
  "eslint-module-utils": "^2.6.1",
76
- "eslint-plugin-import": "^2.23.0",
79
+ "eslint-plugin-import": "^2.23.4",
77
80
  "eslint-plugin-json": "^3.0.0",
78
81
  "package-json-validator": "^0.6.3",
79
82
  "testdouble": "^3.16.1"
80
83
  },
84
+ "resolutions": {
85
+ "minimist": "^1.2.5"
86
+ },
81
87
  "private": false
82
88
  }