@itentialopensource/adapter-netbrain 1.3.1 → 1.3.3
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/CHANGELOG.md +16 -0
- package/TAB2.md +1 -1
- package/metadata.json +8 -5
- package/package.json +6 -6
- package/refs?service=git-upload-pack +0 -0
- package/report/adapterInfo.json +4 -4
- package/sampleProperties.json +4 -4
- package/test/integration/adapterTestConnectivity.js +0 -24
- package/test/integration/adapterTestIntegration.js +19 -15
- package/test/unit/adapterTestUnit.js +15 -11
- package/compliance-report.json +0 -9
- package/compliance-report.txt +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
|
|
2
|
+
## 1.3.3 [09-12-2024]
|
|
3
|
+
|
|
4
|
+
* add workshop and fix vulnerabilities
|
|
5
|
+
|
|
6
|
+
See merge request itentialopensource/adapters/adapter-netbrain!25
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 1.3.2 [08-15-2024]
|
|
11
|
+
|
|
12
|
+
* Changes made at 2024.08.14_19:54PM
|
|
13
|
+
|
|
14
|
+
See merge request itentialopensource/adapters/adapter-netbrain!24
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
2
18
|
## 1.3.1 [08-07-2024]
|
|
3
19
|
|
|
4
20
|
* Changes made at 2024.08.06_22:00PM
|
package/TAB2.md
CHANGED
package/metadata.json
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adapter-netbrain",
|
|
3
3
|
"webName": "Adapter for Integration to NetBrain",
|
|
4
|
+
"supportLevel": "community",
|
|
4
5
|
"vendor": "NetBrain",
|
|
5
6
|
"product": "NetBrain",
|
|
7
|
+
"techAlliance": false,
|
|
6
8
|
"osVersion": [],
|
|
7
9
|
"apiVersions": [],
|
|
8
10
|
"iapVersions": [
|
|
@@ -29,7 +31,7 @@
|
|
|
29
31
|
"Determine configuration drift",
|
|
30
32
|
"Golden Configuration",
|
|
31
33
|
"Port/VLAN Configuration",
|
|
32
|
-
"EVPN &
|
|
34
|
+
"EVPN & VXLAN",
|
|
33
35
|
"Port Turn-up",
|
|
34
36
|
"Assign Network & IP",
|
|
35
37
|
"Cloud Managed Networks",
|
|
@@ -49,7 +51,7 @@
|
|
|
49
51
|
"storeLink": "",
|
|
50
52
|
"npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-netbrain",
|
|
51
53
|
"repoLink": "https://gitlab.com/itentialopensource/adapters/adapter-netbrain",
|
|
52
|
-
"docLink": "https://
|
|
54
|
+
"docLink": "https://gitlab.com/itentialopensource/adapters/adapter-netbrain/-/blob/master/README.md?ref_type=heads",
|
|
53
55
|
"demoLinks": [],
|
|
54
56
|
"trainingLinks": [
|
|
55
57
|
{
|
|
@@ -69,7 +71,9 @@
|
|
|
69
71
|
"link": "https://www.netbraintech.com/docs/ie101/help/restful-api.htm",
|
|
70
72
|
"public": false
|
|
71
73
|
}
|
|
72
|
-
]
|
|
74
|
+
],
|
|
75
|
+
"workshopLinks": [],
|
|
76
|
+
"workshopHomePage": "https://www.itential.com/get-started/"
|
|
73
77
|
},
|
|
74
78
|
"assets": [],
|
|
75
79
|
"relatedItems": {
|
|
@@ -79,6 +83,5 @@
|
|
|
79
83
|
"workflowProjects": [],
|
|
80
84
|
"transformationProjects": [],
|
|
81
85
|
"exampleProjects": []
|
|
82
|
-
}
|
|
83
|
-
"supportLevel": "community"
|
|
86
|
+
}
|
|
84
87
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itentialopensource/adapter-netbrain",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.3",
|
|
4
4
|
"description": "This adapter integrates with system described as: netbrainRestfulApi.",
|
|
5
5
|
"main": "adapter.js",
|
|
6
6
|
"wizardVersion": "2.44.7",
|
|
7
|
-
"engineVersion": "1.
|
|
7
|
+
"engineVersion": "1.68.2",
|
|
8
8
|
"adapterType": "http",
|
|
9
9
|
"scripts": {
|
|
10
10
|
"artifactize": "npm i && node utils/packModificationScript.js",
|
|
@@ -53,22 +53,22 @@
|
|
|
53
53
|
"author": "Itential",
|
|
54
54
|
"homepage": "https://gitlab.com/itentialopensource/adapters/adapter-netbrain#readme",
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@itentialopensource/adapter-utils": "^5.
|
|
56
|
+
"@itentialopensource/adapter-utils": "^5.8.0",
|
|
57
57
|
"acorn": "^8.12.1",
|
|
58
58
|
"ajv": "^8.17.1",
|
|
59
|
-
"axios": "^1.7.
|
|
59
|
+
"axios": "^1.7.4",
|
|
60
60
|
"commander": "^11.0.0",
|
|
61
61
|
"dns-lookup-promise": "^1.0.4",
|
|
62
62
|
"fs-extra": "^11.2.0",
|
|
63
63
|
"json-query": "^2.2.2",
|
|
64
|
-
"mocha": "^10.7.
|
|
64
|
+
"mocha": "^10.7.3",
|
|
65
65
|
"mocha-param": "^2.0.1",
|
|
66
66
|
"mongodb": "^4.16.0",
|
|
67
67
|
"ping": "^0.4.4",
|
|
68
68
|
"prompts": "^2.4.2",
|
|
69
69
|
"readline-sync": "^1.4.10",
|
|
70
70
|
"semver": "^7.6.3",
|
|
71
|
-
"winston": "^3.
|
|
71
|
+
"winston": "^3.14.2"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"chai": "^4.3.7",
|
|
Binary file
|
package/report/adapterInfo.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.2
|
|
2
|
+
"version": "1.3.2",
|
|
3
3
|
"configLines": 6006,
|
|
4
4
|
"scriptLines": 1783,
|
|
5
5
|
"codeLines": 10269,
|
|
6
|
-
"testLines":
|
|
7
|
-
"testCases":
|
|
8
|
-
"totalCodeLines":
|
|
6
|
+
"testLines": 8237,
|
|
7
|
+
"testCases": 404,
|
|
8
|
+
"totalCodeLines": 20289,
|
|
9
9
|
"wfTasks": 113
|
|
10
10
|
}
|
package/sampleProperties.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "Adapter-netbrain",
|
|
3
3
|
"type": "Netbrain",
|
|
4
4
|
"properties": {
|
|
5
|
-
"host": "
|
|
5
|
+
"host": "localhost",
|
|
6
6
|
"port": 443,
|
|
7
7
|
"choosepath": "",
|
|
8
8
|
"base_path": "/ServicesAPI/API",
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"ostypePrefix": "meraki-",
|
|
138
138
|
"port": "{port}",
|
|
139
139
|
"ipaddress": "{ip_addr}",
|
|
140
|
-
"serial"
|
|
140
|
+
"serial": "{serial}"
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
],
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
"ostypePrefix": "meraki-",
|
|
164
164
|
"port": "{port}",
|
|
165
165
|
"ipaddress": "{ip_addr}",
|
|
166
|
-
"serial"
|
|
166
|
+
"serial": "{serial}",
|
|
167
167
|
"id": "{myid}"
|
|
168
168
|
}
|
|
169
169
|
}
|
|
@@ -247,7 +247,7 @@
|
|
|
247
247
|
"ostypePrefix": "meraki-",
|
|
248
248
|
"port": "{port}",
|
|
249
249
|
"ipaddress": "{ip_addr}",
|
|
250
|
-
"serial"
|
|
250
|
+
"serial": "{serial}",
|
|
251
251
|
"id": "{myid}"
|
|
252
252
|
}
|
|
253
253
|
}
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
/* eslint no-unused-vars: warn */
|
|
5
5
|
|
|
6
6
|
const assert = require('assert');
|
|
7
|
-
const http = require('http');
|
|
8
7
|
const https = require('https');
|
|
9
8
|
const mocha = require('mocha');
|
|
10
9
|
const ping = require('ping');
|
|
@@ -53,29 +52,6 @@ describe('[integration] Adapter Test', () => {
|
|
|
53
52
|
});
|
|
54
53
|
});
|
|
55
54
|
|
|
56
|
-
it('Support HTTP on port 80', (done) => {
|
|
57
|
-
const requestOptions = {
|
|
58
|
-
host,
|
|
59
|
-
port: 80,
|
|
60
|
-
method: 'HEAD'
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
const req = http.request(requestOptions, (res) => {
|
|
64
|
-
try {
|
|
65
|
-
assert.ok(res.statusCode >= 200 && res.statusCode < 400);
|
|
66
|
-
done();
|
|
67
|
-
} catch (error) {
|
|
68
|
-
done(error);
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
req.on('error', (err) => {
|
|
73
|
-
done(err);
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
req.end();
|
|
77
|
-
});
|
|
78
|
-
|
|
79
55
|
it('Support HTTPS on port 443', (done) => {
|
|
80
56
|
const requestOptions = {
|
|
81
57
|
host,
|
|
@@ -36,13 +36,17 @@ const samProps = require(`${adaptdir}/sampleProperties.json`).properties;
|
|
|
36
36
|
// these variables can be changed to run in integrated mode so easier to set them here
|
|
37
37
|
// always check these in with bogus data!!!
|
|
38
38
|
samProps.stub = true;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
samProps.
|
|
42
|
-
samProps.
|
|
43
|
-
samProps.
|
|
44
|
-
samProps.
|
|
45
|
-
samProps.
|
|
39
|
+
|
|
40
|
+
// uncomment if connecting
|
|
41
|
+
// samProps.host = 'replace.hostorip.here';
|
|
42
|
+
// samProps.authentication.username = 'username';
|
|
43
|
+
// samProps.authentication.password = 'password';
|
|
44
|
+
// samProps.authentication.token = 'password';
|
|
45
|
+
// samProps.protocol = 'http';
|
|
46
|
+
// samProps.port = 80;
|
|
47
|
+
// samProps.ssl.enabled = false;
|
|
48
|
+
// samProps.ssl.accept_invalid_cert = false;
|
|
49
|
+
|
|
46
50
|
if (samProps.request.attempt_timeout < 30000) {
|
|
47
51
|
samProps.request.attempt_timeout = 30000;
|
|
48
52
|
}
|
|
@@ -475,7 +479,7 @@ describe('[integration] Netbrain Adapter Test', () => {
|
|
|
475
479
|
|
|
476
480
|
const authenticationAndInitializationPostV1SessionBodyParam = {
|
|
477
481
|
username: 'NetBrain',
|
|
478
|
-
password:
|
|
482
|
+
password: samProps.authentication.password
|
|
479
483
|
};
|
|
480
484
|
describe('#postV1Session - errors', () => {
|
|
481
485
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
@@ -1767,7 +1771,7 @@ describe('[integration] Netbrain Adapter Test', () => {
|
|
|
1767
1771
|
mode: 4,
|
|
1768
1772
|
port: 6,
|
|
1769
1773
|
username: 'string',
|
|
1770
|
-
password:
|
|
1774
|
+
password: samProps.authentication.password,
|
|
1771
1775
|
KeyName: 'string',
|
|
1772
1776
|
loginPrompt: 'string',
|
|
1773
1777
|
passwordPrompt: 'string',
|
|
@@ -1784,14 +1788,14 @@ describe('[integration] Netbrain Adapter Test', () => {
|
|
|
1784
1788
|
telnetInfo: {
|
|
1785
1789
|
alias: 'string',
|
|
1786
1790
|
userName: 'string',
|
|
1787
|
-
password:
|
|
1791
|
+
password: samProps.authentication.password,
|
|
1788
1792
|
cliMode: 4,
|
|
1789
1793
|
keyName: 'string'
|
|
1790
1794
|
},
|
|
1791
1795
|
privilegeInfo: {
|
|
1792
1796
|
alias: 'string',
|
|
1793
1797
|
userName: 'string',
|
|
1794
|
-
password:
|
|
1798
|
+
password: samProps.authentication.password
|
|
1795
1799
|
},
|
|
1796
1800
|
snmpInfo: {
|
|
1797
1801
|
alias: 'string',
|
|
@@ -1854,7 +1858,7 @@ describe('[integration] Netbrain Adapter Test', () => {
|
|
|
1854
1858
|
mode: 4,
|
|
1855
1859
|
port: 3,
|
|
1856
1860
|
username: 'string',
|
|
1857
|
-
password:
|
|
1861
|
+
password: samProps.authentication.password,
|
|
1858
1862
|
KeyName: 'string',
|
|
1859
1863
|
loginPrompt: 'string',
|
|
1860
1864
|
passwordPrompt: 'string',
|
|
@@ -1871,14 +1875,14 @@ describe('[integration] Netbrain Adapter Test', () => {
|
|
|
1871
1875
|
telnetInfo: {
|
|
1872
1876
|
alias: 'string',
|
|
1873
1877
|
userName: 'string',
|
|
1874
|
-
password:
|
|
1878
|
+
password: samProps.authentication.password,
|
|
1875
1879
|
cliMode: 1,
|
|
1876
1880
|
keyName: 'string'
|
|
1877
1881
|
},
|
|
1878
1882
|
privilegeInfo: {
|
|
1879
1883
|
alias: 'string',
|
|
1880
1884
|
userName: 'string',
|
|
1881
|
-
password:
|
|
1885
|
+
password: samProps.authentication.password
|
|
1882
1886
|
},
|
|
1883
1887
|
snmpInfo: {
|
|
1884
1888
|
alias: 'string',
|
|
@@ -2417,7 +2421,7 @@ describe('[integration] Netbrain Adapter Test', () => {
|
|
|
2417
2421
|
email: 'string',
|
|
2418
2422
|
firstName: 'string',
|
|
2419
2423
|
lastName: 'string',
|
|
2420
|
-
password:
|
|
2424
|
+
password: samProps.authentication.password,
|
|
2421
2425
|
allowChangePassword: true,
|
|
2422
2426
|
isSystemAdmin: true
|
|
2423
2427
|
};
|
|
@@ -36,13 +36,17 @@ const samProps = require(`${adaptdir}/sampleProperties.json`).properties;
|
|
|
36
36
|
// these variables can be changed to run in integrated mode so easier to set them here
|
|
37
37
|
// always check these in with bogus data!!!
|
|
38
38
|
samProps.stub = true;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
samProps.
|
|
42
|
-
samProps.
|
|
43
|
-
samProps.
|
|
44
|
-
samProps.
|
|
45
|
-
samProps.
|
|
39
|
+
|
|
40
|
+
// uncomment if connecting
|
|
41
|
+
// samProps.host = 'replace.hostorip.here';
|
|
42
|
+
// samProps.authentication.username = 'username';
|
|
43
|
+
// samProps.authentication.password = 'password';
|
|
44
|
+
// samProps.authentication.token = 'password';
|
|
45
|
+
// samProps.protocol = 'http';
|
|
46
|
+
// samProps.port = 80;
|
|
47
|
+
// samProps.ssl.enabled = false;
|
|
48
|
+
// samProps.ssl.accept_invalid_cert = false;
|
|
49
|
+
|
|
46
50
|
samProps.request.attempt_timeout = 1200000;
|
|
47
51
|
const attemptTimeout = samProps.request.attempt_timeout;
|
|
48
52
|
const { stub } = samProps;
|
|
@@ -315,15 +319,15 @@ describe('[unit] Netbrain Adapter Test', () => {
|
|
|
315
319
|
assert.notEqual(null, packageDotJson.dependencies);
|
|
316
320
|
assert.notEqual('', packageDotJson.dependencies);
|
|
317
321
|
assert.equal('^8.17.1', packageDotJson.dependencies.ajv);
|
|
318
|
-
assert.equal('^1.7.
|
|
322
|
+
assert.equal('^1.7.4', packageDotJson.dependencies.axios);
|
|
319
323
|
assert.equal('^11.0.0', packageDotJson.dependencies.commander);
|
|
320
324
|
assert.equal('^11.2.0', packageDotJson.dependencies['fs-extra']);
|
|
321
|
-
assert.equal('^10.7.
|
|
325
|
+
assert.equal('^10.7.3', packageDotJson.dependencies.mocha);
|
|
322
326
|
assert.equal('^2.0.1', packageDotJson.dependencies['mocha-param']);
|
|
323
327
|
assert.equal('^0.4.4', packageDotJson.dependencies.ping);
|
|
324
328
|
assert.equal('^1.4.10', packageDotJson.dependencies['readline-sync']);
|
|
325
329
|
assert.equal('^7.6.3', packageDotJson.dependencies.semver);
|
|
326
|
-
assert.equal('^3.
|
|
330
|
+
assert.equal('^3.14.2', packageDotJson.dependencies.winston);
|
|
327
331
|
done();
|
|
328
332
|
} catch (error) {
|
|
329
333
|
log.error(`Test Failure: ${error}`);
|
|
@@ -561,7 +565,7 @@ describe('[unit] Netbrain Adapter Test', () => {
|
|
|
561
565
|
log.error(`Adapter Exception: ${error}`);
|
|
562
566
|
done(error);
|
|
563
567
|
}
|
|
564
|
-
});
|
|
568
|
+
}).timeout(attemptTimeout);
|
|
565
569
|
});
|
|
566
570
|
|
|
567
571
|
describe('propertiesSchema.json', () => {
|
package/compliance-report.json
DELETED
package/compliance-report.txt
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
---------------------------------------------------------------------------------------------
|
|
2
|
-
**** Project Compliance Summary ****
|
|
3
|
-
0 project(s) are not valid
|
|
4
|
-
0 project(s) are valid
|
|
5
|
-
---------------------------------------------------------------------------------------------
|