@itentialopensource/adapter-servicenow 2.8.8 → 2.9.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/BROKER.md CHANGED
@@ -22,18 +22,25 @@ Below is an example of how you may set up the properties for this call.
22
22
  {
23
23
  "path": "/{org}/get/devices",
24
24
  "method": "GET",
25
+ "pagination": {
26
+ "offsetVar": "",
27
+ "limitVar": "",
28
+ "incrementBy": "limit",
29
+ "requestLocation": "query"
30
+ },
25
31
  "query": {},
26
32
  "body": {},
27
33
  "headers": {},
28
34
  "handleFailure": "ignore",
35
+ "responseDataKey": "",
29
36
  "requestFields": {
30
37
  "org": "555"
31
38
  },
32
39
  "responseFields": {
33
- "name": "host",
34
- "ostype": "os",
40
+ "name": "{hostField}",
41
+ "ostype": "{osField}",
35
42
  "ostypePrefix": "system-",
36
- "ipaddress": "attributes.ipaddr",
43
+ "ipaddress": "{attributes.ipaddr}",
37
44
  "port": "443"
38
45
  }
39
46
  },
@@ -44,16 +51,17 @@ Below is an example of how you may set up the properties for this call.
44
51
  "body": {},
45
52
  "headers": {},
46
53
  "handleFailure": "ignore",
54
+ "responseDataKey": "",
47
55
  "requestFields": {
48
56
  "org": "777"
49
57
  },
50
58
  "responseFields": {
51
- "name": "host",
52
- "ostype": "os",
59
+ "name": "{hostField}",
60
+ "ostype": "{osField}",
53
61
  "ostypePrefix": "system-",
54
- "ipaddress": "attributes.ipaddr",
62
+ "ipaddress": "{attributes.ipaddr}",
55
63
  "port": "443",
56
- "myorg": "org"
64
+ "myorg": "{orgField}"
57
65
  }
58
66
  }
59
67
  ]
@@ -88,12 +96,13 @@ Below is an example of how you may set up the properties for this call.
88
96
  "headers": {},
89
97
  "handleFailure": "ignore",
90
98
  "statusValue": "online",
99
+ "responseDataKey": "",
91
100
  "requestFields": {
92
- "org": "myorg",
93
- "id": "name"
101
+ "org": "{myorg}",
102
+ "id": "{name}"
94
103
  },
95
104
  "responseFields": {
96
- "status": "status"
105
+ "status": "{status}"
97
106
  }
98
107
  }
99
108
  ]
@@ -129,9 +138,10 @@ Below is an example of how you may set up the properties for this call.
129
138
  "body": {},
130
139
  "headers": {},
131
140
  "handleFailure": "ignore",
141
+ "responseDataKey": "",
132
142
  "requestFields": {
133
- "org": "myorg",
134
- "id": "name"
143
+ "org": "{myorg}",
144
+ "id": "{name}"
135
145
  }
136
146
  "responseFields": {}
137
147
  },
@@ -142,8 +152,9 @@ Below is an example of how you may set up the properties for this call.
142
152
  "body": {},
143
153
  "headers": {},
144
154
  "handleFailure": "ignore",
155
+ "responseDataKey": "",
145
156
  "requestFields": {
146
- "org": "myorg"
157
+ "org": "{myorg}"
147
158
  }
148
159
  "responseFields": {}
149
160
  }
@@ -178,17 +189,18 @@ Below is an example of how you may set up the properties for this call.
178
189
  "body": {},
179
190
  "headers": {},
180
191
  "handleFailure": "ignore",
192
+ "responseDataKey": "",
181
193
  "requestFields": {
182
- "org": "myorg",
183
- "id": "name"
194
+ "org": "{myorg}",
195
+ "id": "{name}"
184
196
  },
185
197
  "responseFields": {
186
- "name": "host",
187
- "ostype": "os",
198
+ "name": "{hostField}",
199
+ "ostype": "{osField}",
188
200
  "ostypePrefix": "system-",
189
- "ipaddress": "attributes.ipaddr",
201
+ "ipaddress": "{attributes.ipaddr}",
190
202
  "port": "443",
191
- "myorg": "org"
203
+ "myorg": "{orgField}"
192
204
  }
193
205
  }
194
206
  ]
package/CHANGELOG.md CHANGED
@@ -1,4 +1,12 @@
1
1
 
