@itentialopensource/adapter-kentik 0.2.4 → 0.2.5

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.
@@ -0,0 +1,9 @@
1
+ {
2
+ "ComplianceEntries": [
3
+ {
4
+ "name": "Compliance Summary",
5
+ "numInvalidProjects": 0,
6
+ "numValidProjects": 0
7
+ }
8
+ ]
9
+ }
@@ -0,0 +1,5 @@
1
+ ---------------------------------------------------------------------------------------------
2
+ **** Project Compliance Summary ****
3
+ 0 project(s) are not valid
4
+ 0 project(s) are valid
5
+ ---------------------------------------------------------------------------------------------
package/metadata.json CHANGED
@@ -27,20 +27,46 @@
27
27
  "isDeprecated": false
28
28
  },
29
29
  "brokerSince": "",
30
+ "authMethods": [
31
+ {
32
+ "type": "API Key",
33
+ "primary": true
34
+ }
35
+ ],
30
36
  "documentation": {
31
37
  "storeLink": "",
32
38
  "npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-kentik",
33
- "repoLink": "https://gitlab.com/itentialopensource/adapters/observability/adapter-kentik",
39
+ "repoLink": "https://gitlab.com/itentialopensource/adapters/adapter-kentik",
34
40
  "docLink": "",
35
- "demoLinks": [],
36
- "trainingLinks": [],
41
+ "demoLinks": [
42
+ {
43
+ "title": "Itential + Kentik: Integrated Network Observability & Automation",
44
+ "link": "https://www.itential.com/resource/demo/itential-kentik-integrated-network-observability-automation/"
45
+ },
46
+ {
47
+ "title": "Itential + Kentik: Integrating Observability with Automation for Closed-Loop Remediation of Infrastructure Events",
48
+ "link": "https://www.itential.com/blog/company/hybrid-cloud-automation/itential-kentik-integrating-observability-with-automation-for-closed-loop-remediation-of-infrastructure-events/"
49
+ }
50
+ ],
51
+ "trainingLinks": [
52
+ {
53
+ "title": "Itential Academy",
54
+ "link": "https://www.itential.com/itential-academy/"
55
+ }
56
+ ],
37
57
  "faqLink": "https://docs.itential.com/opensource/docs/troubleshooting-an-adapter",
38
58
  "contributeLink": "https://gitlab.com/itentialopensource/adapters/contributing-guide",
39
59
  "issueLink": "https://itential.atlassian.net/servicedesk/customer/portals",
40
60
  "webLink": "https://www.itential.com/adapters/kentik/",
41
- "vendorLink": "",
42
- "productLink": "",
43
- "apiLinks": []
61
+ "vendorLink": "https://www.kentik.com/",
62
+ "productLink": "https://www.kentik.com/",
63
+ "apiLinks": [
64
+ {
65
+ "title": "Kentik APIs",
66
+ "link": "https://kb.kentik.com/v0/Ab09.htm",
67
+ "public": true
68
+ }
69
+ ]
44
70
  },
45
71
  "assets": [],
46
72
  "relatedItems": {
@@ -50,11 +76,5 @@
50
76
  "workflowProjects": [],
51
77
  "transformationProjects": [],
52
78
  "exampleProjects": []
53
- },
54
- "authMethods": [
55
- {
56
- "type": "API Key",
57
- "primary": true
58
- }
59
- ]
79
+ }
60
80
  }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-kentik",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "This adapter integrates with system described as: kentik apis",
5
5
  "main": "adapter.js",
6
6
  "wizardVersion": "2.44.7",
7
- "engineVersion": "1.67.14",
7
+ "engineVersion": "1.67.20",
8
8
  "adapterType": "http",
9
9
  "scripts": {
10
10
  "artifactize": "npm i && node utils/packModificationScript.js",
@@ -15,7 +15,6 @@
15
15
  "test:baseunit": "mocha test/unit/adapterBaseTestUnit.js --LOG=error",
16
16
  "test:unit": "mocha test/unit/adapterTestUnit.js --LOG=error",
17
17
  "test:integration": "mocha test/integration/adapterTestIntegration.js --LOG=error",
18
- "test:cover": "nyc --reporter html --reporter text mocha --reporter dot test/*",
19
18
  "test": "npm run test:baseunit && npm run test:unit && npm run test:integration",
20
19
  "adapter:install": "npm i && node utils/tbScript.js install",
21
20
  "adapter:checkMigrate": "node utils/checkMigrate.js",
@@ -43,17 +42,17 @@
43
42
  ],
44
43
  "license": "Apache-2.0",
45
44
  "engines": {
46
- "node": ">= 8.0.0",
45
+ "node": ">= 14.0.0",
47
46
  "npm": ">= 6.0.0"
48
47
  },
49
48
  "repository": {
50
49
  "type": "git",
51
- "url": "git@gitlab.com:itentialopensource/adapters/observability/adapter-kentik.git"
50
+ "url": "git@gitlab.com:itentialopensource/adapters/adapter-kentik.git"
52
51
  },
