@itentialopensource/adapter-mockdevice 2.1.4 → 2.2.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 +2 -2
- package/ENHANCE.md +3 -3
- package/README.md +8 -8
- package/TAB2.md +3 -3
- package/coverage/adapter-mockdevice/adapter.js.html +1612 -0
- package/coverage/adapter-mockdevice/index.html +116 -0
- package/coverage/adapter-mockdevice/utils/argParser.js.html +217 -0
- package/coverage/adapter-mockdevice/utils/index.html +131 -0
- package/coverage/adapter-mockdevice/utils/logger.js.html +163 -0
- package/coverage/base.css +224 -0
- package/coverage/block-navigation.js +87 -0
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +131 -0
- package/coverage/prettify.css +1 -0
- package/coverage/prettify.js +2 -0
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +196 -0
- package/package.json +35 -38
- package/utils/argParser.js +44 -0
- package/utils/logger.js +26 -0
- package/utils/artifactize.js +0 -146
- package/utils/packModificationScript.js +0 -35
package/AUTH.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
## Authenticating Mock Device Adapter
|
|
2
2
|
|
|
3
|
-
This document will go through the steps for authenticating the Mock Device adapter with. Properly configuring the properties for an adapter in
|
|
3
|
+
This document will go through the steps for authenticating the Mock Device adapter with. Properly configuring the properties for an adapter in Itential Platform is critical for getting the adapter online. You can read more about adapter authentication <a href="https://docs.itential.com/opensource/docs/authentication" target="_blank">HERE</a>.
|
|
4
4
|
|
|
5
5
|
### No Authentication
|
|
6
6
|
The Winston Syslog Adapter does not require any authentication.
|
|
7
7
|
|
|
8
8
|
### Troubleshooting
|
|
9
9
|
- Make sure you copied over the correct username and password.
|
|
10
|
-
- Turn on debug level logs for the adapter in
|
|
10
|
+
- Turn on debug level logs for the adapter in Itential Platform Admin Essentials.
|
|
11
11
|
- Investigate the logs
|
package/ENHANCE.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
### Adding a Second Instance of an Adapter
|
|
4
4
|
|
|
5
|
-
You can add a second instance of this adapter without adding new code on the file system. To do this go into the
|
|
5
|
+
You can add a second instance of this adapter without adding new code on the file system. To do this go into the Itential Platform Admin Essentials and add a new service config for this adapter. The two instances of the adapter should have unique ids. In addition, they should point to different instances (unique host and port) of the other system.
|
|
6
6
|
|
|
7
7
|
### Adding Adapter Calls
|
|
8
8
|
|
|
@@ -18,7 +18,7 @@ npm run adapter:update
|
|
|
18
18
|
|
|
19
19
|
If you do not have a Swagger or OpenAPI document, you can use a Postman Collection and convert that to an OpenAPI document using APIMatic and then follow the first process.
|
|
20
20
|
|
|
21
|
-
If you want to manually update the adapter that can also be done the key thing is to make sure you update all of the right files. Within the entities directory you will find 1 or more entities. You can create a new entity or add to an existing entity. Each entity has an action.json file, any new call will need to be put in the action.json file. It will also need to be added to the enum for the ph_request_type in the appropriate schema files. Once this configuration is complete you will need to add the call to the adapter.js file and, in order to make it available as a workflow task in
|
|
21
|
+
If you want to manually update the adapter that can also be done the key thing is to make sure you update all of the right files. Within the entities directory you will find 1 or more entities. You can create a new entity or add to an existing entity. Each entity has an action.json file, any new call will need to be put in the action.json file. It will also need to be added to the enum for the ph_request_type in the appropriate schema files. Once this configuration is complete you will need to add the call to the adapter.js file and, in order to make it available as a workflow task in Itential Platform, it should also be added to the pronghorn.json file. You can optionally add it to the unit and integration test files. There is more information on how to work on each of these files in the <a href="https://docs.itential.com/opensource/docs/adapters" target="_blank">Adapter Technical Resources</a> on our Documentation Site.
|
|
22
22
|
|
|
23
23
|
```text
|
|
24
24
|
Files to update
|
|
@@ -32,7 +32,7 @@ Files to update
|
|
|
32
32
|
|
|
33
33
|
### Adding Adapter Properties
|
|
34
34
|
|
|
35
|
-
While changing adapter properties is done in the service instance configuration section of
|
|
35
|
+
While changing adapter properties is done in the service instance configuration section of Itential Platform, adding properties has to be done in the adapter. To add a property you should edit the propertiesSchema.json with the proper information for the property. In addition, you should modify the sampleProperties to have the new property in it.
|
|
36
36
|
|
|
37
37
|
```text
|
|
38
38
|
Files to update
|
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ Git
|
|
|
21
21
|
|
|
22
22
|
### How to Install
|
|
23
23
|
|
|
24
|
-
1. Set up the name space location in your
|
|
24
|
+
1. Set up the name space location in your Itential Platform node_modules.
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
27
|
cd /opt/pronghorn/current/node_modules (* could be in a different place)
|
|
@@ -29,7 +29,7 @@ if the @itentialopensource directory does not exist, create it:
|
|
|
29
29
|
mkdir @itentialopensource
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
2. Clone/unzip/tar the adapter into your
|
|
32
|
+
2. Clone/unzip/tar the adapter into your Itential Platform environment.
|
|
33
33
|
|
|
34
34
|
```bash
|
|
35
35
|
cd \@itentialopensource
|
|
@@ -47,15 +47,15 @@ cd adapter-mockdevice
|
|
|
47
47
|
npm run adapter:install
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
4. Restart
|
|
50
|
+
4. Restart Itential Platform
|
|
51
51
|
|
|
52
52
|
```bash
|
|
53
53
|
systemctl restart pronghorn
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
5. Change the adapter service instance configuration (host, port, credentials, etc) in
|
|
56
|
+
5. Change the adapter service instance configuration (host, port, credentials, etc) in Itential Platform Admin Essentials GUI
|
|
57
57
|
|
|
58
|
-
npm run adapter:install can be dependent on where the adapter is installed and on the version of
|
|
58
|
+
npm run adapter:install can be dependent on where the adapter is installed and on the version of Itential Platform so it is subject to fail. If this happens you can replace step 3-5 above with these:
|
|
59
59
|
|
|
60
60
|
3. Install adapter dependencies and check the adapter.
|
|
61
61
|
|
|
@@ -66,17 +66,17 @@ npm run lint:errors
|
|
|
66
66
|
npm run test
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
4. Restart
|
|
69
|
+
4. Restart Itential Platform
|
|
70
70
|
|
|
71
71
|
```bash
|
|
72
72
|
systemctl restart pronghorn
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
-
5. Create an adapter service instance configuration in
|
|
75
|
+
5. Create an adapter service instance configuration in Itential Platform Admin Essentials GUI
|
|
76
76
|
|
|
77
77
|
### Adapter Properties and Descriptions
|
|
78
78
|
|
|
79
|
-
This section provides sample properties that can be used to configure the adpater in
|
|
79
|
+
This section provides sample properties that can be used to configure the adpater in Itential Platform .
|
|
80
80
|
|
|
81
81
|
```JSON
|
|
82
82
|
{
|
package/TAB2.md
CHANGED
|
@@ -10,18 +10,18 @@
|
|
|
10
10
|
## Specific Adapter Information
|
|
11
11
|
### Authentication
|
|
12
12
|
|
|
13
|
-
This document will go through the steps for authenticating the Mock Device adapter with. Properly configuring the properties for an adapter in
|
|
13
|
+
This document will go through the steps for authenticating the Mock Device adapter with. Properly configuring the properties for an adapter in Itential Platform is critical for getting the adapter online. You can read more about adapter authentication <a href="https://docs.itential.com/opensource/docs/authentication" target="_blank">HERE</a>.
|
|
14
14
|
|
|
15
15
|
#### No Authentication
|
|
16
16
|
The Winston Syslog Adapter does not require any authentication.
|
|
17
17
|
|
|
18
18
|
#### Troubleshooting
|
|
19
19
|
- Make sure you copied over the correct username and password.
|
|
20
|
-
- Turn on debug level logs for the adapter in
|
|
20
|
+
- Turn on debug level logs for the adapter in Itential Platform Admin Essentials.
|
|
21
21
|
- Investigate the logs
|
|
22
22
|
### Sample Properties
|
|
23
23
|
|
|
24
|
-
Sample Properties can be used to help you configure the adapter in the Itential
|
|
24
|
+
Sample Properties can be used to help you configure the adapter in the Itential Platform. You will need to update connectivity information such as the host, port, protocol and credentials.
|
|
25
25
|
|
|
26
26
|
```json
|
|
27
27
|
"properties": {
|