@itentialopensource/adapter-paragon_active_assurance 0.2.4 → 0.3.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.
package/metadata.json CHANGED
@@ -28,13 +28,24 @@
28
28
  "isDeprecated": false
29
29
  },
30
30
  "brokerSince": "",
31
+ "authMethods": [
32
+ {
33
+ "type": "Multi Factor Auth",
34
+ "primary": true
35
+ }
36
+ ],
31
37
  "documentation": {
32
38
  "storeLink": "",
33
39
  "npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-paragon_active_assurance",
34
- "repoLink": "https://gitlab.com/itentialopensource/adapters/telemetry-analytics/adapter-paragon_active_assurance",
40
+ "repoLink": "https://gitlab.com/itentialopensource/adapters/adapter-paragon_active_assurance",
35
41
  "docLink": "https://docs.itential.com/opensource/docs/paragon-active-assurance",
36
42
  "demoLinks": [],
37
- "trainingLinks": [],
43
+ "trainingLinks": [
44
+ {
45
+ "title": "Itential Academy",
46
+ "link": "https://www.itential.com/itential-academy/"
47
+ }
48
+ ],
38
49
  "faqLink": "https://docs.itential.com/opensource/docs/troubleshooting-an-adapter",
39
50
  "contributeLink": "https://gitlab.com/itentialopensource/adapters/contributing-guide",
40
51
  "issueLink": "https://itential.atlassian.net/servicedesk/customer/portals",
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-paragon_active_assurance",
3
- "version": "0.2.4",
3
+ "version": "0.3.0",
4
4
  "description": "This adapter integrates with system described as: Juniper Paragon Active Assurance.",
5
5
  "main": "adapter.js",
6
6
  "systemName": "Juniper Paragon Active Assurance",
7
7
  "wizardVersion": "2.44.7",
8
- "engineVersion": "1.67.14",
8
+ "engineVersion": "1.67.19",
9
9
  "adapterType": "http",
10
10
  "scripts": {
11
11
  "artifactize": "npm i && node utils/packModificationScript.js",
@@ -16,7 +16,6 @@
16
16
  "test:baseunit": "mocha test/unit/adapterBaseTestUnit.js --LOG=error",
17
17
  "test:unit": "mocha test/unit/adapterTestUnit.js --LOG=error",
18
18
  "test:integration": "mocha test/integration/adapterTestIntegration.js --LOG=error",
19
- "test:cover": "nyc --reporter html --reporter text mocha --reporter dot test/*",
20
19
  "test": "npm run test:baseunit && npm run test:unit && npm run test:integration",
21
20
  "adapter:install": "npm i && node utils/tbScript.js install",
22
21
  "adapter:checkMigrate": "node utils/checkMigrate.js",
@@ -45,15 +44,15 @@
45
44
  ],
46
45
  "license": "Apache-2.0",
47
46
  "engines": {
48
- "node": ">= 8.0.0",
47
+ "node": ">= 14.0.0",
49
48
  "npm": ">= 6.0.0"
50
49
  },
51
50
  "repository": {
52
51
  "type": "git",
53
- "url": "git@gitlab.com:itentialopensource/adapters/telemetry-analytics/adapter-paragon_active_assurance.git"
52
+ "url": "git@gitlab.com:itentialopensource/adapters/adapter-paragon_active_assurance.git"
54
53
  },
55
54
  "author": "Itential",
56
- "homepage": "https://gitlab.com/itentialopensource/adapters/telemetry-analytics/adapter-paragon_active_assurance#readme",
55
+ "homepage": "https://gitlab.com/itentialopensource/adapters/adapter-paragon_active_assurance#readme",
57
56
  "dependencies": {
58
57
  "@itentialopensource/adapter-utils": "^5.3.10",
59
58
  "acorn": "^8.10.0",
@@ -66,7 +65,6 @@
66
65
  "mocha": "^10.3.0",
67
66
  "mocha-param": "^2.0.1",
68
67
  "mongodb": "^4.16.0",
69
- "nyc": "^15.1.0",
70
68
  "ping": "^0.4.4",
71
69
  "prompts": "^2.4.2",
72
70
  "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.1.2",
3
- "configLines": 12507,
2
+ "version": "0.2.4",
3
+ "configLines": 12512,
4
4
  "scriptLines": 1783,
5
5
  "codeLines": 13458,
6
- "testLines": 11197,
6
+ "testLines": 11196,
7
7
  "testCases": 571,
8
- "totalCodeLines": 26438,
8
+ "totalCodeLines": 26437,
9
9
  "wfTasks": 141
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.3.10"
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": 6163
78
+ },
79
+ {
80
+ "owner": "unitTestJS",
81
+ "description": "Number of unit tests",
82
+ "value": 376
83
+ },
84
+ {
85
+ "owner": "integrationTestJS",
86
+ "description": "Number of lines of code in integration tests",
87
+ "value": 3781
88
+ },
89
+ {
90
+ "owner": "integrationTestJS",
91
+ "description": "Number of integration tests",
92
+ "value": 125
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": 11397
108
+ },
109
+ {
110
+ "owner": "Overall",
111
+ "description": "Total Tests",
112
+ "value": 501
113
+ },
114
+ {
115
+ "owner": "Overall",
116
+ "description": "Total Files",
117
+ "value": 6
118
+ }
119
+ ]
120
+ }
@@ -142,30 +142,32 @@
142
142
  }
