@itentialopensource/adapter-f5_bigiq 0.3.4 → 0.4.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 (50) hide show
  1. package/AUTH.md +13 -14
  2. package/CALLS.md +2099 -22
  3. package/CHANGELOG.md +16 -0
  4. package/CONTRIBUTING.md +1 -160
  5. package/ENHANCE.md +2 -2
  6. package/README.md +32 -23
  7. package/SYSTEMINFO.md +14 -6
  8. package/adapter.js +401 -333
  9. package/adapterBase.js +549 -879
  10. package/changelogs/CHANGELOG.MD +48 -0
  11. package/entities/.system/action.json +1 -1
  12. package/entities/DeviceUpgrades/action.json +62 -0
  13. package/entities/DeviceUpgrades/mockdatafiles/getAllUpgradeInstances-default.json +58 -0
  14. package/entities/DeviceUpgrades/mockdatafiles/getUpgradeInstancesById-default.json +15 -0
  15. package/entities/DeviceUpgrades/mockdatafiles/updateDeviceUpgrade-default.json +15 -0
  16. package/entities/DeviceUpgrades/schema.json +4 -1
  17. package/metadata.json +72 -0
  18. package/package.json +24 -25
  19. package/pronghorn.json +624 -201
  20. package/propertiesSchema.json +431 -31
  21. package/refs?service=git-upload-pack +0 -0
  22. package/report/adapter-openapi.json +13524 -0
  23. package/report/adapter-openapi.yaml +9517 -0
  24. package/report/adapterInfo.json +8 -8
  25. package/report/updateReport1691507623236.json +120 -0
  26. package/report/updateReport1692202627551.json +120 -0
  27. package/report/updateReport1694462181107.json +120 -0
  28. package/report/updateReport1698421056669.json +120 -0
  29. package/sampleProperties.json +65 -4
  30. package/test/integration/adapterTestBasicGet.js +2 -4
  31. package/test/integration/adapterTestConnectivity.js +91 -42
  32. package/test/integration/adapterTestIntegration.js +232 -2
  33. package/test/unit/adapterBaseTestUnit.js +388 -313
  34. package/test/unit/adapterTestUnit.js +408 -112
  35. package/utils/adapterInfo.js +1 -1
  36. package/utils/addAuth.js +1 -1
  37. package/utils/artifactize.js +1 -1
  38. package/utils/checkMigrate.js +1 -1
  39. package/utils/entitiesToDB.js +2 -2
  40. package/utils/findPath.js +1 -1
  41. package/utils/methodDocumentor.js +273 -0
  42. package/utils/modify.js +13 -15
  43. package/utils/packModificationScript.js +1 -1
  44. package/utils/pre-commit.sh +2 -0
  45. package/utils/taskMover.js +309 -0
  46. package/utils/tbScript.js +89 -34
  47. package/utils/tbUtils.js +41 -21
  48. package/utils/testRunner.js +1 -1
  49. package/utils/troubleshootingAdapter.js +9 -6
  50. package/workflows/README.md +0 -3
@@ -0,0 +1,48 @@
1
+
2
+ ## 0.3.3 [07-25-2023]
3
+
4
+ * Add default value to schema files
5
+
6
+ See merge request itentialopensource/adapters/controller-orchestrator/adapter-f5_bigiq!5
7
+
8
+ ---
9
+
10
+ ## 0.3.2 [07-20-2023]
11
+
12
+ * Remove additional headers
13
+
14
+ See merge request itentialopensource/adapters/controller-orchestrator/adapter-f5_bigiq!4
15
+
16
+ ---
17
+
18
+ ## 0.3.1 [07-20-2023]
19
+
20
+ * Delete big-ip endpoints and add a big-iq task
21
+
22
+ See merge request itentialopensource/adapters/controller-orchestrator/adapter-f5_bigiq!3
23
+
24
+ ---
25
+
26
+ ## 0.3.0 [07-20-2023]
27
+
28
+ * Add missing endpoints
29
+
30
+ See merge request itentialopensource/adapters/controller-orchestrator/adapter-f5_bigiq!2
31
+
32
+ ---
33
+
34
+ ## 0.2.0 [05-21-2022]
35
+
36
+ * Migration to the latest Adapter Foundation
37
+
38
+ See merge request itentialopensource/adapters/controller-orchestrator/adapter-f5_bigiq!1
39
+
40
+ ---
41
+
42
+ ## 0.1.1 [07-20-2021]
43
+
44
+ - Initial Commit
45
+
46
+ See commit b3bb5ef
47
+
48
+ ---
@@ -29,7 +29,7 @@
29
29
  "name": "healthcheck",
30
30
  "protocol": "REST",
31
31
  "method": "GET",
