@itentialopensource/adapter-viptela 0.10.1 → 0.10.2
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/BROKER.md +6 -2
- package/CHANGELOG.md +68 -39
- package/adapter.js +2 -1
- package/adapterBase.js +63 -30
- package/package.json +4 -3
- package/pronghorn.json +642 -642
- package/propertiesSchema.json +49 -8
- package/refs?service=git-upload-pack +0 -0
- package/report/adapterInfo.json +7 -7
- package/report/updateReport1652490573359.json +120 -0
- package/sampleProperties.json +4 -4
- package/test/integration/adapterTestBasicGet.js +1 -1
- package/test/integration/adapterTestIntegration.js +8478 -11078
- package/test/unit/adapterTestUnit.js +29 -112
- package/utils/entitiesToDB.js +12 -57
- package/utils/tbScript.js +35 -20
- package/utils/tbUtils.js +44 -39
- package/utils/testRunner.js +16 -16
package/propertiesSchema.json
CHANGED
|
@@ -900,6 +900,11 @@
|
|
|
900
900
|
},
|
|
901
901
|
"properties": {}
|
|
902
902
|
},
|
|
903
|
+
"responseDatakey": {
|
|
904
|
+
"type": "string",
|
|
905
|
+
"description": "place in the response where the data is - supports jsonquery",
|
|
906
|
+
"default": ""
|
|
907
|
+
},
|
|
903
908
|
"responseFields": {
|
|
904
909
|
"type": "object",
|
|
905
910
|
"description": "The json object with response fields of the call to getDevice",
|
|
@@ -927,7 +932,7 @@
|
|
|
927
932
|
"description": "The field in response to getDevice that contains the port of the device",
|
|
928
933
|
"default": ""
|
|
929
934
|
},
|
|
930
|
-
"
|
|
935
|
+
"ipaddress": {
|
|
931
936
|
"type": "string",
|
|
932
937
|
"description": "The field in response to getDevice that contains the ip address of the device",
|
|
933
938
|
"default": ""
|
|
@@ -990,6 +995,11 @@
|
|
|
990
995
|
},
|
|
991
996
|
"properties": {}
|
|
992
997
|
},
|
|
998
|
+
"responseDatakey": {
|
|
999
|
+
"type": "string",
|
|
1000
|
+
"description": "place in the response where the data is - supports jsonquery",
|
|
1001
|
+
"default": ""
|
|
1002
|
+
},
|
|
993
1003
|
"responseFields": {
|
|
994
1004
|
"type": "object",
|
|
995
1005
|
"description": "The json object with response fields of the call to getDevicesFiltered",
|
|
@@ -1012,12 +1022,12 @@
|
|
|
1012
1022
|
"description": "Any prefix that should be added to the ostype of the device (e.g. aws-)",
|
|
1013
1023
|
"default": ""
|
|
1014
1024
|
},
|
|
1015
|
-
"
|
|
1025
|
+
"port": {
|
|
1016
1026
|
"type": "string",
|
|
1017
1027
|
"description": "The field in response to getDevicesFiltered that contains the port of the device",
|
|
1018
1028
|
"default": ""
|
|
1019
1029
|
},
|
|
1020
|
-
"
|
|
1030
|
+
"ipaddress": {
|
|
1021
1031
|
"type": "string",
|
|
1022
1032
|
"description": "The field in response to getDevicesFiltered that contains the ip address of the device",
|
|
1023
1033
|
"default": ""
|
|
@@ -1072,11 +1082,6 @@
|
|
|
1072
1082
|
"description": "return failure or ignore isAlive",
|
|
1073
1083
|
"default": "ignore"
|
|
1074
1084
|
},
|
|
1075
|
-
"statusValue": {
|
|
1076
|
-
"type": "string",
|
|
1077
|
-
"description": "The expected value in the status field",
|
|
1078
|
-
"default": "true"
|
|
1079
|
-
},
|
|
1080
1085
|
"requestFields": {
|
|
1081
1086
|
"type": "object",
|
|
1082
1087
|
"description": "The json object with response fields of the call to getDevice",
|
|
@@ -1085,6 +1090,11 @@
|
|
|
1085
1090
|
},
|
|
1086
1091
|
"properties": {}
|
|
1087
1092
|
},
|
|
1093
|
+
"responseDatakey": {
|
|
1094
|
+
"type": "string",
|
|
1095
|
+
"description": "place in the response where the data is - supports jsonquery",
|
|
1096
|
+
"default": ""
|
|
1097
|
+
},
|
|
1088
1098
|
"responseFields": {
|
|
1089
1099
|
"type": "object",
|
|
1090
1100
|
"description": "The json object with response fields of the call to isAlive",
|
|
@@ -1096,6 +1106,11 @@
|
|
|
1096
1106
|
"type": "string",
|
|
1097
1107
|
"description": "The field in response to isAlive that contains the status of the device",
|
|
1098
1108
|
"default": "name"
|
|
1109
|
+
},
|
|
1110
|
+
"statusValue": {
|
|
1111
|
+
"type": "string",
|
|
1112
|
+
"description": "The expected value in the status field",
|
|
1113
|
+
"default": "true"
|
|
1099
1114
|
}
|
|
1100
1115
|
}
|
|
1101
1116
|
}
|
|
@@ -1155,6 +1170,11 @@
|
|
|
1155
1170
|
},
|
|
1156
1171
|
"properties": {}
|
|
1157
1172
|
},
|
|
1173
|
+
"responseDatakey": {
|
|
1174
|
+
"type": "string",
|
|
1175
|
+
"description": "place in the response where the data is - supports jsonquery",
|
|
1176
|
+
"default": ""
|
|
1177
|
+
},
|
|
1158
1178
|
"responseFields": {
|
|
1159
1179
|
"type": "object",
|
|
1160
1180
|
"description": "The json object with response fields of the call to getConfig",
|
|
@@ -1210,6 +1230,27 @@
|
|
|
1210
1230
|
],
|
|
1211
1231
|
"description": "return failure or ignore getCount",
|
|
1212
1232
|
"default": "ignore"
|
|
1233
|
+
},
|
|
1234
|
+
"requestFields": {
|
|
1235
|
+
"type": "object",
|
|
1236
|
+
"description": "The json object with response fields of the call to getDevice",
|
|
1237
|
+
"additionalProperties": {
|
|
1238
|
+
"type": "string"
|
|
1239
|
+
},
|
|
1240
|
+
"properties": {}
|
|
1241
|
+
},
|
|
1242
|
+
"responseDatakey": {
|
|
1243
|
+
"type": "string",
|
|
1244
|
+
"description": "place in the response where the data is - supports jsonquery",
|
|
1245
|
+
"default": ""
|
|
1246
|
+
},
|
|
1247
|
+
"responseFields": {
|
|
1248
|
+
"type": "object",
|
|
1249
|
+
"description": "The json object with response fields of the call to getConfig",
|
|
1250
|
+
"additionalProperties": {
|
|
1251
|
+
"type": "string"
|
|
1252
|
+
},
|
|
1253
|
+
"properties": {}
|
|
1213
1254
|
}
|
|
1214
1255
|
}
|
|
1215
1256
|
}
|
|
Binary file
|
package/report/adapterInfo.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.10.
|
|
3
|
-
"configLines":
|
|
4
|
-
"scriptLines":
|
|
5
|
-
"codeLines":
|
|
6
|
-
"testLines":
|
|
7
|
-
"testCases":
|
|
8
|
-
"totalCodeLines":
|
|
2
|
+
"version": "0.10.1",
|
|
3
|
+
"configLines": 20359,
|
|
4
|
+
"scriptLines": 1707,
|
|
5
|
+
"codeLines": 45295,
|
|
6
|
+
"testLines": 27464,
|
|
7
|
+
"testCases": 1439,
|
|
8
|
+
"totalCodeLines": 74466,
|
|
9
9
|
"wfTasks": 570
|
|
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": 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": 11723
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"owner": "unitTestJS",
|
|
81
|
+
"description": "Number of unit tests",
|
|
82
|
+
"value": 829
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"owner": "integrationTestJS",
|
|
86
|
+
"description": "Number of lines of code in integration tests",
|
|
87
|
+
"value": 17128
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"owner": "integrationTestJS",
|
|
91
|
+
"description": "Number of integration tests",
|
|
92
|
+
"value": 554
|
|
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": 30634
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"owner": "Overall",
|
|
111
|
+
"description": "Total Tests",
|
|
112
|
+
"value": 1383
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"owner": "Overall",
|
|
116
|
+
"description": "Total Files",
|
|
117
|
+
"value": 6
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
}
|
package/sampleProperties.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"cache_location": "none",
|
|
10
10
|
"encode_pathvars": true,
|
|
11
11
|
"encode_queryvars": true,
|
|
12
|
-
"save_metric":
|
|
12
|
+
"save_metric": false,
|
|
13
13
|
"stub": true,
|
|
14
14
|
"protocol": "https",
|
|
15
15
|
"authentication": {
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"cert_file": ""
|
|
106
106
|
}
|
|
107
107
|
},
|
|
108
|
-
"
|
|
108
|
+
"devicebroker": {
|
|
109
109
|
"getDevice": [
|
|
110
110
|
{
|
|
111
111
|
"path": "/get/devices/{id}",
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
"ostype": "os",
|
|
123
123
|
"ostypePrefix": "system-",
|
|
124
124
|
"ipaddress": "attributes.ipaddr",
|
|
125
|
-
"port": 443
|
|
125
|
+
"port": "443"
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
],
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
"ostype": "os",
|
|
141
141
|
"ostypePrefix": "system-",
|
|
142
142
|
"ipaddress": "attributes.ipaddr",
|
|
143
|
-
"port": 443
|
|
143
|
+
"port": "443"
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
],
|
|
@@ -34,7 +34,7 @@ describe('[integration] Adapter BasicGET Test', () => {
|
|
|
34
34
|
context('Testing GET calls without query parameters', () => {
|
|
35
35
|
before(async () => {
|
|
36
36
|
const iapDir = path.join(__dirname, '../../../../../');
|
|
37
|
-
if (!utils.
|
|
37
|
+
if (!utils.areWeUnderIAPinstallationDirectory()) {
|
|
38
38
|
const sampleProperties = require('../../sampleProperties.json');
|
|
39
39
|
const adapter = { properties: sampleProperties };
|
|
40
40
|
a = basicGet.getAdapterInstance(adapter);
|