@itentialopensource/adapter-viptela 0.10.0 → 0.10.3

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.
@@ -51,6 +51,11 @@
51
51
  "description": "When true the path variables are encoded in the url",
52
52
  "default": true
53
53
  },
54
+ "encode_queryvars": {
55
+ "type": "boolean",
56
+ "description": "When true the query parameters are encoded in the url",
57
+ "default": true
58
+ },
54
59
  "save_metric": {
55
60
  "type": [
56
61
  "boolean",
@@ -93,6 +98,9 @@
93
98
  },
94
99
  "mongo": {
95
100
  "$ref": "#/definitions/mongo"
101
+ },
102
+ "devicebroker": {
103
+ "$ref": "#/definitions/devicebroker"
96
104
  }
97
105
  },
98
106
  "required": [
@@ -877,7 +885,10 @@
877
885
  },
878
886
  "handleFailure": {
879
887
  "type": "string",
880
- "enum": ["ignore", "fail"],
888
+ "enum": [
889
+ "ignore",
890
+ "fail"
891
+ ],
881
892
  "description": "return failure or ignore failure",
882
893
  "default": "ignore"
883
894
  },
@@ -889,6 +900,11 @@
889
900
  },
890
901
  "properties": {}
891
902
  },
903
+ "responseDatakey": {
904
+ "type": "string",
905
+ "description": "place in the response where the data is - supports jsonquery",
906
+ "default": ""
907
+ },
892
908
  "responseFields": {
893
909
  "type": "object",
894
910
  "description": "The json object with response fields of the call to getDevice",
@@ -916,7 +932,7 @@
916
932
  "description": "The field in response to getDevice that contains the port of the device",
917
933
  "default": ""
918
934
  },
919
- "ip": {
935
+ "ipaddress": {
920
936
  "type": "string",
921
937
  "description": "The field in response to getDevice that contains the ip address of the device",
922
938
  "default": ""
@@ -964,10 +980,26 @@
964
980
  },
965
981
  "handleFailure": {
966
982
  "type": "string",
967
- "enum": ["ignore", "fail"],
983
+ "enum": [
984
+ "ignore",
985
+ "fail"
986
+ ],
968
987
  "description": "return failure or ignore failure",
969
988
  "default": "ignore"
970
989
  },
990
+ "requestFields": {
991
+ "type": "object",
992
+ "description": "The json object with response fields of the call to getDevice",
993
+ "additionalProperties": {
994
+ "type": "string"
995
+ },
996
+ "properties": {}
997
+ },
998
+ "responseDatakey": {
999
+ "type": "string",
1000
+ "description": "place in the response where the data is - supports jsonquery",
1001
+ "default": ""
1002
+ },
971
1003
  "responseFields": {
972
1004
  "type": "object",
973
1005
  "description": "The json object with response fields of the call to getDevicesFiltered",
@@ -990,12 +1022,12 @@
990
1022
  "description": "Any prefix that should be added to the ostype of the device (e.g. aws-)",
991
1023
  "default": ""
992
1024
  },
993
- "port_field": {
1025
+ "port": {
994
1026
  "type": "string",
995
1027
  "description": "The field in response to getDevicesFiltered that contains the port of the device",
996
1028
  "default": ""
997
1029
  },
998
- "ip_field": {
1030
+ "ipaddress": {
999
1031
  "type": "string",
1000
1032
  "description": "The field in response to getDevicesFiltered that contains the ip address of the device",
1001
1033
  "default": ""
@@ -1043,15 +1075,13 @@
1043
1075
  },
1044
1076
  "handleFailure": {
1045
1077
  "type": "string",
1046
- "enum": ["ignore", "fail"],
1078
+ "enum": [
1079
+ "ignore",
1080
+ "fail"
1081
+ ],
1047
1082
  "description": "return failure or ignore isAlive",
1048
1083
  "default": "ignore"
1049
1084
  },
1050
- "statusValue": {
1051
- "type": "string",
1052
- "description": "The expected value in the status field",
1053
- "default": "true"
1054
- },
1055
1085
  "requestFields": {
1056
1086
  "type": "object",
1057
1087
  "description": "The json object with response fields of the call to getDevice",
@@ -1060,6 +1090,11 @@
1060
1090
  },
1061
1091
  "properties": {}
1062
1092
  },
1093
+ "responseDatakey": {
1094
+ "type": "string",
1095
+ "description": "place in the response where the data is - supports jsonquery",
1096
+ "default": ""
1097
+ },
1063
1098
  "responseFields": {
1064
1099
  "type": "object",
1065
1100
  "description": "The json object with response fields of the call to isAlive",
@@ -1071,6 +1106,11 @@
1071
1106
  "type": "string",
1072
1107
  "description": "The field in response to isAlive that contains the status of the device",
1073
1108
  "default": "name"
1109
+ },
1110
+ "statusValue": {
1111
+ "type": "string",
1112
+ "description": "The expected value in the status field",
1113
+ "default": "true"
1074
1114
  }
1075
1115
  }
1076
1116
  }
