@itentialopensource/adapter-azure_devops 0.2.3 → 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 +3 -1
- package/BROKER.md +31 -19
- package/CALLS.md +3 -2
- package/CHANGELOG.md +16 -0
- package/PROPERTIES.md +5 -0
- package/README.md +60 -63
- package/SYSTEMINFO.md +7 -2
- package/TAB1.md +16 -0
- package/TAB2.md +321 -0
- package/metadata.json +26 -4
- package/package.json +7 -9
- package/propertiesSchema.json +5 -0
- package/refs?service=git-upload-pack +0 -0
- package/report/adapterInfo.json +4 -4
- package/report/updateReport1715034269029.json +120 -0
- package/sampleProperties.json +37 -25
- package/test/integration/adapterTestIntegration.js +1 -0
- package/test/unit/adapterTestUnit.js +1 -3
package/AUTH.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
This document will go through the steps for authenticating the Microsoft Azure DevOps adapter with the authentication methods we have worked with in the past. Properly configuring the properties for an adapter in IAP 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
|
+
Companies periodically change authentication methods to provide better security. As this happens this section should be updated and contributed/merge back into the adapter repository.
|
|
6
|
+
|
|
5
7
|
### Static Token Authentication
|
|
6
8
|
The Microsoft Azure DevOps adapter requires Static Token Authentication. If you change authentication methods, you should change this section accordingly and merge it back into the adapter repository.
|
|
7
9
|
|
|
@@ -26,7 +28,7 @@ you can leave all of the other properties in the authentication section, they wi
|
|
|
26
28
|
4. Restart the adapter. If your properties were set correctly, the adapter should go online.
|
|
27
29
|
|
|
28
30
|
### Troubleshooting
|
|
29
|
-
- Make sure you copied over the correct
|
|
31
|
+
- Make sure you copied over the correct Personal Access Token.
|
|
30
32
|
- Turn on debug level logs for the adapter in IAP Admin Essentials.
|
|
31
33
|
- Turn on auth_logging for the adapter in IAP Admin Essentials (adapter properties).
|
|
32
34
|
- Investigate the logs - in particular:
|
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": "
|
|
34
|
-
"ostype": "
|
|
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": "
|
|
52
|
-
"ostype": "
|
|
59
|
+
"name": "{hostField}",
|
|
60
|
+
"ostype": "{osField}",
|
|
53
61
|
"ostypePrefix": "system-",
|
|
54
|
-
"ipaddress": "attributes.ipaddr",
|
|
62
|
+
"ipaddress": "{attributes.ipaddr}",
|
|
55
63
|
"port": "443",
|
|
56
|
-
"myorg": "
|
|
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": "
|
|
187
|
-
"ostype": "
|
|
198
|
+
"name": "{hostField}",
|
|
199
|
+
"ostype": "{osField}",
|
|
188
200
|
"ostypePrefix": "system-",
|
|
189
|
-
"ipaddress": "attributes.ipaddr",
|
|
201
|
+
"ipaddress": "{attributes.ipaddr}",
|
|
190
202
|
"port": "443",
|
|
191
|
-
"myorg": "
|
|
203
|
+
"myorg": "{orgField}"
|
|
192
204
|
}
|
|
193
205
|
}
|
|
194
206
|
]
|
package/CALLS.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The `adapter.js` file contains the calls the adapter makes available to the rest of the Itential Platform. The API detailed for these calls should be available through JSDOC. The following is a brief summary of the calls.
|
|
4
4
|
|
|
5
|
+
|
|
5
6
|
### Generic Adapter Calls
|
|
6
7
|
|
|
7
8
|
These are adapter methods that IAP or you might use. There are some other methods not shown here that might be used for internal adapter functionality.
|
|
@@ -19,7 +20,7 @@ These are adapter methods that IAP or you might use. There are some other method
|
|
|
19
20
|
</tr>
|
|
20
21
|
<tr>
|
|
21
22
|
<td style="padding:15px">healthCheck(callback)</td>
|
|
22
|
-
<td style="padding:15px">This call ensures that the adapter can communicate with Adapter for
|
|
23
|
+
<td style="padding:15px">This call ensures that the adapter can communicate with Adapter for Azure Devops. The actual call that is used is defined in the adapter properties and .system entities action.json file.</td>
|
|
23
24
|
<td style="padding:15px">No</td>
|
|
24
25
|
</tr>
|
|
25
26
|
<tr>
|
|
@@ -29,7 +30,7 @@ These are adapter methods that IAP or you might use. There are some other method
|
|
|
29
30
|
</tr>
|
|
30
31
|
<tr>
|
|
31
32
|
<td style="padding:15px">encryptProperty(property, technique, callback)</td>
|
|
32
|
-
<td style="padding:15px">This call will take the provided property and technique, and return the property encrypted with the technique. This allows the property to be used in the adapterProps section for the credential password so that the password does not have to be in clear text. The adapter will decrypt the property as needed for communications with Adapter for
|
|
33
|
+
<td style="padding:15px">This call will take the provided property and technique, and return the property encrypted with the technique. This allows the property to be used in the adapterProps section for the credential password so that the password does not have to be in clear text. The adapter will decrypt the property as needed for communications with Adapter for Azure Devops.</td>
|
|
33
34
|
<td style="padding:15px">No</td>
|
|
34
35
|
</tr>
|
|
35
36
|
<tr>
|
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
|
|
2
|
+
## 0.3.0 [05-08-2024]
|
|
3
|
+
|
|
4
|
+
* 2024 Adapter Migration
|
|
5
|
+
|
|
6
|
+
See merge request itentialopensource/adapters/devops-netops/adapter-azure_devops!17
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 0.2.4 [03-26-2024]
|
|
11
|
+
|
|
12
|
+
* Changes made at 2024.03.26_14:22PM
|
|
13
|
+
|
|
14
|
+
See merge request itentialopensource/adapters/devops-netops/adapter-azure_devops!16
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
2
18
|
## 0.2.3 [03-11-2024]
|
|
3
19
|
|
|
4
20
|
* Changes made at 2024.03.11_13:21PM
|
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 Azure_devops to
|
|
|
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
|
-
- [
|
|
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
|
-
- [
|
|
19
|
-
- [
|
|
20
|
-
- [
|
|
21
|
-
|
|
22
|
-
- [
|
|
23
|
-
- [
|
|
24
|
-
- [
|
|
25
|
-
- [
|
|
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
|
-
|
|
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
|
|
28
46
|
|
|
29
|
-
|
|
47
|
+
### [Overview](./SUMMARY.md)
|
|
48
|
+
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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,7 +174,7 @@ eslint-plugin-json
|
|
|
154
174
|
testdouble
|
|
155
175
|
```
|
|
156
176
|
|
|
157
|
-
|
|
177
|
+
#### How to Install
|
|
158
178
|
|
|
159
179
|
1. Set up the name space location in your IAP node_modules.
|
|
160
180
|
|
|
@@ -167,8 +187,8 @@ if the @itentialopensource directory does not exist, create it:
|
|
|
167
187
|
2. Clone/unzip/tar the adapter into your IAP environment.
|
|
168
188
|
|
|
169
189
|
```bash
|
|
170
|
-
cd
|
|
171
|
-
git clone git@gitlab.com
|
|
190
|
+
cd @itentialopensource
|
|
191
|
+
git clone git@gitlab.com:@itentialopensource/adapters/adapter-azure_devops
|
|
172
192
|
or
|
|
173
193
|
unzip adapter-azure_devops.zip
|
|
174
194
|
or
|
|
@@ -196,30 +216,11 @@ systemctl restart pronghorn
|
|
|
196
216
|
|
|
197
217
|
7. Change the adapter service instance configuration (host, port, credentials, etc) in IAP Admin Essentials GUI
|
|
198
218
|
|
|
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:
|
|
201
|
-
|
|
202
|
-
3. Install adapter dependencies and check the adapter.
|
|
203
|
-
|
|
204
|
-
```bash
|
|
205
|
-
cd adapter-azure_devops
|
|
206
|
-
npm run adapter:install
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
4. Restart IAP
|
|
210
|
-
|
|
211
|
-
```bash
|
|
212
|
-
systemctl restart pronghorn
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
5. Change the adapter service instance configuration (host, port, credentials, etc) in IAP Admin Essentials GUI
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
### Testing
|
|
219
|
+
#### Testing
|
|
219
220
|
|
|
220
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.
|
|
221
222
|
|
|
222
|
-
|
|
223
|
+
##### Unit Testing
|
|
223
224
|
|
|
224
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.
|
|
225
226
|
|
|
@@ -232,7 +233,7 @@ npm run test:baseunit
|
|
|
232
233
|
|
|
233
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.
|
|
234
235
|
|
|
235
|
-
|
|
236
|
+
##### Integration Testing - Standalone
|
|
236
237
|
|
|
237
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 Azure_devops. 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.
|
|
238
239
|
|
|
@@ -247,7 +248,7 @@ npm run test:integration
|
|
|
247
248
|
|
|
248
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.
|
|
249
250
|
|
|
250
|
-
|
|
251
|
+
##### Integration Testing
|
|
251
252
|
|
|
252
253
|
Integration Testing requires connectivity to Azure_devops. 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.
|
|
253
254
|
|
|
@@ -263,23 +264,19 @@ Test should also be written to clean up after themselves. However, it is importa
|
|
|
263
264
|
|
|
264
265
|
> **Reminder**: Do not check in code with actual credentials to systems.
|
|
265
266
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
## [Using this Adapter](./CALLS.md)
|
|
269
|
-
|
|
270
|
-
### [Authentication](./AUTH.md)
|
|
267
|
+
### [Configuration](./PROPERTIES.md)
|
|
271
268
|
|
|
272
|
-
|
|
269
|
+
### Additional Information
|
|
273
270
|
|
|
274
|
-
|
|
271
|
+
#### [Enhancements](./ENHANCE.md)
|
|
275
272
|
|
|
276
|
-
|
|
273
|
+
#### [Contributing](./CONTRIBUTING.md)
|
|
277
274
|
|
|
278
|
-
|
|
275
|
+
#### Helpful Links
|
|
279
276
|
|
|
280
277
|
<a href="https://docs.itential.com/opensource/docs/adapters" target="_blank">Adapter Technical Resources</a>
|
|
281
278
|
|
|
282
|
-
|
|
279
|
+
#### Node Scripts
|
|
283
280
|
|
|
284
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.
|
|
285
282
|
|
|
@@ -331,9 +328,9 @@ There are several node scripts that now accompany the adapter. These scripts are
|
|
|
331
328
|
</table>
|
|
332
329
|
<br>
|
|
333
330
|
|
|
334
|
-
|
|
331
|
+
### [Troubleshoot](./TROUBLESHOOT.md)
|
|
335
332
|
|
|
336
|
-
|
|
333
|
+
### License and Maintainers
|
|
337
334
|
|
|
338
335
|
```text
|
|
339
336
|
Itential Product Adapters are maintained by the Itential Product Team.
|
|
@@ -341,6 +338,6 @@ Itential OpenSource Adapters are maintained by the Itential Adapter Team and the
|
|
|
341
338
|
Custom Adapters are maintained by other sources.
|
|
342
339
|
```
|
|
343
340
|
|
|
344
|
-
|
|
341
|
+
### Product License
|
|
345
342
|
|
|
346
343
|
[Apache 2.0](./LICENSE)
|
package/SYSTEMINFO.md
CHANGED
|
@@ -12,8 +12,13 @@ We classify Microsoft Azure DevOps into the CI/CD domain since Microsoft Azure D
|
|
|
12
12
|
## Why Integrate
|
|
13
13
|
The Azure DevOps adapter from Itential is used to integrate the Itential Automation Platform (IAP) with Microsoft Azure DevOps. With this adapter you have the ability to perform operations such as:
|
|
14
14
|
|
|
15
|
-
-
|
|
16
|
-
-
|
|
15
|
+
- Get Pipelines
|
|
16
|
+
- Get Pipeline
|
|
17
|
+
- Get Pipeline Runs
|
|
18
|
+
- Get Repositories
|
|
19
|
+
- Get Pull Requests
|
|
20
|
+
- Create Pull Request
|
|
21
|
+
- Commit
|
|
17
22
|
|
|
18
23
|
## Additional Product Documentation
|
|
19
24
|
The [API documents for Microsoft Azure DevOps](https://learn.microsoft.com/en-us/rest/api/azure/devops/?view=azure-devops-rest-7.2)
|
package/TAB1.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Overview
|
|
2
|
+
|
|
3
|
+
This adapter is used to integrate the Itential Automation Platform (IAP) with the Azure_devops System. The API that was used to build the adapter for Azure_devops is usually available in the report directory of this adapter. The adapter utilizes the Azure_devops 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
|
+
|
|
5
|
+
## Details
|
|
6
|
+
The Azure DevOps adapter from Itential is used to integrate the Itential Automation Platform (IAP) with Microsoft Azure DevOps. With this adapter you have the ability to perform operations such as:
|
|
7
|
+
|
|
8
|
+
- Get Pipelines
|
|
9
|
+
- Get Pipeline
|
|
10
|
+
- Get Pipeline Runs
|
|
11
|
+
- Get Repositories
|
|
12
|
+
- Get Pull Requests
|
|
13
|
+
- Create Pull Request
|
|
14
|
+
- Commit
|
|
15
|
+
|
|
16
|
+
For further technical details on how to install and use this adapter, please click the Technical Documentation tab.
|
package/TAB2.md
ADDED
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
# Microsoft Azure DevOps
|
|
2
|
+
|
|
3
|
+
## Table of Contents
|
|
4
|
+
|
|
5
|
+
- [Specific Adapter Information](#specific-adapter-information)
|
|
6
|
+
- [Authentication](#authentication)
|
|
7
|
+
- [Sample Properties](#sample-properties)
|
|
8
|
+
- [Swagger](#swagger)
|
|
9
|
+
- [Generic Adapter Information](#generic-adapter-information)
|
|
10
|
+
|
|
11
|
+
## Specific Adapter Information
|
|
12
|
+
### Authentication
|
|
13
|
+
|
|
14
|
+
This document will go through the steps for authenticating the Microsoft Azure DevOps adapter with the authentication methods we have worked with in the past. Properly configuring the properties for an adapter in IAP 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>.
|
|
15
|
+
|
|
16
|
+
Companies periodically change authentication methods to provide better security. As this happens this section should be updated and contributed/merge back into the adapter repository.
|
|
17
|
+
|
|
18
|
+
#### Static Token Authentication
|
|
19
|
+
The Microsoft Azure DevOps adapter requires Static Token Authentication. If you change authentication methods, you should change this section accordingly and merge it back into the adapter repository.
|
|
20
|
+
|
|
21
|
+
STEPS
|
|
22
|
+
1. Ensure you have access to a Microsoft Azure DevOps server and that it is running
|
|
23
|
+
2. Follow the steps in the README.md to import the adapter into IAP if you have not already done so
|
|
24
|
+
3. Use the properties below for the ```properties.authentication``` field
|
|
25
|
+
```json
|
|
26
|
+
"authentication": {
|
|
27
|
+
"auth_method": "static_token",
|
|
28
|
+
"token": "<PAT>",
|
|
29
|
+
"token_timeout": 600000,
|
|
30
|
+
"token_cache": "local",
|
|
31
|
+
"invalid_token_error": 401,
|
|
32
|
+
"auth_field": "header.headers.Authorization",
|
|
33
|
+
"auth_field_format": "Basic {b64}Basic:{token}{/b64}",
|
|
34
|
+
"auth_logging": false
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
you can leave all of the other properties in the authentication section, they will not be used when the auth_method is static_token.
|
|
38
|
+
|
|
39
|
+
4. Restart the adapter. If your properties were set correctly, the adapter should go online.
|
|
40
|
+
|
|
41
|
+
#### Troubleshooting
|
|
42
|
+
- Make sure you copied over the correct Personal Access Token.
|
|
43
|
+
- Turn on debug level logs for the adapter in IAP Admin Essentials.
|
|
44
|
+
- Turn on auth_logging for the adapter in IAP Admin Essentials (adapter properties).
|
|
45
|
+
- Investigate the logs - in particular:
|
|
46
|
+
- The FULL REQUEST log to make sure the proper headers are being sent with the request.
|
|
47
|
+
- The FULL BODY log to make sure the payload is accurate.
|
|
48
|
+
- The CALL RETURN log to see what the other system is telling us.
|
|
49
|
+
- Credentials should be ** masked ** by the adapter so make sure you verify the username and password - including that there are erroneous spaces at the front or end.
|
|
50
|
+
- Remember when you are done to turn auth_logging off as you do not want to log credentials.
|
|
51
|
+
|
|
52
|
+
### Sample Properties
|
|
53
|
+
|
|
54
|
+
Sample Properties 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.
|
|
55
|
+
|
|
56
|
+
```json
|
|
57
|
+
"properties": {
|
|
58
|
+
"host": "dev.azure.com",
|
|
59
|
+
"port": 443,
|
|
60
|
+
"choosepath": "",
|
|
61
|
+
"base_path": "/",
|
|
62
|
+
"version": "",
|
|
63
|
+
"cache_location": "none",
|
|
64
|
+
"encode_pathvars": true,
|
|
65
|
+
"encode_queryvars": true,
|
|
66
|
+
"save_metric": false,
|
|
67
|
+
"stub": true,
|
|
68
|
+
"protocol": "https",
|
|
69
|
+
"authentication": {
|
|
70
|
+
"auth_method": "static_token",
|
|
71
|
+
"username": "username",
|
|
72
|
+
"password": "password",
|
|
73
|
+
"token": "token",
|
|
74
|
+
"token_timeout": 600000,
|
|
75
|
+
"token_cache": "local",
|
|
76
|
+
"invalid_token_error": 401,
|
|
77
|
+
"auth_field": "header.headers.Authorization",
|
|
78
|
+
"auth_field_format": "Basic {b64}Basic:{token}{/b64}",
|
|
79
|
+
"auth_logging": false,
|
|
80
|
+
"client_id": "",
|
|
81
|
+
"client_secret": "",
|
|
82
|
+
"grant_type": "",
|
|
83
|
+
"sensitive": [],
|
|
84
|
+
"sso": {
|
|
85
|
+
"protocol": "",
|
|
86
|
+
"host": "",
|
|
87
|
+
"port": 0
|
|
88
|
+
},
|
|
89
|
+
"multiStepAuthCalls": [
|
|
90
|
+
{
|
|
91
|
+
"name": "",
|
|
92
|
+
"requestFields": {},
|
|
93
|
+
"responseFields": {},
|
|
94
|
+
"successfullResponseCode": 200
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
"healthcheck": {
|
|
99
|
+
"type": "none",
|
|
100
|
+
"frequency": 60000,
|
|
101
|
+
"query_object": {},
|
|
102
|
+
"addlHeaders": {}
|
|
103
|
+
},
|
|
104
|
+
"throttle": {
|
|
105
|
+
"throttle_enabled": false,
|
|
106
|
+
"number_pronghorns": 1,
|
|
107
|
+
"sync_async": "sync",
|
|
108
|
+
"max_in_queue": 1000,
|
|
109
|
+
"concurrent_max": 1,
|
|
110
|
+
"expire_timeout": 0,
|
|
111
|
+
"avg_runtime": 200,
|
|
112
|
+
"priorities": [
|
|
113
|
+
{
|
|
114
|
+
"value": 0,
|
|
115
|
+
"percent": 100
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
},
|
|
119
|
+
"request": {
|
|
120
|
+
"number_redirects": 0,
|
|
121
|
+
"number_retries": 3,
|
|
122
|
+
"limit_retry_error": [
|
|
123
|
+
0
|
|
124
|
+
],
|
|
125
|
+
"failover_codes": [],
|
|
126
|
+
"attempt_timeout": 5000,
|
|
127
|
+
"global_request": {
|
|
128
|
+
"payload": {},
|
|
129
|
+
"uriOptions": {},
|
|
130
|
+
"addlHeaders": {},
|
|
131
|
+
"authData": {}
|
|
132
|
+
},
|
|
133
|
+
"healthcheck_on_timeout": true,
|
|
134
|
+
"return_raw": false,
|
|
135
|
+
"archiving": false,
|
|
136
|
+
"return_request": false
|
|
137
|
+
},
|
|
138
|
+
"proxy": {
|
|
139
|
+
"enabled": false,
|
|
140
|
+
"host": "",
|
|
141
|
+
"port": 1,
|
|
142
|
+
"protocol": "http",
|
|
143
|
+
"username": "",
|
|
144
|
+
"password": ""
|
|
145
|
+
},
|
|
146
|
+
"ssl": {
|
|
147
|
+
"ecdhCurve": "",
|
|
148
|
+
"enabled": false,
|
|
149
|
+
"accept_invalid_cert": false,
|
|
150
|
+
"ca_file": "",
|
|
151
|
+
"key_file": "",
|
|
152
|
+
"cert_file": "",
|
|
153
|
+
"secure_protocol": "",
|
|
154
|
+
"ciphers": ""
|
|
155
|
+
},
|
|
156
|
+
"mongo": {
|
|
157
|
+
"host": "",
|
|
158
|
+
"port": 0,
|
|
159
|
+
"database": "",
|
|
160
|
+
"username": "",
|
|
161
|
+
"password": "",
|
|
162
|
+
"replSet": "",
|
|
163
|
+
"db_ssl": {
|
|
164
|
+
"enabled": false,
|
|
165
|
+
"accept_invalid_cert": false,
|
|
166
|
+
"ca_file": "",
|
|
167
|
+
"key_file": "",
|
|
168
|
+
"cert_file": ""
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"devicebroker": {
|
|
172
|
+
"enabled": false,
|
|
173
|
+
"getDevice": [
|
|
174
|
+
{
|
|
175
|
+
"path": "/not/mapped",
|
|
176
|
+
"method": "GET",
|
|
177
|
+
"query": {},
|
|
178
|
+
"body": {},
|
|
179
|
+
"headers": {},
|
|
180
|
+
"handleFailure": "ignore",
|
|
181
|
+
"requestFields": {
|
|
182
|
+
"insample": "{port}"
|
|
183
|
+
},
|
|
184
|
+
"responseDatakey": "",
|
|
185
|
+
"responseFields": {
|
|
186
|
+
"name": "{this}{||}{that}",
|
|
187
|
+
"ostype": "{osfield}",
|
|
188
|
+
"ostypePrefix": "meraki-",
|
|
189
|
+
"port": "{port}",
|
|
190
|
+
"ipaddress": "{ip_addr}",
|
|
191
|
+
"serial": "{serial}"
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
],
|
|
195
|
+
"getDevicesFiltered": [
|
|
196
|
+
{
|
|
197
|
+
"path": "/not/mapped",
|
|
198
|
+
"method": "GET",
|
|
199
|
+
"pagination": {
|
|
200
|
+
"offsetVar": "",
|
|
201
|
+
"limitVar": "",
|
|
202
|
+
"incrementBy": "limit",
|
|
203
|
+
"requestLocation": "query"
|
|
204
|
+
},
|
|
205
|
+
"query": {},
|
|
206
|
+
"body": {},
|
|
207
|
+
"headers": {},
|
|
208
|
+
"handleFailure": "ignore",
|
|
209
|
+
"requestFields": {},
|
|
210
|
+
"responseDatakey": "",
|
|
211
|
+
"responseFields": {
|
|
212
|
+
"name": "{this}{||}{that}",
|
|
213
|
+
"ostype": "{osfield}",
|
|
214
|
+
"ostypePrefix": "meraki-",
|
|
215
|
+
"port": "{port}",
|
|
216
|
+
"ipaddress": "{ip_addr}",
|
|
217
|
+
"serial": "{serial}",
|
|
218
|
+
"id": "{myid}"
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
],
|
|
222
|
+
"isAlive": [
|
|
223
|
+
{
|
|
224
|
+
"path": "/not/mapped/{devID}",
|
|
225
|
+
"method": "GET",
|
|
226
|
+
"query": {},
|
|
227
|
+
"body": {},
|
|
228
|
+
"headers": {},
|
|
229
|
+
"handleFailure": "ignore",
|
|
230
|
+
"requestFields": {
|
|
231
|
+
"devID": "{id}"
|
|
232
|
+
},
|
|
233
|
+
"responseDatakey": "",
|
|
234
|
+
"responseFields": {
|
|
235
|
+
"status": "return2xx",
|
|
236
|
+
"statusValue": "AD.200"
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
],
|
|
240
|
+
"getConfig": [
|
|
241
|
+
{
|
|
242
|
+
"path": "/not/mapped/{devID}",
|
|
243
|
+
"method": "GET",
|
|
244
|
+
"query": {},
|
|
245
|
+
"body": {},
|
|
246
|
+
"headers": {},
|
|
247
|
+
"handleFailure": "ignore",
|
|
248
|
+
"requestFields": {
|
|
249
|
+
"devID": "{id}"
|
|
250
|
+
},
|
|
251
|
+
"responseDatakey": "",
|
|
252
|
+
"responseFields": {}
|
|
253
|
+
}
|
|
254
|
+
],
|
|
255
|
+
"getCount": [
|
|
256
|
+
{
|
|
257
|
+
"path": "/not/mapped",
|
|
258
|
+
"method": "GET",
|
|
259
|
+
"query": {},
|
|
260
|
+
"body": {},
|
|
261
|
+
"headers": {},
|
|
262
|
+
"handleFailure": "ignore",
|
|
263
|
+
"requestFields": {},
|
|
264
|
+
"responseDatakey": "",
|
|
265
|
+
"responseFields": {}
|
|
266
|
+
}
|
|
267
|
+
]
|
|
268
|
+
},
|
|
269
|
+
"cache": {
|
|
270
|
+
"enabled": false,
|
|
271
|
+
"entities": [
|
|
272
|
+
{
|
|
273
|
+
"entityType": "device",
|
|
274
|
+
"frequency": 3600,
|
|
275
|
+
"flushOnFail": false,
|
|
276
|
+
"limit": 10000,
|
|
277
|
+
"retryAttempts": 5,
|
|
278
|
+
"sort": true,
|
|
279
|
+
"populate": [
|
|
280
|
+
{
|
|
281
|
+
"path": "/not/mapped",
|
|
282
|
+
"method": "GET",
|
|
283
|
+
"pagination": {
|
|
284
|
+
"offsetVar": "",
|
|
285
|
+
"limitVar": "",
|
|
286
|
+
"incrementBy": "limit",
|
|
287
|
+
"requestLocation": "query"
|
|
288
|
+
},
|
|
289
|
+
"query": {},
|
|
290
|
+
"body": {},
|
|
291
|
+
"headers": {},
|
|
292
|
+
"handleFailure": "ignore",
|
|
293
|
+
"requestFields": {},
|
|
294
|
+
"responseDatakey": "",
|
|
295
|
+
"responseFields": {
|
|
296
|
+
"name": "{this}{||}{that}",
|
|
297
|
+
"ostype": "{osfield}",
|
|
298
|
+
"ostypePrefix": "meraki-",
|
|
299
|
+
"port": "{port}",
|
|
300
|
+
"ipaddress": "{ip_addr}",
|
|
301
|
+
"serial": "{serial}",
|
|
302
|
+
"id": "{myid}"
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
],
|
|
306
|
+
"cachedTasks": [
|
|
307
|
+
{
|
|
308
|
+
"name": "",
|
|
309
|
+
"filterField": "",
|
|
310
|
+
"filterLoc": ""
|
|
311
|
+
}
|
|
312
|
+
]
|
|
313
|
+
}
|
|
314
|
+
]
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
```
|
|
318
|
+
### [Swagger](https://gitlab.com/itentialopensource/adapters/devops-netops/adapter-azure_devops/-/blob/master/report/adapter-openapi.json)
|
|
319
|
+
|
|
320
|
+
## [Generic Adapter Information](https://gitlab.com/itentialopensource/adapters/devops-netops/adapter-azure_devops/-/blob/master/README.md)
|
|
321
|
+
|
package/metadata.json
CHANGED
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"CI/CD"
|
|
18
18
|
],
|
|
19
19
|
"tags": [
|
|
20
|
-
"CI/CD & Self-Service"
|
|
20
|
+
"CI/CD & Self-Service",
|
|
21
|
+
"Cloud Infrastructure Changes"
|
|
21
22
|
],
|
|
22
23
|
"useCases": [
|
|
23
24
|
"CI/CD Pipeline"
|
|
@@ -26,12 +27,29 @@
|
|
|
26
27
|
"isDeprecated": false
|
|
27
28
|
},
|
|
28
29
|
"brokerSince": "",
|
|
30
|
+
"authMethods": [
|
|
31
|
+
{
|
|
32
|
+
"type": "Personal Access Token",
|
|
33
|
+
"primary": true
|
|
34
|
+
}
|
|
35
|
+
],
|
|
29
36
|
"documentation": {
|
|
30
37
|
"storeLink": "",
|
|
31
38
|
"npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-azure_devops",
|
|
32
|
-
"repoLink": "https://gitlab.com/itentialopensource/adapters/
|
|
39
|
+
"repoLink": "https://gitlab.com/itentialopensource/adapters/adapter-azure_devops",
|
|
33
40
|
"docLink": "https://docs.itential.com/opensource/docs/microsoft-azure-devops",
|
|
34
|
-
"demoLinks": [
|
|
41
|
+
"demoLinks": [
|
|
42
|
+
{
|
|
43
|
+
"title": "How NetDevOps Teams Can Integrate Network Automations with their Entire IT Ecosystem",
|
|
44
|
+
"link": "https://www.itential.com/blog/company/automation-strategy/how-netdevops-teams-can-integrate-network-automations-with-their-entire-it-ecosystem/"
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"trainingLinks": [
|
|
48
|
+
{
|
|
49
|
+
"title": "Itential Academy",
|
|
50
|
+
"link": "https://www.itential.com/itential-academy/"
|
|
51
|
+
}
|
|
52
|
+
],
|
|
35
53
|
"faqLink": "https://docs.itential.com/opensource/docs/troubleshooting-an-adapter",
|
|
36
54
|
"contributeLink": "https://gitlab.com/itentialopensource/adapters/contributing-guide",
|
|
37
55
|
"issueLink": "https://itential.atlassian.net/servicedesk/customer/portals",
|
|
@@ -39,7 +57,11 @@
|
|
|
39
57
|
"vendorLink": "https://www.microsoft.com/en-us/",
|
|
40
58
|
"productLink": "https://azure.microsoft.com/en-us/products/devops",
|
|
41
59
|
"apiLinks": [
|
|
42
|
-
|
|
60
|
+
{
|
|
61
|
+
"title": "API documents for azure devops",
|
|
62
|
+
"link": "https://learn.microsoft.com/en-us/rest/api/azure/devops/?view=azure-devops-rest-7.2",
|
|
63
|
+
"public": true
|
|
64
|
+
}
|
|
43
65
|
]
|
|
44
66
|
},
|
|
45
67
|
"assets": [],
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itentialopensource/adapter-azure_devops",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "This adapter integrates with system described as: Azure DevOps.",
|
|
5
5
|
"main": "adapter.js",
|
|
6
6
|
"wizardVersion": "2.44.7",
|
|
7
|
-
"engineVersion": "1.67.
|
|
7
|
+
"engineVersion": "1.67.19",
|
|
8
8
|
"adapterType": "http",
|
|
9
9
|
"scripts": {
|
|
10
10
|
"artifactize": "npm i && node utils/packModificationScript.js",
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
"test:baseunit": "mocha test/unit/adapterBaseTestUnit.js --LOG=error",
|
|
16
16
|
"test:unit": "mocha test/unit/adapterTestUnit.js --LOG=error",
|
|
17
17
|
"test:integration": "mocha test/integration/adapterTestIntegration.js --LOG=error",
|
|
18
|
-
"test:cover": "nyc --reporter html --reporter text mocha --reporter dot test/*",
|
|
19
18
|
"test": "npm run test:baseunit && npm run test:unit && npm run test:integration",
|
|
20
19
|
"adapter:install": "npm i && node utils/tbScript.js install",
|
|
21
20
|
"adapter:checkMigrate": "node utils/checkMigrate.js",
|
|
@@ -46,20 +45,20 @@
|
|
|
46
45
|
],
|
|
47
46
|
"license": "Apache-2.0",
|
|
48
47
|
"engines": {
|
|
49
|
-
"node": ">=
|
|
48
|
+
"node": ">= 14.0.0",
|
|
50
49
|
"npm": ">= 6.0.0"
|
|
51
50
|
},
|
|
52
51
|
"repository": {
|
|
53
52
|
"type": "git",
|
|
54
|
-
"url": "git@gitlab.com:itentialopensource/adapters/
|
|
53
|
+
"url": "git@gitlab.com:itentialopensource/adapters/adapter-azure_devops.git"
|
|
55
54
|
},
|
|
56
55
|
"author": "Itential",
|
|
57
|
-
"homepage": "https://gitlab.com/itentialopensource/adapters/
|
|
56
|
+
"homepage": "https://gitlab.com/itentialopensource/adapters/adapter-azure_devops#readme",
|
|
58
57
|
"dependencies": {
|
|
59
|
-
"@itentialopensource/adapter-utils": "^5.3.
|
|
58
|
+
"@itentialopensource/adapter-utils": "^5.3.10",
|
|
60
59
|
"acorn": "^8.10.0",
|
|
61
60
|
"ajv": "^8.12.0",
|
|
62
|
-
"axios": "^1.6.
|
|
61
|
+
"axios": "^1.6.8",
|
|
63
62
|
"commander": "^11.0.0",
|
|
64
63
|
"dns-lookup-promise": "^1.0.4",
|
|
65
64
|
"fs-extra": "^11.1.1",
|
|
@@ -67,7 +66,6 @@
|
|
|
67
66
|
"mocha": "^10.3.0",
|
|
68
67
|
"mocha-param": "^2.0.1",
|
|
69
68
|
"mongodb": "^4.16.0",
|
|
70
|
-
"nyc": "^15.1.0",
|
|
71
69
|
"ping": "^0.4.4",
|
|
72
70
|
"prompts": "^2.4.2",
|
|
73
71
|
"readline-sync": "^1.4.10",
|
package/propertiesSchema.json
CHANGED
|
@@ -945,6 +945,11 @@
|
|
|
945
945
|
"devicebroker": {
|
|
946
946
|
"type": "object",
|
|
947
947
|
"properties": {
|
|
948
|
+
"enabled": {
|
|
949
|
+
"type": "boolean",
|
|
950
|
+
"description": "Whether or not the device broker calls have been mapped",
|
|
951
|
+
"default": false
|
|
952
|
+
},
|
|
948
953
|
"getDevice": {
|
|
949
954
|
"type": "array",
|
|
950
955
|
"description": "Broker call(s) to getDevice",
|
|
Binary file
|
package/report/adapterInfo.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.2.
|
|
3
|
-
"configLines":
|
|
2
|
+
"version": "0.2.4",
|
|
3
|
+
"configLines": 54269,
|
|
4
4
|
"scriptLines": 1783,
|
|
5
5
|
"codeLines": 14951,
|
|
6
|
-
"testLines":
|
|
6
|
+
"testLines": 20300,
|
|
7
7
|
"testCases": 998,
|
|
8
|
-
"totalCodeLines":
|
|
8
|
+
"totalCodeLines": 37034,
|
|
9
9
|
"wfTasks": 143
|
|
10
10
|
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
{
|
|
2
|
+
"errors": [],
|
|
3
|
+
"statistics": [
|
|
4
|
+
{
|
|
5
|
+
"owner": "errorJson",
|
|
6
|
+
"description": "New adapter errors available for use",
|
|
7
|
+
"value": 0
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"owner": "errorJson",
|
|
11
|
+
"description": "Adapter errors no longer available for use",
|
|
12
|
+
"value": 0
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"owner": "errorJson",
|
|
16
|
+
"description": "Adapter errors that have been updated (e.g. recommendation changes)",
|
|
17
|
+
"value": 31
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"owner": "packageJson",
|
|
21
|
+
"description": "Number of production dependencies",
|
|
22
|
+
"value": 16
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"owner": "packageJson",
|
|
26
|
+
"description": "Number of development dependencies",
|
|
27
|
+
"value": 6
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"owner": "packageJson",
|
|
31
|
+
"description": "Number of npm scripts",
|
|
32
|
+
"value": 21
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"owner": "packageJson",
|
|
36
|
+
"description": "Runtime Library dependency",
|
|
37
|
+
"value": "^5.3.10"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"owner": "propertiesSchemaJson",
|
|
41
|
+
"description": "Adapter properties defined in the propertiesSchema file",
|
|
42
|
+
"value": 78
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"owner": "markdown",
|
|
46
|
+
"description": "Number of lines in the README.md",
|
|
47
|
+
"value": 344
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"owner": "markdown",
|
|
51
|
+
"description": "Number of lines in the SUMMARY.md",
|
|
52
|
+
"value": 9
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"owner": "markdown",
|
|
56
|
+
"description": "Number of lines in the PROPERTIES.md",
|
|
57
|
+
"value": 647
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"owner": "markdown",
|
|
61
|
+
"description": "Number of lines in the TROUBLESHOOT.md",
|
|
62
|
+
"value": 48
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"owner": "markdown",
|
|
66
|
+
"description": "Number of lines in the ENHANCE.md",
|
|
67
|
+
"value": 70
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"owner": "markdown",
|
|
71
|
+
"description": "Number of lines in the BROKER.md",
|
|
72
|
+
"value": 70
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"owner": "unitTestJS",
|
|
76
|
+
"description": "Number of lines of code in unit tests",
|
|
77
|
+
"value": 13378
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"owner": "unitTestJS",
|
|
81
|
+
"description": "Number of unit tests",
|
|
82
|
+
"value": 801
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"owner": "integrationTestJS",
|
|
86
|
+
"description": "Number of lines of code in integration tests",
|
|
87
|
+
"value": 5670
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"owner": "integrationTestJS",
|
|
91
|
+
"description": "Number of integration tests",
|
|
92
|
+
"value": 127
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"owner": "staticFile",
|
|
96
|
+
"description": "Number of lines of code in adapterBase.js",
|
|
97
|
+
"value": 1453
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"owner": "staticFile",
|
|
101
|
+
"description": "Number of static files added",
|
|
102
|
+
"value": 36
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"owner": "Overall",
|
|
106
|
+
"description": "Total lines of Code",
|
|
107
|
+
"value": 20501
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"owner": "Overall",
|
|
111
|
+
"description": "Total Tests",
|
|
112
|
+
"value": 928
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"owner": "Overall",
|
|
116
|
+
"description": "Total Files",
|
|
117
|
+
"value": 6
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
}
|
package/sampleProperties.json
CHANGED
|
@@ -116,30 +116,32 @@
|
|
|
116
116
|
}
|
|
117
117
|
},
|
|
118
118
|
"devicebroker": {
|
|
119
|
+
"enabled": false,
|
|
119
120
|
"getDevice": [
|
|
120
121
|
{
|
|
121
|
-
"path": "/
|
|
122
|
+
"path": "/not/mapped",
|
|
122
123
|
"method": "GET",
|
|
123
124
|
"query": {},
|
|
124
125
|
"body": {},
|
|
125
126
|
"headers": {},
|
|
126
127
|
"handleFailure": "ignore",
|
|
127
128
|
"requestFields": {
|
|
128
|
-
"
|
|
129
|
+
"insample": "{port}"
|
|
129
130
|
},
|
|
130
131
|
"responseDatakey": "",
|
|
131
132
|
"responseFields": {
|
|
132
|
-
"name": "
|
|
133
|
-
"ostype": "
|
|
134
|
-
"ostypePrefix": "
|
|
135
|
-
"
|
|
136
|
-
"
|
|
133
|
+
"name": "{this}{||}{that}",
|
|
134
|
+
"ostype": "{osfield}",
|
|
135
|
+
"ostypePrefix": "meraki-",
|
|
136
|
+
"port": "{port}",
|
|
137
|
+
"ipaddress": "{ip_addr}",
|
|
138
|
+
"serial" : "{serial}"
|
|
137
139
|
}
|
|
138
140
|
}
|
|
139
141
|
],
|
|
140
142
|
"getDevicesFiltered": [
|
|
141
143
|
{
|
|
142
|
-
"path": "/
|
|
144
|
+
"path": "/not/mapped",
|
|
143
145
|
"method": "GET",
|
|
144
146
|
"pagination": {
|
|
145
147
|
"offsetVar": "",
|
|
@@ -154,42 +156,44 @@
|
|
|
154
156
|
"requestFields": {},
|
|
155
157
|
"responseDatakey": "",
|
|
156
158
|
"responseFields": {
|
|
157
|
-
"name": "
|
|
158
|
-
"ostype": "
|
|
159
|
-
"ostypePrefix": "
|
|
160
|
-
"
|
|
161
|
-
"
|
|
159
|
+
"name": "{this}{||}{that}",
|
|
160
|
+
"ostype": "{osfield}",
|
|
161
|
+
"ostypePrefix": "meraki-",
|
|
162
|
+
"port": "{port}",
|
|
163
|
+
"ipaddress": "{ip_addr}",
|
|
164
|
+
"serial" : "{serial}",
|
|
165
|
+
"id": "{myid}"
|
|
162
166
|
}
|
|
163
167
|
}
|
|
164
168
|
],
|
|
165
169
|
"isAlive": [
|
|
166
170
|
{
|
|
167
|
-
"path": "/
|
|
171
|
+
"path": "/not/mapped/{devID}",
|
|
168
172
|
"method": "GET",
|
|
169
173
|
"query": {},
|
|
170
174
|
"body": {},
|
|
171
175
|
"headers": {},
|
|
172
176
|
"handleFailure": "ignore",
|
|
173
177
|
"requestFields": {
|
|
174
|
-
"
|
|
178
|
+
"devID": "{id}"
|
|
175
179
|
},
|
|
176
180
|
"responseDatakey": "",
|
|
177
181
|
"responseFields": {
|
|
178
|
-
"status": "
|
|
179
|
-
"statusValue": "
|
|
182
|
+
"status": "return2xx",
|
|
183
|
+
"statusValue": "AD.200"
|
|
180
184
|
}
|
|
181
185
|
}
|
|
182
186
|
],
|
|
183
187
|
"getConfig": [
|
|
184
188
|
{
|
|
185
|
-
"path": "/
|
|
189
|
+
"path": "/not/mapped/{devID}",
|
|
186
190
|
"method": "GET",
|
|
187
191
|
"query": {},
|
|
188
192
|
"body": {},
|
|
189
193
|
"headers": {},
|
|
190
194
|
"handleFailure": "ignore",
|
|
191
195
|
"requestFields": {
|
|
192
|
-
"
|
|
196
|
+
"devID": "{id}"
|
|
193
197
|
},
|
|
194
198
|
"responseDatakey": "",
|
|
195
199
|
"responseFields": {}
|
|
@@ -197,7 +201,7 @@
|
|
|
197
201
|
],
|
|
198
202
|
"getCount": [
|
|
199
203
|
{
|
|
200
|
-
"path": "/
|
|
204
|
+
"path": "/not/mapped",
|
|
201
205
|
"method": "GET",
|
|
202
206
|
"query": {},
|
|
203
207
|
"body": {},
|
|
@@ -213,15 +217,15 @@
|
|
|
213
217
|
"enabled": false,
|
|
214
218
|
"entities": [
|
|
215
219
|
{
|
|
216
|
-
"entityType": "",
|
|
217
|
-
"frequency":
|
|
220
|
+
"entityType": "device",
|
|
221
|
+
"frequency": 3600,
|
|
218
222
|
"flushOnFail": false,
|
|
219
|
-
"limit":
|
|
223
|
+
"limit": 10000,
|
|
220
224
|
"retryAttempts": 5,
|
|
221
225
|
"sort": true,
|
|
222
226
|
"populate": [
|
|
223
227
|
{
|
|
224
|
-
"path": "",
|
|
228
|
+
"path": "/not/mapped",
|
|
225
229
|
"method": "GET",
|
|
226
230
|
"pagination": {
|
|
227
231
|
"offsetVar": "",
|
|
@@ -235,7 +239,15 @@
|
|
|
235
239
|
"handleFailure": "ignore",
|
|
236
240
|
"requestFields": {},
|
|
237
241
|
"responseDatakey": "",
|
|
238
|
-
"responseFields": {
|
|
242
|
+
"responseFields": {
|
|
243
|
+
"name": "{this}{||}{that}",
|
|
244
|
+
"ostype": "{osfield}",
|
|
245
|
+
"ostypePrefix": "meraki-",
|
|
246
|
+
"port": "{port}",
|
|
247
|
+
"ipaddress": "{ip_addr}",
|
|
248
|
+
"serial" : "{serial}",
|
|
249
|
+
"id": "{myid}"
|
|
250
|
+
}
|
|
239
251
|
}
|
|
240
252
|
],
|
|
241
253
|
"cachedTasks": [
|
|
@@ -46,6 +46,7 @@ samProps.ssl.accept_invalid_cert = false;
|
|
|
46
46
|
if (samProps.request.attempt_timeout < 30000) {
|
|
47
47
|
samProps.request.attempt_timeout = 30000;
|
|
48
48
|
}
|
|
49
|
+
samProps.devicebroker.enabled = true;
|
|
49
50
|
const attemptTimeout = samProps.request.attempt_timeout;
|
|
50
51
|
const { stub } = samProps;
|
|
51
52
|
|
|
@@ -284,7 +284,6 @@ describe('[unit] Azure_devops Adapter Test', () => {
|
|
|
284
284
|
assert.equal('mocha test/unit/adapterBaseTestUnit.js --LOG=error', packageDotJson.scripts['test:baseunit']);
|
|
285
285
|
assert.equal('mocha test/unit/adapterTestUnit.js --LOG=error', packageDotJson.scripts['test:unit']);
|
|
286
286
|
assert.equal('mocha test/integration/adapterTestIntegration.js --LOG=error', packageDotJson.scripts['test:integration']);
|
|
287
|
-
assert.equal('nyc --reporter html --reporter text mocha --reporter dot test/*', packageDotJson.scripts['test:cover']);
|
|
288
287
|
assert.equal('npm run test:baseunit && npm run test:unit && npm run test:integration', packageDotJson.scripts.test);
|
|
289
288
|
assert.equal('npm publish --registry=https://registry.npmjs.org --access=public', packageDotJson.scripts.deploy);
|
|
290
289
|
assert.equal('npm run deploy', packageDotJson.scripts.build);
|
|
@@ -316,12 +315,11 @@ describe('[unit] Azure_devops Adapter Test', () => {
|
|
|
316
315
|
assert.notEqual(null, packageDotJson.dependencies);
|
|
317
316
|
assert.notEqual('', packageDotJson.dependencies);
|
|
318
317
|
assert.equal('^8.12.0', packageDotJson.dependencies.ajv);
|
|
319
|
-
assert.equal('^1.6.
|
|
318
|
+
assert.equal('^1.6.8', packageDotJson.dependencies.axios);
|
|
320
319
|
assert.equal('^11.0.0', packageDotJson.dependencies.commander);
|
|
321
320
|
assert.equal('^11.1.1', packageDotJson.dependencies['fs-extra']);
|
|
322
321
|
assert.equal('^10.3.0', packageDotJson.dependencies.mocha);
|
|
323
322
|
assert.equal('^2.0.1', packageDotJson.dependencies['mocha-param']);
|
|
324
|
-
assert.equal('^15.1.0', packageDotJson.dependencies.nyc);
|
|
325
323
|
assert.equal('^0.4.4', packageDotJson.dependencies.ping);
|
|
326
324
|
assert.equal('^1.4.10', packageDotJson.dependencies['readline-sync']);
|
|
327
325
|
assert.equal('^7.5.3', packageDotJson.dependencies.semver);
|