@itentialopensource/adapter-aws_cloudformation 0.2.10 → 0.3.1

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.
@@ -0,0 +1,9 @@
1
+ {
2
+ "ComplianceEntries": [
3
+ {
4
+ "name": "Compliance Summary",
5
+ "numInvalidProjects": 0,
6
+ "numValidProjects": 0
7
+ }
8
+ ]
9
+ }
@@ -0,0 +1,5 @@
1
+ ---------------------------------------------------------------------------------------------
2
+ **** Project Compliance Summary ****
3
+ 0 project(s) are not valid
4
+ 0 project(s) are valid
5
+ ---------------------------------------------------------------------------------------------
package/metadata.json CHANGED
@@ -42,20 +42,37 @@
42
42
  "isDeprecated": false
43
43
  },
44
44
  "brokerSince": "",
45
+ "authMethods": [
46
+ {
47
+ "type": "AWS Auth",
48
+ "primary": true
49
+ }
50
+ ],
45
51
  "documentation": {
46
52
  "storeLink": "",
47
53
  "npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-aws_cloudformation",
48
- "repoLink": "https://gitlab.com/itentialopensource/adapters/cloud/adapter-aws_cloudformation",
54
+ "repoLink": "https://gitlab.com/itentialopensource/adapters/adapter-aws_cloudformation",
49
55
  "docLink": "https://docs.itential.com/opensource/docs/amazon-aws-cloud-formation",
50
56
  "demoLinks": [],
51
- "trainingLinks": [],
57
+ "trainingLinks": [
58
+ {
59
+ "title": "Itential Academy",
60
+ "link": "https://www.itential.com/itential-academy/"
61
+ }
62
+ ],
52
63
  "faqLink": "https://docs.itential.com/opensource/docs/troubleshooting-an-adapter",
53
64
  "contributeLink": "https://gitlab.com/itentialopensource/adapters/contributing-guide",
54
65
  "issueLink": "https://itential.atlassian.net/servicedesk/customer/portals",
55
66
  "webLink": "https://www.itential.com/adapters/aws-cloud-formation/",
56
67
  "vendorLink": "https://aws.amazon.com/",
57
- "productLink": "",
58
- "apiLinks": []
68
+ "productLink": "https://aws.amazon.com/cloudformation/",
69
+ "apiLinks": [
70
+ {
71
+ "title": "AWS CloudFormation API Documentation",
72
+ "link": "https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/Welcome.html",
73
+ "public": true
74
+ }
75
+ ]
59
76
  },
60
77
  "relatedItems": {
61
78
  "adapters": [],
@@ -64,5 +81,6 @@
64
81
  "workflowProjects": [],
65
82
  "transformationProjects": [],
66
83
  "exampleProjects": []
67
- }
84
+ },
85
+ "supportLevel": "community"
68
86
  }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-aws_cloudformation",
3
- "version": "0.2.10",
3
+ "version": "0.3.1",
4
4
  "description": "This adapter integrates with system described as: Aws_cloudformation.",
5
5
  "main": "adapter.js",
6
6
  "wizardVersion": "2.44.7",
7
- "engineVersion": "1.67.10",
7
+ "engineVersion": "1.67.20",
8
8
  "adapterType": "http",
9
9
  "scripts": {
10
10
  "artifactize": "npm i && node utils/packModificationScript.js",
@@ -15,7 +15,6 @@
15
15
  "test:baseunit": "mocha test/unit/adapterBaseTestUnit.js --LOG=error",
16
16
  "test:unit": "mocha test/unit/adapterTestUnit.js --LOG=error",
17
17
  "test:integration": "mocha test/integration/adapterTestIntegration.js --LOG=error",
18
- "test:cover": "nyc --reporter html --reporter text mocha --reporter dot test/*",
19
18
  "test": "npm run test:baseunit && npm run test:unit && npm run test:integration",
20
19
  "adapter:install": "npm i && node utils/tbScript.js install",
21
20
  "adapter:checkMigrate": "node utils/checkMigrate.js",
@@ -45,34 +44,33 @@
45
44
  ],
46
45
  "license": "Apache-2.0",
47
46
  "engines": {
48
- "node": ">= 8.0.0",
47
+ "node": ">= 14.0.0",
49
48
  "npm": ">= 6.0.0"
50
49
  },
51
50
  "repository": {
52
51
  "type": "git",
53
- "url": "git@gitlab.com:itentialopensource/adapters/cloud/adapter-aws_cloudformation.git"
52
+ "url": "git@gitlab.com:itentialopensource/adapters/adapter-aws_cloudformation.git"
54
53
  },
