@itentialopensource/adapter-adtran_mosaic_devicemanager 0.1.1 → 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 +39 -0
- package/BROKER.md +199 -0
- package/CALLS.md +733 -0
- package/CHANGELOG.md +17 -2
- package/CODE_OF_CONDUCT.md +12 -17
- package/CONTRIBUTING.md +3 -148
- package/ENHANCE.md +14 -14
- package/PROPERTIES.md +483 -89
- package/README.md +156 -67
- package/SUMMARY.md +2 -2
- package/SYSTEMINFO.md +11 -0
- package/TROUBLESHOOT.md +4 -3
- package/adapter.js +236 -626
- package/adapterBase.js +647 -494
- package/changelogs/changelog.md +16 -0
- package/entities/.generic/action.json +105 -0
- package/entities/.generic/schema.json +6 -1
- package/metadata.json +47 -0
- package/package.json +24 -24
- package/pronghorn.json +508 -90
- package/propertiesSchema.json +496 -39
- package/refs?service=git-upload-pack +0 -0
- package/report/adapter-openapi.json +7211 -0
- package/report/adapter-openapi.yaml +6459 -0
- package/report/adapterInfo.json +10 -0
- package/report/updateReport1653138377421.json +120 -0
- package/report/updateReport1691507605063.json +120 -0
- package/report/updateReport1692202606613.json +120 -0
- package/report/updateReport1694462023649.json +120 -0
- package/report/updateReport1698421007213.json +120 -0
- package/sampleProperties.json +153 -3
- package/test/integration/adapterTestBasicGet.js +3 -5
- package/test/integration/adapterTestConnectivity.js +91 -42
- package/test/integration/adapterTestIntegration.js +1965 -2493
- package/test/unit/adapterBaseTestUnit.js +388 -306
- package/test/unit/adapterTestUnit.js +364 -231
- package/utils/adapterInfo.js +206 -0
- package/utils/addAuth.js +1 -1
- package/utils/artifactize.js +1 -1
- package/utils/checkMigrate.js +1 -1
- package/utils/entitiesToDB.js +12 -57
- package/utils/findPath.js +1 -1
- package/utils/methodDocumentor.js +273 -0
- package/utils/modify.js +13 -15
- package/utils/packModificationScript.js +1 -1
- package/utils/pre-commit.sh +5 -0
- package/utils/taskMover.js +309 -0
- package/utils/tbScript.js +123 -53
- package/utils/tbUtils.js +84 -59
- package/utils/testRunner.js +17 -17
- package/utils/troubleshootingAdapter.js +9 -6
- package/workflows/README.md +0 -3
package/README.md
CHANGED
|
@@ -2,34 +2,37 @@
|
|
|
2
2
|
|
|
3
3
|
## Table of Contents
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
+
- [Overview](./SUMMARY.md)
|
|
8
|
+
- [Versioning](#versioning)
|
|
9
|
+
- [Supported IAP Versions](#supported-iap-versions)
|
|
10
|
+
- [Getting Started](#getting-started)
|
|
11
|
+
- [Helpful Background Information](#helpful-background-information)
|
|
12
|
+
- [Prerequisites](#prerequisites)
|
|
13
|
+
- [How to Install](#how-to-install)
|
|
14
|
+
- [Testing](#testing)
|
|
15
|
+
- [Configuration](./PROPERTIES.md)
|
|
16
|
+
- [Using this Adapter](./CALLS.md)
|
|
17
|
+
- [Authentication](./AUTH.md)
|
|
18
|
+
- [Additional Information](#additional-information)
|
|
19
|
+
- [Enhancements](./ENHANCE.md)
|
|
20
|
+
- [Contributing](./CONTRIBUTING.md)
|
|
21
|
+
- [Helpful Links](#helpful-links)
|
|
22
|
+
- [Node Scripts](#node-scripts)
|
|
23
|
+
- [Troubleshoot](./TROUBLESHOOT.md)
|
|
24
|
+
- [License and Maintainers](#license-and-maintainers)
|
|
25
|
+
- [Product License](#product-license)
|
|
23
26
|
|
|
24
27
|
## [Overview](./SUMMARY.md)
|
|
25
28
|
|
|
26
29
|
## Versioning
|
|
27
30
|
|
|
28
|
-
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
|
|
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>.
|
|
29
32
|
|
|
30
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 AdtranMosaicDeviceManager works appropriately.
|
|
31
34
|
|
|
32
|
-
Release notes can be viewed in CHANGELOG.md
|
|
35
|
+
Release notes can be viewed in CHANGELOG.md.
|
|
33
36
|
|
|
34
37
|
## Supported IAP Versions
|
|
35
38
|
|
|
@@ -45,21 +48,24 @@ These instructions will help you get a copy of the project on your local machine
|
|
|
45
48
|
|
|
46
49
|
### Helpful Background Information
|
|
47
50
|
|
|
48
|
-
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:
|
|
49
52
|
|
|
50
53
|
```text
|
|
51
54
|
Authentication
|
|
52
|
-
|
|
55
|
+
IAP Service Instance Configuration
|
|
53
56
|
Code Files
|
|
54
|
-
Action
|
|
55
|
-
|
|
56
|
-
|
|
57
|
+
Endpoint Configuration (Action & Schema)
|
|
58
|
+
Mock Data
|
|
59
|
+
Adapter Generic Methods
|
|
60
|
+
Headers
|
|
61
|
+
Security
|
|
57
62
|
Linting and Testing
|
|
58
|
-
|
|
63
|
+
Build an Adapter
|
|
64
|
+
Troubleshooting an Adapter
|
|
59
65
|
```
|
|
60
66
|
|
|
61
67
|
Others will be added over time.
|
|
62
|
-
Want to build a new adapter? Use the
|
|
68
|
+
Want to build a new adapter? Use the <a href="https://adapters.itential.io" target="_blank">Itential Adapter Builder</a>
|
|
63
69
|
|
|
64
70
|
### Prerequisites
|
|
65
71
|
|
|
@@ -73,22 +79,69 @@ Git
|
|
|
73
79
|
|
|
74
80
|
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.
|
|
75
81
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
82
|
+
<table border="1" class="bordered-table">
|
|
83
|
+
<tr>
|
|
84
|
+
<th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Package</span></th>
|
|
85
|
+
<th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Description</span></th>
|
|
86
|
+
</tr>
|
|
87
|
+
<tr>
|
|
88
|
+
<td style="padding:15px">@itentialopensource/adapter-utils</td>
|
|
89
|
+
<td style="padding:15px">Runtime library classes for all adapters; includes request handling, connection, authentication throttling, and translation.</td>
|
|
90
|
+
</tr>
|
|
91
|
+
<tr>
|
|
92
|
+
<td style="padding:15px">ajv</td>
|
|
93
|
+
<td style="padding:15px">Required for validation of adapter properties to integrate with AdtranMosaicDeviceManager.</td>
|
|
94
|
+
</tr>
|
|
95
|
+
<tr>
|
|
96
|
+
<td style="padding:15px">axios</td>
|
|
97
|
+
<td style="padding:15px">Utilized by the node scripts that are included with the adapter; helps to build and extend the functionality.</td>
|
|
98
|
+
</tr>
|
|
99
|
+
<tr>
|
|
100
|
+
<td style="padding:15px">commander</td>
|
|
101
|
+
<td style="padding:15px">Utilized by the node scripts that are included with the adapter; helps to build and extend the functionality.</td>
|
|
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>
|
|
107
|
+
<tr>
|
|
108
|
+
<td style="padding:15px">fs-extra</td>
|
|
109
|
+
<td style="padding:15px">Utilized by the node scripts that are included with the adapter; helps to build and extend the functionality.</td>
|
|
110
|
+
</tr>
|
|
111
|
+
<tr>
|
|
112
|
+
<td style="padding:15px">mocha</td>
|
|
113
|
+
<td style="padding:15px">Testing library that is utilized by some of the node scripts that are included with the adapter.</td>
|
|
114
|
+
</tr>
|
|
115
|
+
<tr>
|
|
116
|
+
<td style="padding:15px">mocha-param</td>
|
|
117
|
+
<td style="padding:15px">Testing library that is utilized by some of the node scripts that are included with the adapter.</td>
|
|
118
|
+
</tr>
|
|
119
|
+
<tr>
|
|
120
|
+
<td style="padding:15px">mongodb</td>
|
|
121
|
+
<td style="padding:15px">Utilized by the node scripts that are included with the adapter; helps to build and extend the functionality.</td>
|
|
122
|
+
</tr>
|
|
123
|
+
<tr>
|
|
124
|
+
<td style="padding:15px">nyc</td>
|
|
125
|
+
<td style="padding:15px">Testing coverage library that is utilized by some of the node scripts that are included with the adapter.</td>
|
|
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>
|
|
131
|
+
<tr>
|
|
132
|
+
<td style="padding:15px">readline-sync</td>
|
|
133
|
+
<td style="padding:15px">Utilized by the node script that comes with the adapter; helps to test unit and integration functionality.</td>
|
|
134
|
+
</tr>
|
|
135
|
+
<tr>
|
|
136
|
+
<td style="padding:15px">semver</td>
|
|
137
|
+
<td style="padding:15px">Utilized by the node scripts that are included with the adapter; helps to build and extend the functionality.</td>
|
|
138
|
+
</tr>
|
|
139
|
+
<tr>
|
|
140
|
+
<td style="padding:15px">winston</td>
|
|
141
|
+
<td style="padding:15px">Utilized by the node scripts that are included with the adapter; helps to build and extend the functionality.</td>
|
|
142
|
+
</tr>
|
|
143
|
+
</table>
|
|
144
|
+
<br>
|
|
92
145
|
|
|
93
146
|
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.
|
|
94
147
|
|
|
@@ -98,7 +151,6 @@ eslint
|
|
|
98
151
|
eslint-config-airbnb-base
|
|
99
152
|
eslint-plugin-import
|
|
100
153
|
eslint-plugin-json
|
|
101
|
-
package-json-validator
|
|
102
154
|
testdouble
|
|
103
155
|
```
|
|
104
156
|
|
|
@@ -127,7 +179,9 @@ tar -xvf adapter-adtran_mosaic_devicemanager.tar
|
|
|
127
179
|
|
|
128
180
|
```bash
|
|
129
181
|
cd adapter-adtran_mosaic_devicemanager
|
|
130
|
-
npm
|
|
182
|
+
npm install
|
|
183
|
+
npm run lint:errors
|
|
184
|
+
npm run test
|
|
131
185
|
```
|
|
132
186
|
|
|
133
187
|
4. Restart IAP
|
|
@@ -136,17 +190,20 @@ npm run adapter:install
|
|
|
136
190
|
systemctl restart pronghorn
|
|
137
191
|
```
|
|
138
192
|
|
|
139
|
-
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
|
|
140
198
|
|
|
141
|
-
|
|
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:
|
|
142
201
|
|
|
143
202
|
3. Install adapter dependencies and check the adapter.
|
|
144
203
|
|
|
145
204
|
```bash
|
|
146
205
|
cd adapter-adtran_mosaic_devicemanager
|
|
147
|
-
npm run install
|
|
148
|
-
npm run lint:errors
|
|
149
|
-
npm run test
|
|
206
|
+
npm run adapter:install
|
|
150
207
|
```
|
|
151
208
|
|
|
152
209
|
4. Restart IAP
|
|
@@ -155,11 +212,8 @@ npm run test
|
|
|
155
212
|
systemctl restart pronghorn
|
|
156
213
|
```
|
|
157
214
|
|
|
158
|
-
5.
|
|
159
|
-
|
|
160
|
-
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
|
|
161
216
|
|
|
162
|
-
7. Change the adapter service instance configuration (host, port, credentials, etc) in IAP Admin Essentials GUI
|
|
163
217
|
|
|
164
218
|
### Testing
|
|
165
219
|
|
|
@@ -223,24 +277,59 @@ Test should also be written to clean up after themselves. However, it is importa
|
|
|
223
277
|
|
|
224
278
|
### Helpful Links
|
|
225
279
|
|
|
226
|
-
|
|
280
|
+
<a href="https://docs.itential.com/opensource/docs/adapters" target="_blank">Adapter Technical Resources</a>
|
|
227
281
|
|
|
228
282
|
### Node Scripts
|
|
229
283
|
|
|
230
284
|
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 IAP as they have dependencies on IAP and Mongo. If you have issues with the scripts please report them to the Itential Adapter Team. Each of these scripts are described below.
|
|
231
285
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
286
|
+
<table border="1" class="bordered-table">
|
|
287
|
+
<tr>
|
|
288
|
+
<th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Run</span></th>
|
|
289
|
+
<th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Description</span></th>
|
|
290
|
+
</tr>
|
|
291
|
+
<tr>
|
|
292
|
+
<td style="padding:15px">npm run adapter:install</td>
|
|
293
|
+
<td style="padding:15px">Provides an easier way to install the adapter.</td>
|
|
294
|
+
</tr>
|
|
295
|
+
<tr>
|
|
296
|
+
<td style="padding:15px">npm run adapter:checkMigrate</td>
|
|
297
|
+
<td style="padding:15px">Checks whether your adapter can and should be migrated to the latest foundation.</td>
|
|
298
|
+
</tr>
|
|
299
|
+
<tr>
|
|
300
|
+
<td style="padding:15px">npm run adapter:findPath</td>
|
|
301
|
+
<td style="padding:15px">Can be used to see if the adapter supports a particular API call.</td>
|
|
302
|
+
</tr>
|
|
303
|
+
<tr>
|
|
304
|
+
<td style="padding:15px">npm run adapter:migrate</td>
|
|
305
|
+
<td style="padding:15px">Provides an easier way to update your adapter after you download the migration zip from Itential DevSite.</td>
|
|
306
|
+
</tr>
|
|
307
|
+
<tr>
|
|
308
|
+
<td style="padding:15px">npm run adapter:update</td>
|
|
309
|
+
<td style="padding:15px">Provides an easier way to update your adapter after you download the update zip from Itential DevSite.</td>
|
|
310
|
+
</tr>
|
|
311
|
+
<tr>
|
|
312
|
+
<td style="padding:15px">npm run adapter:revert</td>
|
|
313
|
+
<td style="padding:15px">Allows you to revert after a migration or update if it resulted in issues.</td>
|
|
314
|
+
</tr>
|
|
315
|
+
<tr>
|
|
316
|
+
<td style="padding:15px">npm run troubleshoot</td>
|
|
317
|
+
<td style="padding:15px">Provides a way to troubleshoot the adapter - runs connectivity, healthcheck and basic get.</td>
|
|
318
|
+
</tr>
|
|
319
|
+
<tr>
|
|
320
|
+
<td style="padding:15px">npm run connectivity</td>
|
|
321
|
+
<td style="padding:15px">Provides a connectivity check to the AdtranMosaicDeviceManager system.</td>
|
|
322
|
+
</tr>
|
|
323
|
+
<tr>
|
|
324
|
+
<td style="padding:15px">npm run healthcheck</td>
|
|
325
|
+
<td style="padding:15px">Checks whether the configured healthcheck call works to AdtranMosaicDeviceManager.</td>
|
|
326
|
+
</tr>
|
|
327
|
+
<tr>
|
|
328
|
+
<td style="padding:15px">npm run basicget</td>
|
|
329
|
+
<td style="padding:15px">Checks whether the basic get calls works to AdtranMosaicDeviceManager.</td>
|
|
330
|
+
</tr>
|
|
331
|
+
</table>
|
|
332
|
+
<br>
|
|
244
333
|
|
|
245
334
|
## [Troubleshoot](./TROUBLESHOOT.md)
|
|
246
335
|
|
package/SUMMARY.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
## Overview
|
|
2
2
|
|
|
3
|
-
This adapter is used to integrate the Itential Automation Platform (IAP) with the AdtranMosaicDeviceManager System. The API for AdtranMosaicDeviceManager is available
|
|
3
|
+
This adapter is used to integrate the Itential Automation Platform (IAP) with the AdtranMosaicDeviceManager System. The API that was used to build the adapter for AdtranMosaicDeviceManager is usually available in the report directory of this adapter. The adapter utilizes the AdtranMosaicDeviceManager 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
5
|
>**Note**: It is possible that some integrations will be supported through the AdtranMosaicDeviceManager 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
|
-
Itential provides information on all of its product adapters in the Customer Knowledge Base. Information in the
|
|
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
|
|
|
9
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 IAP.
|
package/SYSTEMINFO.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Adtran Mosaic Device Manager
|
|
2
|
+
|
|
3
|
+
Vendor: Adtran Mosaic Device Manager
|
|
4
|
+
Homepage: https://Adtran Mosaic Device Manager.com/
|
|
5
|
+
|
|
6
|
+
Product: Adtran Mosaic Device Manager
|
|
7
|
+
Product Page: https://Adtran Mosaic Device Manager.com/
|
|
8
|
+
|
|
9
|
+
## Introduction
|
|
10
|
+
|
|
11
|
+
## Additional Product Documentation
|
package/TROUBLESHOOT.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
## Troubleshoot
|
|
2
2
|
|
|
3
|
-
Run `npm run troubleshoot` to start the interactive troubleshooting process. The command allows
|
|
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 IAP.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
You also have the option to run individual commands to perform specific test:
|
|
6
6
|
|
|
7
7
|
- `npm run healthcheck` will perform a healthcheck request of with current setting.
|
|
8
8
|
- `npm run basicget` will perform some non-parameter GET request with current setting.
|
|
@@ -27,6 +27,7 @@ Go into the Itential Platform GUI and verify/update the properties
|
|
|
27
27
|
```text
|
|
28
28
|
ping the ip address of AdtranMosaicDeviceManager server
|
|
29
29
|
try telnet to the ip address port of AdtranMosaicDeviceManager
|
|
30
|
+
execute a curl command to the other system
|
|
30
31
|
```
|
|
31
32
|
|
|
32
33
|
4. Verify the credentials provided for AdtranMosaicDeviceManager.
|
|
@@ -43,4 +44,4 @@ Go into the Itential Platform GUI and verify/update the properties
|
|
|
43
44
|
|
|
44
45
|
### Functional Issues
|
|
45
46
|
|
|
46
|
-
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
|
|
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.
|