@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
@@ -8,10 +8,79 @@
8
8
  "ph_request_type": {
9
9
  "type": "string",
10
10
  "description": "type of request (internal to adapter)",
11
- "default": "activateVsmartPolicy",
11
+ "default": "getVsmartPolicyList",
12
12
  "enum": [
13
+ "getVsmartPolicyList",
13
14
  "activateVsmartPolicy",
14
- "deactivateVsmartPolicy"
15
+ "deactivateVsmartPolicy",
16
+ "generateDeviceTemplateInput",
17
+ "previewDeviceTemplateConfiguration",
18
+ "attachDeviceTemplateCli",
19
+ "attachDeviceTemplateFeature",
20
+ "detachDeviceTemplateCli",
21
+ "getDeviceList",
22
+ "pushMixTemplate",
23
+ "getAttachedConfigToDevice",
24
+ "pushMasterTemplate",
25
+ "getAttachedDeviceList",
26
+ "createInputWithoutDevice",
27
+ "getDeviceConfigurationPreview",
28
+ "processInputCommaSepFile",
29
+ "validateTemplate",
30
+ "pushCloudxConfig",
31
+ "editCloudxConfig",
32
+ "detachSites",
33
+ "getDevicesWithDuplicateIP",
34
+ "pushCLITemplate",
35
+ "detachDeviceTemplate",
36
+ "createDeviceInput",
37
+ "checkVbond",
38
+ "generateTemplateList",
39
+ "createTemplate",
40
+ "getTemplate",
41
+ "editTemplate",
42
+ "deleteTemplate",
43
+ "editLITemplate",
44
+ "createLITemplate",
45
+ "listLITemplate",
46
+ "generateTemplateByDeviceType",
47
+ "getTemplateDefinition",
48
+ "generateTemplateTypes",
49
+ "generateTemplateTypeDefinition",
50
+ "generateMasterTemplateDefinition",
51
+ "getDeviceTemplatesAttachedToFeature",
52
+ "getOutOfSyncTemplates",
53
+ "getOutOfSyncDevices",
54
+ "createMasterTemplate",
55
+ "createCLITemplate",
56
+ "getMasterTemplateDefinition",
57
+ "generateTemplateList__v3",
58
+ "editTemplate__v3",
59
+ "generateTemplateList__v4",
60
+ "editTemplate__v4",
61
+ "getRunningConfig",
62
+ "uploadConfig",
63
+ "getAttachedConfig",
64
+ "getConfigDiff",
65
+ "generateCLIModeDevices",
66
+ "updateDeviceToCLIMode",
67
+ "generatevManageModeDevices",
68
+ "getCompatibleDevices",
69
+ "getVpnForDevice",
70
+ "rmaUpdate",
71
+ "deActivatePolicy",
72
+ "activatePolicy",
73
+ "checkVSmartConnectivityStatus",
74
+ "generateTemplateList__v5",
75
+ "createTemplate__v3",
76
+ "getTemplate__v3",
77
+ "editTemplate__v5",
78
+ "deleteTemplate__v3",
79
+ "generateTemplateList__v6",
80
+ "createTemplate__v4",
81
+ "getTemplate__v4",
82
+ "editTemplate__v6",
83
+ "deleteTemplate__v4"
15
84
  ],
16
85
  "external_name": "ph_request_type"
17
86
  }
package/error.json CHANGED
@@ -168,6 +168,12 @@
168
168
  "displayString": "Failure response received for $VARIABLE$",
169
169
  "recommendation": "Check the reason for failure in the stack trace"
170
170
  },
