@itentialopensource/adapter-robustel 0.1.1 → 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.
Files changed (54) hide show
  1. package/AUTH.md +39 -0
  2. package/BROKER.md +199 -0
  3. package/CALLS.md +205 -0
  4. package/CHANGELOG.md +17 -2
  5. package/CODE_OF_CONDUCT.md +12 -17
  6. package/CONTRIBUTING.md +3 -148
  7. package/ENHANCE.md +69 -0
  8. package/PROPERTIES.md +641 -0
  9. package/README.md +235 -576
  10. package/SUMMARY.md +9 -0
  11. package/SYSTEMINFO.md +11 -0
  12. package/TROUBLESHOOT.md +47 -0
  13. package/adapter.js +402 -573
  14. package/adapterBase.js +843 -419
  15. package/changelogs/changelog.md +16 -0
  16. package/entities/.generic/action.json +105 -0
  17. package/entities/.generic/schema.json +6 -1
  18. package/error.json +6 -0
  19. package/metadata.json +47 -0
  20. package/package.json +24 -24
  21. package/pronghorn.json +559 -148
  22. package/propertiesDecorators.json +14 -0
  23. package/propertiesSchema.json +842 -6
  24. package/refs?service=git-upload-pack +0 -0
  25. package/report/adapter-openapi.json +204 -0
  26. package/report/adapter-openapi.yaml +163 -0
  27. package/report/adapterInfo.json +10 -0
  28. package/report/updateReport1653173664637.json +120 -0
  29. package/report/updateReport1691507608338.json +120 -0
  30. package/report/updateReport1692202610637.json +120 -0
  31. package/report/updateReport1694462053440.json +120 -0
  32. package/report/updateReport1698421016757.json +120 -0
  33. package/sampleProperties.json +158 -5
  34. package/test/integration/adapterTestBasicGet.js +3 -5
  35. package/test/integration/adapterTestConnectivity.js +91 -42
  36. package/test/integration/adapterTestIntegration.js +269 -271
  37. package/test/unit/adapterBaseTestUnit.js +388 -308
  38. package/test/unit/adapterTestUnit.js +399 -260
  39. package/utils/adapterInfo.js +206 -0
  40. package/utils/addAuth.js +1 -1
  41. package/utils/artifactize.js +1 -1
  42. package/utils/checkMigrate.js +1 -1
  43. package/utils/entitiesToDB.js +12 -57
  44. package/utils/findPath.js +1 -1
  45. package/utils/methodDocumentor.js +273 -0
  46. package/utils/modify.js +13 -15
  47. package/utils/packModificationScript.js +1 -1
  48. package/utils/pre-commit.sh +5 -0
  49. package/utils/taskMover.js +309 -0
  50. package/utils/tbScript.js +123 -53
  51. package/utils/tbUtils.js +87 -49
  52. package/utils/testRunner.js +17 -17
  53. package/utils/troubleshootingAdapter.js +9 -6
  54. package/workflows/README.md +0 -3