53
52
  "author": "Itential",
54
- "homepage": "https://gitlab.com/itentialopensource/adapters/observability/adapter-kentik#readme",
53
+ "homepage": "https://gitlab.com/itentialopensource/adapters/adapter-kentik#readme",
55
54
  "dependencies": {
56
- "@itentialopensource/adapter-utils": "^5.3.10",
55
+ "@itentialopensource/adapter-utils": "^5.5.0",
57
56
  "acorn": "^8.10.0",
58
57
  "ajv": "^8.12.0",
59
58
  "axios": "^1.6.8",
@@ -64,7 +63,6 @@
64
63
  "mocha": "^10.3.0",
65
64
  "mocha-param": "^2.0.1",
66
65
  "mongodb": "^4.16.0",
67
- "nyc": "^15.1.0",
68
66
  "ping": "^0.4.4",
69
67
  "prompts": "^2.4.2",
70
68
  "readline-sync": "^1.4.10",
@@ -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,10 +1,10 @@
1
1
  {
2
- "version": "0.2.0",
3
- "configLines": 11976,
2
+ "version": "0.2.4",
3
+ "configLines": 11981,
4
4
  "scriptLines": 1783,
5
5
  "codeLines": 8801,
6
- "testLines": 9176,
6
+ "testLines": 9175,
7
7
  "testCases": 394,
8
- "totalCodeLines": 19760,
8
+ "totalCodeLines": 19759,
9
9
  "wfTasks": 106
10
10
  }
@@ -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": 16
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": 21
33
+ },
34
+ {
35
+ "owner": "packageJson",
36
+ "description": "Runtime Library dependency",
37
+ "value": "^5.5.0"
38
+ },
39
+ {
40
+ "owner": "propertiesSchemaJson",
41
+ "description": "Adapter properties defined in the propertiesSchema file",
42
+ "value": 78
43
+ },
44
+ {
45
+ "owner": "markdown",
46
+ "description": "Number of lines in the README.md",
47
+ "value": 344
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": 647
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": 3924
78
+ },
79
+ {
80
+ "owner": "unitTestJS",
81
+ "description": "Number of unit tests",
82
+ "value": 234
83
+ },
84
+ {
85
+ "owner": "integrationTestJS",
86
+ "description": "Number of lines of code in integration tests",
87
+ "value": 3999
88
+ },
89
+ {
90
+ "owner": "integrationTestJS",
91
+ "description": "Number of integration tests",
92
+ "value": 90
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": 9376
108
+ },
109
+ {
110
+ "owner": "Overall",
111
+ "description": "Total Tests",
112
+ "value": 324
113
+ },
114
+ {
115
+ "owner": "Overall",
116
+ "description": "Total Files",
117
+ "value": 6
118
+ }
119
+ ]
120
+ }
@@ -124,30 +124,32 @@
124
124
  }
125
125
  },
