@itentialopensource/adapter-128technology 0.2.4 → 0.4.1

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 (44) hide show
  1. package/AUTH.md +39 -0
  2. package/BROKER.md +199 -0
  3. package/CALLS.md +169 -0
  4. package/CHANGELOG.md +39 -10
  5. package/CODE_OF_CONDUCT.md +12 -17
  6. package/CONTRIBUTING.md +88 -74
  7. package/ENHANCE.md +69 -0
  8. package/PROPERTIES.md +641 -0
  9. package/README.md +225 -502
  10. package/SUMMARY.md +9 -0
  11. package/SYSTEMINFO.md +11 -0
  12. package/TROUBLESHOOT.md +47 -0
  13. package/adapter.js +349 -58
  14. package/adapterBase.js +1023 -247
  15. package/entities/.generic/action.json +110 -5
  16. package/entities/.generic/schema.json +6 -1
  17. package/error.json +12 -0
  18. package/package.json +20 -13
  19. package/pronghorn.json +642 -378
  20. package/propertiesDecorators.json +14 -0
  21. package/propertiesSchema.json +436 -0
  22. package/refs?service=git-upload-pack +0 -0
  23. package/report/adapterInfo.json +10 -0
  24. package/report/updateReport1642429912446.json +95 -0
  25. package/report/updateReport1652812108415.json +120 -0
  26. package/sampleProperties.json +96 -4
  27. package/storage/metrics.json +29988 -0
  28. package/test/integration/adapterTestBasicGet.js +2 -2
  29. package/test/integration/adapterTestIntegration.js +30 -104
  30. package/test/unit/adapterBaseTestUnit.js +35 -27
  31. package/test/unit/adapterTestUnit.js +642 -114
  32. package/utils/adapterInfo.js +206 -0
  33. package/utils/addAuth.js +94 -0
  34. package/utils/basicGet.js +1 -14
  35. package/utils/entitiesToDB.js +179 -0
  36. package/utils/modify.js +1 -1
  37. package/utils/packModificationScript.js +1 -1
  38. package/utils/patches2bundledDeps.js +90 -0
  39. package/utils/pre-commit.sh +3 -0
  40. package/utils/removeHooks.js +20 -0
  41. package/utils/tbScript.js +43 -22
  42. package/utils/tbUtils.js +126 -29
  43. package/utils/testRunner.js +16 -16
  44. package/utils/troubleshootingAdapter.js +2 -26
@@ -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": {
@@ -21,7 +22,10 @@
21
22
  "invalid_token_error": 401,
22
23
  "auth_field": "header.headers.Authorization",
23
24
  "auth_field_format": "Bearer {token}",
24
- "auth_logging": false
25
+ "auth_logging": false,
26
+ "client_id": "",
27
+ "client_secret": "",
28
+ "grant_type": ""
25
29
  },
26
30
  "healthcheck": {
27
31
  "type": "none",
@@ -94,10 +98,98 @@
94
98
  "key_file": "",
95
99
  "cert_file": ""
96
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
+ ]
97
189
  }
98
190
  },
99
191
  "groups": [],
100
192
  "brokers": [],
101
193
  "logLevel": "none",
102
194
  "timeout": 120000
103
- }
195
+ }