@itentialopensource/adapter-checkpoint_gaia 0.1.1 → 0.2.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/.eslintignore +0 -1
- package/.jshintrc +3 -0
- package/AUTH.md +16 -15
- package/BROKER.md +31 -19
- package/CALLS.md +59 -23
- package/CHANGELOG.md +8 -1
- package/PROPERTIES.md +5 -0
- package/README.md +60 -63
- package/SYSTEMINFO.md +18 -6
- package/TAB1.md +10 -0
- package/TAB2.md +87 -2098
- package/compliance-report.json +9 -0
- package/compliance-report.txt +5 -0
- package/metadata.json +22 -5
- package/package.json +7 -9
- package/propertiesSchema.json +133 -36
- package/refs?service=git-upload-pack +0 -0
- package/report/adapterInfo.json +4 -4
- package/report/updateReport1715609924124.json +120 -0
- package/sampleProperties.json +42 -30
- package/test/integration/adapterTestIntegration.js +2 -1
- package/test/unit/adapterTestUnit.js +8 -4
- package/utils/artifactize.js +0 -0
package/sampleProperties.json
CHANGED
|
@@ -116,30 +116,32 @@
|
|
|
116
116
|
}
|
|
117
117
|
},
|
|
118
118
|
"devicebroker": {
|
|
119
|
+
"enabled": false,
|
|
119
120
|
"getDevice": [
|
|
120
121
|
{
|
|
121
|
-
"path": "/
|
|
122
|
+
"path": "/not/mapped",
|
|
122
123
|
"method": "GET",
|
|
123
124
|
"query": {},
|
|
124
125
|
"body": {},
|
|
125
126
|
"headers": {},
|
|
126
|
-
"handleFailure": "
|
|
127
|
+
"handleFailure": "ignore",
|
|
127
128
|
"requestFields": {
|
|
128
|
-
"
|
|
129
|
+
"insample": "{port}"
|
|
129
130
|
},
|
|
130
131
|
"responseDatakey": "",
|
|
131
132
|
"responseFields": {
|
|
132
|
-
"name": "
|
|
133
|
-
"ostype": "
|
|
134
|
-
"ostypePrefix": "
|
|
135
|
-
"
|
|
136
|
-
"
|
|
133
|
+
"name": "{this}{||}{that}",
|
|
134
|
+
"ostype": "{osfield}",
|
|
135
|
+
"ostypePrefix": "meraki-",
|
|
136
|
+
"port": "{port}",
|
|
137
|
+
"ipaddress": "{ip_addr}",
|
|
138
|
+
"serial": "{serial}"
|
|
137
139
|
}
|
|
138
140
|
}
|
|
139
141
|
],
|
|
140
142
|
"getDevicesFiltered": [
|
|
141
143
|
{
|
|
142
|
-
"path": "/
|
|
144
|
+
"path": "/not/mapped",
|
|
143
145
|
"method": "GET",
|
|
144
146
|
"pagination": {
|
|
145
147
|
"offsetVar": "",
|
|
@@ -150,46 +152,48 @@
|
|
|
150
152
|
"query": {},
|
|
151
153
|
"body": {},
|
|
152
154
|
"headers": {},
|
|
153
|
-
"handleFailure": "
|
|
155
|
+
"handleFailure": "ignore",
|
|
154
156
|
"requestFields": {},
|
|
155
157
|
"responseDatakey": "",
|
|
156
158
|
"responseFields": {
|
|
157
|
-
"name": "
|
|
158
|
-
"ostype": "
|
|
159
|
-
"ostypePrefix": "
|
|
160
|
-
"
|
|
161
|
-
"
|
|
159
|
+
"name": "{this}{||}{that}",
|
|
160
|
+
"ostype": "{osfield}",
|
|
161
|
+
"ostypePrefix": "meraki-",
|
|
162
|
+
"port": "{port}",
|
|
163
|
+
"ipaddress": "{ip_addr}",
|
|
164
|
+
"serial": "{serial}",
|
|
165
|
+
"id": "{myid}"
|
|
162
166
|
}
|
|
163
167
|
}
|
|
164
168
|
],
|
|
165
169
|
"isAlive": [
|
|
166
170
|
{
|
|
167
|
-
"path": "/
|
|
171
|
+
"path": "/not/mapped/{devID}",
|
|
168
172
|
"method": "GET",
|
|
169
173
|
"query": {},
|
|
170
174
|
"body": {},
|
|
171
175
|
"headers": {},
|
|
172
|
-
"handleFailure": "
|
|
176
|
+
"handleFailure": "ignore",
|
|
173
177
|
"requestFields": {
|
|
174
|
-
"
|
|
178
|
+
"devID": "{id}"
|
|
175
179
|
},
|
|
176
180
|
"responseDatakey": "",
|
|
177
181
|
"responseFields": {
|
|
178
|
-
"status": "
|
|
179
|
-
"statusValue": "
|
|
182
|
+
"status": "return2xx",
|
|
183
|
+
"statusValue": "AD.200"
|
|
180
184
|
}
|
|
181
185
|
}
|
|
182
186
|
],
|
|
183
187
|
"getConfig": [
|
|
184
188
|
{
|
|
185
|
-
"path": "/
|
|
189
|
+
"path": "/not/mapped/{devID}",
|
|
186
190
|
"method": "GET",
|
|
187
191
|
"query": {},
|
|
188
192
|
"body": {},
|
|
189
193
|
"headers": {},
|
|
190
|
-
"handleFailure": "
|
|
194
|
+
"handleFailure": "ignore",
|
|
191
195
|
"requestFields": {
|
|
192
|
-
"
|
|
196
|
+
"devID": "{id}"
|
|
193
197
|
},
|
|
194
198
|
"responseDatakey": "",
|
|
195
199
|
"responseFields": {}
|
|
@@ -197,12 +201,12 @@
|
|
|
197
201
|
],
|
|
198
202
|
"getCount": [
|
|
199
203
|
{
|
|
200
|
-
"path": "/
|
|
204
|
+
"path": "/not/mapped",
|
|
201
205
|
"method": "GET",
|
|
202
206
|
"query": {},
|
|
203
207
|
"body": {},
|
|
204
208
|
"headers": {},
|
|
205
|
-
"handleFailure": "
|
|
209
|
+
"handleFailure": "ignore",
|
|
206
210
|
"requestFields": {},
|
|
207
211
|
"responseDatakey": "",
|
|
208
212
|
"responseFields": {}
|
|
@@ -213,15 +217,15 @@
|
|
|
213
217
|
"enabled": false,
|
|
214
218
|
"entities": [
|
|
215
219
|
{
|
|
216
|
-
"entityType": "",
|
|
217
|
-
"frequency":
|
|
220
|
+
"entityType": "device",
|
|
221
|
+
"frequency": 3600,
|
|
218
222
|
"flushOnFail": false,
|
|
219
|
-
"limit":
|
|
223
|
+
"limit": 10000,
|
|
220
224
|
"retryAttempts": 5,
|
|
221
225
|
"sort": true,
|
|
222
226
|
"populate": [
|
|
223
227
|
{
|
|
224
|
-
"path": "",
|
|
228
|
+
"path": "/not/mapped",
|
|
225
229
|
"method": "GET",
|
|
226
230
|
"pagination": {
|
|
227
231
|
"offsetVar": "",
|
|
@@ -235,7 +239,15 @@
|
|
|
235
239
|
"handleFailure": "ignore",
|
|
236
240
|
"requestFields": {},
|
|
237
241
|
"responseDatakey": "",
|
|
238
|
-
"responseFields": {
|
|
242
|
+
"responseFields": {
|
|
243
|
+
"name": "{this}{||}{that}",
|
|
244
|
+
"ostype": "{osfield}",
|
|
245
|
+
"ostypePrefix": "meraki-",
|
|
246
|
+
"port": "{port}",
|
|
247
|
+
"ipaddress": "{ip_addr}",
|
|
248
|
+
"serial": "{serial}",
|
|
249
|
+
"id": "{myid}"
|
|
250
|
+
}
|
|
239
251
|
}
|
|
240
252
|
],
|
|
241
253
|
"cachedTasks": [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @copyright Itential, LLC
|
|
1
|
+
/* @copyright Itential, LLC 2019 (pre-modifications) */
|
|
2
2
|
|
|
3
3
|
// Set globals
|
|
4
4
|
/* global describe it log pronghornProps */
|
|
@@ -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
|
|
|
@@ -278,13 +278,15 @@ describe('[unit] Checkpoint_gaia Adapter Test', () => {
|
|
|
278
278
|
assert.notEqual(undefined, packageDotJson.scripts);
|
|
279
279
|
assert.notEqual(null, packageDotJson.scripts);
|
|
280
280
|
assert.notEqual('', packageDotJson.scripts);
|
|
281
|
+
assert.equal('node utils/setup.js', packageDotJson.scripts.preinstall);
|
|
281
282
|
assert.equal('node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js', packageDotJson.scripts.lint);
|
|
282
283
|
assert.equal('node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js --quiet', packageDotJson.scripts['lint:errors']);
|
|
283
284
|
assert.equal('mocha test/unit/adapterBaseTestUnit.js --LOG=error', packageDotJson.scripts['test:baseunit']);
|
|
284
285
|
assert.equal('mocha test/unit/adapterTestUnit.js --LOG=error', packageDotJson.scripts['test:unit']);
|
|
285
286
|
assert.equal('mocha test/integration/adapterTestIntegration.js --LOG=error', packageDotJson.scripts['test:integration']);
|
|
286
|
-
assert.equal('nyc --reporter html --reporter text mocha --reporter dot test/*', packageDotJson.scripts['test:cover']);
|
|
287
287
|
assert.equal('npm run test:baseunit && npm run test:unit && npm run test:integration', packageDotJson.scripts.test);
|
|
288
|
+
assert.equal('npm publish --registry=https://registry.npmjs.org --access=public', packageDotJson.scripts.deploy);
|
|
289
|
+
assert.equal('npm run deploy', packageDotJson.scripts.build);
|
|
288
290
|
done();
|
|
289
291
|
} catch (error) {
|
|
290
292
|
log.error(`Test Failure: ${error}`);
|
|
@@ -297,6 +299,9 @@ describe('[unit] Checkpoint_gaia Adapter Test', () => {
|
|
|
297
299
|
assert.notEqual(undefined, packageDotJson.repository);
|
|
298
300
|
assert.notEqual(null, packageDotJson.repository);
|
|
299
301
|
assert.notEqual('', packageDotJson.repository);
|
|
302
|
+
assert.equal('git', packageDotJson.repository.type);
|
|
303
|
+
assert.equal('git@gitlab.com:itentialopensource/adapters/', packageDotJson.repository.url.substring(0, 43));
|
|
304
|
+
assert.equal('https://gitlab.com/itentialopensource/adapters/', packageDotJson.homepage.substring(0, 47));
|
|
300
305
|
done();
|
|
301
306
|
} catch (error) {
|
|
302
307
|
log.error(`Test Failure: ${error}`);
|
|
@@ -310,12 +315,11 @@ describe('[unit] Checkpoint_gaia Adapter Test', () => {
|
|
|
310
315
|
assert.notEqual(null, packageDotJson.dependencies);
|
|
311
316
|
assert.notEqual('', packageDotJson.dependencies);
|
|
312
317
|
assert.equal('^8.12.0', packageDotJson.dependencies.ajv);
|
|
313
|
-
assert.equal('^1.
|
|
318
|
+
assert.equal('^1.6.8', packageDotJson.dependencies.axios);
|
|
314
319
|
assert.equal('^11.0.0', packageDotJson.dependencies.commander);
|
|
315
320
|
assert.equal('^11.1.1', packageDotJson.dependencies['fs-extra']);
|
|
316
|
-
assert.equal('^10.
|
|
321
|
+
assert.equal('^10.3.0', packageDotJson.dependencies.mocha);
|
|
317
322
|
assert.equal('^2.0.1', packageDotJson.dependencies['mocha-param']);
|
|
318
|
-
assert.equal('^15.1.0', packageDotJson.dependencies.nyc);
|
|
319
323
|
assert.equal('^0.4.4', packageDotJson.dependencies.ping);
|
|
320
324
|
assert.equal('^1.4.10', packageDotJson.dependencies['readline-sync']);
|
|
321
325
|
assert.equal('^7.5.3', packageDotJson.dependencies.semver);
|
package/utils/artifactize.js
CHANGED
|
File without changes
|