@itentialopensource/adapter-opengear_lighthouse 0.2.2 → 0.2.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 CHANGED
@@ -1,4 +1,12 @@
1
1
 
2
+ ## 0.2.3 [09-13-2024]
3
+
4
+ * add workshop and fix vulnerabilities
5
+
6
+ See merge request itentialopensource/adapters/adapter-opengear_lighthouse!11
7
+
8
+ ---
9
+
2
10
  ## 0.2.2 [08-14-2024]
3
11
 
4
12
  * Changes made at 2024.08.14_17:18PM
package/metadata.json CHANGED
@@ -1,8 +1,10 @@
1
1
  {
2
2
  "name": "adapter-opengear_lighthouse",
3
3
  "webName": "Adapter for Integration to Opengear Lighthouse",
4
+ "supportLevel": "community",
4
5
  "vendor": "Opengear",
5
6
  "product": "Lighthouse",
7
+ "techAlliance": false,
6
8
  "osVersions": [],
7
9
  "apiVersions": [
8
10
  "v3.5"
@@ -26,7 +28,7 @@
26
28
  "Determine configuration drift",
27
29
  "Golden Configuration",
28
30
  "Port/VLAN Configuration",
29
- "EVPN & VXLA",
31
+ "EVPN & VXLAN",
30
32
  "Port Turn-up",
31
33
  "Assign Network & IP",
32
34
  "Cloud Managed Networks",
@@ -46,7 +48,7 @@
46
48
  "storeLink": "",
47
49
  "npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-opengear_lighthouse",
48
50
  "repoLink": "https://gitlab.com/itentialopensource/adapters/adapter-opengear_lighthouse",
49
- "docLink": "",
51
+ "docLink": "https://gitlab.com/itentialopensource/adapters/adapter-opengear_lighthouse/-/blob/master/README.md?ref_type=heads",
50
52
  "demoLinks": [],
51
53
  "trainingLinks": [
52
54
  {
@@ -57,7 +59,7 @@
57
59
  "faqLink": "https://docs.itential.com/opensource/docs/troubleshooting-an-adapter",
58
60
  "contributeLink": "https://gitlab.com/itentialopensource/adapters/contributing-guide",
59
61
  "issueLink": "https://itential.atlassian.net/servicedesk/customer/portals",
60
- "webLink": "",
62
+ "webLink": "https://www.itential.com/adapters/opengear-lighthouse/",
61
63
  "vendorLink": "https://opengear.com/",
62
64
  "productLink": "https://opengear.com/products/lighthouse/",
63
65
  "apiLinks": [
@@ -78,7 +80,5 @@
78
80
  "workflowProjects": [],
79
81
  "transformationProjects": [],
80
82
  "exampleProjects": []
81
- },
82
- "supportLevel": "community",
83
- "techAlliance": false
83
+ }
84
84
  }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-opengear_lighthouse",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "This adapter integrates with system described as: lighthouseRestApi.",
5
5
  "main": "adapter.js",
6
6
  "systemName": "Opengear_lighthouse",
7
7
  "wizardVersion": "2.44.7",
8
- "engineVersion": "1.67.19",
8
+ "engineVersion": "1.68.2",
9
9
  "adapterType": "http",
10
10
  "scripts": {
11
11
  "artifactize": "npm i && node utils/packModificationScript.js",
@@ -54,7 +54,7 @@
54
54
  "author": "Itential",
55
55
  "homepage": "https://gitlab.com/itentialopensource/adapters/adapter-opengear_lighthouse#readme",
56
56
  "dependencies": {
57
- "@itentialopensource/adapter-utils": "^5.6.0",
57
+ "@itentialopensource/adapter-utils": "^5.8.0",
58
58
  "acorn": "^8.12.1",
59
59
  "ajv": "^8.17.1",
60
60
  "axios": "^1.7.4",
@@ -69,7 +69,7 @@
69
69
  "prompts": "^2.4.2",
70
70
  "readline-sync": "^1.4.10",
71
71
  "semver": "^7.6.3",
72
- "winston": "^3.13.1"
72
+ "winston": "^3.14.2"
73
73
  },
74
74
  "devDependencies": {
75
75
  "chai": "^4.3.7",
@@ -950,7 +950,8 @@
950
950
  "description": "Whether or not the device broker calls have been mapped",
951
951
  "default": false
952
952
  },
953
- "getDevice": { "type": "array",
953
+ "getDevice": {
954
+ "type": "array",
954
955
  "description": "Broker call(s) to getDevice",
955
956
  "items": {
956
957
  "type": "object",
Binary file
@@ -1,10 +1,10 @@
1
1
  {
2
- "version": "0.1.8",
3
- "configLines": 14461,
2
+ "version": "0.2.2",
3
+ "configLines": 14462,
4
4
  "scriptLines": 1783,
5
5
  "codeLines": 16540,
6
- "testLines": 11052,
7
- "testCases": 559,
8
- "totalCodeLines": 29375,
6
+ "testLines": 11036,
7
+ "testCases": 558,
8
+ "totalCodeLines": 29359,
9
9
  "wfTasks": 172
10
10
  }
@@ -135,7 +135,7 @@
135
135
  "ostypePrefix": "meraki-",
136
136
  "port": "{port}",
137
137
  "ipaddress": "{ip_addr}",
138
- "serial" : "{serial}"
138
+ "serial": "{serial}"
139
139
  }
140
140
  }
141
141
  ],
@@ -161,7 +161,7 @@
161
161
  "ostypePrefix": "meraki-",
162
162
  "port": "{port}",
163
163
  "ipaddress": "{ip_addr}",
164
- "serial" : "{serial}",
164
+ "serial": "{serial}",
165
165
  "id": "{myid}"
166
166
  }
167
167
  }
@@ -245,7 +245,7 @@
245
245
  "ostypePrefix": "meraki-",
246
246
  "port": "{port}",
247
247
  "ipaddress": "{ip_addr}",
248
- "serial" : "{serial}",
248
+ "serial": "{serial}",
249
249
  "id": "{myid}"
250
250
  }
