@itentialopensource/adapter-robustel 0.3.2 → 0.4.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/TAB2.md ADDED
@@ -0,0 +1,322 @@
1
+ # Robustel
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 Robustel adapter with Custom Token Authentication. 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
+ #### Custom Token Authentication
17
+ The Robustel adapter requires Custom Authentication. The adapter will handle creating the signature header as long as the correct credentials (api_version, signature_version, unique_code, client_id, and client_secret) are provided, and `auth_method` is set to `no_authentication`.
18
+
19
+ 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 Robustel 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
+ 4. Note that the `username` field will contain the LMv1 `accessId` and the `password` field will contain the LMv1 `accessKey`
26
+ ```json
27
+ "authentication": {
28
+ "auth_method": "no_authentication",
29
+ "auth_logging": false,
30
+ "client_id": "id",
31
+ "client_secret": "secret",
32
+ "api_version": "1.0",
33
+ "signature_version": "1.0",
34
+ "unique_code": "unique_code"
35
+ }
36
+ ```
37
+ 4. Restart the adapter. If your properties were set correctly, the adapter should go online.
38
+
39
+ #### Troubleshooting
40
+ - Make sure you copied over the correct credentials.
41
+ - Turn on debug level logs for the adapter in IAP Admin Essentials.
42
+ - Turn on auth_logging for the adapter in IAP Admin Essentials (adapter properties).
43
+ - Investigate the logs - in particular:
44
+ - The FULL REQUEST log to make sure the proper headers are being sent with the request.
45
+ - The FULL BODY log to make sure the payload is accurate.
46
+ - The CALL RETURN log to see what the other system is telling us.
47
+ - Credentials should be ** masked ** by the adapter so make sure you verify token
48
+ - Remember when you are done to turn auth_logging off as you do not want to log credentials.
49
+
50
+ ### Sample Properties
51
+
52
+ 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.
53
+
54
+ ```json
55
+ "properties": {
56
+ "host": "rcms-cloud.robustel.net",
57
+ "port": 443,
58
+ "choosepath": "",
59
+ "base_path": "/api/link",
60
+ "version": "",
61
+ "cache_location": "none",
62
+ "encode_pathvars": true,
63
+ "encode_queryvars": true,
64
+ "save_metric": false,
65
+ "stub": false,
66
+ "protocol": "https",
67
+ "authentication": {
68
+ "auth_method": "no_authentication",
69
+ "username": "username",
70
+ "password": "password",
71
+ "token": "token",
72
+ "token_timeout": 600000,
73
+ "token_cache": "local",
74
+ "invalid_token_error": 401,
75
+ "auth_field": "header.headers.Authorization",
76
+ "auth_field_format": "Basic {b64}{username}:{password}{/b64}",
77
+ "auth_logging": false,
78
+ "client_id": "id",
79
+ "client_secret": "secret",
80
+ "grant_type": "",
81
+ "sensitive": [],
82
+ "sso": {
83
+ "protocol": "",
84
+ "host": "",
85
+ "port": 0
86
+ },
87
+ "multiStepAuthCalls": [
88
+ {
89
+ "name": "",
90
+ "requestFields": {},
91
+ "responseFields": {},
92
+ "successfullResponseCode": 200
93
+ }
94
+ ],
95
+ "api_version": "1.0",
96
+ "signature_version": "1.0",
97
+ "unique_code": "unique_code"
98
+ },
99
+ "healthcheck": {
100
+ "type": "none",
101
+ "frequency": 60000,
102
+ "query_object": {},
103
+ "addlHeaders": {}
104
+ },
105
+ "throttle": {
106
+ "throttle_enabled": false,
107
+ "number_pronghorns": 1,
108
+ "sync_async": "sync",
109
+ "max_in_queue": 1000,
110
+ "concurrent_max": 1,
111
+ "expire_timeout": 0,
112
+ "avg_runtime": 200,
113
+ "priorities": [
114
+ {
115
+ "value": 0,
116
+ "percent": 100
117
+ }
118
+ ]
119
+ },
120
+ "request": {
121
+ "number_redirects": 0,
122
+ "number_retries": 3,
123
+ "limit_retry_error": [
124
+ 0
125
+ ],
126
+ "failover_codes": [],
127
+ "attempt_timeout": 5000,
128
+ "global_request": {
129
+ "payload": {},
130
+ "uriOptions": {},
131
+ "addlHeaders": {},
132
+ "authData": {}
133
+ },
134
+ "healthcheck_on_timeout": true,
135
+ "return_raw": false,
136
+ "archiving": false,
137
+ "return_request": false
138
+ },
139
+ "proxy": {
140
+ "enabled": false,
141
+ "host": "",
142
+ "port": 1,
143
+ "protocol": "http",
144
+ "username": "",
145
+ "password": ""
146
+ },
147
+ "ssl": {
148
+ "ecdhCurve": "",
149
+ "enabled": false,
150
+ "accept_invalid_cert": false,
151
+ "ca_file": "",
152
+ "key_file": "",
153
+ "cert_file": "",
154
+ "secure_protocol": "",
155
+ "ciphers": ""
156
+ },
157
+ "mongo": {
158
+ "host": "",
159
+ "port": 0,
160
+ "database": "",
161
+ "username": "",
162
+ "password": "",
163
+ "replSet": "",
164
+ "db_ssl": {
165
+ "enabled": false,
166
+ "accept_invalid_cert": false,
167
+ "ca_file": "",
168
+ "key_file": "",
169
+ "cert_file": ""
170
+ }
171
+ },
172
+ "devicebroker": {
173
+ "enabled": false,
174
+ "getDevice": [
175
+ {
176
+ "path": "/not/mapped",
177
+ "method": "GET",
178
+ "query": {},
179
+ "body": {},
180
+ "headers": {},
181
+ "handleFailure": "ignore",
182
+ "requestFields": {
183
+ "insample": "{port}"
184
+ },
185
+ "responseDatakey": "",
186
+ "responseFields": {
187
+ "name": "{this}{||}{that}",
188
+ "ostype": "{osfield}",
189
+ "ostypePrefix": "meraki-",
190
+ "port": "{port}",
191
+ "ipaddress": "{ip_addr}",
192
+ "serial": "{serial}"
193
+ }
194
+ }
195
+ ],
196
+ "getDevicesFiltered": [
197
+ {
198
+ "path": "/not/mapped",
199
+ "method": "GET",
200
+ "pagination": {
201
+ "offsetVar": "",
202
+ "limitVar": "",
203
+ "incrementBy": "limit",
204
+ "requestLocation": "query"
205
+ },
206
+ "query": {},
207
+ "body": {},
208
+ "headers": {},
209
+ "handleFailure": "ignore",
210
+ "requestFields": {},
211
+ "responseDatakey": "",
212
+ "responseFields": {
213
+ "name": "{this}{||}{that}",
214
+ "ostype": "{osfield}",
215
+ "ostypePrefix": "meraki-",
216
+ "port": "{port}",
217
+ "ipaddress": "{ip_addr}",
218
+ "serial": "{serial}",
219
+ "id": "{myid}"
220
+ }
221
+ }
222
+ ],
223
+ "isAlive": [
224
+ {
225
+ "path": "/not/mapped/{devID}",
226
+ "method": "GET",
227
+ "query": {},
228
+ "body": {},
229
+ "headers": {},
230
+ "handleFailure": "ignore",
231
+ "requestFields": {
232
+ "devID": "{id}"
233
+ },
234
+ "responseDatakey": "",
235
+ "responseFields": {
236
+ "status": "return2xx",
237
+ "statusValue": "AD.200"
238
+ }
239
+ }
240
+ ],
241
+ "getConfig": [
242
+ {
243
+ "path": "/not/mapped/{devID}",
244
+ "method": "GET",
245
+ "query": {},
246
+ "body": {},
247
+ "headers": {},
248
+ "handleFailure": "ignore",
249
+ "requestFields": {
250
+ "devID": "{id}"
251
+ },
252
+ "responseDatakey": "",
253
+ "responseFields": {}
254
+ }
255
+ ],
256
+ "getCount": [
257
+ {
258
+ "path": "/not/mapped",
259
+ "method": "GET",
260
+ "query": {},
261
+ "body": {},
262
+ "headers": {},
263
+ "handleFailure": "ignore",
264
+ "requestFields": {},
265
+ "responseDatakey": "",
266
+ "responseFields": {}
267
+ }
268
+ ]
269
+ },
270
+ "cache": {
271
+ "enabled": false,
272
+ "entities": [
273
+ {
274
+ "entityType": "device",
275
+ "frequency": 3600,
276
+ "flushOnFail": false,
277
+ "limit": 10000,
278
+ "retryAttempts": 5,
279
+ "sort": true,
280
+ "populate": [
281
+ {
282
+ "path": "/not/mapped",
283
+ "method": "GET",
284
+ "pagination": {
285
+ "offsetVar": "",
286
+ "limitVar": "",
287
+ "incrementBy": "limit",
288
+ "requestLocation": "query"
289
+ },
290
+ "query": {},
291
+ "body": {},
292
+ "headers": {},
293
+ "handleFailure": "ignore",
294
+ "requestFields": {},
295
+ "responseDatakey": "",
296
+ "responseFields": {
297
+ "name": "{this}{||}{that}",
298
+ "ostype": "{osfield}",
299
+ "ostypePrefix": "meraki-",
300
+ "port": "{port}",
301
+ "ipaddress": "{ip_addr}",
302
+ "serial": "{serial}",
303
+ "id": "{myid}"
304
+ }
305
+ }
306
+ ],
307
+ "cachedTasks": [
308
+ {
309
+ "name": "",
310
+ "filterField": "",
311
+ "filterLoc": ""
312
+ }
313
+ ]
314
+ }
315
+ ]
316
+ }
317
+ }
318
+ ```
319
+ ### [Swagger](https://gitlab.com/itentialopensource/adapters/controller-orchestrator/adapter-robustel/-/blob/master/report/adapter-openapi.json)
320
+
321
+ ## [Generic Adapter Information](https://gitlab.com/itentialopensource/adapters/controller-orchestrator/adapter-robustel/-/blob/master/README.md)
322
+
package/metadata.json CHANGED
@@ -39,20 +39,37 @@
39
39
  "isDeprecated": false