32
- "entitypath": "{base_path}/{version}/healthcheck?{query}",
32
+ "entitypath": "{base_path}/{version}/mgmt/shared/user-scripts/example?{query}",
33
33
  "requestSchema": "schema.json",
34
34
  "responseSchema": "schema.json",
35
35
  "timeout": 0,
@@ -142,6 +142,68 @@
142
142
  "mockFile": "mockdatafiles/getRemoveDeviceTrustStatusById-default.json"
143
143
  }
144
144
  ]
145
+ },
146
+ {
147
+ "name": "updateDeviceUpgrade",
148
+ "protocol": "REST",
149
+ "method": "POST",
150
+ "entitypath": "{base_path}/{version}/mgmt/cm/device/upgrade-backups?{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": "mockdatafiles/updateDeviceUpgrade-default.json"
163
+ }
164
+ ]
165
+ },
166
+ {
167
+ "name": "getAllUpgradeInstances",
168
+ "protocol": "REST",
169
+ "method": "GET",
170
+ "entitypath": "{base_path}/{version}/mgmt/cm/device/upgrade-backups?{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": "mockdatafiles/getAllUpgradeInstances-default.json"
184
+ }
185
+ ]
186
+ },
187
+ {
188
+ "name": "getUpgradeInstancesById",
189
+ "protocol": "REST",
190
+ "method": "GET",
191
+ "entitypath": "{base_path}/{version}/mgmt/cm/device/upgrade-backups/{pathv1}?{query}",
192
+ "requestSchema": "schema.json",
193
+ "responseSchema": "schema.json",
194
+ "timeout": 0,
195
+ "sendEmpty": false,
196
+ "sendGetBody": false,
197
+ "requestDatatype": "JSON",
198
+ "responseDatatype": "JSON",
199
+ "headers": {},
200
+ "responseObjects": [
201
+ {
202
+ "type": "default",
203
+ "key": "",
204
+ "mockFile": "mockdatafiles/getUpgradeInstancesById-default.json"
205
+ }
206
+ ]
145
207
  }
146
208
  ]
147
209
  }
@@ -0,0 +1,58 @@
1
+ {
2
+ "items": [
3
+ {
4
+ "id": "3a010684-47c5-48f0-ba4a-82eece96aa3a",
5
+ "kind": "cm:device:upgrade-backups:prepostupgradebackupstate",
6
+ "selfLink": "https://localhost/mgmt/cm/device/upgrade-backups/3a010684-47c5-48f0-ba4a-82eece96aa3a",
7
+ "generation": 4,
8
+ "hasPreBackup": true,
9
+ "hasPostBackup": false,
10
+ "needPreBackup": true,
11
+ "taskReference": {
12
+ "link": "https://localhost/mgmt/cm/device/upgrades/dbc4369f-8e33-4364-a612-4cfc6756b8da"
13
+ },
14
+ "needPostBackup": false,
15
+ "lastUpdateMicros": 1695828377417472,
16
+ "preBackupRecords": [
17
+ {
18
+ "backupReference": {
19
+ "link": "https://localhost/mgmt/cm/system/backup-restore/e34e6090-b5db-4973-8cb6-fe9217d3b394"
20
+ },
21
+ "deviceReference": {
22
+ "link": "https://localhost/mgmt/shared/resolver/device-groups/cm-bigip-allBigIpDevices/devices/3fd9cf87-17ff-44b3-afc8-461c115bc5c8"
23
+ }
24
+ }
25
+ ],
26
+ "includePrivateKeys": true
27
+ },
28
+ {
29
+ "id": "03e01c63-44cd-44f5-ae2f-446391ae436f",
30
+ "kind": "cm:device:upgrade-backups:prepostupgradebackupstate",
31
+ "selfLink": "https://localhost/mgmt/cm/device/upgrade-backups/03e01c63-44cd-44f5-ae2f-446391ae436f",
32
+ "generation": 3,
33
+ "hasPreBackup": true,
34
+ "hasPostBackup": false,
35
+ "needPreBackup": true,
36
+ "taskReference": {
37
+ "link": "https://localhost/mgmt/cm/device/upgrades/e577fed5-17ea-4bf6-b811-3045890173ab"
38
+ },
39
+ "needPostBackup": false,
40
+ "lastUpdateMicros": 1695272987904849,
41
+ "preBackupRecords": [
42
+ {
43
+ "backupReference": {
44
+ "link": "https://localhost/mgmt/cm/system/backup-restore/83c3b188-3172-4639-b665-2196a08b9fd4"
45
+ },
46
+ "deviceReference": {
47
+ "link": "https://localhost/mgmt/shared/resolver/device-groups/cm-bigip-allBigIpDevices/devices/b14fc503-0fa0-4597-9042-cb43809b50e5"
48
+ }
49
+ }
50
+ ],
51
+ "includePrivateKeys": false
52
+ }
53
+ ],
54
+ "generation": 18,
55
+ "kind": "cm:device:upgrade-backups:prepostupgradebackupcollectionstate",
56
+ "lastUpdateMicros": 1695830761033292,
57
+ "selfLink": "https://localhost/mgmt/cm/device/upgrade-backups"
58
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "id": "538c14b3-0331-45df-8663-11caab266c0a",
3
+ "kind": "cm:device:upgrade-backups:prepostupgradebackupstate",
4
+ "selfLink": "https://localhost/mgmt/cm/device/upgrade-backups/538c14b3-0331-45df-8663-11caab266c0a",
5
+ "generation": 1,
6
+ "hasPreBackup": false,
7
+ "hasPostBackup": false,
8
+ "needPreBackup": true,
9
+ "taskReference": {
10
+ "link": "https://localhost/mgmt/cm/device/upgrades/48b1368c-765c-4e1a-b049-d8ed0ba02c60"
11
+ },
12
+ "needPostBackup": false,
13
+ "lastUpdateMicros": 1695830761023352,
14
+ "includePrivateKeys": true
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "id": "538c14b3-0331-45df-8663-11caab266c0a",
3
+ "includePrivateKeys": true,
4
+ "needPreBackup": true,
5
+ "hasPreBackup": false,
6
+ "needPostBackup": false,
7
+ "hasPostBackup": false,
8
+ "taskReference": {
9
+ "link": "https://localhost/mgmt/cm/device/upgrades/48b1368c-765c-4e1a-b049-d8ed0ba02c60"
10
+ },
11
+ "generation": 1,
12
+ "lastUpdateMicros": 1695830761023352,
13
+ "kind": "cm:device:upgrade-backups:prepostupgradebackupstate",
14
+ "selfLink": "https://localhost/mgmt/cm/device/upgrade-backups/538c14b3-0331-45df-8663-11caab266c0a"
15
+ }
@@ -16,7 +16,10 @@
16
16
  "removeDeviceServices",
