@itentialopensource/adapter-google_drive 0.4.2 → 0.5.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.
@@ -132,30 +132,32 @@
132
132
  }
133
133
  },
134
134
  "devicebroker": {
135
+ "enabled": false,
135
136
  "getDevice": [
136
137
  {
137
- "path": "/get/devices/{id}",
138
+ "path": "/not/mapped",
138
139
  "method": "GET",
139
140
  "query": {},
140
141
  "body": {},
141
142
  "headers": {},
142
143
  "handleFailure": "ignore",
143
144
  "requestFields": {
144
- "id": "name"
145
+ "insample": "{port}"
145
146
  },
146
147
  "responseDatakey": "",
147
148
  "responseFields": {
148
- "name": "host",
149
- "ostype": "os",
150
- "ostypePrefix": "system-",
151
- "ipaddress": "attributes.ipaddr",
152
- "port": "443"
149
+ "name": "{this}{||}{that}",
150
+ "ostype": "{osfield}",
151
+ "ostypePrefix": "meraki-",
152
+ "port": "{port}",
153
+ "ipaddress": "{ip_addr}",
154
+ "serial": "{serial}"
153
155
  }
154
156
  }
155
157
  ],
156
158
  "getDevicesFiltered": [
157
159
  {
158
- "path": "/get/devices",
160
+ "path": "/not/mapped",
159
161
  "method": "GET",
160
162
  "pagination": {
161
163
  "offsetVar": "",
@@ -170,42 +172,44 @@
170
172
  "requestFields": {},
171
173
  "responseDatakey": "",
172
174
  "responseFields": {
173
- "name": "host",
174
- "ostype": "os",
175
- "ostypePrefix": "system-",
176
- "ipaddress": "attributes.ipaddr",
177
- "port": "443"
175
+ "name": "{this}{||}{that}",
176
+ "ostype": "{osfield}",
177
+ "ostypePrefix": "meraki-",
178
+ "port": "{port}",
179
+ "ipaddress": "{ip_addr}",
180
+ "serial": "{serial}",
181
+ "id": "{myid}"
178
182
  }
179
183
  }
180
184
  ],
181
185
  "isAlive": [
182
186
  {
183
- "path": "/get/devices/{id}/status",
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
- "id": "name"
194
+ "devID": "{id}"
191
195
  },
192
196
  "responseDatakey": "",
193
197
  "responseFields": {
194
- "status": "status",
195
- "statusValue": "online"
198
+ "status": "return2xx",
199
+ "statusValue": "AD.200"
196
200
  }
197
201
  }
198
202
  ],
199
203
  "getConfig": [
200
204
  {
201
- "path": "/get/devices/{id}/configPart1",
205
+ "path": "/not/mapped/{devID}",
202
206
  "method": "GET",
203
207
  "query": {},
204
208
  "body": {},
205
209
  "headers": {},
206
210
  "handleFailure": "ignore",
207
211
  "requestFields": {
208
- "id": "name"
212
+ "devID": "{id}"
209
213
  },
210
214
  "responseDatakey": "",
211
215
  "responseFields": {}
@@ -213,7 +217,7 @@
213
217
  ],
214
218
  "getCount": [
215
219
  {
216
- "path": "/get/devices",
220
+ "path": "/not/mapped",
217
221
  "method": "GET",
218
222
  "query": {},
219
223
  "body": {},
@@ -229,15 +233,15 @@
229
233
  "enabled": false,
230
234
  "entities": [
231
235
  {
232
- "entityType": "",
233
- "frequency": 1440,
236
+ "entityType": "device",
237
+ "frequency": 3600,
234
238
  "flushOnFail": false,
235
- "limit": 1000,
239
+ "limit": 10000,
236
240
  "retryAttempts": 5,
237
241
  "sort": true,
238
242
  "populate": [
239
243
  {
240
- "path": "",
244
+ "path": "/not/mapped",
241
245
  "method": "GET",
242
246
  "pagination": {
243
247
  "offsetVar": "",
@@ -251,7 +255,15 @@
251
255
  "handleFailure": "ignore",
252
256
  "requestFields": {},
253
257
  "responseDatakey": "",
254
- "responseFields": {}
258
+ "responseFields": {
259
+ "name": "{this}{||}{that}",
260
+ "ostype": "{osfield}",
261
+ "ostypePrefix": "meraki-",
262
+ "port": "{port}",
263
+ "ipaddress": "{ip_addr}",
264
+ "serial": "{serial}",
265
+ "id": "{myid}"
266
+ }
255
267
  }
256
268
  ],
257
269
  "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] Google_drive 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] Google_drive 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.7', packageDotJson.dependencies.axios);
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);
@@ -563,7 +561,7 @@ describe('[unit] Google_drive 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', () => {