@itentialopensource/adapter-aws_cloudformation 0.2.9 → 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 +49 -10
- package/BROKER.md +31 -19
- package/CHANGELOG.md +16 -0
- package/PROPERTIES.md +5 -0
- package/README.md +60 -63
- package/SUMMARY.md +1 -1
- package/SYSTEMINFO.md +25 -0
- package/TAB1.md +15 -0
- package/TAB2.md +379 -0
- package/metadata.json +21 -4
- 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/updateReport1717535381614.json +120 -0
- package/sampleProperties.json +43 -25
- package/test/integration/adapterTestIntegration.js +1 -0
- package/test/unit/adapterTestUnit.js +3 -5
package/sampleProperties.json
CHANGED
|
@@ -122,28 +122,32 @@
|
|
|
122
122
|
}
|
|
123
123
|
},
|
|
124
124
|
"devicebroker": {
|
|
125
|
+
"enabled": false,
|
|
125
126
|
"getDevice": [
|
|
126
127
|
{
|
|
127
|
-
"path": "/
|
|
128
|
+
"path": "/not/mapped",
|
|
128
129
|
"method": "GET",
|
|
129
130
|
"query": {},
|
|
130
131
|
"body": {},
|
|
131
132
|
"headers": {},
|
|
132
133
|
"handleFailure": "ignore",
|
|
133
|
-
"requestFields": {
|
|
134
|
+
"requestFields": {
|
|
135
|
+
"insample": "{port}"
|
|
136
|
+
},
|
|
134
137
|
"responseDatakey": "",
|
|
135
138
|
"responseFields": {
|
|
136
|
-
"name": "{
|
|
137
|
-
"ostype": "{
|
|
138
|
-
"ostypePrefix": "
|
|
139
|
-
"
|
|
140
|
-
"
|
|
139
|
+
"name": "{this}{||}{that}",
|
|
140
|
+
"ostype": "{osfield}",
|
|
141
|
+
"ostypePrefix": "meraki-",
|
|
142
|
+
"port": "{port}",
|
|
143
|
+
"ipaddress": "{ip_addr}",
|
|
144
|
+
"serial" : "{serial}"
|
|
141
145
|
}
|
|
142
146
|
}
|
|
143
147
|
],
|
|
144
148
|
"getDevicesFiltered": [
|
|
145
149
|
{
|
|
146
|
-
"path": "/
|
|
150
|
+
"path": "/not/mapped",
|
|
147
151
|
"method": "GET",
|
|
148
152
|
"pagination": {
|
|
149
153
|
"offsetVar": "",
|
|
@@ -158,46 +162,52 @@
|
|
|
158
162
|
"requestFields": {},
|
|
159
163
|
"responseDatakey": "",
|
|
160
164
|
"responseFields": {
|
|
161
|
-
"name": "{
|
|
162
|
-
"ostype": "{
|
|
163
|
-
"ostypePrefix": "
|
|
164
|
-
"
|
|
165
|
-
"
|
|
165
|
+
"name": "{this}{||}{that}",
|
|
166
|
+
"ostype": "{osfield}",
|
|
167
|
+
"ostypePrefix": "meraki-",
|
|
168
|
+
"port": "{port}",
|
|
169
|
+
"ipaddress": "{ip_addr}",
|
|
170
|
+
"serial" : "{serial}",
|
|
171
|
+
"id": "{myid}"
|
|
166
172
|
}
|
|
167
173
|
}
|
|
168
174
|
],
|
|
169
175
|
"isAlive": [
|
|
170
176
|
{
|
|
171
|
-
"path": "/
|
|
177
|
+
"path": "/not/mapped/{devID}",
|
|
172
178
|
"method": "GET",
|
|
173
179
|
"query": {},
|
|
174
180
|
"body": {},
|
|
175
181
|
"headers": {},
|
|
176
182
|
"handleFailure": "ignore",
|
|
177
|
-
"requestFields": {
|
|
183
|
+
"requestFields": {
|
|
184
|
+
"devID": "{id}"
|
|
185
|
+
},
|
|
178
186
|
"responseDatakey": "",
|
|
179
187
|
"responseFields": {
|
|
180
|
-
"status": "
|
|
181
|
-
"statusValue": "
|
|
188
|
+
"status": "return2xx",
|
|
189
|
+
"statusValue": "AD.200"
|
|
182
190
|
}
|
|
183
191
|
}
|
|
184
192
|
],
|
|
185
193
|
"getConfig": [
|
|
186
194
|
{
|
|
187
|
-
"path": "/
|
|
195
|
+
"path": "/not/mapped/{devID}",
|
|
188
196
|
"method": "GET",
|
|
189
197
|
"query": {},
|
|
190
198
|
"body": {},
|
|
191
199
|
"headers": {},
|
|
192
200
|
"handleFailure": "ignore",
|
|
193
|
-
"requestFields": {
|
|
201
|
+
"requestFields": {
|
|
202
|
+
"devID": "{id}"
|
|
203
|
+
},
|
|
194
204
|
"responseDatakey": "",
|
|
195
205
|
"responseFields": {}
|
|
196
206
|
}
|
|
197
207
|
],
|
|
198
208
|
"getCount": [
|
|
199
209
|
{
|
|
200
|
-
"path": "/
|
|
210
|
+
"path": "/not/mapped",
|
|
201
211
|
"method": "GET",
|
|
202
212
|
"query": {},
|
|
203
213
|
"body": {},
|
|
@@ -213,15 +223,15 @@
|
|
|
213
223
|
"enabled": false,
|
|
214
224
|
"entities": [
|
|
215
225
|
{
|
|
216
|
-
"entityType": "",
|
|
217
|
-
"frequency":
|
|
226
|
+
"entityType": "device",
|
|
227
|
+
"frequency": 3600,
|
|
218
228
|
"flushOnFail": false,
|
|
219
|
-
"limit":
|
|
229
|
+
"limit": 10000,
|
|
220
230
|
"retryAttempts": 5,
|
|
221
231
|
"sort": true,
|
|
222
232
|
"populate": [
|
|
223
233
|
{
|
|
224
|
-
"path": "",
|
|
234
|
+
"path": "/not/mapped",
|
|
225
235
|
"method": "GET",
|
|
226
236
|
"pagination": {
|
|
227
237
|
"offsetVar": "",
|
|
@@ -235,7 +245,15 @@
|
|
|
235
245
|
"handleFailure": "ignore",
|
|
236
246
|
"requestFields": {},
|
|
237
247
|
"responseDatakey": "",
|
|
238
|
-
"responseFields": {
|
|
248
|
+
"responseFields": {
|
|
249
|
+
"name": "{this}{||}{that}",
|
|
250
|
+
"ostype": "{osfield}",
|
|
251
|
+
"ostypePrefix": "meraki-",
|
|
252
|
+
"port": "{port}",
|
|
253
|
+
"ipaddress": "{ip_addr}",
|
|
254
|
+
"serial" : "{serial}",
|
|
255
|
+
"id": "{myid}"
|
|
256
|
+
}
|
|
239
257
|
}
|
|
240
258
|
],
|
|
241
259
|
"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
|
|
|
@@ -56,7 +56,7 @@ global.pronghornProps = {
|
|
|
56
56
|
adapterProps: {
|
|
57
57
|
adapters: [{
|
|
58
58
|
id: 'Test-aws_cloudformation',
|
|
59
|
-
type: '
|
|
59
|
+
type: 'AwsCloudFormation',
|
|
60
60
|
properties: samProps
|
|
61
61
|
}]
|
|
62
62
|
}
|
|
@@ -284,7 +284,6 @@ describe('[unit] AwsCloudFormation 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] AwsCloudFormation 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);
|
|
@@ -563,7 +561,7 @@ describe('[unit] AwsCloudFormation 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', () => {
|