@@ -1115,7 +1155,10 @@
1115
1155
  },
1116
1156
  "handleFailure": {
1117
1157
  "type": "string",
1118
- "enum": ["ignore", "fail"],
1158
+ "enum": [
1159
+ "ignore",
1160
+ "fail"
1161
+ ],
1119
1162
  "description": "return failure or ignore getConfig",
1120
1163
  "default": "ignore"
1121
1164
  },
@@ -1127,14 +1170,18 @@
1127
1170
  },
1128
1171
  "properties": {}
1129
1172
  },
1173
+ "responseDatakey": {
1174
+ "type": "string",
1175
+ "description": "place in the response where the data is - supports jsonquery",
1176
+ "default": ""
1177
+ },
1130
1178
  "responseFields": {
1131
1179
  "type": "object",
1132
1180
  "description": "The json object with response fields of the call to getConfig",
1133
1181
  "additionalProperties": {
1134
1182
  "type": "string"
1135
1183
  },
1136
- "properties": {
1137
- }
1184
+ "properties": {}
1138
1185
  }
1139
1186
  }
1140
1187
  }
@@ -1177,9 +1224,33 @@
1177
1224
  },
1178
1225
  "handleFailure": {
1179
1226
  "type": "string",
1180
- "enum": ["ignore", "fail"],
1227
+ "enum": [
1228
+ "ignore",
1229
+ "fail"
1230
+ ],
1181
1231
  "description": "return failure or ignore getCount",
1182
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": {}
1183
1254
  }
1184
1255
  }
1185
1256
  }
Binary file
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": "0.10.2",
3
+ "configLines": 20359,
4
+ "scriptLines": 1707,
5
+ "codeLines": 45295,
6
+ "testLines": 27464,
7
+ "testCases": 1439,
8
+ "totalCodeLines": 74466,
9
+ "wfTasks": 570
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
+ }
@@ -8,7 +8,8 @@
8
8
  "version": "",
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": {
@@ -103,6 +104,87 @@
103
104
  "key_file": "",
104
105
  "cert_file": ""
105
106
  }
107
+ },
108
+ "devicebroker": {
109
+ "getDevice": [
110
+ {
111
+ "path": "/get/devices/{id}",
112
+ "method": "GET",
113
+ "query": {},
114
+ "body": {},
115
+ "headers": {},
116
+ "handleFailure": "ignore",
117
+ "requestFields": {
118
+ "id": "name"
119
+ },
120
+ "responseFields": {
121
+ "name": "host",
122
+ "ostype": "os",
123
+ "ostypePrefix": "system-",
124
+ "ipaddress": "attributes.ipaddr",
125
+ "port": "443"
126
+ }
127
+ }
128
+ ],
129
+ "getDevicesFiltered": [
130
+ {
131
+ "path": "/get/devices",
132
+ "method": "GET",
133
+ "query": {},
134
+ "body": {},
135
+ "headers": {},
136
+ "handleFailure": "ignore",
137
+ "requestFields": {},
138
+ "responseFields": {
139
+ "name": "host",
140
+ "ostype": "os",
141
+ "ostypePrefix": "system-",
142
+ "ipaddress": "attributes.ipaddr",
143
+ "port": "443"
144
+ }
145
+ }
146
+ ],
147
+ "isAlive": [
148
+ {
149
+ "path": "/get/devices/{id}/status",
150
+ "method": "GET",
151
+ "query": {},
152
+ "body": {},
153
+ "headers": {},
154
+ "handleFailure": "ignore",
155
+ "statusValue": "online",
156
+ "requestFields": {
157
+ "id": "name"
158
+ },
159
+ "responseFields": {
160
+ "status": "status"
161
+ }
162
+ }
163
+ ],
164
+ "getConfig": [
165
+ {
166
+ "path": "/get/devices/{id}/configPart1",
167
+ "method": "GET",
168
+ "query": {},
169
+ "body": {},
170
+ "headers": {},
171
+ "handleFailure": "ignore",
172
+ "requestFields": {
173
+ "id": "name"
174
+ },
175
+ "responseFields": {}
176
+ }
177
+ ],
178
+ "getCount": [
179
+ {
180
+ "path": "/get/devices",
181
+ "method": "GET",
182
+ "query": {},
183
+ "body": {},
184
+ "headers": {},
185
+ "handleFailure": "ignore"
186
+ }
187
+ ]
106
188
  }
107
189
  },
108
190
  "groups": [],
@@ -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.withinIAP(iapDir)) {
37
+ if (!utils.areWeUnderIAPinstallationDirectory()) {
38
38
  const sampleProperties = require('../../sampleProperties.json');
39
39
  const adapter = { properties: sampleProperties };
40
40
  a = basicGet.getAdapterInstance(adapter);