171
+ {
172
+ "key": "Suspended Adapter",
173
+ "icode": "AD.600",
174
+ "displayString": "Adapter is suspended",
175
+ "recommendation": "Check if external system is functional and unsuspend if appropriate"
176
+ },
171
177
  {
172
178
  "key": "Caught Exception",
173
179
  "icode": "AD.900",
package/package.json CHANGED
@@ -1,20 +1,31 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-viptela",
3
- "version": "0.7.0",
3
+ "version": "0.9.0",
4
4
  "description": "This adapter integrates with system Viptela",
5
5
  "main": "adapter.js",
6
- "wizardVersion": "2.41.25",
7
- "engineVersion": "1.52.2",
6
+ "wizardVersion": "2.44.7",
7
+ "engineVersion": "1.59.55",
8
8
  "scripts": {
9
9
  "artifactize": "npm i && node utils/packModificationScript.js",
10
- "preinstall": "node utils/setup.js",
10
+ "preinstall": "node utils/setup.js && npm install --package-lock-only --ignore-scripts && npx npm-force-resolutions",
11
11
  "lint": "node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js",
12
12
  "lint:errors": "node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js --quiet",
13
+ "test:baseunit": "mocha test/unit/adapterBaseTestUnit.js --LOG=error",
13
14
  "test:unit": "mocha test/unit/adapterTestUnit.js --LOG=error",
14
15
  "test:integration": "mocha test/integration/adapterTestIntegration.js --LOG=error",
15
16
  "test:cover": "nyc --reporter html --reporter text mocha --reporter dot test/*",
16
- "test": "npm run test:unit && npm run test:integration",
17
- "deploy": "npm publish --registry=http://registry.npmjs.org --access=public",
17
+ "test": "npm run test:baseunit && npm run test:unit && npm run test:integration",
18
+ "adapter:install": "npm i && node utils/tbScript.js install",
19
+ "adapter:checkMigrate": "node utils/checkMigrate.js",
20
+ "adapter:findPath": "node utils/findPath.js",
21
+ "adapter:migrate": "node utils/modify.js -m",
22
+ "adapter:update": "node utils/modify.js -u",
23
+ "adapter:revert": "node utils/modify.js -r",
24
+ "troubleshoot": "node utils/tbScript.js",
25
+ "healthcheck": "node utils/tbScript.js healthcheck",
26
+ "basicget": "node utils/tbScript.js basicget",
27
+ "connectivity": "node utils/tbScript.js connectivity",
28
+ "deploy": "npm publish --registry=https://registry.npmjs.org --access=public",
18
29
  "build": "npm run deploy"
19
30
  },
20
31
  "keywords": [
@@ -40,22 +51,32 @@
40
51
  "author": "Itential",
41
52
  "homepage": "https://gitlab.com/itentialopensource/adapters/sd-wan/adapter-viptela#readme",
42
53
  "dependencies": {
43
- "@itentialopensource/adapter-utils": "^4.34.4",
54
+ "@itentialopensource/adapter-utils": "^4.44.11",
44
55
  "ajv": "^6.12.0",
56
+ "axios": "^0.21.0",
57
+ "commander": "^2.20.0",
45
58
  "fs-extra": "^8.1.0",
46
- "package-json-validator": "^0.6.3",
47
- "readline-sync": "^1.4.10"
59
+ "mocha": "^9.0.1",
60
+ "mocha-param": "^2.0.1",
61
+ "mongodb": "^4.1.0",
62
+ "network-diagnostics": "^0.5.3",
63
+ "nyc": "^15.1.0",
64
+ "readline-sync": "^1.4.10",
65
+ "semver": "^7.3.2",
66
+ "winston": "^3.3.3"
48
67
  },
49
68
  "devDependencies": {
50
- "chai": "^4.2.0",
51
- "eslint": "^7.2.0",
52
- "eslint-config-airbnb-base": "^14.2.0",
53
- "eslint-plugin-import": "^2.21.2",
54
- "eslint-plugin-json": "^2.1.1",
55
- "mocha": "^8.1.1",
56
- "nyc": "^15.1.0",
57
- "testdouble": "^3.16.0",
58
- "winston": "^3.2.1"
69
+ "chai": "^4.3.4",
70
+ "eslint": "^7.29.0",
71
+ "eslint-config-airbnb-base": "^14.2.1",
72
+ "eslint-plugin-import": "^2.23.4",
73
+ "eslint-plugin-json": "^3.0.0",
74
+ "package-json-validator": "^0.6.3",
75
+ "testdouble": "^3.16.1"
76
+ },
77
+ "resolutions": {
78
+ "minimist": "^1.2.5"
59
79
  },
60
- "private": false
80
+ "private": false,
81
+ "adapterType": "http"
61
82
  }