2
+ ## 2.9.0 [07-15-2024]
3
+
4
+ * Minor/2024 auto migration
5
+
6
+ See merge request itentialopensource/adapters/itsm-testing/adapter-servicenow!35
7
+
8
+ ---
9
+
2
10
  ## 2.8.8 [06-05-2024]
3
11
 
4
12
  * Changes made at 2024.03.27_14:10PM
package/PROPERTIES.md CHANGED
@@ -97,6 +97,7 @@ This section defines **all** the properties that are available for the adapter,
97
97
  }
98
98
  },
99
99
  "devicebroker": {
100
+ "enabled": false,
100
101
  "getDevice": [
101
102
  {
102
103
  "path": "/call/to/get/device/details",
@@ -580,6 +581,10 @@ The device broker section defines the properties used integrate Servicenow to th
580
581
  <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Property</span></th>
581
582
  <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Description</span></th>
582
583
  </tr>
584
+ <tr>
585
+ <td style="padding:15px">enabled</td>
586
+ <td style="padding:15px">Whether or not the device broker calls have been mapped.</td>
587
+ </tr>
583
588
  <tr>
584
589
  <td style="padding:15px">getDevice</td>
585
590
  <td style="padding:15px">The array of calls used to get device details for the broker</td>
package/README.md CHANGED
@@ -4,29 +4,49 @@
4
4
 
5
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
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)
7
+ - [Specific to this Adapter](#specific-to-this-adapter)
17
8
  - [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)
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 IAP Versions](#supported-iap-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
+ - [Additional Information](#additional-information)
23
+ - [Enhancements](./ENHANCE.md)
24
+ - [Contributing](./CONTRIBUTING.md)
25
+ - [Helpful Links](#helpful-links)
26
+ - [Node Scripts](#node-scripts)
27
+ - [Troubleshoot](./TROUBLESHOOT.md)
28
+ - [License and Maintainers](#license-and-maintainers)
29
+ - [Product License](#product-license)
30
+
31
+
32
+ ## Specific to this Adapter
26
33
 
27
- ## [Overview](./SUMMARY.md)
34
+ ### [Authentication](./AUTH.md)
35
+
36
+ ### [Sample Properties](./sampleProperties.json)
37
+
38
+ <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.
39
+
40
+ ### [Available Calls](./CALLS.md)
41
+
42
+ ### [Swagger](./report/adapter-openapi.json)
43
+
44
+
45
+ ## Generic Adapter Information
46
+
47
+ ### [Overview](./SUMMARY.md)
28
48
 
29
- ## Versioning
49
+ ### Versioning
30
50
 
31
51
  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>.
32
52
 
@@ -34,7 +54,7 @@ Any release prior to 1.0.0 is a pre-release. Initial builds of adapters are gene
34
54
 
35
55
  Release notes can be viewed in CHANGELOG.md.
36
56
 
37
- ## Supported IAP Versions
57
+ ### Supported IAP Versions
38
58
 
39
59
  Itential Product adapters are built for particular versions of IAP and packaged with the versions they work with.
40
60
 
@@ -42,11 +62,11 @@ Itential opensource adapter as well as custom adapters built with the Itential A
42
62
 
43
63
  Many of the scripts that come with all adapters built using the Itential Adapter Builder do have some dependencies on IAP or the IAP database schema and so it is possible these scripts could stop working in different versions of IAP. If you notify Itential of any issues, the Adapter Team will attempt to fix the scripts for newer releases of IAP.
44
64
 
45
- ## Getting Started
65
+ ### Getting Started
46
66
 
47
67
  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.
48
68
 
49
- ### Helpful Background Information
69
+ #### Helpful Background Information
50
70
 
51
71
  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:
52
72
 
@@ -67,7 +87,7 @@ Troubleshooting an Adapter
67
87
  Others will be added over time.
68
88
  Want to build a new adapter? Use the <a href="https://adapters.itential.io" target="_blank">Itential Adapter Builder</a>
69
89
 
70
- ### Prerequisites
90
+ #### Prerequisites
71
91
 
72
92
  The following is a list of required packages for installation on the system the adapter will run on:
73
93
 
@@ -154,16 +174,8 @@ eslint-plugin-json
154
174
  testdouble
155
175
  ```
156
176
 
157
- ### How to Install
177
+ #### How to Install
158
178
 
159
- Installing an Adapter into your instance of Itential varies for Itential Cloud and On Prem IAP customers.
160
-
161
- #### Cloud
162
- 1. Create an instance of the adapter in IAP Admin Essentials GUI
163
-
164
- 2. Change the adapter service instance configuration (host, port, credentials, etc) in IAP Admin Essentials GUI
165
-
166
- #### On Prem IAP
167
179
  1. Set up the name space location in your IAP node_modules.
168
180
 
169
181
  ```bash
@@ -175,8 +187,8 @@ if the @itentialopensource directory does not exist, create it:
175
187
  2. Clone/unzip/tar the adapter into your IAP environment.
176
188
 
177
189
  ```bash
178
- cd \@itentialopensource
179
- git clone git@gitlab.com:\@itentialopensource/adapters/adapter-servicenow
190
+ cd @itentialopensource
191
+ git clone git@gitlab.com:@itentialopensource/adapters/adapter-servicenow
180
192
  or
181
193
  unzip adapter-servicenow.zip
182
194
  or
@@ -204,30 +216,11 @@ systemctl restart pronghorn
204
216
 
205
217
  7. Change the adapter service instance configuration (host, port, credentials, etc) in IAP Admin Essentials GUI
206
218
 
207
-
208
- 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:
209
-
210
- 3. Install adapter dependencies and check the adapter.
211
-
212
- ```bash
213
- cd adapter-servicenow
214
- npm run adapter:install
215
- ```
216
-
217
- 4. Restart IAP
218
-
219
- ```bash
220
- systemctl restart pronghorn
221
- ```
222
-
223
- 5. Change the adapter service instance configuration (host, port, credentials, etc) in IAP Admin Essentials GUI
224
-
225
-
226
- ### Testing
219
+ #### Testing
227
220
 
228
221
  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.
229
222
 
230
- #### Unit Testing
223
+ ##### Unit Testing
231
224
 
232
225
  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.
233
226
 
@@ -240,7 +233,7 @@ npm run test:baseunit
240
233
 
241
234
  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.
242
235
 
243
- #### Integration Testing - Standalone
236
+ ##### Integration Testing - Standalone
244
237
 
245
238
  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 Servicenow. 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.
246
239
 
@@ -255,7 +248,7 @@ npm run test:integration
255
248
 
256
249
  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.
257
250
 
258
- #### Integration Testing
251
+ ##### Integration Testing
259
252
 
260
253
  Integration Testing requires connectivity to Servicenow. 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.
261
254
 
@@ -271,23 +264,19 @@ Test should also be written to clean up after themselves. However, it is importa
271
264
 
272
265
  > **Reminder**: Do not check in code with actual credentials to systems.
273
266
 
274
- ## [Configuration](./PROPERTIES.md)
275
-
276
- ## [Using this Adapter](./CALLS.md)
277
-
278
- ### [Authentication](./AUTH.md)
267
+ ### [Configuration](./PROPERTIES.md)
279
268
 
280
- ## Additional Information
269
+ ### Additional Information
281
270
 
282
- ### [Enhancements](./ENHANCE.md)
271
+ #### [Enhancements](./ENHANCE.md)
283
272
 
284
- ### [Contributing](./CONTRIBUTING.md)
273
+ #### [Contributing](./CONTRIBUTING.md)
285
274
 
286
- ### Helpful Links
275
+ #### Helpful Links
287
276
 
288
277
  <a href="https://docs.itential.com/opensource/docs/adapters" target="_blank">Adapter Technical Resources</a>
289
278
 
290
- ### Node Scripts
279
+ #### Node Scripts
291
280
 
292
281
  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.
293
282
 
@@ -339,9 +328,9 @@ There are several node scripts that now accompany the adapter. These scripts are
339
328
  </table>
340
329
  <br>
341
330
 
342
- ## [Troubleshoot](./TROUBLESHOOT.md)
331
+ ### [Troubleshoot](./TROUBLESHOOT.md)
343
332
 
344
- ## License and Maintainers
333
+ ### License and Maintainers
345
334
 
346
335
  ```text
347
336
  Itential Product Adapters are maintained by the Itential Product Team.
@@ -349,6 +338,6 @@ Itential OpenSource Adapters are maintained by the Itential Adapter Team and the
349
338
  Custom Adapters are maintained by other sources.
350
339
  ```
351
340
 
352
- ## Product License
341
+ ### Product License
353
342
 
354
343
  [Apache 2.0](./LICENSE)