@itentialopensource/adapter-meraki 1.2.4 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +16 -0
- package/metadata.json +1 -1
- package/package.json +3 -3
- package/propertiesSchema.json +10 -1
- package/refs?service=git-upload-pack +0 -0
- package/report/adapterInfo.json +2 -2
- package/report/updateReport1698422317633.json +120 -0
- package/utils/methodDocumentor.js +16 -3
package/CHANGELOG.md
CHANGED
@@ -1,4 +1,20 @@
|
|
1
1
|
|
2
|
+
## 1.4.0 [12-14-2023]
|
3
|
+
|
4
|
+
* More migration changes
|
5
|
+
|
6
|
+
See merge request itentialopensource/adapters/sd-wan/adapter-meraki!34
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
## 1.3.0 [11-06-2023]
|
11
|
+
|
12
|
+
* More migration changes
|
13
|
+
|
14
|
+
See merge request itentialopensource/adapters/sd-wan/adapter-meraki!34
|
15
|
+
|
16
|
+
---
|
17
|
+
|
2
18
|
## 1.2.4 [10-19-2023]
|
3
19
|
|
4
20
|
* meta use case and tag changes
|
package/metadata.json
CHANGED
@@ -46,7 +46,7 @@
|
|
46
46
|
"repoLink": "https://gitlab.com/itentialopensource/adapters/sd-wan/adapter-meraki",
|
47
47
|
"docLink": "https://docs.itential.com/opensource/docs/meraki",
|
48
48
|
"demoLinks": [
|
49
|
-
"https://www.itential.com/automations/sd-wan-branch-management",
|
49
|
+
"https://www.itential.com/automations/sd-wan-branch-management/",
|
50
50
|
"https://www.itential.com/solutions/sdwan-automation-orchestration/"
|
51
51
|
],
|
52
52
|
"faqLink": "https://docs.itential.com/opensource/docs/troubleshooting-an-adapter",
|
package/package.json
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"name": "@itentialopensource/adapter-meraki",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.4.0",
|
4
4
|
"description": "This adapter integrates with system described as: merakiDashboardApi.",
|
5
5
|
"main": "adapter.js",
|
6
6
|
"systemName": "Meraki",
|
7
7
|
"wizardVersion": "2.44.7",
|
8
|
-
"engineVersion": "1.67.
|
8
|
+
"engineVersion": "1.67.10",
|
9
9
|
"adapterType": "http",
|
10
10
|
"scripts": {
|
11
11
|
"artifactize": "npm i && node utils/packModificationScript.js",
|
@@ -54,7 +54,7 @@
|
|
54
54
|
"author": "Itential",
|
55
55
|
"homepage": "https://gitlab.com/itentialopensource/adapters/sd-wan/adapter-meraki#readme",
|
56
56
|
"dependencies": {
|
57
|
-
"@itentialopensource/adapter-utils": "^5.
|
57
|
+
"@itentialopensource/adapter-utils": "^5.3.0",
|
58
58
|
"acorn": "^8.10.0",
|
59
59
|
"ajv": "^8.12.0",
|
60
60
|
"axios": "^1.4.0",
|
package/propertiesSchema.json
CHANGED
@@ -109,6 +109,14 @@
|
|
109
109
|
},
|
110
110
|
"cache": {
|
111
111
|
"$ref": "#/definitions/cache"
|
112
|
+
},
|
113
|
+
"service": {
|
114
|
+
"type": "string",
|
115
|
+
"description": "Service we are integrating with -- used with AWS Authentication",
|
116
|
+
"examples": [
|
117
|
+
"ec2",
|
118
|
+
"route53"
|
119
|
+
]
|
112
120
|
}
|
113
121
|
},
|
114
122
|
"required": [
|
@@ -131,7 +139,8 @@
|
|
131
139
|
"jwt_token",
|
132
140
|
"request_token",
|
133
141
|
"no_authentication",
|
134
|
-
"multi_step_authentication"
|
142
|
+
"multi_step_authentication",
|
143
|
+
"aws_authentication"
|
135
144
|
]
|
136
145
|
},
|
137
146
|
"username": {
|
Binary file
|
package/report/adapterInfo.json
CHANGED
@@ -0,0 +1,120 @@
|
|
1
|
+
{
|
2
|
+
"errors": [],
|
3
|
+
"statistics": [
|
4
|
+
{
|
5
|
+
"owner": "errorJson",
|
6
|
+
"description": "New adapter errors available for use",
|
7
|
+
"value": 0
|
8
|
+
},
|
9
|
+
{
|
10
|
+
"owner": "errorJson",
|
11
|
+
"description": "Adapter errors no longer available for use",
|
12
|
+
"value": 0
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"owner": "errorJson",
|
16
|
+
"description": "Adapter errors that have been updated (e.g. recommendation changes)",
|
17
|
+
"value": 31
|
18
|
+
},
|
19
|
+
{
|
20
|
+
"owner": "packageJson",
|
21
|
+
"description": "Number of production dependencies",
|
22
|
+
"value": 17
|
23
|
+
},
|
24
|
+
{
|
25
|
+
"owner": "packageJson",
|
26
|
+
"description": "Number of development dependencies",
|
27
|
+
"value": 6
|
28
|
+
},
|
29
|
+
{
|
30
|
+
"owner": "packageJson",
|
31
|
+
"description": "Number of npm scripts",
|
32
|
+
"value": 22
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"owner": "packageJson",
|
36
|
+
"description": "Runtime Library dependency",
|
37
|
+
"value": "^5.3.0"
|
38
|
+
},
|
39
|
+
{
|
40
|
+
"owner": "propertiesSchemaJson",
|
41
|
+
"description": "Adapter properties defined in the propertiesSchema file",
|
42
|
+
"value": 77
|
43
|
+
},
|
44
|
+
{
|
45
|
+
"owner": "markdown",
|
46
|
+
"description": "Number of lines in the README.md",
|
47
|
+
"value": 347
|
48
|
+
},
|
49
|
+
{
|
50
|
+
"owner": "markdown",
|
51
|
+
"description": "Number of lines in the SUMMARY.md",
|
52
|
+
"value": 9
|
53
|
+
},
|
54
|
+
{
|
55
|
+
"owner": "markdown",
|
56
|
+
"description": "Number of lines in the PROPERTIES.md",
|
57
|
+
"value": 642
|
58
|
+
},
|
59
|
+
{
|
60
|
+
"owner": "markdown",
|
61
|
+
"description": "Number of lines in the TROUBLESHOOT.md",
|
62
|
+
"value": 48
|
63
|
+
},
|
64
|
+
{
|
65
|
+
"owner": "markdown",
|
66
|
+
"description": "Number of lines in the ENHANCE.md",
|
67
|
+
"value": 70
|
68
|
+
},
|
69
|
+
{
|
70
|
+
"owner": "markdown",
|
71
|
+
"description": "Number of lines in the BROKER.md",
|
72
|
+
"value": 70
|
73
|
+
},
|
74
|
+
{
|
75
|
+
"owner": "unitTestJS",
|
76
|
+
"description": "Number of lines of code in unit tests",
|
77
|
+
"value": 24028
|
78
|
+
},
|
79
|
+
{
|
80
|
+
"owner": "unitTestJS",
|
81
|
+
"description": "Number of unit tests",
|
82
|
+
"value": 1565
|
83
|
+
},
|
84
|
+
{
|
85
|
+
"owner": "integrationTestJS",
|
86
|
+
"description": "Number of lines of code in integration tests",
|
87
|
+
"value": 18165
|
88
|
+
},
|
89
|
+
{
|
90
|
+
"owner": "integrationTestJS",
|
91
|
+
"description": "Number of integration tests",
|
92
|
+
"value": 595
|
93
|
+
},
|
94
|
+
{
|
95
|
+
"owner": "staticFile",
|
96
|
+
"description": "Number of lines of code in adapterBase.js",
|
97
|
+
"value": 1453
|
98
|
+
},
|
99
|
+
{
|
100
|
+
"owner": "staticFile",
|
101
|
+
"description": "Number of static files added",
|
102
|
+
"value": 36
|
103
|
+
},
|
104
|
+
{
|
105
|
+
"owner": "Overall",
|
106
|
+
"description": "Total lines of Code",
|
107
|
+
"value": 43646
|
108
|
+
},
|
109
|
+
{
|
110
|
+
"owner": "Overall",
|
111
|
+
"description": "Total Tests",
|
112
|
+
"value": 2160
|
113
|
+
},
|
114
|
+
{
|
115
|
+
"owner": "Overall",
|
116
|
+
"description": "Total Files",
|
117
|
+
"value": 6
|
118
|
+
}
|
119
|
+
]
|
120
|
+
}
|
@@ -77,6 +77,7 @@ function readFileUsingLib(filename, descriptionObj, workflowObj, functionList) {
|
|
77
77
|
// parsing the file to get the function and class declarations.
|
78
78
|
const aFileFuncArgs = acorn.parse(aFile, { ecmaVersion: 2020 });
|
79
79
|
|
80
|
+
let callName = 'identifyRequest';
|
80
81
|
// Looping through all the declarations parsed:
|
81
82
|
aFileFuncArgs.body.forEach((e) => {
|
82
83
|
// Getting only the class declaration as it has our required functions.
|
@@ -89,8 +90,10 @@ function readFileUsingLib(filename, descriptionObj, workflowObj, functionList) {
|
|
89
90
|
method.value.params.forEach((param) => {
|
90
91
|
if (param.type === 'Identifier') {
|
91
92
|
funcArgs.push(param.name);
|
93
|
+
} else if (param.type === 'RestElement') {
|
94
|
+
funcArgs.push(`...${param.argument.name}`);
|
92
95
|
} else {
|
93
|
-
const args = `${param.left.name} = ${param.right.
|
96
|
+
const args = `${param.left.name} = ${param.right.raw}`;
|
94
97
|
funcArgs.push(args);
|
95
98
|
}
|
96
99
|
});
|
@@ -102,7 +105,7 @@ function readFileUsingLib(filename, descriptionObj, workflowObj, functionList) {
|
|
102
105
|
});
|
103
106
|
const requests = [];
|
104
107
|
for (let i = 0; i < callList.length; i += 1) {
|
105
|
-
if (callList[i].callee.property && callList[i].callee.property.name ===
|
108
|
+
if (callList[i].callee.property && callList[i].callee.property.name === callName) {
|
106
109
|
requests.push(callList[i]);
|
107
110
|
}
|
108
111
|
}
|
@@ -114,7 +117,16 @@ function readFileUsingLib(filename, descriptionObj, workflowObj, functionList) {
|
|
114
117
|
const entity = expr.arguments[0].value;
|
115
118
|
const actionName = expr.arguments[1].value;
|
116
119
|
if (expr !== undefined && (expr.arguments[0].type !== 'Literal' || expr.arguments[1].type !== 'Literal')) {
|
117
|
-
|
120
|
+
const param1 = method.value.params[0];
|
121
|
+
const param2 = method.value.params[1];
|
122
|
+
if (param1.type !== 'Identifier' || param2.type !== 'Identifier'
|
123
|
+
|| expr.arguments[0].type !== 'Identifier' || expr.arguments[1].type !== 'Identifier'
|
124
|
+
|| param1.name !== expr.arguments[0].name || param2.name !== expr.arguments[1].name) {
|
125
|
+
throw new Error(`identifyRequest proxy method ${funcName} unknown format`);
|
126
|
+
} else if (callName !== 'identifyRequest') {
|
127
|
+
throw new Error(`MethodDocumentor not yet programmed to handle multiple helper methods: 1) ${callName}, 2) ${funcName}`);
|
128
|
+
}
|
129
|
+
callName = funcName;
|
118
130
|
}
|
119
131
|
const entityPath = getPathFromEntity(entity, actionName);
|
120
132
|
|
@@ -197,6 +209,7 @@ function readMDFile(filename, functionList) {
|
|
197
209
|
// Creating the tags for each method to be appended to the file.
|
198
210
|
const tdBeginTag = ' <td style="padding:15px">';
|
199
211
|
const tdEndTag = '</td>';
|
212
|
+
|
200
213
|
functionList.forEach((func) => {
|
201
214
|
const signCommand = `${tdBeginTag}${func.method_signature}${tdEndTag}`;
|
202
215
|
const descCommand = `${tdBeginTag}${func.description}${tdEndTag}`;
|