@itentialopensource/adapter-meraki 1.4.2 → 1.4.4

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,4 +1,20 @@
1
1
 
2
+ ## 1.4.4 [02-13-2024]
3
+
4
+ * Add stub data for device broker calls
5
+
6
+ See merge request itentialopensource/adapters/sd-wan/adapter-meraki!38
7
+
8
+ ---
9
+
10
+ ## 1.4.3 [02-09-2024]
11
+
12
+ * updates for broker
13
+
14
+ See merge request itentialopensource/adapters/sd-wan/adapter-meraki!37
15
+
16
+ ---
17
+
2
18
  ## 1.4.2 [12-24-2023]
3
19
 
4
20
  * update metadata
@@ -18,6 +18,26 @@
18
18
  "type": "default",
19
19
  "key": "",
20
20
  "mockFile": ""
21
+ },
22
+ {
23
+ "type": "mockData=getDevicesFiltered",
24
+ "key": "",
25
+ "mockFile": "mockdatafiles/getDevicesFiltered.json"
26
+ },
27
+ {
28
+ "type": "mockData=getConfig",
29
+ "key": "",
30
+ "mockFile": "mockdatafiles/getConfig.json"
31
+ },
32
+ {
33
+ "type": "mockData=isAlive",
34
+ "key": "",
35
+ "mockFile": "mockdatafiles/isAlive.json"
36
+ },
37
+ {
38
+ "type": "mockData=getCount",
39
+ "key": "",
40
+ "mockFile": "mockdatafiles/getDevicesFiltered.json"
21
41
  }
22
42
  ]
23
43
  },
