@itentialopensource/adapter-128technology 0.2.3 → 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.
Files changed (50) hide show
  1. package/.eslintignore +1 -0
  2. package/AUTH.md +39 -0
  3. package/BROKER.md +199 -0
  4. package/CALLS.md +169 -0
  5. package/CHANGELOG.md +44 -7
  6. package/CODE_OF_CONDUCT.md +12 -17
  7. package/CONTRIBUTING.md +88 -74
  8. package/ENHANCE.md +69 -0
  9. package/PROPERTIES.md +641 -0
  10. package/README.md +228 -420
  11. package/SUMMARY.md +9 -0
  12. package/SYSTEMINFO.md +11 -0
  13. package/TROUBLESHOOT.md +47 -0
  14. package/adapter.js +11827 -37
  15. package/adapterBase.js +1270 -238
  16. package/entities/.generic/action.json +214 -0
  17. package/entities/.generic/schema.json +28 -0
  18. package/error.json +12 -0
  19. package/package.json +41 -18
  20. package/pronghorn.json +642 -74
  21. package/propertiesDecorators.json +14 -0
  22. package/propertiesSchema.json +472 -4
  23. package/refs?service=git-upload-pack +0 -0
  24. package/report/adapterInfo.json +10 -0
  25. package/report/updateReport1614264802205.json +95 -0
  26. package/report/updateReport1642429912446.json +95 -0
  27. package/report/updateReport1652812108415.json +120 -0
  28. package/sampleProperties.json +104 -7
  29. package/storage/metrics.json +29988 -0
  30. package/test/integration/adapterTestBasicGet.js +85 -0
  31. package/test/integration/adapterTestConnectivity.js +93 -0
  32. package/test/integration/adapterTestIntegration.js +30 -99
  33. package/test/unit/adapterBaseTestUnit.js +949 -0
  34. package/test/unit/adapterTestUnit.js +643 -110
  35. package/utils/adapterInfo.js +206 -0
  36. package/utils/addAuth.js +94 -0
  37. package/utils/basicGet.js +50 -0
  38. package/utils/checkMigrate.js +63 -0
  39. package/utils/entitiesToDB.js +179 -0
  40. package/utils/findPath.js +74 -0
  41. package/utils/modify.js +154 -0
  42. package/utils/packModificationScript.js +1 -1
  43. package/utils/patches2bundledDeps.js +90 -0
  44. package/utils/pre-commit.sh +3 -0
  45. package/utils/removeHooks.js +20 -0
  46. package/utils/tbScript.js +184 -0
  47. package/utils/tbUtils.js +469 -0
  48. package/utils/testRunner.js +16 -16
  49. package/utils/troubleshootingAdapter.js +190 -0
  50. package/img/adapter.png +0 -0