143
143
  },
144
144
  "devicebroker": {
145
+ "enabled": false,
145
146
  "getDevice": [
146
147
  {
147
- "path": "/get/devices/{id}",
148
+ "path": "/not/mapped",
148
149
  "method": "GET",
149
150
  "query": {},
150
151
  "body": {},
151
152
  "headers": {},
152
153
  "handleFailure": "ignore",
153
154
  "requestFields": {
154
- "id": "name"
155
+ "insample": "{port}"
155
156
  },
156
157
  "responseDatakey": "",
157
158
  "responseFields": {
158
- "name": "host",
159
- "ostype": "os",
160
- "ostypePrefix": "system-",
161
- "ipaddress": "attributes.ipaddr",
162
- "port": "443"
159
+ "name": "{this}{||}{that}",
160
+ "ostype": "{osfield}",
161
+ "ostypePrefix": "meraki-",
162
+ "port": "{port}",
163
+ "ipaddress": "{ip_addr}",
164
+ "serial" : "{serial}"
163
165
  }
164
166
  }
165
167
  ],
166
168
  "getDevicesFiltered": [
167
169
  {
168
- "path": "/get/devices",
170
+ "path": "/not/mapped",
169
171
  "method": "GET",
170
172
  "pagination": {
171
173
  "offsetVar": "",
@@ -180,42 +182,44 @@
180
182
  "requestFields": {},
181
183
  "responseDatakey": "",
182
184
  "responseFields": {
183
- "name": "host",
184
- "ostype": "os",
185
- "ostypePrefix": "system-",
186
- "ipaddress": "attributes.ipaddr",
187
- "port": "443"
185
+ "name": "{this}{||}{that}",
186
+ "ostype": "{osfield}",
187
+ "ostypePrefix": "meraki-",
188
+ "port": "{port}",
189
+ "ipaddress": "{ip_addr}",
190
+ "serial" : "{serial}",
191
+ "id": "{myid}"
188
192
  }
189
193
  }
190
194
  ],
191
195
  "isAlive": [
192
196
  {
193
- "path": "/get/devices/{id}/status",
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": {
204
- "status": "status",
205
- "statusValue": "online"
208
+ "status": "return2xx",
209
+ "statusValue": "AD.200"
206
210
  }
207
211
  }
208
212
  ],
209
213
  "getConfig": [
210
214
  {
211
- "path": "/get/devices/{id}/configPart1",
215
+ "path": "/not/mapped/{devID}",
212
216
  "method": "GET",
213
217
  "query": {},
214
218
  "body": {},
215
219
  "headers": {},
216
220
  "handleFailure": "ignore",
217
221
  "requestFields": {
218
- "id": "name"
222
+ "devID": "{id}"
219
223
  },
220
224
  "responseDatakey": "",
221
225
  "responseFields": {}
@@ -223,7 +227,7 @@
223
227
  ],
224
228
  "getCount": [
225
229
  {
226
- "path": "/get/devices",
230
+ "path": "/not/mapped",
227
231
  "method": "GET",
228
232
  "query": {},
229
233
  "body": {},
@@ -239,15 +243,15 @@
239
243
  "enabled": false,
240
244
  "entities": [
241
245
  {
242
- "entityType": "",
243
- "frequency": 1440,
246
+ "entityType": "device",
247
+ "frequency": 3600,
244
248
  "flushOnFail": false,
245
- "limit": 1000,
249
+ "limit": 10000,
246
250
  "retryAttempts": 5,
247
251
  "sort": true,
248
252
  "populate": [
249
253
  {
250
- "path": "",
254
+ "path": "/not/mapped",
251
255
  "method": "GET",
252
256
  "pagination": {
253
257
  "offsetVar": "",
@@ -261,7 +265,15 @@
261
265
  "handleFailure": "ignore",
262
266
  "requestFields": {},
263
267
  "responseDatakey": "",
264
- "responseFields": {}
268
+ "responseFields": {
269
+ "name": "{this}{||}{that}",
270
+ "ostype": "{osfield}",
271
+ "ostypePrefix": "meraki-",
272
+ "port": "{port}",
273
+ "ipaddress": "{ip_addr}",
274
+ "serial" : "{serial}",
275
+ "id": "{myid}"
276
+ }
265
277
  }
266
278
  ],
267
279
  "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] Paragon_active_assurance 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] Paragon_active_assurance 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] Paragon_active_assurance Adapter Test', () => {
563
561
  log.error(`Adapter Exception: ${error}`);
564
562
  done(error);
565
563
  }
566
- }).timeout(attemptTimeout);
564
+ });
567
565
  });
568
566
 
569
567
  describe('propertiesSchema.json', () => {