@itentialopensource/adapter-meraki 1.1.0 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- package/CALLS.md +457 -1163
- package/CHANGELOG.md +24 -0
- package/README.md +11 -7
- package/adapterBase.js +103 -0
- package/metadata.json +20 -7
- package/package.json +4 -4
- package/propertiesSchema.json +64 -0
- package/refs?service=git-upload-pack +0 -0
- package/report/adapter-openapi.json +5460 -0
- package/report/adapter-openapi.yaml +3774 -0
- package/report/adapterInfo.json +5 -5
- package/report/updateReport1692203092612.json +120 -0
- package/report/updateReport1694439659179.json +120 -0
- package/report/updateReport1694451005916.json +120 -0
- package/sampleProperties.json +12 -0
- package/test/unit/adapterBaseTestUnit.js +6 -6
- package/test/unit/adapterTestUnit.js +9 -3
- package/utils/methodDocumentor.js +57 -22
package/CHANGELOG.md
CHANGED
@@ -1,4 +1,28 @@
|
|
1
1
|
|
2
|
+
## 1.2.2 [09-11-2023]
|
3
|
+
|
4
|
+
* remove example
|
5
|
+
|
6
|
+
See merge request itentialopensource/adapters/sd-wan/adapter-meraki!32
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
## 1.2.1 [09-11-2023]
|
11
|
+
|
12
|
+
* Additional migration and metadata changes
|
13
|
+
|
14
|
+
See merge request itentialopensource/adapters/sd-wan/adapter-meraki!31
|
15
|
+
|
16
|
+
---
|
17
|
+
|
18
|
+
## 1.2.0 [08-16-2023]
|
19
|
+
|
20
|
+
* Minor/2023 migration
|
21
|
+
|
22
|
+
See merge request itentialopensource/adapters/sd-wan/adapter-meraki!30
|
23
|
+
|
24
|
+
---
|
25
|
+
|
2
26
|
## 1.1.0 [08-11-2023]
|
3
27
|
|
4
28
|
* Minor/2023 migration
|
package/README.md
CHANGED
@@ -14,6 +14,7 @@ Some of the page links in this document and links to other GitLab files do not w
|
|
14
14
|
- [Testing](#testing)
|
15
15
|
- [Configuration](./PROPERTIES.md)
|
16
16
|
- [Using this Adapter](./CALLS.md)
|
17
|
+
- [Authentication](./AUTH.md)
|
17
18
|
- [Additional Information](#additional-information)
|
18
19
|
- [Enhancements](./ENHANCE.md)
|
19
20
|
- [Contributing](./CONTRIBUTING.md)
|
@@ -47,17 +48,20 @@ These instructions will help you get a copy of the project on your local machine
|
|
47
48
|
|
48
49
|
### Helpful Background Information
|
49
50
|
|
50
|
-
There is
|
51
|
+
There is <a href="https://docs.itential.com/opensource/docs/adapters" target="_blank">Adapter documentation available on the Itential Documentation Site</a>. This documentation includes information and examples that are helpful for:
|
51
52
|
|
52
53
|
```text
|
53
54
|
Authentication
|
54
|
-
|
55
|
+
IAP Service Instance Configuration
|
55
56
|
Code Files
|
56
|
-
Action
|
57
|
-
|
58
|
-
|
57
|
+
Endpoint Configuration (Action & Schema)
|
58
|
+
Mock Data
|
59
|
+
Adapter Generic Methods
|
60
|
+
Headers
|
61
|
+
Security
|
59
62
|
Linting and Testing
|
60
|
-
|
63
|
+
Build an Adapter
|
64
|
+
Troubleshooting an Adapter
|
61
65
|
```
|
62
66
|
|
63
67
|
Others will be added over time.
|
@@ -175,7 +179,7 @@ tar -xvf adapter-meraki.tar
|
|
175
179
|
|
176
180
|
```bash
|
177
181
|
cd adapter-meraki
|
178
|
-
npm
|
182
|
+
npm install
|
179
183
|
npm run lint:errors
|
180
184
|
npm run test
|
181
185
|
```
|
package/adapterBase.js
CHANGED
@@ -1027,6 +1027,24 @@ class AdapterBase extends EventEmitterCl {
|
|
1027
1027
|
return this.requestHandlerInst.hasEntities(entityType, entityList, callback);
|
1028
1028
|
}
|
1029
1029
|
|
1030
|
+
/**
|
1031
|
+
* @summary Determines if this adapter supports any in a list of entities
|
1032
|
+
*
|
1033
|
+
* @function hasEntitiesAuth
|
1034
|
+
* @param {String} entityType - the entity type to check for
|
1035
|
+
* @param {Array} entityList - the list of entities we are looking for
|
1036
|
+
* @param {Object} callOptions - Additional options used to make request, including auth headers, AWS service, or datatypes
|
1037
|
+
*
|
1038
|
+
* @param {Callback} callback - A map where the entity is the key and the
|
1039
|
+
* value is true or false
|
1040
|
+
*/
|
1041
|
+
hasEntitiesAuth(entityType, entityList, callOptions, callback) {
|
1042
|
+
const origin = `${this.id}-adapterBase-hasEntitiesAuth`;
|
1043
|
+
log.trace(origin);
|
1044
|
+
|
1045
|
+
return this.requestHandlerInst.hasEntitiesAuth(entityType, entityList, callOptions, callback);
|
1046
|
+
}
|
1047
|
+
|
1030
1048
|
/**
|
1031
1049
|
* @summary Get Appliance that match the deviceName
|
1032
1050
|
*
|
@@ -1043,6 +1061,23 @@ class AdapterBase extends EventEmitterCl {
|
|
1043
1061
|
return this.requestHandlerInst.getDevice(deviceName, callback);
|
1044
1062
|
}
|
1045
1063
|
|
1064
|
+
/**
|
1065
|
+
* @summary Get Appliance that match the deviceName
|
1066
|
+
*
|
1067
|
+
* @function getDeviceAuth
|
1068
|
+
* @param {String} deviceName - the deviceName to find (required)
|
1069
|
+
* @param {Object} callOptions - Additional options used to make request, including auth headers, AWS service, or datatypes
|
1070
|
+
*
|
1071
|
+
* @param {getCallback} callback - a callback function to return the result
|
1072
|
+
* (appliance) or the error
|
1073
|
+
*/
|
1074
|
+
getDeviceAuth(deviceName, callOptions, callback) {
|
1075
|
+
const origin = `${this.id}-adapterBase-getDeviceAuth`;
|
1076
|
+
log.trace(origin);
|
1077
|
+
|
1078
|
+
return this.requestHandlerInst.getDeviceAuth(deviceName, callOptions, callback);
|
1079
|
+
}
|
1080
|
+
|
1046
1081
|
/**
|
1047
1082
|
* @summary Get Appliances that match the filter
|
1048
1083
|
*
|
@@ -1059,6 +1094,23 @@ class AdapterBase extends EventEmitterCl {
|
|
1059
1094
|
return this.requestHandlerInst.getDevicesFiltered(options, callback);
|
1060
1095
|
}
|
1061
1096
|
|
1097
|
+
/**
|
1098
|
+
* @summary Get Appliances that match the filter
|
1099
|
+
*
|
1100
|
+
* @function getDevicesFilteredAuth
|
1101
|
+
* @param {Object} options - the data to use to filter the appliances (optional)
|
1102
|
+
* @param {Object} callOptions - Additional options used to make request, including auth headers, AWS service, or datatypes
|
1103
|
+
*
|
1104
|
+
* @param {getCallback} callback - a callback function to return the result
|
1105
|
+
* (appliances) or the error
|
1106
|
+
*/
|
1107
|
+
getDevicesFilteredAuth(options, callOptions, callback) {
|
1108
|
+
const origin = `${this.id}-adapterBase-getDevicesFilteredAuth`;
|
1109
|
+
log.trace(origin);
|
1110
|
+
|
1111
|
+
return this.requestHandlerInst.getDevicesFilteredAuth(options, callOptions, callback);
|
1112
|
+
}
|
1113
|
+
|
1062
1114
|
/**
|
1063
1115
|
* @summary Gets the status for the provided appliance
|
1064
1116
|
*
|
@@ -1075,6 +1127,23 @@ class AdapterBase extends EventEmitterCl {
|
|
1075
1127
|
return this.requestHandlerInst.isAlive(deviceName, callback);
|
1076
1128
|
}
|
1077
1129
|
|
1130
|
+
/**
|
1131
|
+
* @summary Gets the status for the provided appliance
|
1132
|
+
*
|
1133
|
+
* @function isAliveAuth
|
1134
|
+
* @param {String} deviceName - the deviceName of the appliance. (required)
|
1135
|
+
* @param {Object} callOptions - Additional options used to make request, including auth headers, AWS service, or datatypes
|
1136
|
+
*
|
1137
|
+
* @param {configCallback} callback - callback function to return the result
|
1138
|
+
* (appliance isAliveAuth) or the error
|
1139
|
+
*/
|
1140
|
+
isAliveAuth(deviceName, callOptions, callback) {
|
1141
|
+
const origin = `${this.id}-adapterBase-isAliveAuth`;
|
1142
|
+
log.trace(origin);
|
1143
|
+
|
1144
|
+
return this.requestHandlerInst.isAliveAuth(deviceName, callOptions, callback);
|
1145
|
+
}
|
1146
|
+
|
1078
1147
|
/**
|
1079
1148
|
* @summary Gets a config for the provided Appliance
|
1080
1149
|
*
|
@@ -1092,6 +1161,24 @@ class AdapterBase extends EventEmitterCl {
|
|
1092
1161
|
return this.requestHandlerInst.getConfig(deviceName, format, callback);
|
1093
1162
|
}
|
1094
1163
|
|
1164
|
+
/**
|
1165
|
+
* @summary Gets a config for the provided Appliance
|
1166
|
+
*
|
1167
|
+
* @function getConfigAuth
|
1168
|
+
* @param {String} deviceName - the deviceName of the appliance. (required)
|
1169
|
+
* @param {String} format - the desired format of the config. (optional)
|
1170
|
+
* @param {Object} callOptions - Additional options used to make request, including auth headers, AWS service, or datatypes
|
1171
|
+
*
|
1172
|
+
* @param {configCallback} callback - callback function to return the result
|
1173
|
+
* (appliance config) or the error
|
1174
|
+
*/
|
1175
|
+
getConfigAuth(deviceName, format, callOptions, callback) {
|
1176
|
+
const origin = `${this.id}-adapterBase-getConfigAuth`;
|
1177
|
+
log.trace(origin);
|
1178
|
+
|
1179
|
+
return this.requestHandlerInst.getConfigAuth(deviceName, format, callOptions, callback);
|
1180
|
+
}
|
1181
|
+
|
1095
1182
|
/**
|
1096
1183
|
* @summary Gets the device count from the system
|
1097
1184
|
*
|
@@ -1107,6 +1194,22 @@ class AdapterBase extends EventEmitterCl {
|
|
1107
1194
|
return this.requestHandlerInst.iapGetDeviceCount(callback);
|
1108
1195
|
}
|
1109
1196
|
|
1197
|
+
/**
|
1198
|
+
* @summary Gets the device count from the system
|
1199
|
+
*
|
1200
|
+
* @function iapGetDeviceCountAuth
|
1201
|
+
* @param {Object} callOptions - Additional options used to make request, including auth headers, AWS service, or datatypes
|
1202
|
+
*
|
1203
|
+
* @param {getCallback} callback - callback function to return the result
|
1204
|
+
* (count) or the error
|
1205
|
+
*/
|
1206
|
+
iapGetDeviceCountAuth(callOptions, callback) {
|
1207
|
+
const origin = `${this.id}-adapterBase-iapGetDeviceCountAuth`;
|
1208
|
+
log.trace(origin);
|
1209
|
+
|
1210
|
+
return this.requestHandlerInst.iapGetDeviceCountAuth(callOptions, callback);
|
1211
|
+
}
|
1212
|
+
|
1110
1213
|
/* ********************************************** */
|
1111
1214
|
/* */
|
1112
1215
|
/* EXPOSES GENERIC HANDLER */
|
package/metadata.json
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "adapter-meraki",
|
3
|
+
"webName": "Adapter for Integration to Cisco Meraki",
|
3
4
|
"vendor": "Cisco",
|
4
5
|
"product": "Meraki",
|
5
6
|
"osVersion": [],
|
@@ -12,14 +13,19 @@
|
|
12
13
|
"2022.1.x",
|
13
14
|
"2023.1.x"
|
14
15
|
],
|
15
|
-
"method": "REST
|
16
|
+
"method": "REST",
|
16
17
|
"type": "Adapter",
|
17
|
-
"example": "",
|
18
18
|
"domains": [
|
19
19
|
"Inventory",
|
20
|
-
"SD-WAN
|
20
|
+
"SD-WAN (SASE)"
|
21
|
+
],
|
22
|
+
"tags": [
|
23
|
+
"Configuration Management"
|
24
|
+
],
|
25
|
+
"useCases": [
|
26
|
+
"Device Onboarding",
|
27
|
+
"Reboot Device"
|
21
28
|
],
|
22
|
-
"tags": [],
|
23
29
|
"deprecated": {
|
24
30
|
"isDeprecated": false
|
25
31
|
},
|
@@ -29,6 +35,10 @@
|
|
29
35
|
"npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-meraki",
|
30
36
|
"repoLink": "https://gitlab.com/itentialopensource/adapters/sd-wan/adapter-meraki",
|
31
37
|
"docLink": "https://docs.itential.com/opensource/docs/meraki",
|
38
|
+
"demoLinks": [
|
39
|
+
"https://www.itential.com/automations/sd-wan-branch-management",
|
40
|
+
"https://www.itential.com/solutions/sdwan-automation-orchestration/"
|
41
|
+
],
|
32
42
|
"faqLink": "https://docs.itential.com/opensource/docs/troubleshooting-an-adapter",
|
33
43
|
"contributeLink": "https://gitlab.com/itentialopensource/adapters/contributing-guide",
|
34
44
|
"issueLink": "https://itential.atlassian.net/servicedesk/customer/portals",
|
@@ -39,14 +49,17 @@
|
|
39
49
|
"https://developer.cisco.com/meraki/api-latest/"
|
40
50
|
]
|
41
51
|
},
|
52
|
+
"assets": [],
|
42
53
|
"relatedItems": {
|
43
54
|
"adapters": [],
|
44
55
|
"integrations": [],
|
45
56
|
"ecosystemApplications": [],
|
46
|
-
"
|
57
|
+
"workflowProjects": [
|
47
58
|
{
|
48
59
|
"name": "Meraki SD-WAN Management",
|
60
|
+
"webName": "Create a Meraki Network for an Organization",
|
49
61
|
"overview": "The SD-WAN Branch Management pre-built consists of a series of small modular workflows that creates a 'network' for a given organization and claims one or many access points in that network.",
|
62
|
+
"isDependency": false,
|
50
63
|
"versions": [
|
51
64
|
"^0.2.5"
|
52
65
|
],
|
@@ -55,7 +68,7 @@
|
|
55
68
|
"webLink": "https://www.itential.com/automations/sd-wan-branch-management/"
|
56
69
|
}
|
57
70
|
],
|
58
|
-
"
|
59
|
-
"
|
71
|
+
"transformationProjects": [],
|
72
|
+
"exampleProjects": []
|
60
73
|
}
|
61
74
|
}
|
package/package.json
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"name": "@itentialopensource/adapter-meraki",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.2.2",
|
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.8",
|
9
9
|
"adapterType": "http",
|
10
10
|
"scripts": {
|
11
11
|
"artifactize": "npm i && node utils/packModificationScript.js",
|
@@ -54,12 +54,12 @@
|
|
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.1.
|
57
|
+
"@itentialopensource/adapter-utils": "^5.1.7",
|
58
|
+
"acorn": "^8.10.0",
|
58
59
|
"ajv": "^8.12.0",
|
59
60
|
"axios": "^1.4.0",
|
60
61
|
"commander": "^11.0.0",
|
61
62
|
"dns-lookup-promise": "^1.0.4",
|
62
|
-
"esprima": "^4.0.1",
|
63
63
|
"fs-extra": "^11.1.1",
|
64
64
|
"json-query": "^2.2.2",
|
65
65
|
"mocha": "^10.2.0",
|
package/propertiesSchema.json
CHANGED
@@ -1063,6 +1063,38 @@
|
|
1063
1063
|
"description": "The method of the call to getDevicesFiltered",
|
1064
1064
|
"default": "GET"
|
1065
1065
|
},
|
1066
|
+
"pagination": {
|
1067
|
+
"type": "object",
|
1068
|
+
"description": "todo",
|
1069
|
+
"properties": {
|
1070
|
+
"offsetVar": {
|
1071
|
+
"type": "string",
|
1072
|
+
"description": "Name of variable that defines how to go to next set of results"
|
1073
|
+
},
|
1074
|
+
"limitVar": {
|
1075
|
+
"type": "string",
|
1076
|
+
"description": "Name of variable that defines the max results returned in a request"
|
1077
|
+
},
|
1078
|
+
"incrementBy": {
|
1079
|
+
"type": "string",
|
1080
|
+
"enum": [
|
1081
|
+
"limit",
|
1082
|
+
"page"
|
1083
|
+
],
|
1084
|
+
"description": "How to incremenet offset. Default limit",
|
1085
|
+
"default": "limit"
|
1086
|
+
},
|
1087
|
+
"requestLocation": {
|
1088
|
+
"type": "string",
|
1089
|
+
"enum": [
|
1090
|
+
"query",
|
1091
|
+
"body"
|
1092
|
+
],
|
1093
|
+
"description": "Where in request the pagination data goes",
|
1094
|
+
"default": "query"
|
1095
|
+
}
|
1096
|
+
}
|
1097
|
+
},
|
1066
1098
|
"query": {
|
1067
1099
|
"type": "object",
|
1068
1100
|
"description": "The json object with query parameters of the call to getDevicesFiltered",
|
@@ -1487,6 +1519,38 @@
|
|
1487
1519
|
"description": "The method of the call to getDevice",
|
1488
1520
|
"default": "GET"
|
1489
1521
|
},
|
1522
|
+
"pagination": {
|
1523
|
+
"type": "object",
|
1524
|
+
"description": "todo",
|
1525
|
+
"properties": {
|
1526
|
+
"offsetVar": {
|
1527
|
+
"type": "string",
|
1528
|
+
"description": "Name of variable that defines how to go to next set of results"
|
1529
|
+
},
|
1530
|
+
"limitVar": {
|
1531
|
+
"type": "string",
|
1532
|
+
"description": "Name of variable that defines the max results returned in a request"
|
1533
|
+
},
|
1534
|
+
"incrementBy": {
|
1535
|
+
"type": "string",
|
1536
|
+
"enum": [
|
1537
|
+
"limit",
|
1538
|
+
"page"
|
1539
|
+
],
|
1540
|
+
"description": "How to incremenet offset. Default limit",
|
1541
|
+
"default": "limit"
|
1542
|
+
},
|
1543
|
+
"requestLocation": {
|
1544
|
+
"type": "string",
|
1545
|
+
"enum": [
|
1546
|
+
"query",
|
1547
|
+
"body"
|
1548
|
+
],
|
1549
|
+
"description": "Where in request the pagination data goes",
|
1550
|
+
"default": "query"
|
1551
|
+
}
|
1552
|
+
}
|
1553
|
+
},
|
1490
1554
|
"query": {
|
1491
1555
|
"type": "object",
|
1492
1556
|
"description": "The json object with query parameters of the call to getDevice",
|
Binary file
|