@itentialopensource/adapter-att_mobility 0.1.2 → 0.2.2
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 +0 -1
- package/.jshintrc +3 -0
- package/AUTH.md +11 -14
- package/BROKER.md +3 -3
- package/CALLS.md +59 -23
- package/CHANGELOG.md +24 -0
- package/CONTRIBUTING.md +1 -160
- package/ENHANCE.md +4 -4
- package/PROPERTIES.md +19 -19
- package/README.md +45 -36
- package/SUMMARY.md +2 -2
- package/SYSTEMINFO.md +9 -4
- package/TROUBLESHOOT.md +6 -6
- package/adapter.js +159 -330
- package/adapterBase.js +538 -873
- package/changelogs/changelog.md +16 -0
- package/metadata.json +61 -0
- package/package.json +24 -26
- package/pronghorn.json +474 -142
- package/propertiesSchema.json +447 -43
- package/refs?service=git-upload-pack +0 -0
- package/report/adapter-openapi.json +149 -0
- package/report/adapter-openapi.yaml +133 -0
- package/report/adapterInfo.json +8 -8
- package/report/updateReport1691508426658.json +120 -0
- package/report/updateReport1692202905234.json +120 -0
- package/report/updateReport1694465385247.json +120 -0
- package/sampleProperties.json +64 -3
- package/test/integration/adapterTestBasicGet.js +1 -1
- package/test/integration/adapterTestConnectivity.js +91 -42
- package/test/integration/adapterTestIntegration.js +142 -17
- package/test/unit/adapterBaseTestUnit.js +388 -313
- package/test/unit/adapterTestUnit.js +320 -123
- package/utils/adapterInfo.js +1 -1
- package/utils/addAuth.js +1 -1
- package/utils/artifactize.js +1 -1
- package/utils/checkMigrate.js +1 -1
- package/utils/entitiesToDB.js +1 -0
- package/utils/findPath.js +1 -1
- package/utils/methodDocumentor.js +57 -22
- package/utils/modify.js +13 -15
- package/utils/packModificationScript.js +1 -1
- package/utils/taskMover.js +309 -0
- package/utils/tbScript.js +3 -10
- package/utils/tbUtils.js +2 -3
- package/utils/testRunner.js +1 -1
- package/utils/troubleshootingAdapter.js +1 -3
- package/workflows/README.md +0 -3
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Adapter for
|
|
1
|
+
# Adapter for AttMobility
|
|
2
2
|
|
|
3
3
|
## Table of Contents
|
|
4
4
|
|
|
@@ -14,6 +14,7 @@ Some of the page links in this document and links to other GitLab files do not w
|
|
|
14
14
|
- [Testing](#testing)
|
|
15
15
|
- [Configuration](./PROPERTIES.md)
|
|
16
16
|
- [Using this Adapter](./CALLS.md)
|
|
17
|
+
- [Authentication](./AUTH.md)
|
|
17
18
|
- [Additional Information](#additional-information)
|
|
18
19
|
- [Enhancements](./ENHANCE.md)
|
|
19
20
|
- [Contributing](./CONTRIBUTING.md)
|
|
@@ -29,7 +30,7 @@ Some of the page links in this document and links to other GitLab files do not w
|
|
|
29
30
|
|
|
30
31
|
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 IAP 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>.
|
|
31
32
|
|
|
32
|
-
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
|
|
33
|
+
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 AttMobility works appropriately.
|
|
33
34
|
|
|
34
35
|
Release notes can be viewed in CHANGELOG.md.
|
|
35
36
|
|
|
@@ -47,17 +48,20 @@ These instructions will help you get a copy of the project on your local machine
|
|
|
47
48
|
|
|
48
49
|
### Helpful Background Information
|
|
49
50
|
|
|
50
|
-
There is
|
|
51
|
+
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:
|
|
51
52
|
|
|
52
53
|
```text
|
|
53
54
|
Authentication
|
|
54
|
-
|
|
55
|
+
IAP Service Instance Configuration
|
|
55
56
|
Code Files
|
|
56
|
-
Action
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
Endpoint Configuration (Action & Schema)
|
|
58
|
+
Mock Data
|
|
59
|
+
Adapter Generic Methods
|
|
60
|
+
Headers
|
|
61
|
+
Security
|
|
59
62
|
Linting and Testing
|
|
60
|
-
|
|
63
|
+
Build an Adapter
|
|
64
|
+
Troubleshooting an Adapter
|
|
61
65
|
```
|
|
62
66
|
|
|
63
67
|
Others will be added over time.
|
|
@@ -86,7 +90,7 @@ The following list of packages are required for Itential opensource adapters or
|
|
|
86
90
|
</tr>
|
|
87
91
|
<tr>
|
|
88
92
|
<td style="padding:15px">ajv</td>
|
|
89
|
-
<td style="padding:15px">Required for validation of adapter properties to integrate with
|
|
93
|
+
<td style="padding:15px">Required for validation of adapter properties to integrate with AttMobility.</td>
|
|
90
94
|
</tr>
|
|
91
95
|
<tr>
|
|
92
96
|
<td style="padding:15px">axios</td>
|
|
@@ -96,6 +100,10 @@ The following list of packages are required for Itential opensource adapters or
|
|
|
96
100
|
<td style="padding:15px">commander</td>
|
|
97
101
|
<td style="padding:15px">Utilized by the node scripts that are included with the adapter; helps to build and extend the functionality.</td>
|
|
98
102
|
</tr>
|
|
103
|
+
<tr>
|
|
104
|
+
<td style="padding:15px">dns-lookup-promise</td>
|
|
105
|
+
<td style="padding:15px">Utilized by the node scripts that are included with the adapter; helps to build and extend the functionality.</td>
|
|
106
|
+
</tr>
|
|
99
107
|
<tr>
|
|
100
108
|
<td style="padding:15px">fs-extra</td>
|
|
101
109
|
<td style="padding:15px">Utilized by the node scripts that are included with the adapter; helps to build and extend the functionality.</td>
|
|
@@ -112,14 +120,14 @@ The following list of packages are required for Itential opensource adapters or
|
|
|
112
120
|
<td style="padding:15px">mongodb</td>
|
|
113
121
|
<td style="padding:15px">Utilized by the node scripts that are included with the adapter; helps to build and extend the functionality.</td>
|
|
114
122
|
</tr>
|
|
115
|
-
<tr>
|
|
116
|
-
<td style="padding:15px">network-diagnostics</td>
|
|
117
|
-
<td style="padding:15px">Utilized by the node scripts that are included with the adapter; helps to build and extend the functionality.</td>
|
|
118
|
-
</tr>
|
|
119
123
|
<tr>
|
|
120
124
|
<td style="padding:15px">nyc</td>
|
|
121
125
|
<td style="padding:15px">Testing coverage library that is utilized by some of the node scripts that are included with the adapter.</td>
|
|
122
126
|
</tr>
|
|
127
|
+
<tr>
|
|
128
|
+
<td style="padding:15px">ping</td>
|
|
129
|
+
<td style="padding:15px">Utilized by the node scripts that are included with the adapter; helps to build and extend the functionality.</td>
|
|
130
|
+
</tr>
|
|
123
131
|
<tr>
|
|
124
132
|
<td style="padding:15px">readline-sync</td>
|
|
125
133
|
<td style="padding:15px">Utilized by the node script that comes with the adapter; helps to test unit and integration functionality.</td>
|
|
@@ -143,7 +151,6 @@ eslint
|
|
|
143
151
|
eslint-config-airbnb-base
|
|
144
152
|
eslint-plugin-import
|
|
145
153
|
eslint-plugin-json
|
|
146
|
-
package-json-validator
|
|
147
154
|
testdouble
|
|
148
155
|
```
|
|
149
156
|
|
|
@@ -161,18 +168,20 @@ if the @itentialopensource directory does not exist, create it:
|
|
|
161
168
|
|
|
162
169
|
```bash
|
|
163
170
|
cd \@itentialopensource
|
|
164
|
-
git clone git@gitlab.com:\@itentialopensource/adapters/adapter-
|
|
171
|
+
git clone git@gitlab.com:\@itentialopensource/adapters/adapter-att_mobility
|
|
165
172
|
or
|
|
166
|
-
unzip adapter-
|
|
173
|
+
unzip adapter-att_mobility.zip
|
|
167
174
|
or
|
|
168
|
-
tar -xvf adapter-
|
|
175
|
+
tar -xvf adapter-att_mobility.tar
|
|
169
176
|
```
|
|
170
177
|
|
|
171
178
|
3. Run the adapter install script.
|
|
172
179
|
|
|
173
180
|
```bash
|
|
174
|
-
cd adapter-
|
|
175
|
-
npm
|
|
181
|
+
cd adapter-att_mobility
|
|
182
|
+
npm install
|
|
183
|
+
npm run lint:errors
|
|
184
|
+
npm run test
|
|
176
185
|
```
|
|
177
186
|
|
|
178
187
|
4. Restart IAP
|
|
@@ -181,17 +190,20 @@ npm run adapter:install
|
|
|
181
190
|
systemctl restart pronghorn
|
|
182
191
|
```
|
|
183
192
|
|
|
184
|
-
5.
|
|
193
|
+
5. Create an adapter service instance configuration in IAP Admin Essentials GUI
|
|
194
|
+
|
|
195
|
+
6. Copy the properties from the sampleProperties.json and paste them into the service instance configuration in the inner/second properties field.
|
|
196
|
+
|
|
197
|
+
7. Change the adapter service instance configuration (host, port, credentials, etc) in IAP Admin Essentials GUI
|
|
185
198
|
|
|
186
|
-
|
|
199
|
+
|
|
200
|
+
For an easier install of the adapter use npm run adapter:install, it will install the adapter in IAP. Please note that it can be dependent on where the adapter is installed and on the version of IAP so it is subject to fail. If using this, you can replace step 3-5 above with these:
|
|
187
201
|
|
|
188
202
|
3. Install adapter dependencies and check the adapter.
|
|
189
203
|
|
|
190
204
|
```bash
|
|
191
|
-
cd adapter-
|
|
192
|
-
npm run install
|
|
193
|
-
npm run lint:errors
|
|
194
|
-
npm run test
|
|
205
|
+
cd adapter-att_mobility
|
|
206
|
+
npm run adapter:install
|
|
195
207
|
```
|
|
196
208
|
|
|
197
209
|
4. Restart IAP
|
|
@@ -200,11 +212,8 @@ npm run test
|
|
|
200
212
|
systemctl restart pronghorn
|
|
201
213
|
```
|
|
202
214
|
|
|
203
|
-
5.
|
|
204
|
-
|
|
205
|
-
6. Copy the properties from the sampleProperties.json and paste them into the service instance configuration in the inner/second properties field.
|
|
215
|
+
5. Change the adapter service instance configuration (host, port, credentials, etc) in IAP Admin Essentials GUI
|
|
206
216
|
|
|
207
|
-
7. Change the adapter service instance configuration (host, port, credentials, etc) in IAP Admin Essentials GUI
|
|
208
217
|
|
|
209
218
|
### Testing
|
|
210
219
|
|
|
@@ -225,7 +234,7 @@ To add new unit tests, edit the `test/unit/adapterTestUnit.js` file. The tests t
|
|
|
225
234
|
|
|
226
235
|
#### Integration Testing - Standalone
|
|
227
236
|
|
|
228
|
-
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
|
|
237
|
+
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 AttMobility. 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.
|
|
229
238
|
|
|
230
239
|
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.
|
|
231
240
|
|
|
@@ -240,9 +249,9 @@ To add new integration tests, edit the `test/integration/adapterTestIntegration.
|
|
|
240
249
|
|
|
241
250
|
#### Integration Testing
|
|
242
251
|
|
|
243
|
-
Integration Testing requires connectivity to
|
|
252
|
+
Integration Testing requires connectivity to AttMobility. 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.
|
|
244
253
|
|
|
245
|
-
> **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
|
|
254
|
+
> **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 AttMobility. 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 AttMobility which change order dependencies or required data.
|
|
246
255
|
|
|
247
256
|
```bash
|
|
248
257
|
node utils/testRunner
|
|
@@ -268,7 +277,7 @@ Test should also be written to clean up after themselves. However, it is importa
|
|
|
268
277
|
|
|
269
278
|
### Helpful Links
|
|
270
279
|
|
|
271
|
-
<a href="https://
|
|
280
|
+
<a href="https://docs.itential.com/opensource/docs/adapters" target="_blank">Adapter Technical Resources</a>
|
|
272
281
|
|
|
273
282
|
### Node Scripts
|
|
274
283
|
|
|
@@ -309,15 +318,15 @@ There are several node scripts that now accompany the adapter. These scripts are
|
|
|
309
318
|
</tr>
|
|
310
319
|
<tr>
|
|
311
320
|
<td style="padding:15px">npm run connectivity</td>
|
|
312
|
-
<td style="padding:15px">Provides a connectivity check to the
|
|
321
|
+
<td style="padding:15px">Provides a connectivity check to the AttMobility system.</td>
|
|
313
322
|
</tr>
|
|
314
323
|
<tr>
|
|
315
324
|
<td style="padding:15px">npm run healthcheck</td>
|
|
316
|
-
<td style="padding:15px">Checks whether the configured healthcheck call works to
|
|
325
|
+
<td style="padding:15px">Checks whether the configured healthcheck call works to AttMobility.</td>
|
|
317
326
|
</tr>
|
|
318
327
|
<tr>
|
|
319
328
|
<td style="padding:15px">npm run basicget</td>
|
|
320
|
-
<td style="padding:15px">Checks whether the basic get calls works to
|
|
329
|
+
<td style="padding:15px">Checks whether the basic get calls works to AttMobility.</td>
|
|
321
330
|
</tr>
|
|
322
331
|
</table>
|
|
323
332
|
<br>
|
package/SUMMARY.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
## Overview
|
|
2
2
|
|
|
3
|
-
This adapter is used to integrate the Itential Automation Platform (IAP) with the
|
|
3
|
+
This adapter is used to integrate the Itential Automation Platform (IAP) with the AttMobility System. The API that was used to build the adapter for AttMobility is usually available in the report directory of this adapter. The adapter utilizes the AttMobility API to provide the integrations that are deemed pertinent to IAP. The ReadMe file is intended to provide information on this adapter it is generated from various other Markdown files.
|
|
4
4
|
|
|
5
|
-
>**Note**: It is possible that some integrations will be supported through the
|
|
5
|
+
>**Note**: It is possible that some integrations will be supported through the AttMobility 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
6
|
|
|
7
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
8
|
|
package/SYSTEMINFO.md
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
#
|
|
1
|
+
# AT&T Mobility
|
|
2
2
|
|
|
3
|
-
Vendor:
|
|
3
|
+
Vendor: AT&T
|
|
4
4
|
Homepage: https://www.att.com/
|
|
5
5
|
|
|
6
|
-
Product:
|
|
6
|
+
Product: AT&T Mobility
|
|
7
7
|
Product Page: https://www.att.com/
|
|
8
8
|
|
|
9
9
|
## Introduction
|
|
10
|
+
We classify AT&T Mobility into the Inventory domain as AT&T Mobility manages and provides information about mobile devices, and services within mobile network.
|
|
11
|
+
|
|
12
|
+
## Why Integrate
|
|
13
|
+
The AT&T Mobility adapter from Itential is used to integrate the Itential Automation Platform (IAP) with AT&T Mobility.
|
|
14
|
+
|
|
15
|
+
## Additional Product Documentation
|
|
10
16
|
|
|
11
|
-
## Additional Product Documentation
|
package/TROUBLESHOOT.md
CHANGED
|
@@ -22,21 +22,21 @@ npm run troubleshoot
|
|
|
22
22
|
Go into the Itential Platform GUI and verify/update the properties
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
3. Verify there is connectivity between the Itential Platform Server and
|
|
25
|
+
3. Verify there is connectivity between the Itential Platform Server and AttMobility Server.
|
|
26
26
|
|
|
27
27
|
```text
|
|
28
|
-
ping the ip address of
|
|
29
|
-
try telnet to the ip address port of
|
|
28
|
+
ping the ip address of AttMobility server
|
|
29
|
+
try telnet to the ip address port of AttMobility
|
|
30
30
|
execute a curl command to the other system
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
4. Verify the credentials provided for
|
|
33
|
+
4. Verify the credentials provided for AttMobility.
|
|
34
34
|
|
|
35
35
|
```text
|
|
36
|
-
login to
|
|
36
|
+
login to AttMobility using the provided credentials
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
5. Verify the API of the call utilized for
|
|
39
|
+
5. Verify the API of the call utilized for AttMobility Healthcheck.
|
|
40
40
|
|
|
41
41
|
```text
|
|
42
42
|
Go into the Itential Platform GUI and verify/update the properties
|