@itentialopensource/adapter-servicenow 2.9.7 → 2.10.0
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/.eslintrc.js +1 -0
- package/AUTH.md +4 -4
- package/BROKER.md +4 -4
- package/CALLS.md +9 -9
- package/ENHANCE.md +3 -3
- package/PROPERTIES.md +24 -9
- package/README.md +24 -23
- package/SUMMARY.md +2 -2
- package/SYSTEMINFO.md +1 -1
- package/TAB1.md +2 -2
- package/TAB2.md +11 -7
- package/TROUBLESHOOT.md +10 -1
- package/UTILITIES.md +473 -0
- package/adapter.js +12 -12
- package/adapterBase.js +52 -16
- package/package.json +24 -28
- package/pronghorn.json +34 -32
- package/propertiesSchema.json +68 -7
- package/report/adapterInfo.json +7 -7
- package/report/auto-adapter-openapi.json +128401 -0
- package/report/updateReport1748556221331.json +120 -0
- package/sampleProperties.json +6 -2
- package/test/integration/adapterTestBasicGet.js +88 -54
- package/test/integration/adapterTestConnectivity.js +15 -16
- package/test/integration/adapterTestIntegration.js +1 -38
- package/test/unit/adapterBaseTestUnit.js +641 -39
- package/test/unit/adapterTestUnit.js +17 -54
- package/utils/adapterInfo.js +114 -164
- package/utils/argParser.js +44 -0
- package/utils/checkMigrate.js +77 -38
- package/utils/entitiesToDB.js +53 -42
- package/utils/logger.js +26 -0
- package/utils/modify.js +56 -55
- package/utils/mongoDbConnection.js +79 -0
- package/utils/mongoUtils.js +162 -0
- package/utils/taskMover.js +31 -32
- package/utils/tbScript.js +36 -172
- package/utils/tbUtils.js +84 -226
- package/utils/troubleshootingAdapter.js +68 -84
- package/utils/updateAdapterConfig.js +158 -0
- package/utils/addAuth.js +0 -94
- package/utils/artifactize.js +0 -146
- package/utils/basicGet.js +0 -50
- package/utils/packModificationScript.js +0 -35
- package/utils/patches2bundledDeps.js +0 -90
package/adapterBase.js
CHANGED
|
@@ -32,6 +32,7 @@ const entitiesToDB = require(path.join(__dirname, 'utils/entitiesToDB'));
|
|
|
32
32
|
const troubleshootingAdapter = require(path.join(__dirname, 'utils/troubleshootingAdapter'));
|
|
33
33
|
const tbUtils = require(path.join(__dirname, 'utils/tbUtils'));
|
|
34
34
|
const taskMover = require(path.join(__dirname, 'utils/taskMover'));
|
|
35
|
+
const { updateMongoDBConfig } = require(path.join(__dirname, 'utils/updateAdapterConfig'));
|
|
35
36
|
|
|
36
37
|
let propUtil = null;
|
|
37
38
|
let choosepath = null;
|
|
@@ -366,7 +367,6 @@ class AdapterBase extends EventEmitterCl {
|
|
|
366
367
|
// if we were healthy, toggle health
|
|
367
368
|
if (this.healthy) {
|
|
368
369
|
this.emit('OFFLINE', { id: this.id });
|
|
369
|
-
this.emit('DEGRADED', { id: this.id });
|
|
370
370
|
this.healthy = false;
|
|
371
371
|
if (typeof error === 'object') {
|
|
372
372
|
log.error(`${origin}: HEALTH CHECK - Error ${JSON.stringify(error)}`);
|
|
@@ -385,7 +385,6 @@ class AdapterBase extends EventEmitterCl {
|
|
|
385
385
|
|
|
386
386
|
// if we were unhealthy, toggle health
|
|
387
387
|
if (!this.healthy) {
|
|
388
|
-
this.emit('FIXED', { id: this.id });
|
|
389
388
|
this.emit('ONLINE', { id: this.id });
|
|
390
389
|
this.healthy = true;
|
|
391
390
|
log.info(`${origin}: HEALTH CHECK SUCCESSFUL`);
|
|
@@ -583,21 +582,32 @@ class AdapterBase extends EventEmitterCl {
|
|
|
583
582
|
|
|
584
583
|
// take action based on type of file being changed
|
|
585
584
|
if (type === 'action') {
|
|
586
|
-
// BACKUP???
|
|
587
585
|
const ares = updateAction(epath, action, changes);
|
|
588
586
|
if (ares) {
|
|
589
587
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, `Incomplete Configuration Change: ${ares}`, [], null, null, null);
|
|
590
588
|
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
591
589
|
return callback(null, errorObj);
|
|
592
590
|
}
|
|
593
|
-
//
|
|
594
|
-
|
|
591
|
+
// Update MongoDB if possible
|
|
592
|
+
updateMongoDBConfig({
|
|
593
|
+
id: this.id,
|
|
594
|
+
mongoProps: this.allProps.mongo,
|
|
595
|
+
entity,
|
|
596
|
+
type,
|
|
597
|
+
configFile,
|
|
598
|
+
changes,
|
|
599
|
+
action,
|
|
600
|
+
replace
|
|
601
|
+
}).catch((error) => {
|
|
602
|
+
log.error(`${origin}: Error updating MongoDB configuration: ${error.message}`);
|
|
603
|
+
});
|
|
595
604
|
const result = {
|
|
596
605
|
response: `Action updates completed to entity: ${entity} - ${action}`
|
|
597
606
|
};
|
|
598
607
|
log.info(result.response);
|
|
599
608
|
return callback(result, null);
|
|
600
609
|
}
|
|
610
|
+
|
|
601
611
|
if (type === 'schema') {
|
|
602
612
|
const sres = updateSchema(epath, configFile, changes);
|
|
603
613
|
if (sres) {
|
|
@@ -605,12 +615,26 @@ class AdapterBase extends EventEmitterCl {
|
|
|
605
615
|
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
606
616
|
return callback(null, errorObj);
|
|
607
617
|
}
|
|
618
|
+
// Update MongoDB if possible
|
|
619
|
+
updateMongoDBConfig({
|
|
620
|
+
id: this.id,
|
|
621
|
+
mongoProps: this.allProps.mongo,
|
|
622
|
+
entity,
|
|
623
|
+
type,
|
|
624
|
+
configFile,
|
|
625
|
+
changes,
|
|
626
|
+
action,
|
|
627
|
+
replace
|
|
628
|
+
}).catch((error) => {
|
|
629
|
+
log.error(`${origin}: Error updating MongoDB configuration: ${error.message}`);
|
|
630
|
+
});
|
|
608
631
|
const result = {
|
|
609
632
|
response: `Schema updates completed to entity: ${entity} - ${configFile}`
|
|
610
633
|
};
|
|
611
634
|
log.info(result.response);
|
|
612
635
|
return callback(result, null);
|
|
613
636
|
}
|
|
637
|
+
|
|
614
638
|
if (type === 'mock') {
|
|
615
639
|
// if the mock directory does not exist - error
|
|
616
640
|
const mpath = `${__dirname}/entities/${entity}/mockdatafiles`;
|
|
@@ -624,18 +648,31 @@ class AdapterBase extends EventEmitterCl {
|
|
|
624
648
|
return callback(null, errorObj);
|
|
625
649
|
}
|
|
626
650
|
const mres = updateMock(mpath, configFile, changes, replace);
|
|
627
|
-
|
|
628
651
|
if (mres) {
|
|
629
652
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, `Incomplete Configuration Change: ${mres}`, [], null, null, null);
|
|
630
653
|
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
631
654
|
return callback(null, errorObj);
|
|
632
655
|
}
|
|
656
|
+
// Update MongoDB if possible
|
|
657
|
+
updateMongoDBConfig({
|
|
658
|
+
id: this.id,
|
|
659
|
+
mongoProps: this.allProps.mongo,
|
|
660
|
+
entity,
|
|
661
|
+
type,
|
|
662
|
+
configFile,
|
|
663
|
+
changes,
|
|
664
|
+
action,
|
|
665
|
+
replace
|
|
666
|
+
}).catch((error) => {
|
|
667
|
+
log.error(`${origin}: Error updating MongoDB configuration: ${error.message}`);
|
|
668
|
+
});
|
|
633
669
|
const result = {
|
|
634
670
|
response: `Mock data updates completed to entity: ${entity} - ${configFile}`
|
|
635
671
|
};
|
|
636
672
|
log.info(result.response);
|
|
637
673
|
return callback(result, null);
|
|
638
674
|
}
|
|
675
|
+
|
|
639
676
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, `Incomplete Configuration Change: Unsupported Type - ${type}`, [], null, null, null);
|
|
640
677
|
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
641
678
|
return callback(null, errorObj);
|
|
@@ -831,14 +868,13 @@ class AdapterBase extends EventEmitterCl {
|
|
|
831
868
|
*
|
|
832
869
|
* @function iapTroubleshootAdapter
|
|
833
870
|
* @param {Object} props - the connection, healthcheck and authentication properties
|
|
834
|
-
* @param {boolean} persistFlag - whether the adapter properties should be updated
|
|
835
871
|
* @param {Adapter} adapter - adapter instance to troubleshoot
|
|
836
872
|
* @param {Callback} callback - callback function to return troubleshoot results
|
|
837
873
|
*/
|
|
838
|
-
async iapTroubleshootAdapter(props,
|
|
874
|
+
async iapTroubleshootAdapter(props, adapter, callback) {
|
|
839
875
|
try {
|
|
840
|
-
const result = await troubleshootingAdapter.troubleshoot(props, false,
|
|
841
|
-
if (result.healthCheck && result.connectivity.failCount === 0 && result.basicGet.
|
|
876
|
+
const result = await troubleshootingAdapter.troubleshoot(props, false, adapter);
|
|
877
|
+
if (result.healthCheck && result.connectivity.failCount === 0 && result.basicGet.passCount !== 0) {
|
|
842
878
|
return callback(result);
|
|
843
879
|
}
|
|
844
880
|
return callback(null, result);
|
|
@@ -875,8 +911,7 @@ class AdapterBase extends EventEmitterCl {
|
|
|
875
911
|
*/
|
|
876
912
|
async iapRunAdapterConnectivity(callback) {
|
|
877
913
|
try {
|
|
878
|
-
const
|
|
879
|
-
const result = tbUtils.runConnectivity(host, false);
|
|
914
|
+
const result = tbUtils.runConnectivity(this.allProps.host, false);
|
|
880
915
|
if (result.failCount > 0) {
|
|
881
916
|
return callback(null, result);
|
|
882
917
|
}
|
|
@@ -890,12 +925,13 @@ class AdapterBase extends EventEmitterCl {
|
|
|
890
925
|
* @summary runs basicGet script for adapter
|
|
891
926
|
*
|
|
892
927
|
* @function iapRunAdapterBasicGet
|
|
928
|
+
* @param {number} maxCalls - how many GETs to run (optional)
|
|
893
929
|
* @param {Callback} callback - callback function to return basicGet result
|
|
894
930
|
*/
|
|
895
|
-
iapRunAdapterBasicGet(callback) {
|
|
931
|
+
iapRunAdapterBasicGet(maxCalls, callback) {
|
|
896
932
|
try {
|
|
897
|
-
const result = tbUtils.runBasicGet(false);
|
|
898
|
-
if (result.
|
|
933
|
+
const result = tbUtils.runBasicGet(this.allProps, false, maxCalls);
|
|
934
|
+
if (result.passCount === 0) {
|
|
899
935
|
return callback(null, result);
|
|
900
936
|
}
|
|
901
937
|
return callback(result);
|
|
@@ -917,7 +953,7 @@ class AdapterBase extends EventEmitterCl {
|
|
|
917
953
|
log.trace(origin);
|
|
918
954
|
|
|
919
955
|
try {
|
|
920
|
-
const result = await entitiesToDB.moveEntitiesToDB(__dirname, { pronghornProps: this.allProps, id: this.id });
|
|
956
|
+
const result = await entitiesToDB.moveEntitiesToDB(__dirname, { pronghornProps: { mongo: this.allProps && this.allProps.mongo }, id: this.id });
|
|
921
957
|
return callback(result, null);
|
|
922
958
|
} catch (err) {
|
|
923
959
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, err);
|
package/package.json
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itentialopensource/adapter-servicenow",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.0",
|
|
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.69.14",
|
|
9
9
|
"adapterType": "http",
|
|
10
10
|
"scripts": {
|
|
11
|
-
"artifactize": "npm i && node utils/packModificationScript.js",
|
|
12
11
|
"preinstall": "node utils/setup.js",
|
|
13
12
|
"deinstall": "node utils/removeHooks.js",
|
|
14
13
|
"lint": "node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js",
|
|
@@ -17,7 +16,6 @@
|
|
|
17
16
|
"test:unit": "mocha test/unit/adapterTestUnit.js --LOG=error",
|
|
18
17
|
"test:integration": "mocha test/integration/adapterTestIntegration.js --LOG=error",
|
|
19
18
|
"test": "npm run test:baseunit && npm run test:unit && npm run test:integration",
|
|
20
|
-
"adapter:install": "npm i && node utils/tbScript.js install",
|
|
21
19
|
"adapter:checkMigrate": "node utils/checkMigrate.js",
|
|
22
20
|
"adapter:findPath": "node utils/findPath.js",
|
|
23
21
|
"adapter:migrate": "node utils/modify.js -m",
|
|
@@ -32,10 +30,9 @@
|
|
|
32
30
|
},
|
|
33
31
|
"keywords": [
|
|
34
32
|
"Itential",
|
|
35
|
-
"
|
|
33
|
+
"Itential Platform",
|
|
36
34
|
"Automation",
|
|
37
35
|
"Integration",
|
|
38
|
-
"App-Artifacts",
|
|
39
36
|
"Adapter",
|
|
40
37
|
"ITSM",
|
|
41
38
|
"Testing",
|
|
@@ -54,30 +51,29 @@
|
|
|
54
51
|
"author": "Itential",
|
|
55
52
|
"homepage": "https://gitlab.com/itentialopensource/adapters/adapter-servicenow#readme",
|
|
56
53
|
"dependencies": {
|
|
57
|
-
"@itentialopensource/adapter-utils": "
|
|
58
|
-
"acorn": "
|
|
59
|
-
"ajv": "
|
|
60
|
-
"axios": "
|
|
61
|
-
"commander": "
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"mocha": "
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"winston": "^3.17.0"
|
|
54
|
+
"@itentialopensource/adapter-utils": "5.10.16",
|
|
55
|
+
"acorn": "8.14.1",
|
|
56
|
+
"ajv": "8.17.1",
|
|
57
|
+
"axios": "1.9.0",
|
|
58
|
+
"commander": "11.1.0",
|
|
59
|
+
"fs-extra": "11.3.0",
|
|
60
|
+
"json-query": "2.2.2",
|
|
61
|
+
"mocha": "10.8.2",
|
|
62
|
+
"mocha-param": "2.0.1",
|
|
63
|
+
"mongodb": "4.17.2",
|
|
64
|
+
"ping": "0.4.4",
|
|
65
|
+
"prompts": "2.4.2",
|
|
66
|
+
"readline-sync": "1.4.10",
|
|
67
|
+
"semver": "7.7.2",
|
|
68
|
+
"winston": "3.17.0"
|
|
73
69
|
},
|
|
74
70
|
"devDependencies": {
|
|
75
|
-
"chai": "
|
|
76
|
-
"eslint": "
|
|
77
|
-
"eslint-config-airbnb-base": "
|
|
78
|
-
"eslint-plugin-import": "
|
|
79
|
-
"eslint-plugin-json": "
|
|
80
|
-
"testdouble": "
|
|
71
|
+
"chai": "4.5.0",
|
|
72
|
+
"eslint": "8.57.0",
|
|
73
|
+
"eslint-config-airbnb-base": "15.0.0",
|
|
74
|
+
"eslint-plugin-import": "2.31.0",
|
|
75
|
+
"eslint-plugin-json": "3.1.0",
|
|
76
|
+
"testdouble": "3.18.0"
|
|
81
77
|
},
|
|
82
78
|
"private": false
|
|
83
79
|
}
|
package/pronghorn.json
CHANGED
|
@@ -226,16 +226,6 @@
|
|
|
226
226
|
"title": "props",
|
|
227
227
|
"type": "object"
|
|
228
228
|
}
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
"name": "persistFlag",
|
|
232
|
-
"type": "boolean",
|
|
233
|
-
"info": "Whether the input properties should be saved",
|
|
234
|
-
"required": true,
|
|
235
|
-
"schema": {
|
|
236
|
-
"title": "persistFlag",
|
|
237
|
-
"type": "boolean"
|
|
238
|
-
}
|
|
239
229
|
}
|
|
240
230
|
],
|
|
241
231
|
"output": {
|
|
@@ -306,7 +296,19 @@
|
|
|
306
296
|
"name": "iapRunAdapterBasicGet",
|
|
307
297
|
"summary": "Runs basicGet script for adapter",
|
|
308
298
|
"description": "Runs basicGet script for adapter",
|
|
309
|
-
"input": [
|
|
299
|
+
"input": [
|
|
300
|
+
{
|
|
301
|
+
"name": "maxCalls",
|
|
302
|
+
"required": false,
|
|
303
|
+
"type": "number",
|
|
304
|
+
"info": "How many GET endpoints to test (defaults to 5)",
|
|
305
|
+
"schema": {
|
|
306
|
+
"title": "maxCalls",
|
|
307
|
+
"type": "number",
|
|
308
|
+
"default": 5
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
],
|
|
310
312
|
"output": {
|
|
311
313
|
"name": "result",
|
|
312
314
|
"type": "object",
|
|
@@ -327,8 +329,8 @@
|
|
|
327
329
|
},
|
|
328
330
|
{
|
|
329
331
|
"name": "iapMoveAdapterEntitiesToDB",
|
|
330
|
-
"summary": "Moves entities from an adapter into the
|
|
331
|
-
"description": "Moves entities from an adapter into the
|
|
332
|
+
"summary": "Moves entities from an adapter into the Itential Platform database",
|
|
333
|
+
"description": "Moves entities from an adapter into the Itential Platform database",
|
|
332
334
|
"input": [],
|
|
333
335
|
"output": {
|
|
334
336
|
"name": "res",
|
|
@@ -6604,7 +6606,7 @@
|
|
|
6604
6606
|
{
|
|
6605
6607
|
"name": "iapMetadata",
|
|
6606
6608
|
"type": "object",
|
|
6607
|
-
"info": "
|
|
6609
|
+
"info": "Itential Platform Metadata object contains additional info needed for the request: payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, etc.",
|
|
6608
6610
|
"required": false,
|
|
6609
6611
|
"schema": {
|
|
6610
6612
|
"title": "iapMetadata",
|
|
@@ -6698,7 +6700,7 @@
|
|
|
6698
6700
|
{
|
|
6699
6701
|
"name": "iapMetadata",
|
|
6700
6702
|
"type": "object",
|
|
6701
|
-
"info": "
|
|
6703
|
+
"info": "Itential Platform Metadata object contains additional info needed for the request: payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, etc.",
|
|
6702
6704
|
"required": false,
|
|
6703
6705
|
"schema": {
|
|
6704
6706
|
"title": "iapMetadata",
|
|
@@ -6762,7 +6764,7 @@
|
|
|
6762
6764
|
{
|
|
6763
6765
|
"name": "iapMetadata",
|
|
6764
6766
|
"type": "object",
|
|
6765
|
-
"info": "
|
|
6767
|
+
"info": "Itential Platform Metadata object contains additional info needed for the request: payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, etc.",
|
|
6766
6768
|
"required": false,
|
|
6767
6769
|
"schema": {
|
|
6768
6770
|
"title": "iapMetadata",
|
|
@@ -6836,7 +6838,7 @@
|
|
|
6836
6838
|
{
|
|
6837
6839
|
"name": "iapMetadata",
|
|
6838
6840
|
"type": "object",
|
|
6839
|
-
"info": "
|
|
6841
|
+
"info": "Itential Platform Metadata object contains additional info needed for the request: payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, etc.",
|
|
6840
6842
|
"required": false,
|
|
6841
6843
|
"schema": {
|
|
6842
6844
|
"title": "iapMetadata",
|
|
@@ -6920,7 +6922,7 @@
|
|
|
6920
6922
|
{
|
|
6921
6923
|
"name": "iapMetadata",
|
|
6922
6924
|
"type": "object",
|
|
6923
|
-
"info": "
|
|
6925
|
+
"info": "Itential Platform Metadata object contains additional info needed for the request: payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, etc.",
|
|
6924
6926
|
"required": false,
|
|
6925
6927
|
"schema": {
|
|
6926
6928
|
"title": "iapMetadata",
|
|
@@ -6964,7 +6966,7 @@
|
|
|
6964
6966
|
{
|
|
6965
6967
|
"name": "iapMetadata",
|
|
6966
6968
|
"type": "object",
|
|
6967
|
-
"info": "
|
|
6969
|
+
"info": "Itential Platform Metadata object contains additional info needed for the request: payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, etc.",
|
|
6968
6970
|
"required": false,
|
|
6969
6971
|
"schema": {
|
|
6970
6972
|
"title": "iapMetadata",
|
|
@@ -7008,7 +7010,7 @@
|
|
|
7008
7010
|
{
|
|
7009
7011
|
"name": "iapMetadata",
|
|
7010
7012
|
"type": "object",
|
|
7011
|
-
"info": "
|
|
7013
|
+
"info": "Itential Platform Metadata object contains additional info needed for the request: payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, etc.",
|
|
7012
7014
|
"required": false,
|
|
7013
7015
|
"schema": {
|
|
7014
7016
|
"title": "iapMetadata",
|
|
@@ -7092,7 +7094,7 @@
|
|
|
7092
7094
|
{
|
|
7093
7095
|
"name": "iapMetadata",
|
|
7094
7096
|
"type": "object",
|
|
7095
|
-
"info": "
|
|
7097
|
+
"info": "Itential Platform Metadata object contains additional info needed for the request: payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, etc.",
|
|
7096
7098
|
"required": false,
|
|
7097
7099
|
"schema": {
|
|
7098
7100
|
"title": "iapMetadata",
|
|
@@ -7136,7 +7138,7 @@
|
|
|
7136
7138
|
{
|
|
7137
7139
|
"name": "iapMetadata",
|
|
7138
7140
|
"type": "object",
|
|
7139
|
-
"info": "
|
|
7141
|
+
"info": "Itential Platform Metadata object contains additional info needed for the request: payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, etc.",
|
|
7140
7142
|
"required": false,
|
|
7141
7143
|
"schema": {
|
|
7142
7144
|
"title": "iapMetadata",
|
|
@@ -7180,7 +7182,7 @@
|
|
|
7180
7182
|
{
|
|
7181
7183
|
"name": "iapMetadata",
|
|
7182
7184
|
"type": "object",
|
|
7183
|
-
"info": "
|
|
7185
|
+
"info": "Itential Platform Metadata object contains additional info needed for the request: payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, etc.",
|
|
7184
7186
|
"required": false,
|
|
7185
7187
|
"schema": {
|
|
7186
7188
|
"title": "iapMetadata",
|
|
@@ -7234,7 +7236,7 @@
|
|
|
7234
7236
|
{
|
|
7235
7237
|
"name": "iapMetadata",
|
|
7236
7238
|
"type": "object",
|
|
7237
|
-
"info": "
|
|
7239
|
+
"info": "Itential Platform Metadata object contains additional info needed for the request: payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, etc.",
|
|
7238
7240
|
"required": false,
|
|
7239
7241
|
"schema": {
|
|
7240
7242
|
"title": "iapMetadata",
|
|
@@ -7328,7 +7330,7 @@
|
|
|
7328
7330
|
{
|
|
7329
7331
|
"name": "iapMetadata",
|
|
7330
7332
|
"type": "object",
|
|
7331
|
-
"info": "
|
|
7333
|
+
"info": "Itential Platform Metadata object contains additional info needed for the request: payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, etc.",
|
|
7332
7334
|
"required": false,
|
|
7333
7335
|
"schema": {
|
|
7334
7336
|
"title": "iapMetadata",
|
|
@@ -7372,7 +7374,7 @@
|
|
|
7372
7374
|
{
|
|
7373
7375
|
"name": "iapMetadata",
|
|
7374
7376
|
"type": "object",
|
|
7375
|
-
"info": "
|
|
7377
|
+
"info": "Itential Platform Metadata object contains additional info needed for the request: payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, etc.",
|
|
7376
7378
|
"required": false,
|
|
7377
7379
|
"schema": {
|
|
7378
7380
|
"title": "iapMetadata",
|
|
@@ -7426,7 +7428,7 @@
|
|
|
7426
7428
|
{
|
|
7427
7429
|
"name": "iapMetadata",
|
|
7428
7430
|
"type": "object",
|
|
7429
|
-
"info": "
|
|
7431
|
+
"info": "Itential Platform Metadata object contains additional info needed for the request: payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, etc.",
|
|
7430
7432
|
"required": false,
|
|
7431
7433
|
"schema": {
|
|
7432
7434
|
"title": "iapMetadata",
|
|
@@ -7470,7 +7472,7 @@
|
|
|
7470
7472
|
{
|
|
7471
7473
|
"name": "iapMetadata",
|
|
7472
7474
|
"type": "object",
|
|
7473
|
-
"info": "
|
|
7475
|
+
"info": "Itential Platform Metadata object contains additional info needed for the request: payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, etc.",
|
|
7474
7476
|
"required": false,
|
|
7475
7477
|
"schema": {
|
|
7476
7478
|
"title": "iapMetadata",
|
|
@@ -7524,7 +7526,7 @@
|
|
|
7524
7526
|
{
|
|
7525
7527
|
"name": "iapMetadata",
|
|
7526
7528
|
"type": "object",
|
|
7527
|
-
"info": "
|
|
7529
|
+
"info": "Itential Platform Metadata object contains additional info needed for the request: payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, etc.",
|
|
7528
7530
|
"required": false,
|
|
7529
7531
|
"schema": {
|
|
7530
7532
|
"title": "iapMetadata",
|
|
@@ -7608,7 +7610,7 @@
|
|
|
7608
7610
|
{
|
|
7609
7611
|
"name": "iapMetadata",
|
|
7610
7612
|
"type": "object",
|
|
7611
|
-
"info": "
|
|
7613
|
+
"info": "Itential Platform Metadata object contains additional info needed for the request: payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, etc.",
|
|
7612
7614
|
"required": false,
|
|
7613
7615
|
"schema": {
|
|
7614
7616
|
"title": "iapMetadata",
|
|
@@ -7662,7 +7664,7 @@
|
|
|
7662
7664
|
{
|
|
7663
7665
|
"name": "iapMetadata",
|
|
7664
7666
|
"type": "object",
|
|
7665
|
-
"info": "
|
|
7667
|
+
"info": "Itential Platform Metadata object contains additional info needed for the request: payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, etc.",
|
|
7666
7668
|
"required": false,
|
|
7667
7669
|
"schema": {
|
|
7668
7670
|
"title": "iapMetadata",
|
|
@@ -7736,7 +7738,7 @@
|
|
|
7736
7738
|
{
|
|
7737
7739
|
"name": "iapMetadata",
|
|
7738
7740
|
"type": "object",
|
|
7739
|
-
"info": "
|
|
7741
|
+
"info": "Itential Platform Metadata object contains additional info needed for the request: payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, etc.",
|
|
7740
7742
|
"required": false,
|
|
7741
7743
|
"schema": {
|
|
7742
7744
|
"title": "iapMetadata",
|
package/propertiesSchema.json
CHANGED
|
@@ -764,6 +764,14 @@
|
|
|
764
764
|
"security/ca.pem"
|
|
765
765
|
]
|
|
766
766
|
},
|
|
767
|
+
"ca_file_content": {
|
|
768
|
+
"type": "string",
|
|
769
|
+
"description": "The content of the CA file used for SSL",
|
|
770
|
+
"default": "",
|
|
771
|
+
"examples": [
|
|
772
|
+
"-----BEGIN CERTIFICATE-----"
|
|
773
|
+
]
|
|
774
|
+
},
|
|
767
775
|
"key_file": {
|
|
768
776
|
"type": "string",
|
|
769
777
|
"description": "The fully qualified path name to the key file used for SSL",
|
|
@@ -853,32 +861,48 @@
|
|
|
853
861
|
"mongo": {
|
|
854
862
|
"type": "object",
|
|
855
863
|
"properties": {
|
|
864
|
+
"url": {
|
|
865
|
+
"type": "string",
|
|
866
|
+
"description": "Mongo's complete connection URL. This property overrides host, port, database, username, password and replSet settings.",
|
|
867
|
+
"examples": [
|
|
868
|
+
"mongodb://[username:password@]host1[:port1][,...hostN[:portN]][/[defaultauthdb][?options]]",
|
|
869
|
+
"mongodb+srv://[username:password@]cluster0.xxxxx.mongodb.net/[defaultauthdb][?options]",
|
|
870
|
+
"mongodb+srv://cluster0.xxxxx.mongodb.net/[defaultauthdb][?options]"
|
|
871
|
+
]
|
|
872
|
+
},
|
|
856
873
|
"host": {
|
|
857
874
|
"type": "string",
|
|
858
|
-
"description": "
|
|
875
|
+
"description": "Host information for the Mongo server",
|
|
859
876
|
"default": "",
|
|
860
877
|
"examples": [
|
|
861
|
-
"localhost"
|
|
878
|
+
"localhost",
|
|
879
|
+
"cluster0.xxxxx.mongodb.net",
|
|
880
|
+
"my-cluster.example.com"
|
|
862
881
|
]
|
|
863
882
|
},
|
|
864
883
|
"port": {
|
|
865
884
|
"type": "integer",
|
|
866
|
-
"description": "
|
|
885
|
+
"description": "Port information for the Mongo server. Not used when using mongodb+srv:// protocol",
|
|
867
886
|
"default": 443,
|
|
868
887
|
"minimum": 0,
|
|
869
888
|
"maximum": 65535
|
|
870
889
|
},
|
|
871
890
|
"database": {
|
|
872
891
|
"type": "string",
|
|
873
|
-
"description": "The
|
|
892
|
+
"description": "The database for the adapter to use for its data.",
|
|
874
893
|
"default": "",
|
|
875
894
|
"examples": [
|
|
876
895
|
"adapter-xyz"
|
|
877
896
|
]
|
|
878
897
|
},
|
|
898
|
+
"dbAuth": {
|
|
899
|
+
"type": "boolean",
|
|
900
|
+
"description": "Whether to use authentication for MongoDB connection. Default is false.",
|
|
901
|
+
"default": false
|
|
902
|
+
},
|
|
879
903
|
"username": {
|
|
880
904
|
"type": "string",
|
|
881
|
-
"description": "
|
|
905
|
+
"description": "If credentials are required to access Mongo, this is the user to login as.",
|
|
882
906
|
"default": "",
|
|
883
907
|
"examples": [
|
|
884
908
|
"username"
|
|
@@ -886,7 +910,7 @@
|
|
|
886
910
|
},
|
|
887
911
|
"password": {
|
|
888
912
|
"type": "string",
|
|
889
|
-
"description": "
|
|
913
|
+
"description": "If credentials are required to access Mongo, this is the password to login with.",
|
|
890
914
|
"default": "",
|
|
891
915
|
"examples": [
|
|
892
916
|
"password"
|
|
@@ -894,12 +918,17 @@
|
|
|
894
918
|
},
|
|
895
919
|
"replSet": {
|
|
896
920
|
"type": "string",
|
|
897
|
-
"description": "
|
|
921
|
+
"description": "If the database is set up to use replica sets, define it here so it can be added to the database connection. Not used when using mongodb+srv:// protocol",
|
|
898
922
|
"default": "",
|
|
899
923
|
"examples": [
|
|
900
924
|
"my_repolica_set"
|
|
901
925
|
]
|
|
902
926
|
},
|
|
927
|
+
"addSrv": {
|
|
928
|
+
"type": "boolean",
|
|
929
|
+
"description": "Whether the connection requires the mongodb+srv:// protocol. If true, uses mongodb+srv:// protocol. Note: mongodb+srv:// can also be used for non-Atlas deployments that support DNS SRV records",
|
|
930
|
+
"default": false
|
|
931
|
+
},
|
|
903
932
|
"db_ssl": {
|
|
904
933
|
"type": "object",
|
|
905
934
|
"description": "SSL for mongo database connection",
|
|
@@ -940,6 +969,38 @@
|
|
|
940
969
|
}
|
|
941
970
|
}
|
|
942
971
|
}
|
|
972
|
+
},
|
|
973
|
+
"dependencies": {
|
|
974
|
+
"dbAuth": {
|
|
975
|
+
"oneOf": [
|
|
976
|
+
{
|
|
977
|
+
"properties": {
|
|
978
|
+
"dbAuth": {
|
|
979
|
+
"const": false
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
},
|
|
983
|
+
{
|
|
984
|
+
"properties": {
|
|
985
|
+
"dbAuth": {
|
|
986
|
+
"const": true
|
|
987
|
+
},
|
|
988
|
+
"username": {
|
|
989
|
+
"type": "string",
|
|
990
|
+
"minLength": 1
|
|
991
|
+
},
|
|
992
|
+
"password": {
|
|
993
|
+
"type": "string",
|
|
994
|
+
"minLength": 1
|
|
995
|
+
}
|
|
996
|
+
},
|
|
997
|
+
"required": [
|
|
998
|
+
"username",
|
|
999
|
+
"password"
|
|
1000
|
+
]
|
|
1001
|
+
}
|
|
1002
|
+
]
|
|
1003
|
+
}
|
|
943
1004
|
}
|
|
944
1005
|
},
|
|
945
1006
|
"devicebroker": {
|
package/report/adapterInfo.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.9.
|
|
3
|
-
"configLines":
|
|
4
|
-
"scriptLines":
|
|
5
|
-
"codeLines":
|
|
6
|
-
"testLines":
|
|
7
|
-
"testCases":
|
|
8
|
-
"totalCodeLines":
|
|
2
|
+
"version": "2.9.7",
|
|
3
|
+
"configLines": 15838,
|
|
4
|
+
"scriptLines": 2498,
|
|
5
|
+
"codeLines": 15059,
|
|
6
|
+
"testLines": 13557,
|
|
7
|
+
"testCases": 689,
|
|
8
|
+
"totalCodeLines": 31114,
|
|
9
9
|
"wfTasks": 184
|
|
10
10
|
}
|