@@ -0,0 +1,95 @@
1
+ {
2
+ "errors": [],
3
+ "statistics": [
4
+ {
5
+ "owner": "errorJson",
6
+ "description": "New adapter errors available for use",
7
+ "value": 1
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": 29
18
+ },
19
+ {
20
+ "owner": "packageJson",
21
+ "description": "Number of production dependencies",
22
+ "value": 13
23
+ },
24
+ {
25
+ "owner": "packageJson",
26
+ "description": "Number of development dependencies",
27
+ "value": 7
28
+ },
29
+ {
30
+ "owner": "packageJson",
31
+ "description": "Number of npm scripts",
32
+ "value": 23
33
+ },
34
+ {
35
+ "owner": "packageJson",
36
+ "description": "Runtime Library dependency",
37
+ "value": "^4.44.11"
38
+ },
39
+ {
40
+ "owner": "propertiesSchemaJson",
41
+ "description": "Adapter properties defined in the propertiesSchema file",
42
+ "value": 64
43
+ },
44
+ {
45
+ "owner": "readmeMd",
46
+ "description": "Number of lines in the README.md",
47
+ "value": 688
48
+ },
49
+ {
50
+ "owner": "unitTestJS",
51
+ "description": "Number of lines of code in unit tests",
52
+ "value": 123808
53
+ },
54
+ {
55
+ "owner": "unitTestJS",
56
+ "description": "Number of unit tests",
57
+ "value": 7808
58
+ },
59
+ {
60
+ "owner": "integrationTestJS",
61
+ "description": "Number of lines of code in integration tests",
62
+ "value": 63581
63
+ },
64
+ {
65
+ "owner": "integrationTestJS",
66
+ "description": "Number of integration tests",
67
+ "value": 1878
68
+ },
69
+ {
70
+ "owner": "staticFile",
71
+ "description": "Number of lines of code in adapterBase.js",
72
+ "value": 1029
73
+ },
74
+ {
75
+ "owner": "staticFile",
76
+ "description": "Number of static files added",
77
+ "value": 34
78
+ },
79
+ {
80
+ "owner": "Overall",
81
+ "description": "Total lines of Code",
82
+ "value": 188418
83
+ },
84
+ {
85
+ "owner": "Overall",
86
+ "description": "Total Tests",
87
+ "value": 9686
88
+ },
89
+ {
90
+ "owner": "Overall",
91
+ "description": "Total Files",
92
+ "value": 6
93
+ }
94
+ ]
95
+ }
@@ -0,0 +1,120 @@
1
+ {
2
+ "errors": [],
3
+ "statistics": [
4
+ {
5
+ "owner": "errorJson",
6
+ "description": "New adapter errors available for use",
7
+ "value": 1
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": 30
18
+ },
19
+ {
20
+ "owner": "packageJson",
21
+ "description": "Number of production dependencies",
22
+ "value": 14
23
+ },
24
+ {
25
+ "owner": "packageJson",
26
+ "description": "Number of development dependencies",
27
+ "value": 7
28
+ },
29
+ {
30
+ "owner": "packageJson",
31
+ "description": "Number of npm scripts",
32
+ "value": 22
33
+ },
34
+ {
35
+ "owner": "packageJson",
36
+ "description": "Runtime Library dependency",
37
+ "value": "^4.45.4"
38
+ },
39
+ {
40
+ "owner": "propertiesSchemaJson",
41
+ "description": "Adapter properties defined in the propertiesSchema file",
42
+ "value": 70
43
+ },
44
+ {
45
+ "owner": "markdown",
46
+ "description": "Number of lines in the README.md",
47
+ "value": 338
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": 642
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": 123736
78
+ },
79
+ {
80
+ "owner": "unitTestJS",
81
+ "description": "Number of unit tests",
82
+ "value": 7808
83
+ },
84
+ {
85
+ "owner": "integrationTestJS",
86
+ "description": "Number of lines of code in integration tests",
87
+ "value": 63502
88
+ },
89
+ {
90
+ "owner": "integrationTestJS",
91
+ "description": "Number of integration tests",
92
+ "value": 1878
93
+ },
94
+ {
95
+ "owner": "staticFile",
96
+ "description": "Number of lines of code in adapterBase.js",
97
+ "value": 1783
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": 189021
108
+ },
109
+ {
110
+ "owner": "Overall",
111
+ "description": "Total Tests",
112
+ "value": 9686
113
+ },
114
+ {
115
+ "owner": "Overall",
116
+ "description": "Total Files",
117
+ "value": 6
118
+ }
119
+ ]
120
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "Adapter-128technology",
3
- "type": "128technology",
3
+ "type": "Technology",
4
4
  "properties": {
5
5
  "host": "localhost",
6
6
  "port": 443,
@@ -8,7 +8,8 @@
8
8
  "version": "v1",
9
9
  "cache_location": "none",
10
10
  "encode_pathvars": true,
11
- "save_metric": true,
11
+ "encode_queryvars": true,
12
+ "save_metric": false,
12
13
  "stub": true,
13
14
  "protocol": "https",
14
15
  "authentication": {
@@ -20,11 +21,16 @@
20
21
  "token_cache": "local",
21
22
  "invalid_token_error": 401,
22
23
  "auth_field": "header.headers.Authorization",
23
- "auth_field_format": "Bearer {token}"
24
+ "auth_field_format": "Bearer {token}",
25
+ "auth_logging": false,
26
+ "client_id": "",
27
+ "client_secret": "",
28
+ "grant_type": ""
24
29
  },
25
30
  "healthcheck": {
26
31
  "type": "none",
27
- "frequency": 60000
32
+ "frequency": 60000,
33
+ "query_object": {}
28
34
  },
29
35
  "throttle": {
30
36
  "throttle_enabled": false,
@@ -57,13 +63,16 @@
57
63
  },
58
64
  "healthcheck_on_timeout": true,
59
65
  "return_raw": false,
60
- "archiving": false
66
+ "archiving": false,
67
+ "return_request": false
61
68
  },
62
69
  "proxy": {
63
70
  "enabled": false,
64
71
  "host": "",
65
72
  "port": 1,
66
- "protocol": "http"
73
+ "protocol": "http",
74
+ "username": "",
75
+ "password": ""
67
76
  },
68
77
  "ssl": {
69
78
  "ecdhCurve": "",
@@ -89,10 +98,98 @@
89
98
  "key_file": "",
90
99
  "cert_file": ""
91
100
  }
101
+ },
102
+ "devicebroker": {
103
+ "getDevice": [
104
+ {
105
+ "path": "/get/devices/{id}",
106
+ "method": "GET",
107
+ "query": {},
108
+ "body": {},
109
+ "headers": {},
110
+ "handleFailure": "ignore",
111
+ "requestFields": {
112
+ "id": "name"
113
+ },
114
+ "responseDatakey": "",
115
+ "responseFields": {
116
+ "name": "host",
117
+ "ostype": "os",
118
+ "ostypePrefix": "system-",
119
+ "ipaddress": "attributes.ipaddr",
120
+ "port": "443"
121
+ }
122
+ }
123
+ ],
124
+ "getDevicesFiltered": [
125
+ {
126
+ "path": "/get/devices",
127
+ "method": "GET",
128
+ "query": {},
129
+ "body": {},
130
+ "headers": {},
131
+ "handleFailure": "ignore",
132
+ "requestFields": {},
133
+ "responseDatakey": "",
134
+ "responseFields": {
135
+ "name": "host",
136
+ "ostype": "os",
137
+ "ostypePrefix": "system-",
138
+ "ipaddress": "attributes.ipaddr",
139
+ "port": "443"
140
+ }
141
+ }
142
+ ],
143
+ "isAlive": [
144
+ {
145
+ "path": "/get/devices/{id}/status",
146
+ "method": "GET",
147
+ "query": {},
148
+ "body": {},
149
+ "headers": {},
150
+ "handleFailure": "ignore",
151
+ "requestFields": {
152
+ "id": "name"
153
+ },
154
+ "responseDatakey": "",
155
+ "responseFields": {
156
+ "status": "status",
157
+ "statusValue": "online"
158
+ }
159
+ }
160
+ ],
161
+ "getConfig": [
162
+ {
163
+ "path": "/get/devices/{id}/configPart1",
164
+ "method": "GET",
165
+ "query": {},
166
+ "body": {},
167
+ "headers": {},
168
+ "handleFailure": "ignore",
169
+ "requestFields": {
170
+ "id": "name"
171
+ },
172
+ "responseDatakey": "",
173
+ "responseFields": {}
174
+ }
175
+ ],
176
+ "getCount": [
177
+ {
178
+ "path": "/get/devices",
179
+ "method": "GET",
180
+ "query": {},
181
+ "body": {},
182
+ "headers": {},
183
+ "handleFailure": "ignore",
184
+ "requestFields": {},
185
+ "responseDatakey": "",
186
+ "responseFields": {}
187
+ }
188
+ ]
92
189
  }
93
190
  },
94
191
  "groups": [],
95
192
  "brokers": [],
96
193
  "logLevel": "none",
97
194
  "timeout": 120000
98
- }
195
+ }