@itentialopensource/adapter-splunk 0.3.0 → 0.4.1
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 +16 -0
- package/entities/Services/action.json +24 -24
- package/metadata.json +1 -1
- package/package.json +3 -3
- package/propertiesSchema.json +10 -1
- package/refs?service=git-upload-pack +0 -0
- package/report/adapterInfo.json +2 -2
- package/report/updateReport1698422928616.json +120 -0
- package/utils/methodDocumentor.js +16 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
|
|
2
|
+
## 0.4.1 [12-01-2023]
|
|
3
|
+
|
|
4
|
+
* Update request data types to URLENCODE for post calls
|
|
5
|
+
|
|
6
|
+
See merge request itentialopensource/adapters/telemetry-analytics/adapter-splunk!3
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 0.4.0 [11-07-2023]
|
|
11
|
+
|
|
12
|
+
* More migration changes
|
|
13
|
+
|
|
14
|
+
See merge request itentialopensource/adapters/telemetry-analytics/adapter-splunk!2
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
2
18
|
## 0.3.0 [10-19-2023]
|
|
3
19
|
|
|
4
20
|
* Adapter Engine has been updated and the changes are being migrated to the adapter
|
|
@@ -92,8 +92,8 @@
|
|
|
92
92
|
"responseSchema": "schema.json",
|
|
93
93
|
"timeout": 0,
|
|
94
94
|
"sendEmpty": false,
|
|
95
|
-
"requestDatatype": "
|
|
96
|
-
"responseDatatype": "
|
|
95
|
+
"requestDatatype": "URLENCODE",
|
|
96
|
+
"responseDatatype": "XML2JSON",
|
|
97
97
|
"headers": {},
|
|
98
98
|
"responseObjects": [
|
|
99
99
|
{
|
|
@@ -112,8 +112,8 @@
|
|
|
112
112
|
"responseSchema": "schema.json",
|
|
113
113
|
"timeout": 0,
|
|
114
114
|
"sendEmpty": false,
|
|
115
|
-
"requestDatatype": "
|
|
116
|
-
"responseDatatype": "
|
|
115
|
+
"requestDatatype": "URLENCODE",
|
|
116
|
+
"responseDatatype": "XML2JSON",
|
|
117
117
|
"headers": {},
|
|
118
118
|
"responseObjects": [
|
|
119
119
|
{
|
|
@@ -132,8 +132,8 @@
|
|
|
132
132
|
"responseSchema": "schema.json",
|
|
133
133
|
"timeout": 0,
|
|
134
134
|
"sendEmpty": false,
|
|
135
|
-
"requestDatatype": "
|
|
136
|
-
"responseDatatype": "
|
|
135
|
+
"requestDatatype": "URLENCODE",
|
|
136
|
+
"responseDatatype": "XML2JSON",
|
|
137
137
|
"headers": {},
|
|
138
138
|
"responseObjects": [
|
|
139
139
|
{
|
|
@@ -173,8 +173,8 @@
|
|
|
173
173
|
"responseSchema": "schema.json",
|
|
174
174
|
"timeout": 0,
|
|
175
175
|
"sendEmpty": false,
|
|
176
|
-
"requestDatatype": "
|
|
177
|
-
"responseDatatype": "
|
|
176
|
+
"requestDatatype": "URLENCODE",
|
|
177
|
+
"responseDatatype": "XML2JSON",
|
|
178
178
|
"headers": {},
|
|
179
179
|
"responseObjects": [
|
|
180
180
|
{
|
|
@@ -297,8 +297,8 @@
|
|
|
297
297
|
"responseSchema": "schema.json",
|
|
298
298
|
"timeout": 0,
|
|
299
299
|
"sendEmpty": false,
|
|
300
|
-
"requestDatatype": "
|
|
301
|
-
"responseDatatype": "
|
|
300
|
+
"requestDatatype": "URLENCODE",
|
|
301
|
+
"responseDatatype": "XML2JSON",
|
|
302
302
|
"headers": {},
|
|
303
303
|
"responseObjects": [
|
|
304
304
|
{
|
|
@@ -317,8 +317,8 @@
|
|
|
317
317
|
"responseSchema": "schema.json",
|
|
318
318
|
"timeout": 0,
|
|
319
319
|
"sendEmpty": false,
|
|
320
|
-
"requestDatatype": "
|
|
321
|
-
"responseDatatype": "
|
|
320
|
+
"requestDatatype": "URLENCODE",
|
|
321
|
+
"responseDatatype": "XML2JSON",
|
|
322
322
|
"headers": {},
|
|
323
323
|
"responseObjects": [
|
|
324
324
|
{
|
|
@@ -358,8 +358,8 @@
|
|
|
358
358
|
"responseSchema": "schema.json",
|
|
359
359
|
"timeout": 0,
|
|
360
360
|
"sendEmpty": false,
|
|
361
|
-
"requestDatatype": "
|
|
362
|
-
"responseDatatype": "
|
|
361
|
+
"requestDatatype": "URLENCODE",
|
|
362
|
+
"responseDatatype": "XML2JSON",
|
|
363
363
|
"headers": {},
|
|
364
364
|
"responseObjects": [
|
|
365
365
|
{
|
|
@@ -420,8 +420,8 @@
|
|
|
420
420
|
"responseSchema": "schema.json",
|
|
421
421
|
"timeout": 0,
|
|
422
422
|
"sendEmpty": false,
|
|
423
|
-
"requestDatatype": "
|
|
424
|
-
"responseDatatype": "
|
|
423
|
+
"requestDatatype": "URLENCODE",
|
|
424
|
+
"responseDatatype": "XML2JSON",
|
|
425
425
|
"headers": {},
|
|
426
426
|
"responseObjects": [
|
|
427
427
|
{
|
|
@@ -461,8 +461,8 @@
|
|
|
461
461
|
"responseSchema": "schema.json",
|
|
462
462
|
"timeout": 0,
|
|
463
463
|
"sendEmpty": false,
|
|
464
|
-
"requestDatatype": "
|
|
465
|
-
"responseDatatype": "
|
|
464
|
+
"requestDatatype": "URLENCODE",
|
|
465
|
+
"responseDatatype": "XML2JSON",
|
|
466
466
|
"headers": {},
|
|
467
467
|
"responseObjects": [
|
|
468
468
|
{
|
|
@@ -522,8 +522,8 @@
|
|
|
522
522
|
"responseSchema": "schema.json",
|
|
523
523
|
"timeout": 0,
|
|
524
524
|
"sendEmpty": false,
|
|
525
|
-
"requestDatatype": "
|
|
526
|
-
"responseDatatype": "
|
|
525
|
+
"requestDatatype": "URLENCODE",
|
|
526
|
+
"responseDatatype": "XML2JSON",
|
|
527
527
|
"headers": {},
|
|
528
528
|
"responseObjects": [
|
|
529
529
|
{
|
|
@@ -542,8 +542,8 @@
|
|
|
542
542
|
"responseSchema": "schema.json",
|
|
543
543
|
"timeout": 0,
|
|
544
544
|
"sendEmpty": false,
|
|
545
|
-
"requestDatatype": "
|
|
546
|
-
"responseDatatype": "
|
|
545
|
+
"requestDatatype": "URLENCODE",
|
|
546
|
+
"responseDatatype": "XML2JSON",
|
|
547
547
|
"headers": {},
|
|
548
548
|
"responseObjects": [
|
|
549
549
|
{
|
|
@@ -730,8 +730,8 @@
|
|
|
730
730
|
"responseSchema": "schema.json",
|
|
731
731
|
"timeout": 0,
|
|
732
732
|
"sendEmpty": false,
|
|
733
|
-
"requestDatatype": "
|
|
734
|
-
"responseDatatype": "
|
|
733
|
+
"requestDatatype": "URLENCODE",
|
|
734
|
+
"responseDatatype": "XML2JSON",
|
|
735
735
|
"headers": {},
|
|
736
736
|
"responseObjects": [
|
|
737
737
|
{
|
package/metadata.json
CHANGED
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"documentation": {
|
|
34
34
|
"storeLink": "",
|
|
35
35
|
"npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-splunk",
|
|
36
|
-
"repoLink": "https://gitlab.com/itentialopensource/adapters/telemetry-analytics/adapter-splunk
|
|
36
|
+
"repoLink": "https://gitlab.com/itentialopensource/adapters/telemetry-analytics/adapter-splunk",
|
|
37
37
|
"docLink": "https://docs.itential.com/opensource/docs/splunk",
|
|
38
38
|
"demoLinks": [],
|
|
39
39
|
"faqLink": "https://docs.itential.com/opensource/docs/troubleshooting-an-adapter",
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itentialopensource/adapter-splunk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "This adapter integrates with system described as: splunkAdapter.",
|
|
5
5
|
"main": "adapter.js",
|
|
6
6
|
"systemName": "Splunk",
|
|
7
7
|
"wizardVersion": "2.44.7",
|
|
8
|
-
"engineVersion": "1.67.
|
|
8
|
+
"engineVersion": "1.67.10",
|
|
9
9
|
"adapterType": "http",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"artifactize": "npm i && node utils/packModificationScript.js",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"author": "Itential",
|
|
56
56
|
"homepage": "https://gitlab.com/itentialopensource/adapters/telemetry-analytics/adapter-splunk#readme",
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@itentialopensource/adapter-utils": "^5.
|
|
58
|
+
"@itentialopensource/adapter-utils": "^5.3.2",
|
|
59
59
|
"acorn": "^8.10.0",
|
|
60
60
|
"ajv": "^8.12.0",
|
|
61
61
|
"axios": "^1.4.0",
|
package/propertiesSchema.json
CHANGED
|
@@ -109,6 +109,14 @@
|
|
|
109
109
|
},
|
|
110
110
|
"cache": {
|
|
111
111
|
"$ref": "#/definitions/cache"
|
|
112
|
+
},
|
|
113
|
+
"service": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"description": "Service we are integrating with -- used with AWS Authentication",
|
|
116
|
+
"examples": [
|
|
117
|
+
"ec2",
|
|
118
|
+
"route53"
|
|
119
|
+
]
|
|
112
120
|
}
|
|
113
121
|
},
|
|
114
122
|
"required": [
|
|
@@ -131,7 +139,8 @@
|
|
|
131
139
|
"jwt_token",
|
|
132
140
|
"request_token",
|
|
133
141
|
"no_authentication",
|
|
134
|
-
"multi_step_authentication"
|
|
142
|
+
"multi_step_authentication",
|
|
143
|
+
"aws_authentication"
|
|
135
144
|
]
|
|
136
145
|
},
|
|
137
146
|
"username": {
|
|
Binary file
|
package/report/adapterInfo.json
CHANGED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
{
|
|
2
|
+
"errors": [],
|
|
3
|
+
"statistics": [
|
|
4
|
+
{
|
|
5
|
+
"owner": "errorJson",
|
|
6
|
+
"description": "New adapter errors available for use",
|
|
7
|
+
"value": 0
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"owner": "errorJson",
|
|
11
|
+
"description": "Adapter errors no longer available for use",
|
|
12
|
+
"value": 0
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"owner": "errorJson",
|
|
16
|
+
"description": "Adapter errors that have been updated (e.g. recommendation changes)",
|
|
17
|
+
"value": 31
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"owner": "packageJson",
|
|
21
|
+
"description": "Number of production dependencies",
|
|
22
|
+
"value": 17
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"owner": "packageJson",
|
|
26
|
+
"description": "Number of development dependencies",
|
|
27
|
+
"value": 6
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"owner": "packageJson",
|
|
31
|
+
"description": "Number of npm scripts",
|
|
32
|
+
"value": 22
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"owner": "packageJson",
|
|
36
|
+
"description": "Runtime Library dependency",
|
|
37
|
+
"value": "^5.3.0"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"owner": "propertiesSchemaJson",
|
|
41
|
+
"description": "Adapter properties defined in the propertiesSchema file",
|
|
42
|
+
"value": 77
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"owner": "markdown",
|
|
46
|
+
"description": "Number of lines in the README.md",
|
|
47
|
+
"value": 347
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"owner": "markdown",
|
|
51
|
+
"description": "Number of lines in the SUMMARY.md",
|
|
52
|
+
"value": 9
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"owner": "markdown",
|
|
56
|
+
"description": "Number of lines in the PROPERTIES.md",
|
|
57
|
+
"value": 642
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"owner": "markdown",
|
|
61
|
+
"description": "Number of lines in the TROUBLESHOOT.md",
|
|
62
|
+
"value": 48
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"owner": "markdown",
|
|
66
|
+
"description": "Number of lines in the ENHANCE.md",
|
|
67
|
+
"value": 70
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"owner": "markdown",
|
|
71
|
+
"description": "Number of lines in the BROKER.md",
|
|
72
|
+
"value": 70
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"owner": "unitTestJS",
|
|
76
|
+
"description": "Number of lines of code in unit tests",
|
|
77
|
+
"value": 3793
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"owner": "unitTestJS",
|
|
81
|
+
"description": "Number of unit tests",
|
|
82
|
+
"value": 215
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"owner": "integrationTestJS",
|
|
86
|
+
"description": "Number of lines of code in integration tests",
|
|
87
|
+
"value": 1594
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"owner": "integrationTestJS",
|
|
91
|
+
"description": "Number of integration tests",
|
|
92
|
+
"value": 52
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"owner": "staticFile",
|
|
96
|
+
"description": "Number of lines of code in adapterBase.js",
|
|
97
|
+
"value": 1453
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"owner": "staticFile",
|
|
101
|
+
"description": "Number of static files added",
|
|
102
|
+
"value": 36
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"owner": "Overall",
|
|
106
|
+
"description": "Total lines of Code",
|
|
107
|
+
"value": 6840
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"owner": "Overall",
|
|
111
|
+
"description": "Total Tests",
|
|
112
|
+
"value": 267
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"owner": "Overall",
|
|
116
|
+
"description": "Total Files",
|
|
117
|
+
"value": 6
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
}
|
|
@@ -77,6 +77,7 @@ function readFileUsingLib(filename, descriptionObj, workflowObj, functionList) {
|
|
|
77
77
|
// parsing the file to get the function and class declarations.
|
|
78
78
|
const aFileFuncArgs = acorn.parse(aFile, { ecmaVersion: 2020 });
|
|
79
79
|
|
|
80
|
+
let callName = 'identifyRequest';
|
|
80
81
|
// Looping through all the declarations parsed:
|
|
81
82
|
aFileFuncArgs.body.forEach((e) => {
|
|
82
83
|
// Getting only the class declaration as it has our required functions.
|
|
@@ -89,8 +90,10 @@ function readFileUsingLib(filename, descriptionObj, workflowObj, functionList) {
|
|
|
89
90
|
method.value.params.forEach((param) => {
|
|
90
91
|
if (param.type === 'Identifier') {
|
|
91
92
|
funcArgs.push(param.name);
|
|
93
|
+
} else if (param.type === 'RestElement') {
|
|
94
|
+
funcArgs.push(`...${param.argument.name}`);
|
|
92
95
|
} else {
|
|
93
|
-
const args = `${param.left.name} = ${param.right.
|
|
96
|
+
const args = `${param.left.name} = ${param.right.raw}`;
|
|
94
97
|
funcArgs.push(args);
|
|
95
98
|
}
|
|
96
99
|
});
|
|
@@ -102,7 +105,7 @@ function readFileUsingLib(filename, descriptionObj, workflowObj, functionList) {
|
|
|
102
105
|
});
|
|
103
106
|
const requests = [];
|
|
104
107
|
for (let i = 0; i < callList.length; i += 1) {
|
|
105
|
-
if (callList[i].callee.property && callList[i].callee.property.name ===
|
|
108
|
+
if (callList[i].callee.property && callList[i].callee.property.name === callName) {
|
|
106
109
|
requests.push(callList[i]);
|
|
107
110
|
}
|
|
108
111
|
}
|
|
@@ -114,7 +117,16 @@ function readFileUsingLib(filename, descriptionObj, workflowObj, functionList) {
|
|
|
114
117
|
const entity = expr.arguments[0].value;
|
|
115
118
|
const actionName = expr.arguments[1].value;
|
|
116
119
|
if (expr !== undefined && (expr.arguments[0].type !== 'Literal' || expr.arguments[1].type !== 'Literal')) {
|
|
117
|
-
|
|
120
|
+
const param1 = method.value.params[0];
|
|
121
|
+
const param2 = method.value.params[1];
|
|
122
|
+
if (param1.type !== 'Identifier' || param2.type !== 'Identifier'
|
|
123
|
+
|| expr.arguments[0].type !== 'Identifier' || expr.arguments[1].type !== 'Identifier'
|
|
124
|
+
|| param1.name !== expr.arguments[0].name || param2.name !== expr.arguments[1].name) {
|
|
125
|
+
throw new Error(`identifyRequest proxy method ${funcName} unknown format`);
|
|
126
|
+
} else if (callName !== 'identifyRequest') {
|
|
127
|
+
throw new Error(`MethodDocumentor not yet programmed to handle multiple helper methods: 1) ${callName}, 2) ${funcName}`);
|
|
128
|
+
}
|
|
129
|
+
callName = funcName;
|
|
118
130
|
}
|
|
119
131
|
const entityPath = getPathFromEntity(entity, actionName);
|
|
120
132
|
|
|
@@ -197,6 +209,7 @@ function readMDFile(filename, functionList) {
|
|
|
197
209
|
// Creating the tags for each method to be appended to the file.
|
|
198
210
|
const tdBeginTag = ' <td style="padding:15px">';
|
|
199
211
|
const tdEndTag = '</td>';
|
|
212
|
+
|
|
200
213
|
functionList.forEach((func) => {
|
|
201
214
|
const signCommand = `${tdBeginTag}${func.method_signature}${tdEndTag}`;
|
|
202
215
|
const descCommand = `${tdBeginTag}${func.description}${tdEndTag}`;
|