55
54
  "author": "Itential",
56
- "homepage": "https://gitlab.com/itentialopensource/adapters/cloud/adapter-aws_cloudformation#readme",
55
+ "homepage": "https://gitlab.com/itentialopensource/adapters/adapter-aws_cloudformation#readme",
57
56
  "dependencies": {
58
- "@itentialopensource/adapter-utils": "^5.3.10",
59
- "acorn": "^8.10.0",
60
- "ajv": "^8.12.0",
57
+ "@itentialopensource/adapter-utils": "^5.6.0",
58
+ "acorn": "^8.12.1",
59
+ "ajv": "^8.17.1",
61
60
  "aws4": "^1.9.0",
62
- "axios": "^1.6.8",
61
+ "axios": "^1.7.2",
63
62
  "commander": "^11.0.0",
64
63
  "dns-lookup-promise": "^1.0.4",
65
- "fs-extra": "^11.1.1",
64
+ "fs-extra": "^11.2.0",
66
65
  "json-query": "^2.2.2",
67
- "mocha": "^10.3.0",
66
+ "mocha": "^10.7.0",
68
67
  "mocha-param": "^2.0.1",
69
68
  "mongodb": "^4.16.0",
70
- "nyc": "^15.1.0",
71
69
  "ping": "^0.4.4",
72
70
  "prompts": "^2.4.2",
73
71
  "readline-sync": "^1.4.10",
74
- "semver": "^7.5.3",
75
- "winston": "^3.9.0"
72
+ "semver": "^7.6.3",
73
+ "winston": "^3.13.1"
76
74
  },