126
126
  "devicebroker": {
127
+ "enabled": false,
127
128
  "getDevice": [
128
129
  {
129
- "path": "/get/devices/{id}",
130
+ "path": "/not/mapped",
130
131
  "method": "GET",
131
132
  "query": {},
132
133
  "body": {},
133
134
  "headers": {},
134
135
  "handleFailure": "ignore",
135
136
  "requestFields": {
136
- "id": "name"
137
+ "insample": "{port}"
137
138
  },
138
139
  "responseDatakey": "",
139
140
  "responseFields": {
140
- "name": "host",
141
- "ostype": "os",
142
- "ostypePrefix": "system-",
143
- "ipaddress": "attributes.ipaddr",
144
- "port": "443"
141
+ "name": "{this}{||}{that}",
142
+ "ostype": "{osfield}",
143
+ "ostypePrefix": "meraki-",
144
+ "port": "{port}",
145
+ "ipaddress": "{ip_addr}",
146
+ "serial" : "{serial}"
145
147
  }
146
148
  }
147
149
  ],
148
150
  "getDevicesFiltered": [
149
151
  {
150
- "path": "/get/devices",
152
+ "path": "/not/mapped",
151
153
  "method": "GET",
152
154
  "pagination": {
153
155
  "offsetVar": "",
@@ -162,42 +164,44 @@
162
164
  "requestFields": {},
163
165
  "responseDatakey": "",
164
166
  "responseFields": {
165
- "name": "host",
166
- "ostype": "os",
167
- "ostypePrefix": "system-",
168
- "ipaddress": "attributes.ipaddr",
169
- "port": "443"
167
+ "name": "{this}{||}{that}",
168
+ "ostype": "{osfield}",
169
+ "ostypePrefix": "meraki-",
170
+ "port": "{port}",
171
+ "ipaddress": "{ip_addr}",
172
+ "serial" : "{serial}",
173
+ "id": "{myid}"
170
174
  }
171
175
  }
172
176
  ],
173
177
  "isAlive": [
174
178
  {
175
- "path": "/get/devices/{id}/status",
179
+ "path": "/not/mapped/{devID}",
176
180
  "method": "GET",
177
181
  "query": {},
178
182
  "body": {},
179
183
  "headers": {},
180
184
  "handleFailure": "ignore",
181
185
  "requestFields": {
182
- "id": "name"
186
+ "devID": "{id}"
183
187
  },
184
188
  "responseDatakey": "",
185
189
  "responseFields": {
186
- "status": "status",
187
- "statusValue": "online"
190
+ "status": "return2xx",
191
+ "statusValue": "AD.200"
188
192
  }
189
193
  }
190
194
  ],
191
195
  "getConfig": [
192
196
  {
193
- "path": "/get/devices/{id}/configPart1",
197
+ "path": "/not/mapped/{devID}",
194
198
  "method": "GET",
195
199
  "query": {},
196
200
  "body": {},
197
201
  "headers": {},
198
202
  "handleFailure": "ignore",
199
203
  "requestFields": {
200
- "id": "name"
204
+ "devID": "{id}"
201
205
  },
202
206
  "responseDatakey": "",
203
207
  "responseFields": {}
@@ -205,7 +209,7 @@
205
209
  ],
206
210
  "getCount": [
207
211
  {
208
- "path": "/get/devices",
212
+ "path": "/not/mapped",
209
213
  "method": "GET",
210
214
  "query": {},
211
215
  "body": {},
@@ -221,15 +225,15 @@
221
225
  "enabled": false,
222
226
  "entities": [
223
227
  {
224
- "entityType": "",
225
- "frequency": 1440,
228
+ "entityType": "device",
229
+ "frequency": 3600,
226
230
  "flushOnFail": false,
227
- "limit": 1000,
231
+ "limit": 10000,
228
232
  "retryAttempts": 5,
229
233
  "sort": true,
230
234
  "populate": [
231
235
  {
232
- "path": "",
236
+ "path": "/not/mapped",
233
237
  "method": "GET",
234
238
  "pagination": {
235
239
  "offsetVar": "",
@@ -243,7 +247,15 @@
243
247
  "handleFailure": "ignore",
244
248
  "requestFields": {},
245
249
  "responseDatakey": "",
246
- "responseFields": {}
250
+ "responseFields": {
251
+ "name": "{this}{||}{that}",
252
+ "ostype": "{osfield}",
253
+ "ostypePrefix": "meraki-",
254
+ "port": "{port}",
255
+ "ipaddress": "{ip_addr}",
256
+ "serial" : "{serial}",
257
+ "id": "{myid}"
258
+ }
247
259
  }
248
260
  ],
249
261
  "cachedTasks": [
@@ -46,6 +46,7 @@ samProps.ssl.accept_invalid_cert = false;
46
46
  if (samProps.request.attempt_timeout < 30000) {
47
47
  samProps.request.attempt_timeout = 30000;
48
48
  }
49
+ samProps.devicebroker.enabled = true;
49
50
  const attemptTimeout = samProps.request.attempt_timeout;
50
51
  const { stub } = samProps;
51
52
 
@@ -284,7 +284,6 @@ describe('[unit] Kentik Adapter Test', () => {
284
284
  assert.equal('mocha test/unit/adapterBaseTestUnit.js --LOG=error', packageDotJson.scripts['test:baseunit']);
285
285
  assert.equal('mocha test/unit/adapterTestUnit.js --LOG=error', packageDotJson.scripts['test:unit']);
286
286
  assert.equal('mocha test/integration/adapterTestIntegration.js --LOG=error', packageDotJson.scripts['test:integration']);
287
- assert.equal('nyc --reporter html --reporter text mocha --reporter dot test/*', packageDotJson.scripts['test:cover']);
288
287
  assert.equal('npm run test:baseunit && npm run test:unit && npm run test:integration', packageDotJson.scripts.test);
289
288
  assert.equal('npm publish --registry=https://registry.npmjs.org --access=public', packageDotJson.scripts.deploy);
290
289
  assert.equal('npm run deploy', packageDotJson.scripts.build);
@@ -321,7 +320,6 @@ describe('[unit] Kentik Adapter Test', () => {
321
320
  assert.equal('^11.1.1', packageDotJson.dependencies['fs-extra']);
322
321
  assert.equal('^10.3.0', packageDotJson.dependencies.mocha);
323
322
  assert.equal('^2.0.1', packageDotJson.dependencies['mocha-param']);
324
- assert.equal('^15.1.0', packageDotJson.dependencies.nyc);
325
323
  assert.equal('^0.4.4', packageDotJson.dependencies.ping);
326
324
  assert.equal('^1.4.10', packageDotJson.dependencies['readline-sync']);
327
325
  assert.equal('^7.5.3', packageDotJson.dependencies.semver);
@@ -563,7 +561,7 @@ describe('[unit] Kentik Adapter Test', () => {
563
561
  log.error(`Adapter Exception: ${error}`);
564
562
  done(error);
565
563
  }
566
- });
564
+ }).timeout(attemptTimeout);
567
565
  });
568
566
 
569
567
  describe('propertiesSchema.json', () => {