40
40
  },
41
41
  "brokerSince": "",
42
+ "authMethods": [
43
+ {
44
+ "type": "Custom",
45
+ "primary": true
46
+ }
47
+ ],
42
48
  "documentation": {
43
49
  "storeLink": "",
44
50
  "npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-robustel",
45
- "repoLink": "https://gitlab.com/itentialopensource/adapters/controller-orchestrator/adapter-robustel",
51
+ "repoLink": "https://gitlab.com/itentialopensource/adapters/adapter-robustel",
46
52
  "docLink": "https://docs.itential.com/opensource/docs/robustel",
47
53
  "demoLinks": [],
48
- "trainingLinks": [],
54
+ "trainingLinks": [
55
+ {
56
+ "title": "Itential Academy",
57
+ "link": "https://www.itential.com/itential-academy/"
58
+ }
59
+ ],
49
60
  "faqLink": "https://docs.itential.com/opensource/docs/troubleshooting-an-adapter",
50
61
  "contributeLink": "https://gitlab.com/itentialopensource/adapters/contributing-guide",
51
62
  "issueLink": "https://itential.atlassian.net/servicedesk/customer/portals",
52
63
  "webLink": "https://www.itential.com/adapters/robustel/",
53
- "vendorLink": "",
54
- "productLink": "",
55
- "apiLinks": []
64
+ "vendorLink": "https://www.robustel.com/",
65
+ "productLink": "https://www.robustel.com/",
66
+ "apiLinks": [
67
+ {
68
+ "title": "Robustel Cloud Manage Service Overview",
69
+ "link": "https://www.robustel.com/wp-content/uploads/dlm_uploads/2019/07/RCMS-Brochure-2.pdf",
70
+ "public": true
71
+ }
72
+ ]
56
73
  },