251
251
  }
@@ -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
- samProps.host = 'replace.hostorip.here';
40
- samProps.authentication.username = 'username';
41
- samProps.authentication.password = 'password';
42
- samProps.protocol = 'http';
43
- samProps.port = 80;
44
- samProps.ssl.enabled = false;
45
- samProps.ssl.accept_invalid_cert = false;
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] Opengear_lighthouse Adapter Test', () => {
475
479
 
476
480
  const sessionsCreateSessionBodyParam = {
477
481
  username: 'root',
478
- password: 'default'
482
+ password: samProps.authentication.password
479
483
  };
480
484
  describe('#createSession - errors', () => {
481
485
  it('should work if integrated or standalone with mockdata', (done) => {
@@ -862,7 +866,7 @@ describe('[integration] Opengear_lighthouse Adapter Test', () => {
862
866
  connection_info: {
863
867
  address: '192.168.70.23',
864
868
  username: 'new_username',
865
- password: 'new_pass'
869
+ password: samProps.authentication.password
866
870
  },
867
871
  tags: [
868
872
  {
@@ -1631,13 +1635,13 @@ describe('[integration] Opengear_lighthouse Adapter Test', () => {
1631
1635
  read_write_community: 'secret',
1632
1636
  read_only_community: 'secret',
1633
1637
  auth_protocol: 'SHA',
1634
- auth_password: 'secret123',
1638
+ auth_password: samProps.authentication.password,
1635
1639
  username: 'michaelf',
1636
1640
  engine_id: '0x80001f8803555000000000',
1637
1641
  v3_enabled: true,
1638
1642
  v1_enabled: false,
1639
1643
  privacy_protocol: 'DES',
1640
- privacy_password: 'secret123',
1644
+ privacy_password: samProps.authentication.password,
1641
1645
  security_level: 'noAuthNoPriv',
1642
1646
  location: 'BNE',
1643
1647
  contact: 'mail@example.com'
@@ -1699,12 +1703,12 @@ describe('[integration] Opengear_lighthouse Adapter Test', () => {
1699
1703
  protocol: 'UDP',
1700
1704
  community: 'secret',
1701
1705
  auth_protocol: 'SHA',
1702
- auth_password: 'secret123',
1706
+ auth_password: samProps.authentication.password,
1703
1707
  username: 'michaelf',
1704
1708
  engine_id: '0x80001f8803555000000000',
1705
1709
  version: 'v3',
1706
1710
  privacy_protocol: 'DES',
1707
- privacy_password: 'secret123',
1711
+ privacy_password: samProps.authentication.password,
1708
1712
  security_level: 'noAuthNoPriv',
1709
1713
  msg_type: 'TRAP',
1710
1714
  address: 'snmp.example.com',
@@ -2043,7 +2047,7 @@ describe('[integration] Opengear_lighthouse Adapter Test', () => {
2043
2047
  });
2044
2048
 
2045
2049
  const systemPostSystemConfigBackupBodyParam = {
2046
- password: 'string',
2050
+ password: samProps.authentication.password,
2047
2051
  user_files: [
2048
2052
  'string'
2049
2053
  ]
@@ -3317,7 +3321,7 @@ describe('[integration] Opengear_lighthouse Adapter Test', () => {
3317
3321
  const usersPostUsersBodyParam = {
3318
3322
  user: {
3319
3323
  username: 'joe',
3320
- password: 'monkey',
3324
+ password: samProps.authentication.password,
3321
3325
  description: 'local user',
3322
3326
  enabled: true,
3323
3327
  expired: false,
@@ -3443,8 +3447,8 @@ describe('[integration] Opengear_lighthouse Adapter Test', () => {
3443
3447
  });
3444
3448
 
3445
3449
  const usersPutUsersPasswordResetBodyParam = {
3446
- current_password: 'default',
3447
- new_password: 'default2'
3450
+ current_password: samProps.authentication.password,
3451
+ new_password: samProps.authentication.password
3448
3452
  };
3449
3453
  describe('#putUsersPasswordReset - errors', () => {
3450
3454
  it('should work if integrated but since no mockdata should error when run standalone', (done) => {
@@ -3474,7 +3478,7 @@ describe('[integration] Opengear_lighthouse Adapter Test', () => {
3474
3478
  const usersPutUsersPasswordValidationBodyParam = {
3475
3479
  password_validation: {
3476
3480
  username: 'joe',
3477
- password: 'default'
3481
+ password: samProps.authentication.password
3478
3482
  }
3479
3483
  };
3480
3484
  describe('#putUsersPasswordValidation - errors', () => {
@@ -3778,7 +3782,7 @@ describe('[integration] Opengear_lighthouse Adapter Test', () => {
3778
3782
  dependent_lighthouse: {
3779
3783
  address: '192.168.73.100',
3780
3784
  username: 'usera',
3781
- password: 'password',
3785
+ password: samProps.authentication.password,
3782
3786
  lhvpn_subnet_netmask: '255.255.255.0',
3783
3787
  lhvpn_subnet_address: '172.16.4.0'
3784
3788
  }
@@ -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
- samProps.host = 'replace.hostorip.here';
40
- samProps.authentication.username = 'username';
41
- samProps.authentication.password = 'password';
42
- samProps.protocol = 'http';
43
- samProps.port = 80;
44
- samProps.ssl.enabled = false;
45
- samProps.ssl.accept_invalid_cert = false;
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;
@@ -323,7 +327,7 @@ describe('[unit] Opengear_lighthouse Adapter Test', () => {
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.13.1', packageDotJson.dependencies.winston);
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] Opengear_lighthouse 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', () => {
@@ -1,9 +0,0 @@
1
- {
2
- "ComplianceEntries": [
3
- {
4
- "name": "Compliance Summary",
5
- "numInvalidProjects": 0,
6
- "numValidProjects": 0
7
- }
8
- ]
9
- }
@@ -1,5 +0,0 @@
1
- ---------------------------------------------------------------------------------------------
2
- **** Project Compliance Summary ****
3
- 0 project(s) are not valid
4
- 0 project(s) are valid
5
- ---------------------------------------------------------------------------------------------