@itentialopensource/adapter-servicenow 2.9.2 → 2.9.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 +8 -0
- package/TAB2.md +1 -1
- package/metadata.json +13 -6
- package/package.json +4 -4
- 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 +12 -8
- package/test/unit/adapterTestUnit.js +14 -10
- package/compliance-report.json +0 -9
- package/compliance-report.txt +0 -5
package/CHANGELOG.md
CHANGED
package/TAB2.md
CHANGED
|
@@ -67,7 +67,7 @@ Sample Properties can be used to help you configure the adapter in the Itential
|
|
|
67
67
|
"auth_method": "basic user_password",
|
|
68
68
|
"username": "username",
|
|
69
69
|
"password": "password",
|
|
70
|
-
"token": "",
|
|
70
|
+
"token": "token",
|
|
71
71
|
"token_timeout": 180000,
|
|
72
72
|
"token_cache": "local",
|
|
73
73
|
"invalid_token_error": 401,
|
package/metadata.json
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adapter-servicenow",
|
|
3
3
|
"webName": "Adapter for Integration to ServiceNow",
|
|
4
|
+
"supportLevel": "certified",
|
|
4
5
|
"vendor": "ServiceNow",
|
|
5
6
|
"product": "IT Service Management",
|
|
7
|
+
"techAlliance": true,
|
|
6
8
|
"osVersions": [
|
|
7
9
|
"San Diego",
|
|
8
10
|
"Tokyo",
|
|
@@ -44,7 +46,7 @@
|
|
|
44
46
|
"storeLink": "",
|
|
45
47
|
"npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-servicenow",
|
|
46
48
|
"repoLink": "https://gitlab.com/itentialopensource/adapters/adapter-servicenow",
|
|
47
|
-
"docLink": "https://
|
|
49
|
+
"docLink": "https://gitlab.com/itentialopensource/adapters/adapter-servicenow/-/blob/master/README.md?ref_type=heads",
|
|
48
50
|
"demoLinks": [
|
|
49
51
|
{
|
|
50
52
|
"title": "Getting Real (Time) with Automating Network Change Management With ServiceNow",
|
|
@@ -52,7 +54,7 @@
|
|
|
52
54
|
},
|
|
53
55
|
{
|
|
54
56
|
"title": "Integrating ServiceNow CMDB as a Source Of Truth to Drive Network Automation with Itential",
|
|
55
|
-
"link": "https://www.itential.com/resource/demo/integrating-servicenow-cmdb-as-a-source-of-truth-to-drive-network-automation-with-itential
|
|
57
|
+
"link": "https://www.itential.com/resource/demo/integrating-servicenow-cmdb-as-a-source-of-truth-to-drive-network-automation-with-itential/"
|
|
56
58
|
},
|
|
57
59
|
{
|
|
58
60
|
"title": "INTEGRATION - Itential + ServiceNow",
|
|
@@ -93,7 +95,14 @@
|
|
|
93
95
|
"public": true
|
|
94
96
|
}
|
|
95
97
|
],
|
|
96
|
-
"workshopLinks": [
|
|
98
|
+
"workshopLinks": [
|
|
99
|
+
{
|
|
100
|
+
"title": "Create/Update Change Request"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"title": "Create/Update Incident"
|
|
104
|
+
}
|
|
105
|
+
],
|
|
97
106
|
"workshopHomePage": "https://www.itential.com/get-started/"
|
|
98
107
|
},
|
|
99
108
|
"assets": [],
|
|
@@ -130,7 +139,5 @@
|
|
|
130
139
|
],
|
|
131
140
|
"transformationProjects": [],
|
|
132
141
|
"exampleProjects": []
|
|
133
|
-
}
|
|
134
|
-
"supportLevel": "community",
|
|
135
|
-
"techAlliance": false
|
|
142
|
+
}
|
|
136
143
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itentialopensource/adapter-servicenow",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.3",
|
|
4
4
|
"description": "This adapter integrates with system described as: servicenowMadrid.",
|
|
5
5
|
"main": "adapter.js",
|
|
6
6
|
"systemName": "ServiceNow",
|
|
7
7
|
"wizardVersion": "2.44.7",
|
|
8
|
-
"engineVersion": "1.
|
|
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-servicenow#readme",
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@itentialopensource/adapter-utils": "^5.
|
|
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.
|
|
72
|
+
"winston": "^3.14.2"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"chai": "^4.3.7",
|
|
Binary file
|
package/report/adapterInfo.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.
|
|
2
|
+
"version": "2.9.2",
|
|
3
3
|
"configLines": 8406,
|
|
4
4
|
"scriptLines": 1783,
|
|
5
5
|
"codeLines": 12921,
|
|
6
|
-
"testLines":
|
|
7
|
-
"testCases":
|
|
8
|
-
"totalCodeLines":
|
|
6
|
+
"testLines": 11842,
|
|
7
|
+
"testCases": 612,
|
|
8
|
+
"totalCodeLines": 26546,
|
|
9
9
|
"wfTasks": 165
|
|
10
10
|
}
|
package/sampleProperties.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"auth_method": "basic user_password",
|
|
18
18
|
"username": "username",
|
|
19
19
|
"password": "password",
|
|
20
|
-
"token": "",
|
|
20
|
+
"token": "token",
|
|
21
21
|
"token_timeout": 180000,
|
|
22
22
|
"token_cache": "local",
|
|
23
23
|
"invalid_token_error": 401,
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
"ostypePrefix": "meraki-",
|
|
137
137
|
"port": "{port}",
|
|
138
138
|
"ipaddress": "{ip_addr}",
|
|
139
|
-
"serial"
|
|
139
|
+
"serial": "{serial}"
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
],
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
"ostypePrefix": "meraki-",
|
|
163
163
|
"port": "{port}",
|
|
164
164
|
"ipaddress": "{ip_addr}",
|
|
165
|
-
"serial"
|
|
165
|
+
"serial": "{serial}",
|
|
166
166
|
"id": "{myid}"
|
|
167
167
|
}
|
|
168
168
|
}
|
|
@@ -246,7 +246,7 @@
|
|
|
246
246
|
"ostypePrefix": "meraki-",
|
|
247
247
|
"port": "{port}",
|
|
248
248
|
"ipaddress": "{ip_addr}",
|
|
249
|
-
"serial"
|
|
249
|
+
"serial": "{serial}",
|
|
250
250
|
"id": "{myid}"
|
|
251
251
|
}
|
|
252
252
|
}
|
|
@@ -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
|
}
|
|
@@ -2504,7 +2508,7 @@ describe('[integration] Servicenow Adapter Test', () => {
|
|
|
2504
2508
|
|
|
2505
2509
|
const usersCreateUsersBodyParam = {
|
|
2506
2510
|
username: `IAP${randExt}`,
|
|
2507
|
-
password:
|
|
2511
|
+
password: samProps.authentication.password
|
|
2508
2512
|
};
|
|
2509
2513
|
let usersId = '02826bf03710200044e0bfc8bcbe5d3f';
|
|
2510
2514
|
const usersUpdateUsersBodyParam = { name: 'IAP TESTER' };
|
|
@@ -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] Servicenow 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] Servicenow 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', () => {
|
|
@@ -6111,7 +6115,7 @@ describe('[unit] Servicenow Adapter Test', () => {
|
|
|
6111
6115
|
}).timeout(attemptTimeout);
|
|
6112
6116
|
it('should error on create a user - no username', (done) => {
|
|
6113
6117
|
try {
|
|
6114
|
-
const ubody = { password:
|
|
6118
|
+
const ubody = { password: samProps.authentication.password };
|
|
6115
6119
|
a.createUsers(ubody, (data, error) => {
|
|
6116
6120
|
try {
|
|
6117
6121
|
const displayE = 'Schema validation failed on must have required property \'username\'';
|
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
|
-
---------------------------------------------------------------------------------------------
|