57
74
  "assets": [],
58
75
  "relatedItems": {
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-robustel",
3
- "version": "0.3.2",
3
+ "version": "0.4.0",
4
4
  "description": "This adapter integrates with system described as: robustel.",
5
5
  "main": "adapter.js",
6
6
  "wizardVersion": "2.44.7",
7
- "engineVersion": "1.67.14",
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
  "adapter:patches2bundled": "node utils/patches2bundledDeps.js",
20
19
  "test": "npm run test:baseunit && npm run test:unit && npm run test:integration",
21
20
  "adapter:install": "npm i && node utils/tbScript.js install",
@@ -43,7 +42,7 @@
43
42
  ],
44
43
  "license": "Apache-2.0",
45
44
  "engines": {
46
- "node": ">= 8.0.0",
45
+ "node": ">= 14.0.0",
47
46
  "npm": ">= 6.0.0"
48
47
  },
49
48
  "repository": {
@@ -53,10 +52,10 @@
53
52
  "author": "Itential",
54
53
  "homepage": "https://gitlab.com/itentialopensource/adapters/adapter-robustel#readme",
55
54
  "dependencies": {
56
- "@itentialopensource/adapter-utils": "^5.3.8",
55
+ "@itentialopensource/adapter-utils": "^5.3.10",
57
56
  "acorn": "^8.10.0",
58
57
  "ajv": "^8.12.0",
59
- "axios": "^1.6.7",
58
+ "axios": "^1.6.8",
60
59
  "commander": "^11.0.0",
61
60
  "crypto-js": "^4.1.1",
62
61
  "dns-lookup-promise": "^1.0.4",
@@ -65,7 +64,6 @@
65
64
  "mocha": "^10.3.0",
66
65
  "mocha-param": "^2.0.1",
67
66
  "mongodb": "^4.16.0",
68
- "nyc": "^15.1.0",
69
67
  "ping": "^0.4.4",
70
68
  "prompts": "^2.4.2",
71
69
  "readline-sync": "^1.4.10",
@@ -960,6 +960,11 @@
960
960
  "devicebroker": {
961
961
  "type": "object",
962
962
  "properties": {
963
+ "enabled": {
964
+ "type": "boolean",
965
+ "description": "Whether or not the device broker calls have been mapped",
966
+ "default": false
967
+ },
963
968
  "getDevice": {
964
969
  "type": "array",
965
970
  "description": "Broker call(s) to getDevice",
Binary file
@@ -1,10 +1,10 @@
1
1
  {
2
- "version": "0.2.0",
3
- "configLines": 3051,
2
+ "version": "0.3.3",
3
+ "configLines": 3056,
4
4
  "scriptLines": 1783,
5
5
  "codeLines": 2943,
6
- "testLines": 3546,
6
+ "testLines": 3545,
7
7
  "testCases": 164,
8
- "totalCodeLines": 8272,
8
+ "totalCodeLines": 8271,
9
9
  "wfTasks": 31
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": 81
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": 1664
78
+ },
79
+ {
80
+ "owner": "unitTestJS",
81
+ "description": "Number of unit tests",
82
+ "value": 79
83
+ },
84
+ {
85
+ "owner": "integrationTestJS",
86
+ "description": "Number of lines of code in integration tests",
87
+ "value": 629
88
+ },
89
+ {
90
+ "owner": "integrationTestJS",
91
+ "description": "Number of integration tests",
92
+ "value": 15
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": 3746
108
+ },
109
+ {
110
+ "owner": "Overall",
111
+ "description": "Total Tests",
112
+ "value": 94
113
+ },
114
+ {
115
+ "owner": "Overall",
116
+ "description": "Total Files",
117
+ "value": 6
118
+ }
119
+ ]
120
+ }