17
17
  "getRemoveDeviceServicesStatusById",
18
18
  "removeDeviceTrust",
19
- "getRemoveDeviceTrustStatusById"
19
+ "getRemoveDeviceTrustStatusById",
20
+ "updateDeviceUpgrade",
21
+ "getAllUpgradeInstances",
22
+ "getUpgradeInstancesById"
20
23
  ],
21
24
  "external_name": "ph_request_type"
22
25
  }
package/metadata.json ADDED
@@ -0,0 +1,72 @@
1
+ {
2
+ "name": "adapter-f5_bigiq",
3
+ "webName": "Adapter for Integration to F5 BIG-IQ",
4
+ "vendor": "F5",
5
+ "product": "BIG-IQ",
6
+ "osVersion": [],
7
+ "apiVersions": [
8
+ "v6.0.1"
9
+ ],
10
+ "iapVersions": [
11
+ "2021.1.x",
12
+ "2021.2.x",
13
+ "2022.1.x",
14
+ "2023.1.x"
15
+ ],
16
+ "method": "REST",
17
+ "type": "Adapter",
18
+ "domains": [
19
+ "Security (SASE)"
20
+ ],
21
+ "tags": [
22
+ "Firewall",
23
+ "Security Rule Management"
24
+ ],
25
+ "useCases": [
26
+ "Add, update, manage and remove Security Policies and Rules",
27
+ "Automate Security Rule Validation"
28
+ ],
29
+ "deprecated": {
30
+ "isDeprecated": false
31
+ },
32
+ "brokerSince": "",
33
+ "documentation": {
34
+ "storeLink": "",
35
+ "npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-f5_bigiq",
36
+ "repoLink": "https://gitlab.com/itentialopensource/adapters/controller-orchestrator/adapter-f5_bigiq",
37
+ "docLink": "https://docs.itential.com/opensource/docs/f5-big-iq",
38
+ "demoLinks": [],
39
+ "faqLink": "https://docs.itential.com/opensource/docs/troubleshooting-an-adapter",
40
+ "contributeLink": "https://gitlab.com/itentialopensource/adapters/contributing-guide",
41
+ "issueLink": "https://itential.atlassian.net/servicedesk/customer/portals",
42
+ "webLink": "https://www.itential.com/adapters/f5-big-iq/",
43
+ "vendorLink": "https://www.f5.com/",
44
+ "productLink": "https://www.f5.com/products/big-ip-services/big-iq",
45
+ "apiLinks": [
46
+ "https://clouddocs.f5.com/products/big-iq/mgmt-api/v6.0.1/"
47
+ ]
48
+ },
49
+ "assets": [],
50
+ "relatedItems": {
51
+ "adapters": [],
52
+ "integrations": [],
53
+ "ecosystemApplications": [],
54
+ "workflowProjects": [
55
+ {
56
+ "name": "F5 - BIG-IQ - REST",
57
+ "webName": "Project with workflows for the BIG-IQ from F5",
58
+ "overview": "Project with workflows for the BIG-IQ from F5",
59
+ "isDependency": false,
60
+ "versions": [
61
+ "^0.3.0"
62
+ ],
63
+ "repoLink": "https://gitlab.com/itentialopensource/pre-built-automations/staging/f5-big-iq-rest",
64
+ "docLink": "",
65
+ "webLink": ""
66
+ }
67
+
68
+ ],
69
+ "transformationProjects": [],
70
+ "exampleProjects": []
71
+ }
72
+ }
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-f5_bigiq",
3
- "version": "0.3.4",
3
+ "version": "0.4.0",
4
4
  "description": "This adapter integrates with system described as: f5Big-iqApi.",
