@itentialopensource/adapter-redis_cloud 0.2.4 → 0.3.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/AUTH.md +16 -20
- package/BROKER.md +31 -19
- package/CALLS.md +59 -22
- package/CHANGELOG.md +16 -0
- package/PROPERTIES.md +5 -0
- package/README.md +60 -63
- package/TAB1.md +12 -0
- package/TAB2.md +324 -0
- package/metadata.json +14 -2
- package/package.json +7 -9
- package/propertiesSchema.json +5 -0
- package/refs?service=git-upload-pack +0 -0
- package/report/adapterInfo.json +4 -4
- package/report/updateReport1718899986326.json +120 -0
- package/sampleProperties.json +42 -29
- package/test/integration/adapterTestIntegration.js +1 -0
- package/test/unit/adapterTestUnit.js +1 -3
package/sampleProperties.json
CHANGED
|
@@ -14,15 +14,16 @@
|
|
|
14
14
|
"stub": true,
|
|
15
15
|
"protocol": "https",
|
|
16
16
|
"authentication": {
|
|
17
|
-
"auth_method": "
|
|
17
|
+
"auth_method": "static_token",
|
|
18
18
|
"username": "username",
|
|
19
19
|
"password": "password",
|
|
20
|
-
"token": "
|
|
20
|
+
"token": "accountKey",
|
|
21
|
+
"tokenp2": "userKey",
|
|
21
22
|
"token_timeout": 1800000,
|
|
22
23
|
"token_cache": "local",
|
|
23
24
|
"invalid_token_error": 401,
|
|
24
|
-
"auth_field": "header.headers.
|
|
25
|
-
"auth_field_format": "{token}",
|
|
25
|
+
"auth_field": ["header.headers.x-api-key", "header.headers.x-api-secret-key"],
|
|
26
|
+
"auth_field_format": ["{token}", "{tokenp2}"],
|
|
26
27
|
"auth_logging": false,
|
|
27
28
|
"client_id": "",
|
|
28
29
|
"client_secret": "",
|
|
@@ -116,30 +117,32 @@
|
|
|
116
117
|
}
|
|
117
118
|
},
|
|
118
119
|
"devicebroker": {
|
|
120
|
+
"enabled": false,
|
|
119
121
|
"getDevice": [
|
|
120
122
|
{
|
|
121
|
-
"path": "/
|
|
123
|
+
"path": "/not/mapped",
|
|
122
124
|
"method": "GET",
|
|
123
125
|
"query": {},
|
|
124
126
|
"body": {},
|
|
125
127
|
"headers": {},
|
|
126
128
|
"handleFailure": "ignore",
|
|
127
129
|
"requestFields": {
|
|
128
|
-
"
|
|
130
|
+
"insample": "{port}"
|
|
129
131
|
},
|
|
130
132
|
"responseDatakey": "",
|
|
131
133
|
"responseFields": {
|
|
132
|
-
"name": "
|
|
133
|
-
"ostype": "
|
|
134
|
-
"ostypePrefix": "
|
|
135
|
-
"
|
|
136
|
-
"
|
|
134
|
+
"name": "{this}{||}{that}",
|
|
135
|
+
"ostype": "{osfield}",
|
|
136
|
+
"ostypePrefix": "meraki-",
|
|
137
|
+
"port": "{port}",
|
|
138
|
+
"ipaddress": "{ip_addr}",
|
|
139
|
+
"serial" : "{serial}"
|
|
137
140
|
}
|
|
138
141
|
}
|
|
139
142
|
],
|
|
140
143
|
"getDevicesFiltered": [
|
|
141
144
|
{
|
|
142
|
-
"path": "/
|
|
145
|
+
"path": "/not/mapped",
|
|
143
146
|
"method": "GET",
|
|
144
147
|
"pagination": {
|
|
145
148
|
"offsetVar": "",
|
|
@@ -154,42 +157,44 @@
|
|
|
154
157
|
"requestFields": {},
|
|
155
158
|
"responseDatakey": "",
|
|
156
159
|
"responseFields": {
|
|
157
|
-
"name": "
|
|
158
|
-
"ostype": "
|
|
159
|
-
"ostypePrefix": "
|
|
160
|
-
"
|
|
161
|
-
"
|
|
160
|
+
"name": "{this}{||}{that}",
|
|
161
|
+
"ostype": "{osfield}",
|
|
162
|
+
"ostypePrefix": "meraki-",
|
|
163
|
+
"port": "{port}",
|
|
164
|
+
"ipaddress": "{ip_addr}",
|
|
165
|
+
"serial" : "{serial}",
|
|
166
|
+
"id": "{myid}"
|
|
162
167
|
}
|
|
163
168
|
}
|
|
164
169
|
],
|
|
165
170
|
"isAlive": [
|
|
166
171
|
{
|
|
167
|
-
"path": "/
|
|
172
|
+
"path": "/not/mapped/{devID}",
|
|
168
173
|
"method": "GET",
|
|
169
174
|
"query": {},
|
|
170
175
|
"body": {},
|
|
171
176
|
"headers": {},
|
|
172
177
|
"handleFailure": "ignore",
|
|
173
178
|
"requestFields": {
|
|
174
|
-
"
|
|
179
|
+
"devID": "{id}"
|
|
175
180
|
},
|
|
176
181
|
"responseDatakey": "",
|
|
177
182
|
"responseFields": {
|
|
178
|
-
"status": "
|
|
179
|
-
"statusValue": "
|
|
183
|
+
"status": "return2xx",
|
|
184
|
+
"statusValue": "AD.200"
|
|
180
185
|
}
|
|
181
186
|
}
|
|
182
187
|
],
|
|
183
188
|
"getConfig": [
|
|
184
189
|
{
|
|
185
|
-
"path": "/
|
|
190
|
+
"path": "/not/mapped/{devID}",
|
|
186
191
|
"method": "GET",
|
|
187
192
|
"query": {},
|
|
188
193
|
"body": {},
|
|
189
194
|
"headers": {},
|
|
190
195
|
"handleFailure": "ignore",
|
|
191
196
|
"requestFields": {
|
|
192
|
-
"
|
|
197
|
+
"devID": "{id}"
|
|
193
198
|
},
|
|
194
199
|
"responseDatakey": "",
|
|
195
200
|
"responseFields": {}
|
|
@@ -197,7 +202,7 @@
|
|
|
197
202
|
],
|
|
198
203
|
"getCount": [
|
|
199
204
|
{
|
|
200
|
-
"path": "/
|
|
205
|
+
"path": "/not/mapped",
|
|
201
206
|
"method": "GET",
|
|
202
207
|
"query": {},
|
|
203
208
|
"body": {},
|
|
@@ -213,15 +218,15 @@
|
|
|
213
218
|
"enabled": false,
|
|
214
219
|
"entities": [
|
|
215
220
|
{
|
|
216
|
-
"entityType": "",
|
|
217
|
-
"frequency":
|
|
221
|
+
"entityType": "device",
|
|
222
|
+
"frequency": 3600,
|
|
218
223
|
"flushOnFail": false,
|
|
219
|
-
"limit":
|
|
224
|
+
"limit": 10000,
|
|
220
225
|
"retryAttempts": 5,
|
|
221
226
|
"sort": true,
|
|
222
227
|
"populate": [
|
|
223
228
|
{
|
|
224
|
-
"path": "",
|
|
229
|
+
"path": "/not/mapped",
|
|
225
230
|
"method": "GET",
|
|
226
231
|
"pagination": {
|
|
227
232
|
"offsetVar": "",
|
|
@@ -235,7 +240,15 @@
|
|
|
235
240
|
"handleFailure": "ignore",
|
|
236
241
|
"requestFields": {},
|
|
237
242
|
"responseDatakey": "",
|
|
238
|
-
"responseFields": {
|
|
243
|
+
"responseFields": {
|
|
244
|
+
"name": "{this}{||}{that}",
|
|
245
|
+
"ostype": "{osfield}",
|
|
246
|
+
"ostypePrefix": "meraki-",
|
|
247
|
+
"port": "{port}",
|
|
248
|
+
"ipaddress": "{ip_addr}",
|
|
249
|
+
"serial" : "{serial}",
|
|
250
|
+
"id": "{myid}"
|
|
251
|
+
}
|
|
239
252
|
}
|
|
240
253
|
],
|
|
241
254
|
"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] Redis_cloud 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);
|
|
@@ -316,12 +315,11 @@ describe('[unit] Redis_cloud Adapter Test', () => {
|
|
|
316
315
|
assert.notEqual(null, packageDotJson.dependencies);
|
|
317
316
|
assert.notEqual('', packageDotJson.dependencies);
|
|
318
317
|
assert.equal('^8.12.0', packageDotJson.dependencies.ajv);
|
|
319
|
-
assert.equal('^1.6.
|
|
318
|
+
assert.equal('^1.6.8', packageDotJson.dependencies.axios);
|
|
320
319
|
assert.equal('^11.0.0', packageDotJson.dependencies.commander);
|
|
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);
|