Binary file
@@ -0,0 +1,204 @@
1
+ {
2
+ "openapi": "3.0.3",
3
+ "info": {
4
+ "description": "Robustel NMS REST API",
5
+ "version": "1.0.0",
6
+ "title": "Robustel",
7
+ "termsOfService": "http://swagger.io/terms/",
8
+ "contact": {
9
+ "email": "apiteam@swagger.io"
10
+ },
11
+ "license": {
12
+ "name": "Apache 2.0",
13
+ "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
14
+ }
15
+ },
16
+ "servers": [
17
+ {
18
+ "url": "https://locahost/"
19
+ }
20
+ ],
21
+ "security": [],
22
+ "paths": {
23
+ "/dashboard/deviceTotal": {
24
+ "get": {
25
+ "parameters": [],
26
+ "tags": [
27
+ "Dashboard"
28
+ ],
29
+ "operationId": "getDeviceTotal",
30
+ "summary": "Get Device Total",
31
+ "description": "Get Device Total from Dashboard",
32
+ "responses": {
33
+ "200": {
34
+ "description": "successful operation"
35
+ },
36
+ "400": {
37
+ "description": "failed operation"
38
+ }
39
+ }
40
+ }
41
+ },
42
+ "/dashboard/networkTotal": {
43
+ "get": {
44
+ "parameters": [],
45
+ "tags": [
46
+ "Dashboard"
47
+ ],
48
+ "operationId": "getNetworkTotal",
49
+ "summary": "Get Network Total",
50
+ "description": "Get Network Total from Dashboard",
51
+ "responses": {
52
+ "200": {
53
+ "description": "successful operation"
54
+ },
55
+ "400": {
56
+ "description": "failed operation"
57
+ }
58
+ }
59
+ }
60
+ },
61
+ "/device/devices/{serialNumber}": {
62
+ "get": {
63
+ "parameters": [
64
+ {
65
+ "name": "serialNumber",
66
+ "in": "path",
67
+ "description": "serial number",
68
+ "required": true,
69
+ "schema": {
70
+ "type": "string"
71
+ }
72
+ }
73
+ ],
74
+ "tags": [
75
+ "Device"
76
+ ],
77
+ "operationId": "getDeviceDetails",
78
+ "summary": "Get Device Details",
79
+ "description": "Get Device Details from Device Tree",
80
+ "responses": {
81
+ "200": {
82
+ "description": "successful operation"
83
+ },
84
+ "400": {
85
+ "description": "failed operation"
86
+ }
87
+ }
88
+ }
89
+ },
90
+ "/devices/{serialNumber}/firmwares": {
91
+ "get": {
92
+ "parameters": [
93
+ {
94
+ "name": "serialNumber",
95
+ "in": "path",
96
+ "description": "device serial number",
97
+ "required": true,
98
+ "schema": {
99
+ "type": "string"
100
+ }
101
+ }
102
+ ],
103
+ "tags": [
104
+ "Device"
105
+ ],
106
+ "operationId": "getDeviceFirmwareList",
107
+ "summary": "Get Device Firmware List",
108
+ "description": "Get Device Firmware List",
109
+ "responses": {
110
+ "200": {
111
+ "description": "successful operation"
112
+ },
113
+ "400": {
114
+ "description": "failed operation"
115
+ }
116
+ }
117
+ }
118
+ },
119
+ "/devices/{serialNumber}": {
120
+ "put": {
121
+ "parameters": [
122
+ {
123
+ "in": "path",
124
+ "name": "serialNumber",
125
+ "description": "device serial number",
126
+ "required": true,
127
+ "schema": "string"
128
+ }
129
+ ],
130
+ "requestBody": {
131
+ "description": "{ \t\"commandType\": \"UpgradeFirmware\", \t\"softwareVersionId\": \"e8c886ba5ff4415a9ca88f79bd11cdec\" } {\"commandType\": \"GenerateConfigFile\"}",
132
+ "required": true,
133
+ "content": {
134
+ "*/*": {
135
+ "schema": {
136
+ "type": "object"
137
+ }
138
+ }
139
+ }
140
+ },
141
+ "tags": [
142
+ "Device"
143
+ ],
144
+ "operationId": "runCommandOnDevice",
145
+ "summary": "Run Command on Device",
146
+ "description": "Run Command on Device",
147
+ "responses": {
148
+ "200": {
149
+ "description": "successful operation"
150
+ },
151
+ "400": {
152
+ "description": "failed operation"
153
+ }
154
+ }
155
+ }
156
+ },
157
+ "/command/{commandId}": {
158
+ "get": {
159
+ "parameters": [
160
+ {
161
+ "name": "commandId",
162
+ "in": "path",
163
+ "description": "commandId",
164
+ "required": true,
165
+ "schema": {
166
+ "type": "string"
167
+ }
168
+ }
169
+ ],
170
+ "tags": [
171
+ "Device"
172
+ ],
173
+ "operationId": "getFirmwareUpdateResult",
174
+ "summary": "Get Firmware Update Result",
175
+ "description": "Get Firmware Update Result using commandId",
176
+ "responses": {
177
+ "200": {
178
+ "description": "successful operation"
179
+ },
180
+ "400": {
181
+ "description": "failed operation"
182
+ }
183
+ }
184
+ }
185
+ }
186
+ },
187
+ "externalDocs": {
188
+ "description": "Find out more about the OpenAPI Initiative",
189
+ "url": "https://www.openapis.org/"
190
+ },
191
+ "tags": [
192
+ {
193
+ "name": "Device",
194
+ "description": "Device Group"
195
+ },
196
+ {
197
+ "name": "Dashboard",
198
+ "description": "Dashboard Group"
199
+ }
200
+ ],
201
+ "components": {
202
+ "securitySchemes": {}
203
+ }
204
+ }
@@ -0,0 +1,163 @@
1
+ openapi: 3.0.0
2
+ info:
3
+ title: Robustel
4
+ description: Robustel NMS REST API
5
+ contact:
6
+ email: apiteam@swagger.io
7
+ version: '1.0.0'
8
+ servers:
9
+ - url: https://locahost/
10
+ variables: {}
11
+ paths:
12
+ /device/devices/{serialNumber}:
13
+ get:
14
+ tags:
15
+ - Device
16
+ summary: getDeviceDetails
17
+ description: Get Device Details from Device Tree
18
+ operationId: getDeviceDetails
19
+ parameters:
20
+ - name: serialNumber
21
+ in: path
22
+ description: serial number
23
+ required: true
24
+ style: simple
25
+ schema:
26
+ type: string
27
+ responses:
28
+ '200':
29
+ description: successful operation
30
+ headers: {}
31
+ content: {}
32
+ '400':
33
+ description: failed operation
34
+ headers: {}
35
+ content: {}
36
+ deprecated: false
37
+ /devices/{serialNumber}/firmwares:
38
+ get:
39
+ tags:
40
+ - Device
41
+ summary: getDeviceFirmwareList
42
+ description: Get Device Firmware List
43
+ operationId: getDeviceFirmwareList
44
+ parameters:
45
+ - name: serialNumber
46
+ in: path
47
+ description: device serial number
48
+ required: true
49
+ style: simple
50
+ schema:
51
+ type: string
52
+ responses:
53
+ '200':
54
+ description: successful operation
55
+ headers: {}
56
+ content: {}
57
+ '400':
58
+ description: failed operation
59
+ headers: {}
60
+ content: {}
61
+ deprecated: false
62
+ /devices/{serialNumber}:
63
+ put:
64
+ tags:
65
+ - Device
66
+ summary: runCommandOnDevice
67
+ description: Run Command on Device
68
+ operationId: runCommandOnDevice
69
+ parameters:
70
+ - name: serialNumber
71
+ in: path
72
+ description: device serial number
73
+ required: true
74
+ style: simple
75
+ schema:
76
+ type: string
77
+ requestBody:
78
+ description: '{ "commandType": "UpgradeFirmware", "softwareVersionId": "e8c886ba5ff4415a9ca88f79bd11cdec" } {"commandType": "GenerateConfigFile"}'
79
+ content:
80
+ '*/*':
81
+ schema:
82
+ type: object
83
+ description: '{ "commandType": "UpgradeFirmware", "softwareVersionId": "e8c886ba5ff4415a9ca88f79bd11cdec" } {"commandType": "GenerateConfigFile"}'
84
+ required: true
85
+ responses:
86
+ '200':
87
+ description: successful operation
88
+ headers: {}
89
+ content: {}
90
+ '400':
91
+ description: failed operation
92
+ headers: {}
93
+ content: {}
94
+ deprecated: false
95
+ /command/{commandId}:
96
+ get:
97
+ tags:
98
+ - Device
99
+ summary: getFirmwareUpdateResult
100
+ description: Get Firmware Update Result using commandId
101
+ operationId: getFirmwareUpdateResult
102
+ parameters:
103
+ - name: commandId
104
+ in: path
105
+ description: commandId
106
+ required: true
107
+ style: simple
108
+ schema:
109
+ type: string
110
+ responses:
111
+ '200':
112
+ description: successful operation
113
+ headers: {}
114
+ content: {}
115
+ '400':
116
+ description: failed operation
117
+ headers: {}
118
+ content: {}
119
+ deprecated: false
120
+ /dashboard/deviceTotal:
121
+ get:
122
+ tags:
123
+ - Dashboard
124
+ summary: getDeviceTotal
125
+ description: Get Device Total from Dashboard
126
+ operationId: getDeviceTotal
127
+ parameters: []
128
+ responses:
129
+ '200':
130
+ description: successful operation
131
+ headers: {}
132
+ content: {}
133
+ '400':
134
+ description: failed operation
135
+ headers: {}
136
+ content: {}
137
+ deprecated: false
138
+ /dashboard/networkTotal:
139
+ get:
140
+ tags:
141
+ - Dashboard
142
+ summary: getNetworkTotal
143
+ description: Get Network Total from Dashboard
144
+ operationId: getNetworkTotal
145
+ parameters: []
146
+ responses:
147
+ '200':
148
+ description: successful operation
149
+ headers: {}
150
+ content: {}
151
+ '400':
152
+ description: failed operation
153
+ headers: {}
154
+ content: {}
155
+ deprecated: false
156
+ tags:
157
+ - name: Device
158
+ description: Device Group
159
+ - name: Dashboard
160
+ description: Dashboard Group
161
+ externalDocs:
162
+ description: Find out more about the OpenAPI Initiative
163
+ url: https://www.openapis.org/
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": "0.2.0",
3
+ "configLines": 3051,
4
+ "scriptLines": 1783,
5
+ "codeLines": 2943,
6
+ "testLines": 3546,
7
+ "testCases": 164,
8
+ "totalCodeLines": 8272,
9
+ "wfTasks": 31
10
+ }
@@ -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.6"
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": 1440
78
+ },
79
+ {
80
+ "owner": "unitTestJS",
81
+ "description": "Number of unit tests",
82
+ "value": 65
83
+ },
84
+ {
85
+ "owner": "integrationTestJS",
86
+ "description": "Number of lines of code in integration tests",
87
+ "value": 545
88
+ },
89
+ {
90
+ "owner": "integrationTestJS",
91
+ "description": "Number of integration tests",
92
+ "value": 12
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": 3768
108
+ },
109
+ {
110
+ "owner": "Overall",
111
+ "description": "Total Tests",
112
+ "value": 77
113
+ },
114
+ {
115
+ "owner": "Overall",
116
+ "description": "Total Files",
117
+ "value": 6
118
+ }
119
+ ]
120
+ }
@@ -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": 17
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": 22
33
+ },
34
+ {
35
+ "owner": "packageJson",
36
+ "description": "Runtime Library dependency",
37
+ "value": "^5.1.0"
38
+ },
39
+ {
40
+ "owner": "propertiesSchemaJson",
41
+ "description": "Adapter properties defined in the propertiesSchema file",
42
+ "value": 79
43
+ },
44
+ {
45
+ "owner": "markdown",
46
+ "description": "Number of lines in the README.md",
47
+ "value": 343
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": 1660
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": 628
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": 1350
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": 3638
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
+ }