5
5
  "main": "adapter.js",
6
- "systemName": "f5 BIG-IQ",
7
6
  "wizardVersion": "2.44.7",
8
- "engineVersion": "1.61.6",
7
+ "engineVersion": "1.67.10",
9
8
  "adapterType": "http",
10
9
  "scripts": {
11
10
  "artifactize": "npm i && node utils/packModificationScript.js",
12
- "preinstall": "node utils/setup.js && npm install --package-lock-only --ignore-scripts && npx npm-force-resolutions",
11
+ "preinstall": "node utils/setup.js",
12
+ "deinstall": "node utils/removeHooks.js",
13
13
  "lint": "node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js",
14
14
  "lint:errors": "node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js --quiet",
15
15
  "test:baseunit": "mocha test/unit/adapterBaseTestUnit.js --LOG=error",
@@ -23,7 +23,7 @@
23
23
  "adapter:migrate": "node utils/modify.js -m",
24
24
  "adapter:update": "node utils/modify.js -u",
25
25
  "adapter:revert": "node utils/modify.js -r",
26
- "troubleshoot": "node utils/tbScript.js",
26
+ "troubleshoot": "node utils/tbScript.js troubleshoot",
27
27
  "healthcheck": "node utils/tbScript.js healthcheck",
28
28
  "basicget": "node utils/tbScript.js basicget",
29
29
  "connectivity": "node utils/tbScript.js connectivity",
@@ -55,34 +55,33 @@
55
55
  "author": "Itential",
56
56
  "homepage": "https://gitlab.com/itentialopensource/adapters/controller-orchestrator/adapter-f5_bigiq#readme",
57
57
  "dependencies": {
58
- "@itentialopensource/adapter-utils": "^4.45.6",
59
- "ajv": "^6.12.0",
60
- "axios": "^0.21.0",
61
- "commander": "^2.20.0",
62
- "fs-extra": "^8.1.0",
58
+ "@itentialopensource/adapter-utils": "^5.3.0",
59
+ "acorn": "^8.10.0",
60
+ "ajv": "^8.12.0",
61
+ "axios": "^1.4.0",
62
+ "commander": "^11.0.0",
63
+ "dns-lookup-promise": "^1.0.4",
64
+ "fs-extra": "^11.1.1",
63
65
  "json-query": "^2.2.2",
64
- "mocha": "^9.0.1",
66
+ "mocha": "^10.2.0",
65
67
  "mocha-param": "^2.0.1",
66
- "mongodb": "^4.1.0",
67
- "network-diagnostics": "^0.5.3",
68
+ "mongodb": "^4.17.1",
68
69
  "nyc": "^15.1.0",
70
+ "ping": "^0.4.4",
71
+ "prompts": "^2.4.2",
69
72
  "readline-sync": "^1.4.10",
70
- "semver": "^7.3.2",
71
- "winston": "^3.3.3"
73
+ "semver": "^7.5.3",
74
+ "winston": "^3.9.0"
72
75
  },
73
76
  "devDependencies": {
74
77
  "@babel/helper-function-name": "^7.14.2",
75
- "chai": "^4.3.4",
76
- "eslint": "^7.29.0",
77
- "eslint-config-airbnb-base": "^14.2.1",
78
+ "chai": "^4.3.7",
79
+ "eslint": "^8.44.0",
80
+ "eslint-config-airbnb-base": "^15.0.0",
78
81
  "eslint-module-utils": "^2.6.1",
79
- "eslint-plugin-import": "^2.23.4",
80
- "eslint-plugin-json": "^3.0.0",
81
- "package-json-validator": "^0.6.3",
82
- "testdouble": "^3.16.1"
83
- },
84
- "resolutions": {
85
- "minimist": "^1.2.5"
82
+ "eslint-plugin-import": "^2.27.5",
83
+ "eslint-plugin-json": "^3.1.0",
84
+ "testdouble": "^3.18.0"
86
85
  },
87
86
  "private": false
88
87
  }