@itentialopensource/adapter-thingspace 0.3.2 → 0.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/AUTH.md +0 -4
- package/CHANGELOG.md +8 -0
- package/TAB2.md +0 -4
- package/metadata.json +6 -6
- package/package.json +4 -4
- package/refs?service=git-upload-pack +0 -0
- package/report/adapterInfo.json +4 -4
- package/sampleProperties.json +22 -22
- package/test/integration/adapterTestConnectivity.js +0 -24
- package/test/integration/adapterTestIntegration.js +11 -7
- package/test/unit/adapterTestUnit.js +13 -9
- package/compliance-report.json +0 -9
- package/compliance-report.txt +0 -5
package/AUTH.md
CHANGED
|
@@ -48,10 +48,6 @@ STEPS
|
|
|
48
48
|
"{token}",
|
|
49
49
|
"Bearer {getAccessToken.responseFields.accessToken}"
|
|
50
50
|
],
|
|
51
|
-
"auth_logging": false,
|
|
52
|
-
"client_id": "",
|
|
53
|
-
"client_secret": "",
|
|
54
|
-
"grant_type": ""
|
|
55
51
|
}
|
|
56
52
|
```
|
|
57
53
|
4. Restart the adapter. If your properties were set correctly, the adapter should go online.
|
package/CHANGELOG.md
CHANGED
package/TAB2.md
CHANGED
|
@@ -59,10 +59,6 @@ STEPS
|
|
|
59
59
|
"{token}",
|
|
60
60
|
"Bearer {getAccessToken.responseFields.accessToken}"
|
|
61
61
|
],
|
|
62
|
-
"auth_logging": false,
|
|
63
|
-
"client_id": "",
|
|
64
|
-
"client_secret": "",
|
|
65
|
-
"grant_type": ""
|
|
66
62
|
}
|
|
67
63
|
```
|
|
68
64
|
4. Restart the adapter. If your properties were set correctly, the adapter should go online.
|
package/metadata.json
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adapter-thingspace",
|
|
3
3
|
"webName": "Adapter for Integration to Verizon Thingspace",
|
|
4
|
+
"supportLevel": "community",
|
|
4
5
|
"vendor": "Verizon",
|
|
5
6
|
"product": "Thingspace",
|
|
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",
|
|
@@ -50,7 +52,7 @@
|
|
|
50
52
|
"storeLink": "",
|
|
51
53
|
"npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-thingspace",
|
|
52
54
|
"repoLink": "https://gitlab.com/itentialopensource/adapters/adapter-thingspace",
|
|
53
|
-
"docLink": "https://
|
|
55
|
+
"docLink": "https://gitlab.com/itentialopensource/adapters/adapter-thingspace/-/blob/master/README.md?ref_type=heads",
|
|
54
56
|
"demoLinks": [],
|
|
55
57
|
"trainingLinks": [
|
|
56
58
|
{
|
|
@@ -61,7 +63,7 @@
|
|
|
61
63
|
"faqLink": "https://docs.itential.com/opensource/docs/troubleshooting-an-adapter",
|
|
62
64
|
"contributeLink": "https://gitlab.com/itentialopensource/adapters/contributing-guide",
|
|
63
65
|
"issueLink": "https://itential.atlassian.net/servicedesk/customer/portals",
|
|
64
|
-
"webLink": "",
|
|
66
|
+
"webLink": "https://www.itential.com/adapters/verizon-thingspace/",
|
|
65
67
|
"vendorLink": "https://www.verizon.com/",
|
|
66
68
|
"productLink": "https://thingspace.verizon.com/index.html",
|
|
67
69
|
"apiLinks": [
|
|
@@ -82,7 +84,5 @@
|
|
|
82
84
|
"workflowProjects": [],
|
|
83
85
|
"transformationProjects": [],
|
|
84
86
|
"exampleProjects": []
|
|
85
|
-
}
|
|
86
|
-
"supportLevel": "community",
|
|
87
|
-
"techAlliance": false
|
|
87
|
+
}
|
|
88
88
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itentialopensource/adapter-thingspace",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "This adapter integrates with system described as: ThingSpace.",
|
|
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",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"author": "Itential",
|
|
52
52
|
"homepage": "https://gitlab.com/itentialopensource/adapters/adapter-thingspace#readme",
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@itentialopensource/adapter-utils": "^5.
|
|
54
|
+
"@itentialopensource/adapter-utils": "^5.8.0",
|
|
55
55
|
"acorn": "^8.12.1",
|
|
56
56
|
"ajv": "^8.17.1",
|
|
57
57
|
"axios": "^1.7.4",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"prompts": "^2.4.2",
|
|
67
67
|
"readline-sync": "^1.4.10",
|
|
68
68
|
"semver": "^7.6.3",
|
|
69
|
-
"winston": "^3.
|
|
69
|
+
"winston": "^3.14.2"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"chai": "^4.3.7",
|
|
Binary file
|
package/report/adapterInfo.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.2
|
|
2
|
+
"version": "0.3.2",
|
|
3
3
|
"configLines": 5949,
|
|
4
4
|
"scriptLines": 1783,
|
|
5
5
|
"codeLines": 6309,
|
|
6
|
-
"testLines":
|
|
7
|
-
"testCases":
|
|
8
|
-
"totalCodeLines":
|
|
6
|
+
"testLines": 6150,
|
|
7
|
+
"testCases": 278,
|
|
8
|
+
"totalCodeLines": 14242,
|
|
9
9
|
"wfTasks": 67
|
|
10
10
|
}
|
package/sampleProperties.json
CHANGED
|
@@ -41,27 +41,27 @@
|
|
|
41
41
|
},
|
|
42
42
|
"multiStepAuthCalls": [
|
|
43
43
|
{
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
44
|
+
"name": "getAccessToken",
|
|
45
|
+
"requestFields": {
|
|
46
|
+
"grant_type": "client_credentials",
|
|
47
|
+
"header.Authorization": "Basic <token>"
|
|
48
|
+
},
|
|
49
|
+
"responseFields": {
|
|
50
|
+
"accessToken": "access_token"
|
|
51
|
+
},
|
|
52
|
+
"successfullResponseCode": 200
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
55
|
+
"name": "getSessionToken",
|
|
56
|
+
"requestFields": {
|
|
57
|
+
"header.Authorization": "Bearer {getAccessToken.responseFields.accessToken}",
|
|
58
|
+
"username": "<username>",
|
|
59
|
+
"password": "<password>"
|
|
60
|
+
},
|
|
61
|
+
"responseFields": {
|
|
62
|
+
"token": "sessionToken"
|
|
63
|
+
},
|
|
64
|
+
"successfullResponseCode": 200
|
|
65
65
|
}
|
|
66
66
|
]
|
|
67
67
|
},
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
"ostypePrefix": "meraki-",
|
|
159
159
|
"port": "{port}",
|
|
160
160
|
"ipaddress": "{ip_addr}",
|
|
161
|
-
"serial"
|
|
161
|
+
"serial": "{serial}"
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
],
|
|
@@ -184,7 +184,7 @@
|
|
|
184
184
|
"ostypePrefix": "meraki-",
|
|
185
185
|
"port": "{port}",
|
|
186
186
|
"ipaddress": "{ip_addr}",
|
|
187
|
-
"serial"
|
|
187
|
+
"serial": "{serial}",
|
|
188
188
|
"id": "{myid}"
|
|
189
189
|
}
|
|
190
190
|
}
|
|
@@ -268,7 +268,7 @@
|
|
|
268
268
|
"ostypePrefix": "meraki-",
|
|
269
269
|
"port": "{port}",
|
|
270
270
|
"ipaddress": "{ip_addr}",
|
|
271
|
-
"serial"
|
|
271
|
+
"serial": "{serial}",
|
|
272
272
|
"id": "{myid}"
|
|
273
273
|
}
|
|
274
274
|
}
|
|
@@ -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
|
}
|
|
@@ -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;
|
|
@@ -323,7 +327,7 @@ describe('[unit] Thingspace 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.
|
|
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] Thingspace 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
|
-
---------------------------------------------------------------------------------------------
|