@itentialopensource/adapter-viavi_xpertrak 0.3.0 → 0.3.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.
- package/.eslintignore +0 -1
- package/.jshintrc +3 -0
- package/CHANGELOG.md +8 -0
- package/metadata.json +1 -1
- package/package.json +4 -4
- package/propertiesSchema.json +128 -36
- package/refs?service=git-upload-pack +0 -0
- package/report/adapterInfo.json +4 -4
- package/test/unit/adapterTestUnit.js +8 -2
- package/utils/artifactize.js +0 -0
package/.eslintignore
CHANGED
package/.jshintrc
CHANGED
package/CHANGELOG.md
CHANGED
package/metadata.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"documentation": {
|
|
21
21
|
"storeLink": "",
|
|
22
22
|
"npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-viavi_xpertrak",
|
|
23
|
-
"repoLink": "https://gitlab.com
|
|
23
|
+
"repoLink": "https://gitlab.com/itentialopensource/adapters/telemetry-analytics/adapter-viavi_xpertrak",
|
|
24
24
|
"docLink": "",
|
|
25
25
|
"demoLinks": [],
|
|
26
26
|
"trainingLinks": [],
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itentialopensource/adapter-viavi_xpertrak",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "This adapter integrates with system described as: viaviXpertrakApi.",
|
|
5
5
|
"main": "adapter.js",
|
|
6
6
|
"systemName": "Viavi_xpertrak",
|
|
7
|
-
"wizardVersion": "
|
|
8
|
-
"engineVersion": "1.67.
|
|
7
|
+
"wizardVersion": "2.44.7",
|
|
8
|
+
"engineVersion": "1.67.14",
|
|
9
9
|
"adapterType": "http",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"artifactize": "npm i && node utils/packModificationScript.js",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@itentialopensource/adapter-utils": "^5.3.2",
|
|
60
60
|
"acorn": "^8.10.0",
|
|
61
61
|
"ajv": "^8.12.0",
|
|
62
|
-
"axios": "^1.6.
|
|
62
|
+
"axios": "^1.6.5",
|
|
63
63
|
"commander": "^11.0.0",
|
|
64
64
|
"dns-lookup-promise": "^1.0.4",
|
|
65
65
|
"fs-extra": "^11.1.1",
|
package/propertiesSchema.json
CHANGED
|
@@ -83,10 +83,10 @@
|
|
|
83
83
|
"https"
|
|
84
84
|
]
|
|
85
85
|
},
|
|
86
|
-
"service"
|
|
87
|
-
"type"
|
|
86
|
+
"service": {
|
|
87
|
+
"type": "string",
|
|
88
88
|
"description": "Service we are integrating with -- used with AWS Authentication",
|
|
89
|
-
"examples"
|
|
89
|
+
"examples": [
|
|
90
90
|
"ec2",
|
|
91
91
|
"route53"
|
|
92
92
|
]
|
|
@@ -290,7 +290,9 @@
|
|
|
290
290
|
"description": "the protocol to request token from system",
|
|
291
291
|
"default": "",
|
|
292
292
|
"enum": [
|
|
293
|
-
"http",
|
|
293
|
+
"http",
|
|
294
|
+
"https",
|
|
295
|
+
""
|
|
294
296
|
]
|
|
295
297
|
},
|
|
296
298
|
"host": {
|
|
@@ -329,7 +331,7 @@
|
|
|
329
331
|
"responseFields": {
|
|
330
332
|
"type": "object",
|
|
331
333
|
"description": "The fields from the step result"
|
|
332
|
-
|
|
334
|
+
},
|
|
333
335
|
"successfullResponseCode": {
|
|
334
336
|
"type": "integer",
|
|
335
337
|
"description": "Expected response code for given step, if not set any successfull http response is accepted",
|
|
@@ -963,21 +965,30 @@
|
|
|
963
965
|
"type": "object",
|
|
964
966
|
"description": "The json object with query parameters of the call to getDevice",
|
|
965
967
|
"additionalProperties": {
|
|
966
|
-
"type": [
|
|
968
|
+
"type": [
|
|
969
|
+
"string",
|
|
970
|
+
"number"
|
|
971
|
+
]
|
|
967
972
|
}
|
|
968
973
|
},
|
|
969
974
|
"body": {
|
|
970
975
|
"type": "object",
|
|
971
976
|
"description": "The json object with body of the call to getDevice",
|
|
972
977
|
"additionalProperties": {
|
|
973
|
-
"type": [
|
|
978
|
+
"type": [
|
|
979
|
+
"string",
|
|
980
|
+
"number"
|
|
981
|
+
]
|
|
974
982
|
}
|
|
975
983
|
},
|
|
976
984
|
"headers": {
|
|
977
985
|
"type": "object",
|
|
978
986
|
"description": "The json object with headers of the call to getDevice",
|
|
979
987
|
"additionalProperties": {
|
|
980
|
-
"type": [
|
|
988
|
+
"type": [
|
|
989
|
+
"string",
|
|
990
|
+
"number"
|
|
991
|
+
]
|
|
981
992
|
}
|
|
982
993
|
},
|
|
983
994
|
"handleFailure": {
|
|
@@ -993,7 +1004,10 @@
|
|
|
993
1004
|
"type": "object",
|
|
994
1005
|
"description": "The json object with response fields of the call to getDevice",
|
|
995
1006
|
"additionalProperties": {
|
|
996
|
-
"type": [
|
|
1007
|
+
"type": [
|
|
1008
|
+
"string",
|
|
1009
|
+
"number"
|
|
1010
|
+
]
|
|
997
1011
|
},
|
|
998
1012
|
"properties": {}
|
|
999
1013
|
},
|
|
@@ -1006,7 +1020,10 @@
|
|
|
1006
1020
|
"type": "object",
|
|
1007
1021
|
"description": "The json object with response fields of the call to getDevice",
|
|
1008
1022
|
"additionalProperties": {
|
|
1009
|
-
"type": [
|
|
1023
|
+
"type": [
|
|
1024
|
+
"string",
|
|
1025
|
+
"number"
|
|
1026
|
+
]
|
|
1010
1027
|
},
|
|
1011
1028
|
"properties": {
|
|
1012
1029
|
"name": {
|
|
@@ -1091,21 +1108,30 @@
|
|
|
1091
1108
|
"type": "object",
|
|
1092
1109
|
"description": "The json object with query parameters of the call to getDevicesFiltered",
|
|
1093
1110
|
"additionalProperties": {
|
|
1094
|
-
"type": [
|
|
1111
|
+
"type": [
|
|
1112
|
+
"string",
|
|
1113
|
+
"number"
|
|
1114
|
+
]
|
|
1095
1115
|
}
|
|
1096
1116
|
},
|
|
1097
1117
|
"body": {
|
|
1098
1118
|
"type": "object",
|
|
1099
1119
|
"description": "The json object with body of the call to getDevicesFiltered",
|
|
1100
1120
|
"additionalProperties": {
|
|
1101
|
-
"type": [
|
|
1121
|
+
"type": [
|
|
1122
|
+
"string",
|
|
1123
|
+
"number"
|
|
1124
|
+
]
|
|
1102
1125
|
}
|
|
1103
1126
|
},
|
|
1104
1127
|
"headers": {
|
|
1105
1128
|
"type": "object",
|
|
1106
1129
|
"description": "The json object with headers of the call to getDevicesFiltered",
|
|
1107
1130
|
"additionalProperties": {
|
|
1108
|
-
"type": [
|
|
1131
|
+
"type": [
|
|
1132
|
+
"string",
|
|
1133
|
+
"number"
|
|
1134
|
+
]
|
|
1109
1135
|
}
|
|
1110
1136
|
},
|
|
1111
1137
|
"handleFailure": {
|
|
@@ -1121,7 +1147,10 @@
|
|
|
1121
1147
|
"type": "object",
|
|
1122
1148
|
"description": "The json object with response fields of the call to getDevice",
|
|
1123
1149
|
"additionalProperties": {
|
|
1124
|
-
"type": [
|
|
1150
|
+
"type": [
|
|
1151
|
+
"string",
|
|
1152
|
+
"number"
|
|
1153
|
+
]
|
|
1125
1154
|
},
|
|
1126
1155
|
"properties": {}
|
|
1127
1156
|
},
|
|
@@ -1134,7 +1163,10 @@
|
|
|
1134
1163
|
"type": "object",
|
|
1135
1164
|
"description": "The json object with response fields of the call to getDevicesFiltered",
|
|
1136
1165
|
"additionalProperties": {
|
|
1137
|
-
"type": [
|
|
1166
|
+
"type": [
|
|
1167
|
+
"string",
|
|
1168
|
+
"number"
|
|
1169
|
+
]
|
|
1138
1170
|
},
|
|
1139
1171
|
"properties": {
|
|
1140
1172
|
"name": {
|
|
@@ -1187,21 +1219,30 @@
|
|
|
1187
1219
|
"type": "object",
|
|
1188
1220
|
"description": "The json object with query parameters of the call to isAlive",
|
|
1189
1221
|
"additionalProperties": {
|
|
1190
|
-
"type": [
|
|
1222
|
+
"type": [
|
|
1223
|
+
"string",
|
|
1224
|
+
"number"
|
|
1225
|
+
]
|
|
1191
1226
|
}
|
|
1192
1227
|
},
|
|
1193
1228
|
"body": {
|
|
1194
1229
|
"type": "object",
|
|
1195
1230
|
"description": "The json object with body of the call to isAlive",
|
|
1196
1231
|
"additionalProperties": {
|
|
1197
|
-
"type": [
|
|
1232
|
+
"type": [
|
|
1233
|
+
"string",
|
|
1234
|
+
"number"
|
|
1235
|
+
]
|
|
1198
1236
|
}
|
|
1199
1237
|
},
|
|
1200
1238
|
"headers": {
|
|
1201
1239
|
"type": "object",
|
|
1202
1240
|
"description": "The json object with headers of the call to isAlive",
|
|
1203
1241
|
"additionalProperties": {
|
|
1204
|
-
"type": [
|
|
1242
|
+
"type": [
|
|
1243
|
+
"string",
|
|
1244
|
+
"number"
|
|
1245
|
+
]
|
|
1205
1246
|
}
|
|
1206
1247
|
},
|
|
1207
1248
|
"handleFailure": {
|
|
@@ -1217,7 +1258,10 @@
|
|
|
1217
1258
|
"type": "object",
|
|
1218
1259
|
"description": "The json object with response fields of the call to getDevice",
|
|
1219
1260
|
"additionalProperties": {
|
|
1220
|
-
"type": [
|
|
1261
|
+
"type": [
|
|
1262
|
+
"string",
|
|
1263
|
+
"number"
|
|
1264
|
+
]
|
|
1221
1265
|
},
|
|
1222
1266
|
"properties": {}
|
|
1223
1267
|
},
|
|
@@ -1230,7 +1274,10 @@
|
|
|
1230
1274
|
"type": "object",
|
|
1231
1275
|
"description": "The json object with response fields of the call to isAlive",
|
|
1232
1276
|
"additionalProperties": {
|
|
1233
|
-
"type": [
|
|
1277
|
+
"type": [
|
|
1278
|
+
"string",
|
|
1279
|
+
"number"
|
|
1280
|
+
]
|
|
1234
1281
|
},
|
|
1235
1282
|
"properties": {
|
|
1236
1283
|
"status": {
|
|
@@ -1268,21 +1315,30 @@
|
|
|
1268
1315
|
"type": "object",
|
|
1269
1316
|
"description": "The json object with query parameters of the call to getConfig",
|
|
1270
1317
|
"additionalProperties": {
|
|
1271
|
-
"type": [
|
|
1318
|
+
"type": [
|
|
1319
|
+
"string",
|
|
1320
|
+
"number"
|
|
1321
|
+
]
|
|
1272
1322
|
}
|
|
1273
1323
|
},
|
|
1274
1324
|
"body": {
|
|
1275
1325
|
"type": "object",
|
|
1276
1326
|
"description": "The json object with body of the call to getConfig",
|
|
1277
1327
|
"additionalProperties": {
|
|
1278
|
-
"type": [
|
|
1328
|
+
"type": [
|
|
1329
|
+
"string",
|
|
1330
|
+
"number"
|
|
1331
|
+
]
|
|
1279
1332
|
}
|
|
1280
1333
|
},
|
|
1281
1334
|
"headers": {
|
|
1282
1335
|
"type": "object",
|
|
1283
1336
|
"description": "The json object with headers of the call to getConfig",
|
|
1284
1337
|
"additionalProperties": {
|
|
1285
|
-
"type": [
|
|
1338
|
+
"type": [
|
|
1339
|
+
"string",
|
|
1340
|
+
"number"
|
|
1341
|
+
]
|
|
1286
1342
|
}
|
|
1287
1343
|
},
|
|
1288
1344
|
"handleFailure": {
|
|
@@ -1298,7 +1354,10 @@
|
|
|
1298
1354
|
"type": "object",
|
|
1299
1355
|
"description": "The json object with response fields of the call to getDevice",
|
|
1300
1356
|
"additionalProperties": {
|
|
1301
|
-
"type": [
|
|
1357
|
+
"type": [
|
|
1358
|
+
"string",
|
|
1359
|
+
"number"
|
|
1360
|
+
]
|
|
1302
1361
|
},
|
|
1303
1362
|
"properties": {}
|
|
1304
1363
|
},
|
|
@@ -1311,7 +1370,10 @@
|
|
|
1311
1370
|
"type": "object",
|
|
1312
1371
|
"description": "The json object with response fields of the call to getConfig",
|
|
1313
1372
|
"additionalProperties": {
|
|
1314
|
-
"type": [
|
|
1373
|
+
"type": [
|
|
1374
|
+
"string",
|
|
1375
|
+
"number"
|
|
1376
|
+
]
|
|
1315
1377
|
},
|
|
1316
1378
|
"properties": {}
|
|
1317
1379
|
}
|
|
@@ -1338,21 +1400,30 @@
|
|
|
1338
1400
|
"type": "object",
|
|
1339
1401
|
"description": "The json object with query parameters of the call to getCount",
|
|
1340
1402
|
"additionalProperties": {
|
|
1341
|
-
"type": [
|
|
1403
|
+
"type": [
|
|
1404
|
+
"string",
|
|
1405
|
+
"number"
|
|
1406
|
+
]
|
|
1342
1407
|
}
|
|
1343
1408
|
},
|
|
1344
1409
|
"body": {
|
|
1345
1410
|
"type": "object",
|
|
1346
1411
|
"description": "The json object with body of the call to getCount",
|
|
1347
1412
|
"additionalProperties": {
|
|
1348
|
-
"type": [
|
|
1413
|
+
"type": [
|
|
1414
|
+
"string",
|
|
1415
|
+
"number"
|
|
1416
|
+
]
|
|
1349
1417
|
}
|
|
1350
1418
|
},
|
|
1351
1419
|
"headers": {
|
|
1352
1420
|
"type": "object",
|
|
1353
1421
|
"description": "The json object with headers of the call to getCount",
|
|
1354
1422
|
"additionalProperties": {
|
|
1355
|
-
"type": [
|
|
1423
|
+
"type": [
|
|
1424
|
+
"string",
|
|
1425
|
+
"number"
|
|
1426
|
+
]
|
|
1356
1427
|
}
|
|
1357
1428
|
},
|
|
1358
1429
|
"handleFailure": {
|
|
@@ -1368,7 +1439,10 @@
|
|
|
1368
1439
|
"type": "object",
|
|
1369
1440
|
"description": "The json object with response fields of the call to getDevice",
|
|
1370
1441
|
"additionalProperties": {
|
|
1371
|
-
"type": [
|
|
1442
|
+
"type": [
|
|
1443
|
+
"string",
|
|
1444
|
+
"number"
|
|
1445
|
+
]
|
|
1372
1446
|
},
|
|
1373
1447
|
"properties": {}
|
|
1374
1448
|
},
|
|
@@ -1381,7 +1455,10 @@
|
|
|
1381
1455
|
"type": "object",
|
|
1382
1456
|
"description": "The json object with response fields of the call to getConfig",
|
|
1383
1457
|
"additionalProperties": {
|
|
1384
|
-
"type": [
|
|
1458
|
+
"type": [
|
|
1459
|
+
"string",
|
|
1460
|
+
"number"
|
|
1461
|
+
]
|
|
1385
1462
|
},
|
|
1386
1463
|
"properties": {}
|
|
1387
1464
|
}
|
|
@@ -1487,21 +1564,30 @@
|
|
|
1487
1564
|
"type": "object",
|
|
1488
1565
|
"description": "The json object with query parameters of the call to getDevice",
|
|
1489
1566
|
"additionalProperties": {
|
|
1490
|
-
"type": [
|
|
1567
|
+
"type": [
|
|
1568
|
+
"string",
|
|
1569
|
+
"number"
|
|
1570
|
+
]
|
|
1491
1571
|
}
|
|
1492
1572
|
},
|
|
1493
1573
|
"body": {
|
|
1494
1574
|
"type": "object",
|
|
1495
1575
|
"description": "The json object with body of the call to getDevice",
|
|
1496
1576
|
"additionalProperties": {
|
|
1497
|
-
"type": [
|
|
1577
|
+
"type": [
|
|
1578
|
+
"string",
|
|
1579
|
+
"number"
|
|
1580
|
+
]
|
|
1498
1581
|
}
|
|
1499
1582
|
},
|
|
1500
1583
|
"headers": {
|
|
1501
1584
|
"type": "object",
|
|
1502
1585
|
"description": "The json object with headers of the call to getDevice",
|
|
1503
1586
|
"additionalProperties": {
|
|
1504
|
-
"type": [
|
|
1587
|
+
"type": [
|
|
1588
|
+
"string",
|
|
1589
|
+
"number"
|
|
1590
|
+
]
|
|
1505
1591
|
}
|
|
1506
1592
|
},
|
|
1507
1593
|
"handleFailure": {
|
|
@@ -1517,7 +1603,10 @@
|
|
|
1517
1603
|
"type": "object",
|
|
1518
1604
|
"description": "The json object with response fields of the call to getDevice",
|
|
1519
1605
|
"additionalProperties": {
|
|
1520
|
-
"type": [
|
|
1606
|
+
"type": [
|
|
1607
|
+
"string",
|
|
1608
|
+
"number"
|
|
1609
|
+
]
|
|
1521
1610
|
},
|
|
1522
1611
|
"properties": {}
|
|
1523
1612
|
},
|
|
@@ -1530,7 +1619,10 @@
|
|
|
1530
1619
|
"type": "object",
|
|
1531
1620
|
"description": "The json object with response fields of the call to getDevice",
|
|
1532
1621
|
"additionalProperties": {
|
|
1533
|
-
"type": [
|
|
1622
|
+
"type": [
|
|
1623
|
+
"string",
|
|
1624
|
+
"number"
|
|
1625
|
+
]
|
|
1534
1626
|
}
|
|
1535
1627
|
}
|
|
1536
1628
|
}
|
|
@@ -1566,4 +1658,4 @@
|
|
|
1566
1658
|
}
|
|
1567
1659
|
}
|
|
1568
1660
|
}
|
|
1569
|
-
}
|
|
1661
|
+
}
|
|
Binary file
|
package/report/adapterInfo.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
3
|
-
"configLines":
|
|
2
|
+
"version": "0.3.0",
|
|
3
|
+
"configLines": 9737,
|
|
4
4
|
"scriptLines": 1783,
|
|
5
5
|
"codeLines": 9341,
|
|
6
|
-
"testLines":
|
|
6
|
+
"testLines": 7406,
|
|
7
7
|
"testCases": 372,
|
|
8
|
-
"totalCodeLines":
|
|
8
|
+
"totalCodeLines": 18530,
|
|
9
9
|
"wfTasks": 114
|
|
10
10
|
}
|
|
@@ -278,6 +278,7 @@ describe('[unit] Viavi_xpertrak Adapter Test', () => {
|
|
|
278
278
|
assert.notEqual(undefined, packageDotJson.scripts);
|
|
279
279
|
assert.notEqual(null, packageDotJson.scripts);
|
|
280
280
|
assert.notEqual('', packageDotJson.scripts);
|
|
281
|
+
assert.equal('node utils/setup.js', packageDotJson.scripts.preinstall);
|
|
281
282
|
assert.equal('node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js', packageDotJson.scripts.lint);
|
|
282
283
|
assert.equal('node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js --quiet', packageDotJson.scripts['lint:errors']);
|
|
283
284
|
assert.equal('mocha test/unit/adapterBaseTestUnit.js --LOG=error', packageDotJson.scripts['test:baseunit']);
|
|
@@ -285,6 +286,8 @@ describe('[unit] Viavi_xpertrak Adapter Test', () => {
|
|
|
285
286
|
assert.equal('mocha test/integration/adapterTestIntegration.js --LOG=error', packageDotJson.scripts['test:integration']);
|
|
286
287
|
assert.equal('nyc --reporter html --reporter text mocha --reporter dot test/*', packageDotJson.scripts['test:cover']);
|
|
287
288
|
assert.equal('npm run test:baseunit && npm run test:unit && npm run test:integration', packageDotJson.scripts.test);
|
|
289
|
+
assert.equal('npm publish --registry=https://registry.npmjs.org --access=public', packageDotJson.scripts.deploy);
|
|
290
|
+
assert.equal('npm run deploy', packageDotJson.scripts.build);
|
|
288
291
|
done();
|
|
289
292
|
} catch (error) {
|
|
290
293
|
log.error(`Test Failure: ${error}`);
|
|
@@ -297,6 +300,9 @@ describe('[unit] Viavi_xpertrak Adapter Test', () => {
|
|
|
297
300
|
assert.notEqual(undefined, packageDotJson.repository);
|
|
298
301
|
assert.notEqual(null, packageDotJson.repository);
|
|
299
302
|
assert.notEqual('', packageDotJson.repository);
|
|
303
|
+
assert.equal('git', packageDotJson.repository.type);
|
|
304
|
+
assert.equal('git@gitlab.com:itentialopensource/adapters/', packageDotJson.repository.url.substring(0, 43));
|
|
305
|
+
assert.equal('https://gitlab.com/itentialopensource/adapters/', packageDotJson.homepage.substring(0, 47));
|
|
300
306
|
done();
|
|
301
307
|
} catch (error) {
|
|
302
308
|
log.error(`Test Failure: ${error}`);
|
|
@@ -310,7 +316,7 @@ describe('[unit] Viavi_xpertrak Adapter Test', () => {
|
|
|
310
316
|
assert.notEqual(null, packageDotJson.dependencies);
|
|
311
317
|
assert.notEqual('', packageDotJson.dependencies);
|
|
312
318
|
assert.equal('^8.12.0', packageDotJson.dependencies.ajv);
|
|
313
|
-
assert.equal('^1.6.
|
|
319
|
+
assert.equal('^1.6.5', packageDotJson.dependencies.axios);
|
|
314
320
|
assert.equal('^11.0.0', packageDotJson.dependencies.commander);
|
|
315
321
|
assert.equal('^11.1.1', packageDotJson.dependencies['fs-extra']);
|
|
316
322
|
assert.equal('^10.2.0', packageDotJson.dependencies.mocha);
|
|
@@ -557,7 +563,7 @@ describe('[unit] Viavi_xpertrak Adapter Test', () => {
|
|
|
557
563
|
log.error(`Adapter Exception: ${error}`);
|
|
558
564
|
done(error);
|
|
559
565
|
}
|
|
560
|
-
});
|
|
566
|
+
}).timeout(attemptTimeout);
|
|
561
567
|
});
|
|
562
568
|
|
|
563
569
|
describe('propertiesSchema.json', () => {
|
package/utils/artifactize.js
CHANGED
|
File without changes
|