@itentialopensource/adapter-azure_aks 0.3.3 → 0.4.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.
@@ -123,30 +123,32 @@
123
123
  }
124
124
  },
125
125
  "devicebroker": {
126
+ "enabled": false,
126
127
  "getDevice": [
127
128
  {
128
- "path": "/get/devices/{id}",
129
+ "path": "/not/mapped",
129
130
  "method": "GET",
130
131
  "query": {},
131
132
  "body": {},
132
133
  "headers": {},
133
134
  "handleFailure": "ignore",
134
135
  "requestFields": {
135
- "id": "name"
136
+ "insample": "{port}"
136
137
  },
137
138
  "responseDatakey": "",
138
139
  "responseFields": {
139
- "name": "host",
140
- "ostype": "os",
141
- "ostypePrefix": "system-",
142
- "ipaddress": "attributes.ipaddr",
143
- "port": "443"
140
+ "name": "{this}{||}{that}",
141
+ "ostype": "{osfield}",
142
+ "ostypePrefix": "meraki-",
143
+ "port": "{port}",
144
+ "ipaddress": "{ip_addr}",
145
+ "serial" : "{serial}"
144
146
  }
145
147
  }
146
148
  ],
147
149
  "getDevicesFiltered": [
148
150
  {
149
- "path": "/get/devices",
151
+ "path": "/not/mapped",
150
152
  "method": "GET",
151
153
  "pagination": {
152
154
  "offsetVar": "",
@@ -161,42 +163,44 @@
161
163
  "requestFields": {},
162
164
  "responseDatakey": "",
163
165
  "responseFields": {
164
- "name": "host",
165
- "ostype": "os",
166
- "ostypePrefix": "system-",
167
- "ipaddress": "attributes.ipaddr",
168
- "port": "443"
166
+ "name": "{this}{||}{that}",
167
+ "ostype": "{osfield}",
168
+ "ostypePrefix": "meraki-",
169
+ "port": "{port}",
170
+ "ipaddress": "{ip_addr}",
171
+ "serial" : "{serial}",
172
+ "id": "{myid}"
169
173
  }
170
174
  }
171
175
  ],
172
176
  "isAlive": [
173
177
  {
174
- "path": "/get/devices/{id}/status",
178
+ "path": "/not/mapped/{devID}",
175
179
  "method": "GET",
176
180
  "query": {},
177
181
  "body": {},
178
182
  "headers": {},
179
183
  "handleFailure": "ignore",
180
184
  "requestFields": {
181
- "id": "name"
185
+ "devID": "{id}"
182
186
  },
183
187
  "responseDatakey": "",
184
188
  "responseFields": {
185
- "status": "status",
186
- "statusValue": "online"
189
+ "status": "return2xx",
190
+ "statusValue": "AD.200"
187
191
  }
188
192
  }
189
193
  ],
190
194
  "getConfig": [
191
195
  {
192
- "path": "/get/devices/{id}/configPart1",
196
+ "path": "/not/mapped/{devID}",
193
197
  "method": "GET",
194
198
  "query": {},
195
199
  "body": {},
196
200
  "headers": {},
197
201
  "handleFailure": "ignore",
198
202
  "requestFields": {
199
- "id": "name"
203
+ "devID": "{id}"
200
204
  },
201
205
  "responseDatakey": "",
202
206
  "responseFields": {}
@@ -204,7 +208,7 @@
204
208
  ],
205
209
  "getCount": [
206
210
  {
207
- "path": "/get/devices",
211
+ "path": "/not/mapped",
208
212
  "method": "GET",
209
213
  "query": {},
210
214
  "body": {},
@@ -220,15 +224,15 @@
220
224
  "enabled": false,
221
225
  "entities": [
222
226
  {
223
- "entityType": "",
224
- "frequency": 1440,
227
+ "entityType": "device",
228
+ "frequency": 3600,
225
229
  "flushOnFail": false,
226
- "limit": 1000,
230
+ "limit": 10000,
227
231
  "retryAttempts": 5,
228
232
  "sort": true,
229
233
  "populate": [
230
234
  {
231
- "path": "",
235
+ "path": "/not/mapped",
232
236
  "method": "GET",
233
237
  "pagination": {
234
238
  "offsetVar": "",
@@ -242,7 +246,15 @@
242
246
  "handleFailure": "ignore",
243
247
  "requestFields": {},
244
248
  "responseDatakey": "",
245
- "responseFields": {}
249
+ "responseFields": {
250
+ "name": "{this}{||}{that}",
251
+ "ostype": "{osfield}",
252
+ "ostypePrefix": "meraki-",
253
+ "port": "{port}",
254
+ "ipaddress": "{ip_addr}",
255
+ "serial" : "{serial}",
256
+ "id": "{myid}"
257
+ }
246
258
  }
247
259
  ],
248
260
  "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] Azure_aks 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] Azure_aks 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] Azure_aks 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', () => {