@itentialopensource/adapter-aws_lambda 0.1.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.
- package/.eslintignore +6 -0
- package/.eslintrc.js +19 -0
- package/.gitlab/.gitkeep +0 -0
- package/.gitlab/issue_templates/.gitkeep +0 -0
- package/.gitlab/issue_templates/Default.md +17 -0
- package/.gitlab/issue_templates/bugReportTemplate.md +76 -0
- package/.gitlab/issue_templates/featureRequestTemplate.md +14 -0
- package/.jshintrc +0 -0
- package/AUTH.md +39 -0
- package/BROKER.md +211 -0
- package/CALLS.md +603 -0
- package/CODE_OF_CONDUCT.md +43 -0
- package/CONTRIBUTING.md +13 -0
- package/ENHANCE.md +69 -0
- package/LICENSE +201 -0
- package/PROPERTIES.md +661 -0
- package/README.md +344 -0
- package/SUMMARY.md +9 -0
- package/SYSTEMINFO.md +14 -0
- package/TROUBLESHOOT.md +56 -0
- package/UTILITIES.md +473 -0
- package/adapter.js +8845 -0
- package/adapterBase.js +1488 -0
- package/entities/.generic/action.json +214 -0
- package/entities/.generic/schema.json +28 -0
- package/entities/.system/action.json +50 -0
- package/entities/.system/mockdatafiles/getToken-default.json +3 -0
- package/entities/.system/mockdatafiles/healthcheck-default.json +3 -0
- package/entities/.system/schema.json +19 -0
- package/entities/.system/schemaTokenReq.json +53 -0
- package/entities/.system/schemaTokenResp.json +53 -0
- package/entities/AccountSettings/action.json +25 -0
- package/entities/AccountSettings/schema.json +19 -0
- package/entities/CodeSigningConfigs/action.json +127 -0
- package/entities/CodeSigningConfigs/schema.json +57 -0
- package/entities/EventSourceMappings/action.json +106 -0
- package/entities/EventSourceMappings/schema.json +78 -0
- package/entities/Functions/action.json +860 -0
- package/entities/Functions/schema.json +170 -0
- package/entities/Layers/action.json +189 -0
- package/entities/Layers/schema.json +126 -0
- package/entities/Tags/action.json +65 -0
- package/entities/Tags/schema.json +32 -0
- package/error.json +190 -0
- package/metadata.json +58 -0
- package/package.json +77 -0
- package/pronghorn.json +4833 -0
- package/propertiesDecorators.json +14 -0
- package/propertiesSchema.json +1635 -0
- package/report/AWS Lambda-swagger.fixed.json +15883 -0
- package/report/adapterInfo.json +10 -0
- package/report/creationReport.json +615 -0
- package/sampleProperties.json +274 -0
- package/test/integration/adapterTestBasicGet.js +117 -0
- package/test/integration/adapterTestConnectivity.js +117 -0
- package/test/integration/adapterTestIntegration.js +2103 -0
- package/test/unit/adapterBaseTestUnit.js +1626 -0
- package/test/unit/adapterTestUnit.js +3942 -0
- package/utils/adapterInfo.js +156 -0
- package/utils/argParser.js +44 -0
- package/utils/checkMigrate.js +102 -0
- package/utils/entitiesToDB.js +190 -0
- package/utils/findPath.js +74 -0
- package/utils/logger.js +26 -0
- package/utils/methodDocumentor.js +273 -0
- package/utils/modify.js +153 -0
- package/utils/mongoDbConnection.js +79 -0
- package/utils/mongoUtils.js +162 -0
- package/utils/pre-commit.sh +32 -0
- package/utils/removeHooks.js +20 -0
- package/utils/setup.js +33 -0
- package/utils/taskMover.js +308 -0
- package/utils/tbScript.js +103 -0
- package/utils/tbUtils.js +347 -0
- package/utils/testRunner.js +298 -0
- package/utils/troubleshootingAdapter.js +177 -0
- package/utils/updateAdapterConfig.js +158 -0
package/README.md
ADDED
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
# Adapter for Aws_lambda
|
|
2
|
+
|
|
3
|
+
## Table of Contents
|
|
4
|
+
|
|
5
|
+
Some of the page links in this document and links to other GitLab files do not work in Confluence however, the information is available in other sections of the Confluence material.
|
|
6
|
+
|
|
7
|
+
- [Specific to this Adapter](#specific-to-this-adapter)
|
|
8
|
+
- [Authentication](./AUTH.md)
|
|
9
|
+
- [Sample Properties](./sampleProperties.json)
|
|
10
|
+
- [Available Calls](./CALLS.md)
|
|
11
|
+
- [Swagger](./report/adapter-openapi.json)
|
|
12
|
+
- [Generic Adapter Information](#generic-adapter-information)
|
|
13
|
+
- [Overview](./SUMMARY.md)
|
|
14
|
+
- [Versioning](#versioning)
|
|
15
|
+
- [Supported Platform Versions](#supported-platform-versions)
|
|
16
|
+
- [Getting Started](#getting-started)
|
|
17
|
+
- [Helpful Background Information](#helpful-background-information)
|
|
18
|
+
- [Prerequisites](#prerequisites)
|
|
19
|
+
- [How to Install](#how-to-install)
|
|
20
|
+
- [Testing](#testing)
|
|
21
|
+
- [Configuration](./PROPERTIES.md)
|
|
22
|
+
- [Utilities](./UTILITIES.md)
|
|
23
|
+
- [Additional Information](#additional-information)
|
|
24
|
+
- [Enhancements](./ENHANCE.md)
|
|
25
|
+
- [Contributing](./CONTRIBUTING.md)
|
|
26
|
+
- [Helpful Links](#helpful-links)
|
|
27
|
+
- [Node Scripts](#node-scripts)
|
|
28
|
+
- [Troubleshoot](./TROUBLESHOOT.md)
|
|
29
|
+
- [License and Maintainers](#license-and-maintainers)
|
|
30
|
+
- [Product License](#product-license)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## Specific to this Adapter
|
|
34
|
+
|
|
35
|
+
### [Authentication](./AUTH.md)
|
|
36
|
+
|
|
37
|
+
### [Sample Properties](./sampleProperties.json)
|
|
38
|
+
|
|
39
|
+
<a href="./sampleProperties.json" target="_blank">Sample Properties</a> can be used to help you configure the adapter in the Itential Automation Platform. You will need to update connectivity information such as the host, port, protocol and credentials.
|
|
40
|
+
|
|
41
|
+
### [Available Calls](./CALLS.md)
|
|
42
|
+
|
|
43
|
+
### [Swagger](./report/adapter-openapi.json)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
## Generic Adapter Information
|
|
47
|
+
|
|
48
|
+
### [Overview](./SUMMARY.md)
|
|
49
|
+
|
|
50
|
+
### Versioning
|
|
51
|
+
|
|
52
|
+
Itential Product and opensource adapters utilize SemVer for versioning. The current version of the adapter can be found in the `package.json` file or viewed in the Platform GUI on the System page. All Itential opensource adapters can be found in the <a href="https://gitlab.com/itentialopensource/adapters" target="_blank">Itential OpenSource Repository</a>.
|
|
53
|
+
|
|
54
|
+
Any release prior to 1.0.0 is a pre-release. Initial builds of adapters are generally set up as pre-releases as there is often work that needs to be done to configure the adapter and make sure the authentication process to Aws_lambda works appropriately.
|
|
55
|
+
|
|
56
|
+
Release notes can be viewed in CHANGELOG.md.
|
|
57
|
+
|
|
58
|
+
### Supported Platform Versions
|
|
59
|
+
|
|
60
|
+
Itential Product adapters are built for particular versions of Platform and packaged with the versions they work with.
|
|
61
|
+
|
|
62
|
+
Itential opensource adapter as well as custom adapters built with the Itential Adapter Builder work acoss many releases of Platform. As a result, it is not often necessary to modify an adapter when upgrading Platform. If Platform has changes that impact the pronghorn.json, like adding a new required section, this will most likely require changes to all adapters when upgrading Platform.
|
|
63
|
+
|
|
64
|
+
Many of the scripts that come with all adapters built using the Itential Adapter Builder do have some dependencies on Platform or the Platform database schema and so it is possible these scripts could stop working in different versions of Platform. If you notify Itential of any issues, the Adapter Team will attempt to fix the scripts for newer releases of Platform.
|
|
65
|
+
|
|
66
|
+
### Getting Started
|
|
67
|
+
|
|
68
|
+
These instructions will help you get a copy of the project on your local machine for development and testing. Reading this section is also helpful for deployments as it provides you with pertinent information on prerequisites and properties.
|
|
69
|
+
|
|
70
|
+
#### Helpful Background Information
|
|
71
|
+
|
|
72
|
+
There is <a href="https://docs.itential.com/opensource/docs/adapters" target="_blank">Adapter documentation available on the Itential Documentation Site</a>. This documentation includes information and examples that are helpful for:
|
|
73
|
+
|
|
74
|
+
```text
|
|
75
|
+
Authentication
|
|
76
|
+
Platform Service Instance Configuration
|
|
77
|
+
Code Files
|
|
78
|
+
Endpoint Configuration (Action & Schema)
|
|
79
|
+
Mock Data
|
|
80
|
+
Adapter Generic Methods
|
|
81
|
+
Headers
|
|
82
|
+
Security
|
|
83
|
+
Linting and Testing
|
|
84
|
+
Build an Adapter
|
|
85
|
+
Troubleshooting an Adapter
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Others will be added over time.
|
|
89
|
+
Want to build a new adapter? Use the <a href="https://adapters.itential.io" target="_blank">Itential Adapter Builder</a>
|
|
90
|
+
|
|
91
|
+
#### Prerequisites
|
|
92
|
+
|
|
93
|
+
The following is a list of required packages for installation on the system the adapter will run on:
|
|
94
|
+
|
|
95
|
+
```text
|
|
96
|
+
Node.js
|
|
97
|
+
npm
|
|
98
|
+
Git
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
The following list of packages are required for Itential opensource adapters or custom adapters that have been built utilizing the Itential Adapter Builder. You can install these packages by running npm install inside the adapter directory.
|
|
102
|
+
|
|
103
|
+
<table border="1" class="bordered-table">
|
|
104
|
+
<tr>
|
|
105
|
+
<th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Package</span></th>
|
|
106
|
+
<th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Description</span></th>
|
|
107
|
+
</tr>
|
|
108
|
+
<tr>
|
|
109
|
+
<td style="padding:15px">@itentialopensource/adapter-utils</td>
|
|
110
|
+
<td style="padding:15px">Runtime library classes for all adapters; includes request handling, connection, authentication throttling, and translation.</td>
|
|
111
|
+
</tr>
|
|
112
|
+
<tr>
|
|
113
|
+
<td style="padding:15px">ajv</td>
|
|
114
|
+
<td style="padding:15px">Required for validation of adapter properties to integrate with Aws_lambda.</td>
|
|
115
|
+
</tr>
|
|
116
|
+
<tr>
|
|
117
|
+
<td style="padding:15px">axios</td>
|
|
118
|
+
<td style="padding:15px">Utilized by the node scripts that are included with the adapter; helps to build and extend the functionality.</td>
|
|
119
|
+
</tr>
|
|
120
|
+
<tr>
|
|
121
|
+
<td style="padding:15px">commander</td>
|
|
122
|
+
<td style="padding:15px">Utilized by the node scripts that are included with the adapter; helps to build and extend the functionality.</td>
|
|
123
|
+
</tr>
|
|
124
|
+
<tr>
|
|
125
|
+
<td style="padding:15px">fs-extra</td>
|
|
126
|
+
<td style="padding:15px">Utilized by the node scripts that are included with the adapter; helps to build and extend the functionality.</td>
|
|
127
|
+
</tr>
|
|
128
|
+
<tr>
|
|
129
|
+
<td style="padding:15px">mocha</td>
|
|
130
|
+
<td style="padding:15px">Testing library that is utilized by some of the node scripts that are included with the adapter.</td>
|
|
131
|
+
</tr>
|
|
132
|
+
<tr>
|
|
133
|
+
<td style="padding:15px">mocha-param</td>
|
|
134
|
+
<td style="padding:15px">Testing library that is utilized by some of the node scripts that are included with the adapter.</td>
|
|
135
|
+
</tr>
|
|
136
|
+
<tr>
|
|
137
|
+
<td style="padding:15px">mongodb</td>
|
|
138
|
+
<td style="padding:15px">Utilized by the node scripts that are included with the adapter; helps to build and extend the functionality.</td>
|
|
139
|
+
</tr>
|
|
140
|
+
<tr>
|
|
141
|
+
<td style="padding:15px">nyc</td>
|
|
142
|
+
<td style="padding:15px">Testing coverage library that is utilized by some of the node scripts that are included with the adapter.</td>
|
|
143
|
+
</tr>
|
|
144
|
+
<tr>
|
|
145
|
+
<td style="padding:15px">ping</td>
|
|
146
|
+
<td style="padding:15px">Utilized by the node scripts that are included with the adapter; helps to build and extend the functionality.</td>
|
|
147
|
+
</tr>
|
|
148
|
+
<tr>
|
|
149
|
+
<td style="padding:15px">readline-sync</td>
|
|
150
|
+
<td style="padding:15px">Utilized by the node script that comes with the adapter; helps to test unit and integration functionality.</td>
|
|
151
|
+
</tr>
|
|
152
|
+
<tr>
|
|
153
|
+
<td style="padding:15px">semver</td>
|
|
154
|
+
<td style="padding:15px">Utilized by the node scripts that are included with the adapter; helps to build and extend the functionality.</td>
|
|
155
|
+
</tr>
|
|
156
|
+
<tr>
|
|
157
|
+
<td style="padding:15px">winston</td>
|
|
158
|
+
<td style="padding:15px">Utilized by the node scripts that are included with the adapter; helps to build and extend the functionality.</td>
|
|
159
|
+
</tr>
|
|
160
|
+
</table>
|
|
161
|
+
<br>
|
|
162
|
+
|
|
163
|
+
If you are developing and testing a custom adapter, or have testing capabilities on an Itential opensource adapter, you will need to install these packages as well.
|
|
164
|
+
|
|
165
|
+
```text
|
|
166
|
+
chai
|
|
167
|
+
eslint
|
|
168
|
+
eslint-config-airbnb-base
|
|
169
|
+
eslint-plugin-import
|
|
170
|
+
eslint-plugin-json
|
|
171
|
+
testdouble
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
#### How to Install
|
|
175
|
+
|
|
176
|
+
1a. If you are working on Itential Platform 2023.2 or earlier versions, set up the name space location in your Itential Platform node_modules.
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
cd /opt/pronghorn/current/node_modules (* could be in a different place)
|
|
180
|
+
if the @itentialopensource directory does not exist, create it:
|
|
181
|
+
mkdir @itentialopensource
|
|
182
|
+
cd @itentialopensource
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
1b. If you are working on Platform 6, you need to install the adapter in the services directory.
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
cd /opt/itential/platform/services (* you may have configured it to be in a different place)
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
2. Clone/unzip/tar the adapter into your Platform environment.
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
git clone git@gitlab.com:@itentialopensource/adapters/adapter-aws_lambda
|
|
195
|
+
or
|
|
196
|
+
unzip adapter-aws_lambda.zip
|
|
197
|
+
or
|
|
198
|
+
tar -xvf adapter-aws_lambda.tar
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
3. install the adapter dependencies.
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
cd adapter-aws_lambda
|
|
205
|
+
npm install
|
|
206
|
+
npm run lint:errors
|
|
207
|
+
npm run test
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
4. Restart Platform
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
systemctl restart pronghorn
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
5. Create an adapter service instance configuration in Platform Admin Essentials GUI
|
|
217
|
+
|
|
218
|
+
6. Copy the properties from the sampleProperties.json and paste them into the service instance configuration in the inner/second properties field.
|
|
219
|
+
|
|
220
|
+
7. Change the adapter service instance configuration (host, port, credentials, etc) in Platform Admin Essentials GUI
|
|
221
|
+
|
|
222
|
+
#### Testing
|
|
223
|
+
|
|
224
|
+
Mocha is generally used to test all Itential Opensource Adapters. There are unit tests as well as integration tests performed. Integration tests can generally be run as standalone using mock data and running the adapter in stub mode, or as integrated. When running integrated, every effort is made to prevent environmental failures, however there is still a possibility.
|
|
225
|
+
|
|
226
|
+
##### Unit Testing
|
|
227
|
+
|
|
228
|
+
Unit Testing includes testing basic adapter functionality as well as error conditions that are triggered in the adapter prior to any integration. There are two ways to run unit tests. The prefered method is to use the testRunner script; however, both methods are provided here.
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
node utils/testRunner --unit
|
|
232
|
+
|
|
233
|
+
npm run test:unit
|
|
234
|
+
npm run test:baseunit
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
To add new unit tests, edit the `test/unit/adapterTestUnit.js` file. The tests that are already in this file should provide guidance for adding additional tests.
|
|
238
|
+
|
|
239
|
+
##### Integration Testing - Standalone
|
|
240
|
+
|
|
241
|
+
Standalone Integration Testing requires mock data to be provided with the entities. If this data is not provided, standalone integration testing will fail. When the adapter is set to run in stub mode (setting the stub property to true), the adapter will run through its code up to the point of making the request. It will then retrieve the mock data and return that as if it had received that data as the response from Aws_lambda. It will then translate the data so that the adapter can return the expected response to the rest of the Itential software. Standalone is the default integration test.
|
|
242
|
+
|
|
243
|
+
Similar to unit testing, there are two ways to run integration tests. Using the testRunner script is better because it prevents you from having to edit the test script; it will also resets information after testing is complete so that credentials are not saved in the file.
|
|
244
|
+
|
|
245
|
+
```bash
|
|
246
|
+
node utils/testRunner
|
|
247
|
+
answer no at the first prompt
|
|
248
|
+
|
|
249
|
+
npm run test:integration
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
To add new integration tests, edit the `test/integration/adapterTestIntegration.js` file. The tests that are already in this file should provide guidance for adding additional tests.
|
|
253
|
+
|
|
254
|
+
##### Integration Testing
|
|
255
|
+
|
|
256
|
+
Integration Testing requires connectivity to Aws_lambda. By using the testRunner script it prevents you from having to edit the integration test. It also resets the integration test after the test is complete so that credentials are not saved in the file.
|
|
257
|
+
|
|
258
|
+
> **Note**: These tests have been written as a best effort to make them work in most environments. However, the Adapter Builder often does not have the necessary information that is required to set up valid integration tests. For example, the order of the requests can be very important and data is often required for `creates` and `updates`. Hence, integration tests may have to be enhanced before they will work (integrate) with Aws_lambda. Even after tests have been set up properly, it is possible there are environmental constraints that could result in test failures. Some examples of possible environmental issues are customizations that have been made within Aws_lambda which change order dependencies or required data.
|
|
259
|
+
|
|
260
|
+
```bash
|
|
261
|
+
node utils/testRunner
|
|
262
|
+
answer yes at the first prompt
|
|
263
|
+
answer all other questions on connectivity and credentials
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
Test should also be written to clean up after themselves. However, it is important to understand that in some cases this may not be possible. In addition, whenever exceptions occur, test execution may be stopped, which will prevent cleanup actions from running. It is recommended that tests be utilized in dev and test labs only.
|
|
267
|
+
|
|
268
|
+
> **Reminder**: Do not check in code with actual credentials to systems.
|
|
269
|
+
|
|
270
|
+
### [Configuration](./PROPERTIES.md)
|
|
271
|
+
|
|
272
|
+
### [Utilities](./UTILITIES.md)
|
|
273
|
+
|
|
274
|
+
### Additional Information
|
|
275
|
+
|
|
276
|
+
#### [Enhancements](./ENHANCE.md)
|
|
277
|
+
|
|
278
|
+
#### [Contributing](./CONTRIBUTING.md)
|
|
279
|
+
|
|
280
|
+
#### Helpful Links
|
|
281
|
+
|
|
282
|
+
<a href="https://docs.itential.com/opensource/docs/adapters" target="_blank">Adapter Technical Resources</a>
|
|
283
|
+
|
|
284
|
+
#### Node Scripts
|
|
285
|
+
|
|
286
|
+
There are several node scripts that now accompany the adapter. These scripts are provided to make several activities easier. Many of these scripts can have issues with different versions of Platform as they have dependencies on Platform and Mongo. If you have issues with the scripts please report them to the Itential Adapter Team. Each of these scripts are described below.
|
|
287
|
+
|
|
288
|
+
<table border="1" class="bordered-table">
|
|
289
|
+
<tr>
|
|
290
|
+
<th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Run</span></th>
|
|
291
|
+
<th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Description</span></th>
|
|
292
|
+
</tr>
|
|
293
|
+
<tr>
|
|
294
|
+
<td style="padding:15px">npm run adapter:checkMigrate</td>
|
|
295
|
+
<td style="padding:15px">Checks whether your adapter can and should be migrated to the latest foundation.</td>
|
|
296
|
+
</tr>
|
|
297
|
+
<tr>
|
|
298
|
+
<td style="padding:15px">npm run adapter:findPath</td>
|
|
299
|
+
<td style="padding:15px">Can be used to see if the adapter supports a particular API call.</td>
|
|
300
|
+
</tr>
|
|
301
|
+
<tr>
|
|
302
|
+
<td style="padding:15px">npm run adapter:migrate</td>
|
|
303
|
+
<td style="padding:15px">Provides an easier way to update your adapter after you download the migration zip from Itential DevSite.</td>
|
|
304
|
+
</tr>
|
|
305
|
+
<tr>
|
|
306
|
+
<td style="padding:15px">npm run adapter:update</td>
|
|
307
|
+
<td style="padding:15px">Provides an easier way to update your adapter after you download the update zip from Itential DevSite.</td>
|
|
308
|
+
</tr>
|
|
309
|
+
<tr>
|
|
310
|
+
<td style="padding:15px">npm run adapter:revert</td>
|
|
311
|
+
<td style="padding:15px">Allows you to revert after a migration or update if it resulted in issues.</td>
|
|
312
|
+
</tr>
|
|
313
|
+
<tr>
|
|
314
|
+
<td style="padding:15px">npm run troubleshoot</td>
|
|
315
|
+
<td style="padding:15px">Provides a way to troubleshoot the adapter - runs connectivity, healthcheck and basic get.</td>
|
|
316
|
+
</tr>
|
|
317
|
+
<tr>
|
|
318
|
+
<td style="padding:15px">npm run connectivity</td>
|
|
319
|
+
<td style="padding:15px">Provides a connectivity check to the Aws_lambda system.</td>
|
|
320
|
+
</tr>
|
|
321
|
+
<tr>
|
|
322
|
+
<td style="padding:15px">npm run healthcheck</td>
|
|
323
|
+
<td style="padding:15px">Checks whether the configured healthcheck call works to Aws_lambda.</td>
|
|
324
|
+
</tr>
|
|
325
|
+
<tr>
|
|
326
|
+
<td style="padding:15px">npm run basicget</td>
|
|
327
|
+
<td style="padding:15px">Checks whether the basic get calls works to Aws_lambda.</td>
|
|
328
|
+
</tr>
|
|
329
|
+
</table>
|
|
330
|
+
<br>
|
|
331
|
+
|
|
332
|
+
### [Troubleshoot](./TROUBLESHOOT.md)
|
|
333
|
+
|
|
334
|
+
### License and Maintainers
|
|
335
|
+
|
|
336
|
+
```text
|
|
337
|
+
Itential Product Adapters are maintained by the Itential Product Team.
|
|
338
|
+
Itential OpenSource Adapters are maintained by the Itential Adapter Team and the community at large.
|
|
339
|
+
Custom Adapters are maintained by other sources.
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
### Product License
|
|
343
|
+
|
|
344
|
+
[Apache 2.0](./LICENSE)
|
package/SUMMARY.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
## Overview
|
|
2
|
+
|
|
3
|
+
This adapter is used to integrate the Itential Platform with the Aws_lambda System. The API that was used to build the adapter for Aws_lambda is usually available in the report directory of this adapter. The adapter utilizes the Aws_lambda API to provide the integrations that are deemed pertinent to Itential Platform. The ReadMe file is intended to provide information on this adapter it is generated from various other Markdown files.
|
|
4
|
+
|
|
5
|
+
>**Note**: It is possible that some integrations will be supported through the Aws_lambda adapter while other integrations will not. If you need additional API calls, you can use the Update capabilities provided by the Adapter Builder or request Itential to add them if the Adapter is an Itential opensourced adapter.
|
|
6
|
+
|
|
7
|
+
Itential provides information on all of its product adapters in the Customer Knowledge Base. Information in the <a href="https://itential.atlassian.net/servicedesk/customer/portals" target="_blank">Customer Knowledge Base</a> is consistently maintained and goes through documentation reviews. As a result, it should be the first place to go for information.
|
|
8
|
+
|
|
9
|
+
For opensourced and custom built adapters, the ReadMe is a starting point to understand what you have built, provide the information for you to be able to update the adapter, and assist you with deploying the adapter into Itential Platform.
|
package/SYSTEMINFO.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Aws_lambda
|
|
2
|
+
|
|
3
|
+
Vendor: Aws_lambda
|
|
4
|
+
Homepage: https://Aws_lambda.com/
|
|
5
|
+
|
|
6
|
+
Product: Aws_lambda
|
|
7
|
+
Product Page: https://Aws_lambda.com/
|
|
8
|
+
|
|
9
|
+
## Introduction
|
|
10
|
+
|
|
11
|
+
## Why Integrate
|
|
12
|
+
This adapter from Itential is used to integrate the Itential Platform with Aws_lambda. With this adapter you have the ability to perform operations such as:
|
|
13
|
+
|
|
14
|
+
## Additional Product Documentation
|
package/TROUBLESHOOT.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
## Troubleshoot
|
|
2
|
+
|
|
3
|
+
Run `npm run troubleshoot` to start the interactive troubleshooting process. The command allows you to verify and update connection, authentication as well as healthcheck configuration. After that it will test these properties by sending HTTP request to the endpoint. If the tests pass, it will persist these changes into Itential Platform.
|
|
4
|
+
|
|
5
|
+
You also have the option to run individual commands to perform specific test:
|
|
6
|
+
|
|
7
|
+
- `npm run healthcheck` will perform a healthcheck request of with current setting.
|
|
8
|
+
- `npm run basicget` will perform some non-parameter GET request with current setting.
|
|
9
|
+
- `npm run connectivity` will perform networking diagnostics of the adatper endpoint.
|
|
10
|
+
|
|
11
|
+
### Connectivity Issues
|
|
12
|
+
|
|
13
|
+
1. You can run the adapter troubleshooting script which will check connectivity, run the healthcheck and run basic get calls.
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm run troubleshoot
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
2. Verify the adapter properties are set up correctly.
|
|
20
|
+
|
|
21
|
+
```text
|
|
22
|
+
Go into the Itential Platform GUI and verify/update the properties
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
3. Verify there is connectivity between the Itential Platform Server and Aws_lambda Server.
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
ping the ip address of Aws_lambda server
|
|
29
|
+
try telnet to the ip address port of Aws_lambda
|
|
30
|
+
execute a curl command to the other system
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
4. Verify the credentials provided for Aws_lambda.
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
login to Aws_lambda using the provided credentials
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
5. Verify the API of the call utilized for Aws_lambda Healthcheck.
|
|
40
|
+
|
|
41
|
+
```text
|
|
42
|
+
Go into the Itential Platform GUI and verify/update the properties
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Functional Issues
|
|
46
|
+
|
|
47
|
+
Adapter logs are located in `/var/log/pronghorn`. In older releases of the Itential Platform, there is a `pronghorn.log` file which contains logs for all of the Itential Platform. In newer versions, adapters can be configured to log into their own files.
|
|
48
|
+
|
|
49
|
+
### Adapter Results
|
|
50
|
+
|
|
51
|
+
The majority of the http response codes from the adapter come directly from the downstream system. There are some exceptions to this:
|
|
52
|
+
|
|
53
|
+
1. Timeout (-2): There is an attempt timeout property that defines how long the adapter should wait to receive a response before giving up. If that time expires before a resonse is received the adapter will respond with a code of -2. The message will say "The Adapter has run out of time for the request" and it will recommend that you "Increase your adapter request.attempt_timeout property".
|
|
54
|
+
2. Econnreset (-1): When the downstream system or something within the network drops the connection, the adapter will receive and forward an ECONNRESET error with a -1 code. The message will say "The connection was terminated by the network or external system" and the recommendation will be for you to "Check connectivity to the external system and that the system is up".
|
|
55
|
+
|
|
56
|
+
The adapter will also have various errors if it is unable to build the request. All of these errors come with messages and recommendations to help you understand what you need to do to resolve the issue.
|