@itentialopensource/adapter-netbox 0.13.2 → 0.13.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.13.3 [09-12-2024]
3
+
4
+ * add workshop and fix vulnerabilities
5
+
6
+ See merge request itentialopensource/adapters/adapter-netbox!30
7
+
8
+ ---
9
+
2
10
  ## 0.13.2 [08-15-2024]
3
11
 
4
12
  * Changes made at 2024.08.14_19:57PM
package/SYSTEMINFO.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # NetBox
2
2
 
3
3
  Vendor: NetBox
4
- Homepage: https://netbox.dev/
4
+ Homepage: https://netboxlabs.com/
5
5
 
6
6
  Product: NetBox
7
- Product Page: https://netbox.dev/
7
+ Product Page: https://netboxlabs.com/oss/netbox/
8
8
 
9
9
  ## Introduction
10
10
  We classify NetBox into the Inventory domain because it contains an inventory of devices, assets, network discovery and topology information.
package/TAB2.md CHANGED
@@ -64,9 +64,9 @@ Sample Properties can be used to help you configure the adapter in the Itential
64
64
  "protocol": "http",
65
65
  "authentication": {
66
66
  "auth_method": "static_token",
67
- "username": "exampleUsername",
68
- "password": "examplePassword",
69
- "token": "",
67
+ "username": "username",
68
+ "password": "password",
69
+ "token": "token",
70
70
  "token_timeout": 1800000,
71
71
  "token_cache": "local",
72
72
  "invalid_token_error": 401,
package/metadata.json CHANGED
@@ -1,8 +1,10 @@
1
1
  {
2
2
  "name": "adapter-netbox",
3
3
  "webName": "Adapter for Integration to NetBox Labs NetBox v2.5",
4
+ "supportLevel": "certified",
4
5
  "vendor": "NetBox Labs",
5
6
  "product": "NetBox",
7
+ "techAlliance": true,
6
8
  "osVersion": [],
7
9
  "apiVersions": [
8
10
  "2.5",
@@ -47,7 +49,7 @@
47
49
  "storeLink": "",
48
50
  "npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-netbox",
49
51
  "repoLink": "https://gitlab.com/itentialopensource/adapters/adapter-netbox",
50
- "docLink": "https://docs.itential.com/opensource/docs/netbox",
52
+ "docLink": "https://gitlab.com/itentialopensource/adapters/adapter-netbox/-/blob/master/README.md?ref_type=heads",
51
53
  "demoLinks": [
52
54
  {
53
55
  "title": "Itential & NetBox: Evolving from a Source of Truth to Automation & Orchestration (ONUG)",
@@ -72,8 +74,8 @@
72
74
  "contributeLink": "https://gitlab.com/itentialopensource/adapters/contributing-guide",
73
75
  "issueLink": "https://itential.atlassian.net/servicedesk/customer/portals",
74
76
  "webLink": "https://www.itential.com/adapters/netbox/",
75
- "vendorLink": "https://netbox.dev/",
76
- "productLink": "https://netbox.dev/",
77
+ "vendorLink": "https://netboxlabs.com/",
78
+ "productLink": "https://netboxlabs.com/oss/netbox/",
77
79
  "apiLinks": [
78
80
  {
79
81
  "title": "NetBox REST API",
@@ -97,7 +99,5 @@
97
99
  "workflowProjects": [],
98
100
  "transformationProjects": [],
99
101
  "exampleProjects": []
100
- },
101
- "supportLevel": "community",
102
- "techAlliance": false
102
+ }
103
103
  }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-netbox",
3
- "version": "0.13.2",
3
+ "version": "0.13.3",
4
4
  "description": "This adapter integrates with system Netbox",
5
5
  "main": "adapter.js",
6
6
  "systemName": "NetBox",
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",
@@ -53,7 +53,7 @@
53
53
  "author": "Itential",
54
54
  "homepage": "https://gitlab.com/itentialopensource/adapters/adapter-netbox#readme",
55
55
  "dependencies": {
56
- "@itentialopensource/adapter-utils": "^5.6.0",
56
+ "@itentialopensource/adapter-utils": "^5.8.0",
57
57
  "acorn": "^8.12.1",
58
58
  "ajv": "^8.17.1",
59
59
  "axios": "^1.7.4",
@@ -68,7 +68,7 @@
68
68
  "prompts": "^2.4.2",
69
69
  "readline-sync": "^1.4.10",
70
70
  "semver": "^7.6.3",
71
- "winston": "^3.13.1"
71
+ "winston": "^3.14.2"
72
72
  },
73
73
  "devDependencies": {
74
74
  "chai": "^4.3.7",
Binary file
@@ -1,10 +1,10 @@
1
1
  {
2
- "version": "0.12.7",
2
+ "version": "0.13.2",
3
3
  "configLines": 46928,
4
4
  "scriptLines": 1783,
5
5
  "codeLines": 35005,
6
- "testLines": 27740,
7
- "testCases": 1383,
8
- "totalCodeLines": 64528,
6
+ "testLines": 27724,
7
+ "testCases": 1382,
8
+ "totalCodeLines": 64512,
9
9
  "wfTasks": 419
10
10
  }
@@ -15,9 +15,9 @@
15
15
  "protocol": "http",
16
16
  "authentication": {
17
17
  "auth_method": "static_token",
18
- "username": "exampleUsername",
19
- "password": "examplePassword",
20
- "token": "",
18
+ "username": "username",
19
+ "password": "password",
20
+ "token": "token",
21
21
  "token_timeout": 1800000,
22
22
  "token_cache": "local",
23
23
  "invalid_token_error": 401,
@@ -133,7 +133,7 @@
133
133
  "ostypePrefix": "meraki-",
134
134
  "port": "{port}",
135
135
  "ipaddress": "{ip_addr}",
136
- "serial" : "{serial}"
136
+ "serial": "{serial}"
137
137
  }
138
138
  }
139
139
  ],
@@ -159,7 +159,7 @@
159
159
  "ostypePrefix": "meraki-",
160
160
  "port": "{port}",
161
161
  "ipaddress": "{ip_addr}",
162
- "serial" : "{serial}",
162
+ "serial": "{serial}",
163
163
  "id": "{myid}"
164
164
  }
165
165
  }
@@ -243,7 +243,7 @@
243
243
  "ostypePrefix": "meraki-",
244
244
  "port": "{port}",
245
245
  "ipaddress": "{ip_addr}",
246
- "serial" : "{serial}",
246
+ "serial": "{serial}",
247
247
  "id": "{myid}"
248
248
  }
249
249
  }
@@ -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
  }
@@ -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] Netbox 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] Netbox 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
- ---------------------------------------------------------------------------------------------