@@ -0,0 +1,18 @@
1
+ {
2
+ "lat": 37.4180951010362,
3
+ "lng": -122.098531723022,
4
+ "address": "",
5
+ "serial": "Q3AL-NE8E-R4K6",
6
+ "mac": "f8:9e: 28:da: 62:d6",
7
+ "lanIp": "172.000.0.5",
8
+ "tags": [
9
+ "recently-added"
10
+ ],
11
+ "url": "https: //meraki.com/Network/n/9rbT9dYb/manage/nodes/new_list/273358173922006",
12
+ "networkId": "L_627126248111357524",
13
+ "name": null,
14
+ "details": [],
15
+ "model": "MR44",
16
+ "firmware": "wireless-29-5-1",
17
+ "floorPlanId": null
18
+ }
@@ -0,0 +1,40 @@
1
+ [
2
+ {
3
+ "name": "",
4
+ "serial": "Q3AL-NE8E-R4K6",
5
+ "mac": "f8:9e: 28:da: 62:d6",
6
+ "networkId": "L_627126248111357524",
7
+ "productType": "wireless",
8
+ "model": "MR44",
9
+ "address": "",
10
+ "lat": 37.4180951010362,
11
+ "lng": -122.098531723022,
12
+ "notes": "",
13
+ "tags": [
14
+ "recently-added"
15
+ ],
16
+ "lanIp": "172.000.0.5",
17
+ "configurationUpdatedAt": "2024-02-09T14: 39: 37Z",
18
+ "firmware": "wireless-29-5-1",
19
+ "url": "https: //meraki.com/Network/n/9rbT9dYb/manage/nodes/new_list/273358173922006",
20
+ "details": []
21
+ },
22
+ {
23
+ "name": "",
24
+ "serial": "Q4AB-J4J8-6BJR",
25
+ "mac": "f8:9e:28:c4:8e:72",
26
+ "networkId": "L_627126248111357524",
27
+ "productType": "switch",
28
+ "model": "MS120-8LP",
29
+ "address": "",
30
+ "lat": 37.4180951010362,
31
+ "lng": -122.098531723022,
32
+ "notes": "",
33
+ "tags": [],
34
+ "lanIp": "172.000.0.4",
35
+ "configurationUpdatedAt": "2024-01-31T16:57:29Z",
36
+ "firmware": "switch-16-5",
37
+ "url": "https://meraki.com/Network/n/-CRi2cYb/manage/nodes/new_list/273358172491378",
38
+ "details": []
39
+ }
40
+ ]
@@ -0,0 +1,18 @@
1
+ {
2
+ "lat": 37.4180951010362,
3
+ "lng": -122.098531723022,
4
+ "address": "",
5
+ "serial": "Q3AL-NE8E-R4K6",
6
+ "mac": "f8:9e: 28:da: 62:d6",
7
+ "lanIp": "172.000.0.5",
8
+ "tags": [
9
+ "recently-added"
10
+ ],
11
+ "url": "https: //meraki.com/Network/n/9rbT9dYb/manage/nodes/new_list/273358173922006",
12
+ "networkId": "L_627126248111357524",
13
+ "name": null,
14
+ "details": [],
15
+ "model": "MR44",
16
+ "firmware": "wireless-29-5-1",
17
+ "floorPlanId": null
18
+ }
@@ -0,0 +1,40 @@
1
+ [
2
+ {
3
+ "name": "",
4
+ "serial": "Q3AL-NE8E-R4K6",
5
+ "mac": "f8:9e: 28:da: 62:d6",
6
+ "networkId": "L_627126248111357524",
7
+ "productType": "wireless",
8
+ "model": "MR44",
9
+ "address": "",
10
+ "lat": 37.4180951010362,
11
+ "lng": -122.098531723022,
12
+ "notes": "",
13
+ "tags": [
14
+ "recently-added"
15
+ ],
16
+ "lanIp": "172.000.0.5",
17
+ "configurationUpdatedAt": "2024-02-09T14: 39: 37Z",
18
+ "firmware": "wireless-29-5-1",
19
+ "url": "https: //meraki.com/Network/n/9rbT9dYb/manage/nodes/new_list/273358173922006",
20
+ "details": []
21
+ },
22
+ {
23
+ "name": "",
24
+ "serial": "Q4AB-J4J8-6BJR",
25
+ "mac": "f8:9e:28:c4:8e:72",
26
+ "networkId": "L_627126248111357524",
27
+ "productType": "switch",
28
+ "model": "MS120-8LP",
29
+ "address": "",
30
+ "lat": 37.4180951010362,
31
+ "lng": -122.098531723022,
32
+ "notes": "",
33
+ "tags": [],
34
+ "lanIp": "172.000.0.4",
35
+ "configurationUpdatedAt": "2024-01-31T16:57:29Z",
36
+ "firmware": "switch-16-5",
37
+ "url": "https://meraki.com/Network/n/-CRi2cYb/manage/nodes/new_list/273358172491378",
38
+ "details": []
39
+ }
40
+ ]
@@ -0,0 +1,18 @@
1
+ {
2
+ "lat": 37.4180951010362,
3
+ "lng": -122.098531723022,
4
+ "address": "",
5
+ "serial": "Q3AL-NE8E-R4K6",
6
+ "mac": "f8:9e: 28:da: 62:d6",
7
+ "lanIp": "172.000.0.5",
8
+ "tags": [
9
+ "recently-added"
10
+ ],
11
+ "url": "https: //meraki.com/Network/n/9rbT9dYb/manage/nodes/new_list/273358173922006",
12
+ "networkId": "L_627126248111357524",
13
+ "name": null,
14
+ "details": [],
15
+ "model": "MR44",
16
+ "firmware": "wireless-29-5-1",
17
+ "floorPlanId": null
18
+ }
@@ -37,9 +37,5 @@
37
37
  "external_name": "passwd"
38
38
  }
39
39
  },
40
- "required": [
41
- "username",
42
- "password"
43
- ],
44
40
  "definitions": {}
45
41
  }
package/metadata.json CHANGED
@@ -40,14 +40,26 @@
40
40
  "isDeprecated": false
41
41
  },
42
42
  "brokerSince": "1.1.0",
