@itentialopensource/adapter-kubernetes 0.8.5 → 0.9.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/BROKER.md +31 -19
- package/CHANGELOG.md +8 -0
- package/PROPERTIES.md +5 -0
- package/README.md +60 -63
- package/TAB2.md +77 -7665
- package/metadata.json +23 -3
- package/package.json +6 -8
- package/propertiesSchema.json +5 -0
- package/refs?service=git-upload-pack +0 -0
- package/report/adapterInfo.json +4 -4
- package/report/updateReport1717535450448.json +120 -0
- package/sampleProperties.json +37 -25
- package/test/integration/adapterTestIntegration.js +1 -0
- package/test/unit/adapterTestUnit.js +1 -3
package/metadata.json
CHANGED
|
@@ -42,12 +42,24 @@
|
|
|
42
42
|
"isDeprecated": false
|
|
43
43
|
},
|
|
44
44
|
"brokerSince": "",
|
|
45
|
+
"authMethods": [
|
|
46
|
+
{
|
|
47
|
+
"type": "API Key",
|
|
48
|
+
"primary": true
|
|
49
|
+
}
|
|
50
|
+
],
|
|
45
51
|
"documentation": {
|
|
46
52
|
"storeLink": "",
|
|
47
53
|
"npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-kubernetes",
|
|
48
|
-
"repoLink": "https://gitlab.com/itentialopensource/adapters/
|
|
54
|
+
"repoLink": "https://gitlab.com/itentialopensource/adapters/adapter-kubernetes",
|
|
49
55
|
"docLink": "https://docs.itential.com/opensource/docs/kubernetes",
|
|
50
56
|
"demoLinks": [],
|
|
57
|
+
"trainingLinks": [
|
|
58
|
+
{
|
|
59
|
+
"title": "Itential Academy",
|
|
60
|
+
"link": "https://www.itential.com/itential-academy/"
|
|
61
|
+
}
|
|
62
|
+
],
|
|
51
63
|
"faqLink": "https://docs.itential.com/opensource/docs/troubleshooting-an-adapter",
|
|
52
64
|
"contributeLink": "https://gitlab.com/itentialopensource/adapters/contributing-guide",
|
|
53
65
|
"issueLink": "https://itential.atlassian.net/servicedesk/customer/portals",
|
|
@@ -55,8 +67,16 @@
|
|
|
55
67
|
"vendorLink": "https://kubernetes.io/",
|
|
56
68
|
"productLink": "https://kubernetes.io/",
|
|
57
69
|
"apiLinks": [
|
|
58
|
-
|
|
59
|
-
|
|
70
|
+
{
|
|
71
|
+
"title": "Kubernetes API Reference",
|
|
72
|
+
"link": "https://kubernetes.io/docs/reference/",
|
|
73
|
+
"public": true
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"title": "Kubernetes v1 REST API",
|
|
77
|
+
"link": "https://docs.okd.io/3.6/rest_api/kubernetes_v1.html",
|
|
78
|
+
"public": true
|
|
79
|
+
}
|
|
60
80
|
]
|
|
61
81
|
},
|
|
62
82
|
"assets": [],
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itentialopensource/adapter-kubernetes",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "This adapter integrates with system described as: kubernetes.",
|
|
5
5
|
"main": "adapter.js",
|
|
6
6
|
"systemName": "Kubernetes",
|
|
7
7
|
"wizardVersion": "2.44.7",
|
|
8
|
-
"engineVersion": "1.67.
|
|
8
|
+
"engineVersion": "1.67.20",
|
|
9
9
|
"adapterType": "http",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"artifactize": "npm i && node utils/packModificationScript.js",
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
"test:baseunit": "mocha test/unit/adapterBaseTestUnit.js --LOG=error",
|
|
17
17
|
"test:unit": "mocha test/unit/adapterTestUnit.js --LOG=error",
|
|
18
18
|
"test:integration": "mocha test/integration/adapterTestIntegration.js --LOG=error",
|
|
19
|
-
"test:cover": "nyc --reporter html --reporter text mocha --reporter dot test/*",
|
|
20
19
|
"test": "npm run test:baseunit && npm run test:unit && npm run test:integration",
|
|
21
20
|
"adapter:install": "npm i && node utils/tbScript.js install",
|
|
22
21
|
"adapter:checkMigrate": "node utils/checkMigrate.js",
|
|
@@ -44,17 +43,17 @@
|
|
|
44
43
|
],
|
|
45
44
|
"license": "Apache-2.0",
|
|
46
45
|
"engines": {
|
|
47
|
-
"node": ">=
|
|
46
|
+
"node": ">= 14.0.0",
|
|
48
47
|
"npm": ">= 6.0.0"
|
|
49
48
|
},
|
|
50
49
|
"repository": {
|
|
51
50
|
"type": "git",
|
|
52
|
-
"url": "git@gitlab.com:itentialopensource/adapters/
|
|
51
|
+
"url": "git@gitlab.com:itentialopensource/adapters/adapter-kubernetes.git"
|
|
53
52
|
},
|
|
54
53
|
"author": "Itential",
|
|
55
|
-
"homepage": "https://gitlab.com/itentialopensource/adapters/
|
|
54
|
+
"homepage": "https://gitlab.com/itentialopensource/adapters/adapter-kubernetes#readme",
|
|
56
55
|
"dependencies": {
|
|
57
|
-
"@itentialopensource/adapter-utils": "^5.
|
|
56
|
+
"@itentialopensource/adapter-utils": "^5.5.0",
|
|
58
57
|
"acorn": "^8.10.0",
|
|
59
58
|
"ajv": "^8.12.0",
|
|
60
59
|
"axios": "^1.6.8",
|
|
@@ -65,7 +64,6 @@
|
|
|
65
64
|
"mocha": "^10.3.0",
|
|
66
65
|
"mocha-param": "^2.0.1",
|
|
67
66
|
"mongodb": "^4.16.0",
|
|
68
|
-
"nyc": "^15.1.0",
|
|
69
67
|
"ping": "^0.4.4",
|
|
70
68
|
"prompts": "^2.4.2",
|
|
71
69
|
"readline-sync": "^1.4.10",
|
package/propertiesSchema.json
CHANGED
|
@@ -945,6 +945,11 @@
|
|
|
945
945
|
"devicebroker": {
|
|
946
946
|
"type": "object",
|
|
947
947
|
"properties": {
|
|
948
|
+
"enabled": {
|
|
949
|
+
"type": "boolean",
|
|
950
|
+
"description": "Whether or not the device broker calls have been mapped",
|
|
951
|
+
"default": false
|
|
952
|
+
},
|
|
948
953
|
"getDevice": {
|
|
949
954
|
"type": "array",
|
|
950
955
|
"description": "Broker call(s) to getDevice",
|
|
Binary file
|
package/report/adapterInfo.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.8.
|
|
3
|
-
"configLines":
|
|
2
|
+
"version": "0.8.5",
|
|
3
|
+
"configLines": 57469,
|
|
4
4
|
"scriptLines": 1783,
|
|
5
5
|
"codeLines": 72913,
|
|
6
|
-
"testLines":
|
|
6
|
+
"testLines": 53996,
|
|
7
7
|
"testCases": 2655,
|
|
8
|
-
"totalCodeLines":
|
|
8
|
+
"totalCodeLines": 128692,
|
|
9
9
|
"wfTasks": 1105
|
|
10
10
|
}
|
|
@@ -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": 16
|
|
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": 21
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"owner": "packageJson",
|
|
36
|
+
"description": "Runtime Library dependency",
|
|
37
|
+
"value": "^5.5.0"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"owner": "propertiesSchemaJson",
|
|
41
|
+
"description": "Adapter properties defined in the propertiesSchema file",
|
|
42
|
+
"value": 78
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"owner": "markdown",
|
|
46
|
+
"description": "Number of lines in the README.md",
|
|
47
|
+
"value": 344
|
|
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": 647
|
|
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": 20383
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"owner": "unitTestJS",
|
|
81
|
+
"description": "Number of unit tests",
|
|
82
|
+
"value": 1496
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"owner": "integrationTestJS",
|
|
86
|
+
"description": "Number of lines of code in integration tests",
|
|
87
|
+
"value": 32361
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"owner": "integrationTestJS",
|
|
91
|
+
"description": "Number of integration tests",
|
|
92
|
+
"value": 1089
|
|
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": 54197
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"owner": "Overall",
|
|
111
|
+
"description": "Total Tests",
|
|
112
|
+
"value": 2585
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"owner": "Overall",
|
|
116
|
+
"description": "Total Files",
|
|
117
|
+
"value": 6
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
}
|
package/sampleProperties.json
CHANGED
|
@@ -114,30 +114,32 @@
|
|
|
114
114
|
}
|
|
115
115
|
},
|
|
116
116
|
"devicebroker": {
|
|
117
|
+
"enabled": false,
|
|
117
118
|
"getDevice": [
|
|
118
119
|
{
|
|
119
|
-
"path": "/
|
|
120
|
+
"path": "/not/mapped",
|
|
120
121
|
"method": "GET",
|
|
121
122
|
"query": {},
|
|
122
123
|
"body": {},
|
|
123
124
|
"headers": {},
|
|
124
125
|
"handleFailure": "ignore",
|
|
125
126
|
"requestFields": {
|
|
126
|
-
"
|
|
127
|
+
"insample": "{port}"
|
|
127
128
|
},
|
|
128
129
|
"responseDatakey": "",
|
|
129
130
|
"responseFields": {
|
|
130
|
-
"name": "
|
|
131
|
-
"ostype": "
|
|
132
|
-
"ostypePrefix": "
|
|
133
|
-
"
|
|
134
|
-
"
|
|
131
|
+
"name": "{this}{||}{that}",
|
|
132
|
+
"ostype": "{osfield}",
|
|
133
|
+
"ostypePrefix": "meraki-",
|
|
134
|
+
"port": "{port}",
|
|
135
|
+
"ipaddress": "{ip_addr}",
|
|
136
|
+
"serial" : "{serial}"
|
|
135
137
|
}
|
|
136
138
|
}
|
|
137
139
|
],
|
|
138
140
|
"getDevicesFiltered": [
|
|
139
141
|
{
|
|
140
|
-
"path": "/
|
|
142
|
+
"path": "/not/mapped",
|
|
141
143
|
"method": "GET",
|
|
142
144
|
"pagination": {
|
|
143
145
|
"offsetVar": "",
|
|
@@ -152,42 +154,44 @@
|
|
|
152
154
|
"requestFields": {},
|
|
153
155
|
"responseDatakey": "",
|
|
154
156
|
"responseFields": {
|
|
155
|
-
"name": "
|
|
156
|
-
"ostype": "
|
|
157
|
-
"ostypePrefix": "
|
|
158
|
-
"
|
|
159
|
-
"
|
|
157
|
+
"name": "{this}{||}{that}",
|
|
158
|
+
"ostype": "{osfield}",
|
|
159
|
+
"ostypePrefix": "meraki-",
|
|
160
|
+
"port": "{port}",
|
|
161
|
+
"ipaddress": "{ip_addr}",
|
|
162
|
+
"serial" : "{serial}",
|
|
163
|
+
"id": "{myid}"
|
|
160
164
|
}
|
|
161
165
|
}
|
|
162
166
|
],
|
|
163
167
|
"isAlive": [
|
|
164
168
|
{
|
|
165
|
-
"path": "/
|
|
169
|
+
"path": "/not/mapped/{devID}",
|
|
166
170
|
"method": "GET",
|
|
167
171
|
"query": {},
|
|
168
172
|
"body": {},
|
|
169
173
|
"headers": {},
|
|
170
174
|
"handleFailure": "ignore",
|
|
171
175
|
"requestFields": {
|
|
172
|
-
"
|
|
176
|
+
"devID": "{id}"
|
|
173
177
|
},
|
|
174
178
|
"responseDatakey": "",
|
|
175
179
|
"responseFields": {
|
|
176
|
-
"status": "
|
|
177
|
-
"statusValue": "
|
|
180
|
+
"status": "return2xx",
|
|
181
|
+
"statusValue": "AD.200"
|
|
178
182
|
}
|
|
179
183
|
}
|
|
180
184
|
],
|
|
181
185
|
"getConfig": [
|
|
182
186
|
{
|
|
183
|
-
"path": "/
|
|
187
|
+
"path": "/not/mapped/{devID}",
|
|
184
188
|
"method": "GET",
|
|
185
189
|
"query": {},
|
|
186
190
|
"body": {},
|
|
187
191
|
"headers": {},
|
|
188
192
|
"handleFailure": "ignore",
|
|
189
193
|
"requestFields": {
|
|
190
|
-
"
|
|
194
|
+
"devID": "{id}"
|
|
191
195
|
},
|
|
192
196
|
"responseDatakey": "",
|
|
193
197
|
"responseFields": {}
|
|
@@ -195,7 +199,7 @@
|
|
|
195
199
|
],
|
|
196
200
|
"getCount": [
|
|
197
201
|
{
|
|
198
|
-
"path": "/
|
|
202
|
+
"path": "/not/mapped",
|
|
199
203
|
"method": "GET",
|
|
200
204
|
"query": {},
|
|
201
205
|
"body": {},
|
|
@@ -211,15 +215,15 @@
|
|
|
211
215
|
"enabled": false,
|
|
212
216
|
"entities": [
|
|
213
217
|
{
|
|
214
|
-
"entityType": "",
|
|
215
|
-
"frequency":
|
|
218
|
+
"entityType": "device",
|
|
219
|
+
"frequency": 3600,
|
|
216
220
|
"flushOnFail": false,
|
|
217
|
-
"limit":
|
|
221
|
+
"limit": 10000,
|
|
218
222
|
"retryAttempts": 5,
|
|
219
223
|
"sort": true,
|
|
220
224
|
"populate": [
|
|
221
225
|
{
|
|
222
|
-
"path": "",
|
|
226
|
+
"path": "/not/mapped",
|
|
223
227
|
"method": "GET",
|
|
224
228
|
"pagination": {
|
|
225
229
|
"offsetVar": "",
|
|
@@ -233,7 +237,15 @@
|
|
|
233
237
|
"handleFailure": "ignore",
|
|
234
238
|
"requestFields": {},
|
|
235
239
|
"responseDatakey": "",
|
|
236
|
-
"responseFields": {
|
|
240
|
+
"responseFields": {
|
|
241
|
+
"name": "{this}{||}{that}",
|
|
242
|
+
"ostype": "{osfield}",
|
|
243
|
+
"ostypePrefix": "meraki-",
|
|
244
|
+
"port": "{port}",
|
|
245
|
+
"ipaddress": "{ip_addr}",
|
|
246
|
+
"serial" : "{serial}",
|
|
247
|
+
"id": "{myid}"
|
|
248
|
+
}
|
|
237
249
|
}
|
|
238
250
|
],
|
|
239
251
|
"cachedTasks": [
|
|
@@ -46,6 +46,7 @@ samProps.ssl.accept_invalid_cert = false;
|
|
|
46
46
|
if (samProps.request.attempt_timeout < 30000) {
|
|
47
47
|
samProps.request.attempt_timeout = 30000;
|
|
48
48
|
}
|
|
49
|
+
samProps.devicebroker.enabled = true;
|
|
49
50
|
const attemptTimeout = samProps.request.attempt_timeout;
|
|
50
51
|
const { stub } = samProps;
|
|
51
52
|
|
|
@@ -284,7 +284,6 @@ describe('[unit] Kubernetes Adapter Test', () => {
|
|
|
284
284
|
assert.equal('mocha test/unit/adapterBaseTestUnit.js --LOG=error', packageDotJson.scripts['test:baseunit']);
|
|
285
285
|
assert.equal('mocha test/unit/adapterTestUnit.js --LOG=error', packageDotJson.scripts['test:unit']);
|
|
286
286
|
assert.equal('mocha test/integration/adapterTestIntegration.js --LOG=error', packageDotJson.scripts['test:integration']);
|
|
287
|
-
assert.equal('nyc --reporter html --reporter text mocha --reporter dot test/*', packageDotJson.scripts['test:cover']);
|
|
288
287
|
assert.equal('npm run test:baseunit && npm run test:unit && npm run test:integration', packageDotJson.scripts.test);
|
|
289
288
|
assert.equal('npm publish --registry=https://registry.npmjs.org --access=public', packageDotJson.scripts.deploy);
|
|
290
289
|
assert.equal('npm run deploy', packageDotJson.scripts.build);
|
|
@@ -321,7 +320,6 @@ describe('[unit] Kubernetes Adapter Test', () => {
|
|
|
321
320
|
assert.equal('^11.1.1', packageDotJson.dependencies['fs-extra']);
|
|
322
321
|
assert.equal('^10.3.0', packageDotJson.dependencies.mocha);
|
|
323
322
|
assert.equal('^2.0.1', packageDotJson.dependencies['mocha-param']);
|
|
324
|
-
assert.equal('^15.1.0', packageDotJson.dependencies.nyc);
|
|
325
323
|
assert.equal('^0.4.4', packageDotJson.dependencies.ping);
|
|
326
324
|
assert.equal('^1.4.10', packageDotJson.dependencies['readline-sync']);
|
|
327
325
|
assert.equal('^7.5.3', packageDotJson.dependencies.semver);
|
|
@@ -563,7 +561,7 @@ describe('[unit] Kubernetes Adapter Test', () => {
|
|
|
563
561
|
log.error(`Adapter Exception: ${error}`);
|
|
564
562
|
done(error);
|
|
565
563
|
}
|
|
566
|
-
});
|
|
564
|
+
}).timeout(attemptTimeout);
|
|
567
565
|
});
|
|
568
566
|
|
|
569
567
|
describe('propertiesSchema.json', () => {
|