77
75
  "devDependencies": {
78
76
  "chai": "^4.3.7",
@@ -969,6 +969,11 @@
969
969
  "devicebroker": {
970
970
  "type": "object",
971
971
  "properties": {
972
+ "enabled": {
973
+ "type": "boolean",
974
+ "description": "Whether or not the device broker calls have been mapped",
975
+ "default": false
976
+ },
972
977
  "getDevice": {
973
978
  "type": "array",
974
979
  "description": "Broker call(s) to getDevice",
Binary file
@@ -1,10 +1,10 @@
1
1
  {
2
- "version": "0.2.4",
3
- "configLines": 13218,
2
+ "version": "0.2.10",
3
+ "configLines": 13223,
4
4
  "scriptLines": 1783,
5
5
  "codeLines": 11578,
6
- "testLines": 7183,
6
+ "testLines": 7182,
7
7
  "testCases": 345,
8
- "totalCodeLines": 20544,
8
+ "totalCodeLines": 20543,
9
9
  "wfTasks": 163
10
10
  }
@@ -0,0 +1,120 @@
1
+ {
2
+ "errors": [],
3
+ "statistics": [
4
+ {
5
+ "owner": "errorJson",
6
+ "description": "New adapter errors available for use",
7
+ "value": 0
8
+ },
9
+ {
10
+ "owner": "errorJson",
11
+ "description": "Adapter errors no longer available for use",
12
+ "value": 0
13
+ },
14
+ {
15
+ "owner": "errorJson",
16
+ "description": "Adapter errors that have been updated (e.g. recommendation changes)",
17
+ "value": 31
18
+ },
19
+ {
20
+ "owner": "packageJson",
21
+ "description": "Number of production dependencies",
22
+ "value": 16
23
+ },
24
+ {
25
+ "owner": "packageJson",
26
+ "description": "Number of development dependencies",
27
+ "value": 6
28
+ },
29
+ {
30
+ "owner": "packageJson",
31
+ "description": "Number of npm scripts",
32
+ "value": 21
33
+ },
34
+ {
35
+ "owner": "packageJson",
36
+ "description": "Runtime Library dependency",
37
+ "value": "^5.5.0"
38
+ },
39
+ {
40
+ "owner": "propertiesSchemaJson",
41
+ "description": "Adapter properties defined in the propertiesSchema file",
42
+ "value": 81
43
+ },
44
+ {
45
+ "owner": "markdown",
46
+ "description": "Number of lines in the README.md",
47
+ "value": 344
48
+ },
49
+ {
50
+ "owner": "markdown",
51
+ "description": "Number of lines in the SUMMARY.md",
52
+ "value": 9
53
+ },
54
+ {
55
+ "owner": "markdown",
56
+ "description": "Number of lines in the PROPERTIES.md",
57
+ "value": 647
58
+ },
59
+ {
60
+ "owner": "markdown",
61
+ "description": "Number of lines in the TROUBLESHOOT.md",
62
+ "value": 48
63
+ },
64
+ {
65
+ "owner": "markdown",
66
+ "description": "Number of lines in the ENHANCE.md",
67
+ "value": 70
68
+ },
69
+ {
70
+ "owner": "markdown",
71
+ "description": "Number of lines in the BROKER.md",
72
+ "value": 70
73
+ },
74
+ {
75
+ "owner": "unitTestJS",
76
+ "description": "Number of lines of code in unit tests",
77
+ "value": 3355
78
+ },
79
+ {
80
+ "owner": "unitTestJS",
81
+ "description": "Number of unit tests",
82
+ "value": 197
83
+ },
84
+ {
85
+ "owner": "integrationTestJS",
86
+ "description": "Number of lines of code in integration tests",
87
+ "value": 2575
88
+ },
89
+ {
90
+ "owner": "integrationTestJS",
91
+ "description": "Number of integration tests",
92
+ "value": 78
93
+ },
94
+ {
95
+ "owner": "staticFile",
96
+ "description": "Number of lines of code in adapterBase.js",
97
+ "value": 1453
98
+ },
99
+ {
100
+ "owner": "staticFile",
101
+ "description": "Number of static files added",
102
+ "value": 36
103
+ },
104
+ {
105
+ "owner": "Overall",
106
+ "description": "Total lines of Code",
107
+ "value": 7383
108
+ },
109
+ {
110
+ "owner": "Overall",
111
+ "description": "Total Tests",
112
+ "value": 275
113
+ },
114
+ {
115
+ "owner": "Overall",
116
+ "description": "Total Files",
117
+ "value": 6
118
+ }
119
+ ]
120
+ }
@@ -122,28 +122,32 @@
122
122
  }
123
123
  },
124
124
  "devicebroker": {
125
+ "enabled": false,
125
126
  "getDevice": [
126
127
  {
127
- "path": "/get/devices/{name}",
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": "{host}",
137
- "ostype": "{os}",
138
- "ostypePrefix": "system-",
139
- "ipaddress": "{attributes.ipaddr}",
140
- "port": "443"
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": "/get/devices",
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": "{host}",
162
- "ostype": "{os}",
163
- "ostypePrefix": "system-",
164
- "ipaddress": "{attributes.ipaddr}",
165
- "port": "443"
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": "/get/devices/{name}/status",
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": "status",
181
- "statusValue": "online"
188
+ "status": "return2xx",
189
+ "statusValue": "AD.200"
182
190
  }
183
191
  }
184
192
  ],
185
193
  "getConfig": [
186
194
  {
187
- "path": "/get/devices/{name}/configPart1",
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": "/get/devices",
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": 1440,
226
+ "entityType": "device",
227
+ "frequency": 3600,
218
228
  "flushOnFail": false,
219
- "limit": 1000,
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: 'aws_cloudformation',
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);
@@ -315,17 +314,16 @@ describe('[unit] AwsCloudFormation Adapter Test', () => {
315
314
  assert.notEqual(undefined, packageDotJson.dependencies);
316
315
  assert.notEqual(null, packageDotJson.dependencies);
317
316
  assert.notEqual('', packageDotJson.dependencies);
318
- assert.equal('^8.12.0', packageDotJson.dependencies.ajv);
319
- assert.equal('^1.6.8', packageDotJson.dependencies.axios);
317
+ assert.equal('^8.17.1', packageDotJson.dependencies.ajv);
318
+ assert.equal('^1.7.2', packageDotJson.dependencies.axios);
320
319
  assert.equal('^11.0.0', packageDotJson.dependencies.commander);
321
- assert.equal('^11.1.1', packageDotJson.dependencies['fs-extra']);
322
- assert.equal('^10.3.0', packageDotJson.dependencies.mocha);
320
+ assert.equal('^11.2.0', packageDotJson.dependencies['fs-extra']);
321
+ assert.equal('^10.7.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
- assert.equal('^7.5.3', packageDotJson.dependencies.semver);
328
- assert.equal('^3.9.0', packageDotJson.dependencies.winston);
325
+ assert.equal('^7.6.3', packageDotJson.dependencies.semver);
326
+ assert.equal('^3.13.1', packageDotJson.dependencies.winston);
329
327
  done();
330
328
  } catch (error) {
331
329
  log.error(`Test Failure: ${error}`);
@@ -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', () => {