43
+ "authMethods": [
44
+ {
45
+ "type": "API Key",
46
+ "primary": true
47
+ }
48
+ ],
43
49
  "documentation": {
44
50
  "storeLink": "",
45
51
  "npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-meraki",
46
52
  "repoLink": "https://gitlab.com/itentialopensource/adapters/sd-wan/adapter-meraki",
47
53
  "docLink": "https://docs.itential.com/opensource/docs/meraki",
48
54
  "demoLinks": [
49
- "https://www.itential.com/automations/sd-wan-branch-management/",
50
- "https://www.itential.com/solutions/sdwan-automation-orchestration/"
55
+ {
56
+ "title": "Meraki SD-WAN Branch Management",
57
+ "link": "https://www.itential.com/automations/sd-wan-branch-management/"
58
+ },
59
+ {
60
+ "title": "Multi-Vendor SD-WAN",
61
+ "link": "https://www.itential.com/solutions/sdwan-automation-orchestration/"
62
+ }
51
63
  ],
52
64
  "trainingLinks": [],
53
65
  "faqLink": "https://docs.itential.com/opensource/docs/troubleshooting-an-adapter",
@@ -57,7 +69,10 @@
57
69
  "vendorLink": "https://www.cisco.com/",
58
70
  "productLink": "https://meraki.cisco.com/",
59
71
  "apiLinks": [
60
- "https://developer.cisco.com/meraki/api-latest/"
72
+ {
73
+ "title": "Meraki Dashboard API",
74
+ "link": "https://developer.cisco.com/meraki/api-latest/"
75
+ }
61
76
  ]
62
77
  },
63
78
  "assets": [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-meraki",
3
- "version": "1.4.2",
3
+ "version": "1.4.4",
4
4
  "description": "This adapter integrates with system described as: merakiDashboardApi.",
5
5
  "main": "adapter.js",
6
6
  "systemName": "Meraki",
@@ -44,7 +44,7 @@
44
44
  ],
45
45
  "license": "Apache-2.0",
46
46
  "engines": {
47
- "node": ">= 8.0.0",
47
+ "node": ">= 14.0.0",
48
48
  "npm": ">= 6.0.0"
49
49
  },
50
50
  "repository": {
@@ -54,10 +54,10 @@
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.3.0",
57
+ "@itentialopensource/adapter-utils": "^5.3.7",
58
58
  "acorn": "^8.10.0",
59
59
  "ajv": "^8.12.0",
60
- "axios": "^1.6.2",
60
+ "axios": "^1.6.7",
61
61
  "commander": "^11.0.0",
62
62
  "dns-lookup-promise": "^1.0.4",
63
63
  "fs-extra": "^11.1.1",
@@ -945,6 +945,11 @@
945
945
  "devicebroker": {
946
946
  "type": "object",
947
947
  "properties": {
948
+ "enabled": {
949
+ "type": "boolean",
950
+ "description": "Whether or not the device broker calls have been mapped",
951
+ "default": false
952
+ },
948
953
  "getDevice": {
949
954
  "type": "array",
950
955
  "description": "Broker call(s) to getDevice",
Binary file
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "1.4.1",
3
- "configLines": 63063,
2
+ "version": "1.4.3",
3
+ "configLines": 63068,
4
4
  "scriptLines": 1783,
5
5
  "codeLines": 53869,
6
6
  "testLines": 43445,
@@ -22,8 +22,8 @@
22
22
  "token_timeout": 1800000,
23
23
  "token_cache": "local",
24
24
  "invalid_token_error": 401,
25
- "auth_field": "header.headers.Authorization",
26
- "auth_field_format": "Bearer {token}",
25
+ "auth_field": "header.headers.X-Cisco-Meraki-API-Key",
26
+ "auth_field_format": "{token}",
27
27
  "auth_logging": false,
28
28
  "client_id": "",
29
29
  "client_secret": "",
@@ -115,6 +115,7 @@
115
115
  }
116
116
  },
117
117
  "devicebroker": {
118
+ "enabled": true,
118
119
  "getDevice": [
119
120
  {
120
121
  "path": "/organizations/{orgID}/networks/{networkId}/devices/{serial}",
@@ -316,7 +316,7 @@ describe('[unit] Meraki Adapter Test', () => {
316
316
  assert.notEqual(null, packageDotJson.dependencies);
317
317
  assert.notEqual('', packageDotJson.dependencies);
318
318
  assert.equal('^8.12.0', packageDotJson.dependencies.ajv);
319
- assert.equal('^1.6.2', packageDotJson.dependencies.axios);
319
+ assert.equal('^1.6.7', packageDotJson.dependencies.axios);
320
320
  assert.equal('^11.0.0', packageDotJson.dependencies.commander);
321
321
  assert.equal('^11.1.1', packageDotJson.dependencies['fs-extra']);
322
322
  assert.equal('^10.2.0', packageDotJson.dependencies.mocha);