@itentialopensource/adapter-nokia_altiplano 0.3.0 → 0.5.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/AUTH.md +15 -13
- package/BROKER.md +195 -0
- package/CALLS.md +163 -89
- package/CHANGELOG.md +24 -0
- package/CODE_OF_CONDUCT.md +12 -17
- package/CONTRIBUTING.md +88 -74
- package/ENHANCE.md +9 -9
- package/PROPERTIES.md +489 -89
- package/README.md +221 -571
- package/SUMMARY.md +5 -5
- package/SYSTEMINFO.md +6 -7
- package/TROUBLESHOOT.md +5 -4
- package/adapter.js +1202 -625
- package/adapterBase.js +973 -252
- package/entities/.generic/action.json +105 -0
- package/entities/.generic/schema.json +6 -1
- package/entities/Entity/action.json +70 -0
- package/entities/Entity/schema.json +21 -0
- package/entities/Intent/action.json +116 -0
- package/entities/Intent/schema.json +6 -1
- package/error.json +6 -0
- package/package.json +4 -3
- package/pronghorn.json +613 -98
- package/propertiesDecorators.json +14 -0
- package/propertiesSchema.json +380 -0
- package/refs?service=git-upload-pack +0 -0
- package/report/updateReport1651493162166.json +114 -0
- package/report/updateReport1652197536783.json +120 -0
- package/sampleProperties.json +82 -0
- package/test/integration/adapterTestIntegration.js +202 -0
- package/test/unit/adapterBaseTestUnit.js +30 -25
- package/test/unit/adapterTestUnit.js +430 -65
- package/utils/adapterInfo.js +206 -0
- package/utils/pre-commit.sh +3 -0
- package/utils/tbUtils.js +20 -7
|
@@ -52,6 +52,7 @@ global.pronghornProps = {
|
|
|
52
52
|
version: '',
|
|
53
53
|
cache_location: 'none',
|
|
54
54
|
encode_pathvars: true,
|
|
55
|
+
encode_queryvars: true,
|
|
55
56
|
save_metric: false,
|
|
56
57
|
stub,
|
|
57
58
|
protocol,
|
|
@@ -271,10 +272,10 @@ describe('[unit] Nokia_altiplano Adapter Test', () => {
|
|
|
271
272
|
});
|
|
272
273
|
|
|
273
274
|
let wffunctions = [];
|
|
274
|
-
describe('#
|
|
275
|
+
describe('#iapGetAdapterWorkflowFunctions', () => {
|
|
275
276
|
it('should retrieve workflow functions', (done) => {
|
|
276
277
|
try {
|
|
277
|
-
wffunctions = a.
|
|
278
|
+
wffunctions = a.iapGetAdapterWorkflowFunctions([]);
|
|
278
279
|
|
|
279
280
|
try {
|
|
280
281
|
assert.notEqual(0, wffunctions.length);
|
|
@@ -465,16 +466,17 @@ describe('[unit] Nokia_altiplano Adapter Test', () => {
|
|
|
465
466
|
assert.notEqual('', pronghornDotJson.methods);
|
|
466
467
|
assert.equal(true, Array.isArray(pronghornDotJson.methods));
|
|
467
468
|
assert.notEqual(0, pronghornDotJson.methods.length);
|
|
468
|
-
assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === '
|
|
469
|
-
assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === '
|
|
470
|
-
assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === '
|
|
471
|
-
assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === '
|
|
472
|
-
assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === '
|
|
473
|
-
assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === '
|
|
474
|
-
assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === '
|
|
475
|
-
assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === '
|
|
476
|
-
assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === '
|
|
469
|
+
assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapUpdateAdapterConfiguration'));
|
|
470
|
+
assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapFindAdapterPath'));
|
|
471
|
+
assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapTroubleshootAdapter'));
|
|
472
|
+
assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapRunAdapterHealthcheck'));
|
|
473
|
+
assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapRunAdapterConnectivity'));
|
|
474
|
+
assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapRunAdapterBasicGet'));
|
|
475
|
+
assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapSuspendAdapter'));
|
|
476
|
+
assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapUnsuspendAdapter'));
|
|
477
|
+
assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapGetAdapterQueue'));
|
|
477
478
|
assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'genericAdapterRequest'));
|
|
479
|
+
assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'genericAdapterRequestNoBasePath'));
|
|
478
480
|
done();
|
|
479
481
|
} catch (error) {
|
|
480
482
|
log.error(`Test Failure: ${error}`);
|
|
@@ -646,6 +648,8 @@ describe('[unit] Nokia_altiplano Adapter Test', () => {
|
|
|
646
648
|
assert.equal('string', propertiesDotJson.definitions.authentication.properties.client_id.type);
|
|
647
649
|
assert.equal('string', propertiesDotJson.definitions.authentication.properties.client_secret.type);
|
|
648
650
|
assert.equal('string', propertiesDotJson.definitions.authentication.properties.grant_type.type);
|
|
651
|
+
assert.notEqual(undefined, propertiesDotJson.definitions.ssl);
|
|
652
|
+
assert.notEqual(null, propertiesDotJson.definitions.ssl);
|
|
649
653
|
assert.notEqual('', propertiesDotJson.definitions.ssl);
|
|
650
654
|
assert.equal('string', propertiesDotJson.definitions.ssl.properties.ecdhCurve.type);
|
|
651
655
|
assert.equal('boolean', propertiesDotJson.definitions.ssl.properties.enabled.type);
|
|
@@ -659,6 +663,7 @@ describe('[unit] Nokia_altiplano Adapter Test', () => {
|
|
|
659
663
|
assert.equal('string', propertiesDotJson.properties.version.type);
|
|
660
664
|
assert.equal('string', propertiesDotJson.properties.cache_location.type);
|
|
661
665
|
assert.equal('boolean', propertiesDotJson.properties.encode_pathvars.type);
|
|
666
|
+
assert.equal('boolean', propertiesDotJson.properties.encode_queryvars.type);
|
|
662
667
|
assert.equal(true, Array.isArray(propertiesDotJson.properties.save_metric.type));
|
|
663
668
|
assert.equal('string', propertiesDotJson.properties.protocol.type);
|
|
664
669
|
assert.notEqual(undefined, propertiesDotJson.definitions);
|
|
@@ -707,8 +712,6 @@ describe('[unit] Nokia_altiplano Adapter Test', () => {
|
|
|
707
712
|
assert.equal('string', propertiesDotJson.definitions.proxy.properties.protocol.type);
|
|
708
713
|
assert.equal('string', propertiesDotJson.definitions.proxy.properties.username.type);
|
|
709
714
|
assert.equal('string', propertiesDotJson.definitions.proxy.properties.password.type);
|
|
710
|
-
assert.notEqual(undefined, propertiesDotJson.definitions.ssl);
|
|
711
|
-
assert.notEqual(null, propertiesDotJson.definitions.ssl);
|
|
712
715
|
assert.notEqual(undefined, propertiesDotJson.definitions.mongo);
|
|
713
716
|
assert.notEqual(null, propertiesDotJson.definitions.mongo);
|
|
714
717
|
assert.notEqual('', propertiesDotJson.definitions.mongo);
|
|
@@ -724,6 +727,12 @@ describe('[unit] Nokia_altiplano Adapter Test', () => {
|
|
|
724
727
|
assert.equal('string', propertiesDotJson.definitions.mongo.properties.db_ssl.properties.ca_file.type);
|
|
725
728
|
assert.equal('string', propertiesDotJson.definitions.mongo.properties.db_ssl.properties.key_file.type);
|
|
726
729
|
assert.equal('string', propertiesDotJson.definitions.mongo.properties.db_ssl.properties.cert_file.type);
|
|
730
|
+
assert.notEqual('', propertiesDotJson.definitions.devicebroker);
|
|
731
|
+
assert.equal('array', propertiesDotJson.definitions.devicebroker.properties.getDevice.type);
|
|
732
|
+
assert.equal('array', propertiesDotJson.definitions.devicebroker.properties.getDevicesFiltered.type);
|
|
733
|
+
assert.equal('array', propertiesDotJson.definitions.devicebroker.properties.isAlive.type);
|
|
734
|
+
assert.equal('array', propertiesDotJson.definitions.devicebroker.properties.getConfig.type);
|
|
735
|
+
assert.equal('array', propertiesDotJson.definitions.devicebroker.properties.getCount.type);
|
|
727
736
|
done();
|
|
728
737
|
} catch (error) {
|
|
729
738
|
log.error(`Test Failure: ${error}`);
|
|
@@ -1002,10 +1011,10 @@ describe('[unit] Nokia_altiplano Adapter Test', () => {
|
|
|
1002
1011
|
});
|
|
1003
1012
|
});
|
|
1004
1013
|
|
|
1005
|
-
describe('#
|
|
1006
|
-
it('should have a
|
|
1014
|
+
describe('#iapUpdateAdapterConfiguration', () => {
|
|
1015
|
+
it('should have a iapUpdateAdapterConfiguration function', (done) => {
|
|
1007
1016
|
try {
|
|
1008
|
-
assert.equal(true, typeof a.
|
|
1017
|
+
assert.equal(true, typeof a.iapUpdateAdapterConfiguration === 'function');
|
|
1009
1018
|
done();
|
|
1010
1019
|
} catch (error) {
|
|
1011
1020
|
log.error(`Test Failure: ${error}`);
|
|
@@ -1014,19 +1023,19 @@ describe('[unit] Nokia_altiplano Adapter Test', () => {
|
|
|
1014
1023
|
});
|
|
1015
1024
|
});
|
|
1016
1025
|
|
|
1017
|
-
describe('#
|
|
1018
|
-
it('should have a
|
|
1026
|
+
describe('#iapFindAdapterPath', () => {
|
|
1027
|
+
it('should have a iapFindAdapterPath function', (done) => {
|
|
1019
1028
|
try {
|
|
1020
|
-
assert.equal(true, typeof a.
|
|
1029
|
+
assert.equal(true, typeof a.iapFindAdapterPath === 'function');
|
|
1021
1030
|
done();
|
|
1022
1031
|
} catch (error) {
|
|
1023
1032
|
log.error(`Test Failure: ${error}`);
|
|
1024
1033
|
done(error);
|
|
1025
1034
|
}
|
|
1026
1035
|
});
|
|
1027
|
-
it('
|
|
1036
|
+
it('iapFindAdapterPath should find atleast one path that matches', (done) => {
|
|
1028
1037
|
try {
|
|
1029
|
-
a.
|
|
1038
|
+
a.iapFindAdapterPath('{base_path}/{version}', (data, error) => {
|
|
1030
1039
|
try {
|
|
1031
1040
|
assert.equal(undefined, error);
|
|
1032
1041
|
assert.notEqual(undefined, data);
|
|
@@ -1048,10 +1057,10 @@ describe('[unit] Nokia_altiplano Adapter Test', () => {
|
|
|
1048
1057
|
}).timeout(attemptTimeout);
|
|
1049
1058
|
});
|
|
1050
1059
|
|
|
1051
|
-
describe('#
|
|
1052
|
-
it('should have a
|
|
1060
|
+
describe('#iapSuspendAdapter', () => {
|
|
1061
|
+
it('should have a iapSuspendAdapter function', (done) => {
|
|
1053
1062
|
try {
|
|
1054
|
-
assert.equal(true, typeof a.
|
|
1063
|
+
assert.equal(true, typeof a.iapSuspendAdapter === 'function');
|
|
1055
1064
|
done();
|
|
1056
1065
|
} catch (error) {
|
|
1057
1066
|
log.error(`Test Failure: ${error}`);
|
|
@@ -1060,10 +1069,10 @@ describe('[unit] Nokia_altiplano Adapter Test', () => {
|
|
|
1060
1069
|
});
|
|
1061
1070
|
});
|
|
1062
1071
|
|
|
1063
|
-
describe('#
|
|
1064
|
-
it('should have a
|
|
1072
|
+
describe('#iapUnsuspendAdapter', () => {
|
|
1073
|
+
it('should have a iapUnsuspendAdapter function', (done) => {
|
|
1065
1074
|
try {
|
|
1066
|
-
assert.equal(true, typeof a.
|
|
1075
|
+
assert.equal(true, typeof a.iapUnsuspendAdapter === 'function');
|
|
1067
1076
|
done();
|
|
1068
1077
|
} catch (error) {
|
|
1069
1078
|
log.error(`Test Failure: ${error}`);
|
|
@@ -1072,10 +1081,10 @@ describe('[unit] Nokia_altiplano Adapter Test', () => {
|
|
|
1072
1081
|
});
|
|
1073
1082
|
});
|
|
1074
1083
|
|
|
1075
|
-
describe('#
|
|
1076
|
-
it('should have a
|
|
1084
|
+
describe('#iapGetAdapterQueue', () => {
|
|
1085
|
+
it('should have a iapGetAdapterQueue function', (done) => {
|
|
1077
1086
|
try {
|
|
1078
|
-
assert.equal(true, typeof a.
|
|
1087
|
+
assert.equal(true, typeof a.iapGetAdapterQueue === 'function');
|
|
1079
1088
|
done();
|
|
1080
1089
|
} catch (error) {
|
|
1081
1090
|
log.error(`Test Failure: ${error}`);
|
|
@@ -1084,10 +1093,10 @@ describe('[unit] Nokia_altiplano Adapter Test', () => {
|
|
|
1084
1093
|
});
|
|
1085
1094
|
});
|
|
1086
1095
|
|
|
1087
|
-
describe('#
|
|
1088
|
-
it('should have a
|
|
1096
|
+
describe('#iapTroubleshootAdapter', () => {
|
|
1097
|
+
it('should have a iapTroubleshootAdapter function', (done) => {
|
|
1089
1098
|
try {
|
|
1090
|
-
assert.equal(true, typeof a.
|
|
1099
|
+
assert.equal(true, typeof a.iapTroubleshootAdapter === 'function');
|
|
1091
1100
|
done();
|
|
1092
1101
|
} catch (error) {
|
|
1093
1102
|
log.error(`Test Failure: ${error}`);
|
|
@@ -1096,10 +1105,10 @@ describe('[unit] Nokia_altiplano Adapter Test', () => {
|
|
|
1096
1105
|
});
|
|
1097
1106
|
});
|
|
1098
1107
|
|
|
1099
|
-
describe('#
|
|
1100
|
-
it('should have a
|
|
1108
|
+
describe('#iapRunAdapterHealthcheck', () => {
|
|
1109
|
+
it('should have a iapRunAdapterHealthcheck function', (done) => {
|
|
1101
1110
|
try {
|
|
1102
|
-
assert.equal(true, typeof a.
|
|
1111
|
+
assert.equal(true, typeof a.iapRunAdapterHealthcheck === 'function');
|
|
1103
1112
|
done();
|
|
1104
1113
|
} catch (error) {
|
|
1105
1114
|
log.error(`Test Failure: ${error}`);
|
|
@@ -1108,10 +1117,10 @@ describe('[unit] Nokia_altiplano Adapter Test', () => {
|
|
|
1108
1117
|
});
|
|
1109
1118
|
});
|
|
1110
1119
|
|
|
1111
|
-
describe('#
|
|
1112
|
-
it('should have a
|
|
1120
|
+
describe('#iapRunAdapterConnectivity', () => {
|
|
1121
|
+
it('should have a iapRunAdapterConnectivity function', (done) => {
|
|
1113
1122
|
try {
|
|
1114
|
-
assert.equal(true, typeof a.
|
|
1123
|
+
assert.equal(true, typeof a.iapRunAdapterConnectivity === 'function');
|
|
1115
1124
|
done();
|
|
1116
1125
|
} catch (error) {
|
|
1117
1126
|
log.error(`Test Failure: ${error}`);
|
|
@@ -1120,10 +1129,10 @@ describe('[unit] Nokia_altiplano Adapter Test', () => {
|
|
|
1120
1129
|
});
|
|
1121
1130
|
});
|
|
1122
1131
|
|
|
1123
|
-
describe('#
|
|
1124
|
-
it('should have a
|
|
1132
|
+
describe('#iapRunAdapterBasicGet', () => {
|
|
1133
|
+
it('should have a iapRunAdapterBasicGet function', (done) => {
|
|
1125
1134
|
try {
|
|
1126
|
-
assert.equal(true, typeof a.
|
|
1135
|
+
assert.equal(true, typeof a.iapRunAdapterBasicGet === 'function');
|
|
1127
1136
|
done();
|
|
1128
1137
|
} catch (error) {
|
|
1129
1138
|
log.error(`Test Failure: ${error}`);
|
|
@@ -1132,10 +1141,10 @@ describe('[unit] Nokia_altiplano Adapter Test', () => {
|
|
|
1132
1141
|
});
|
|
1133
1142
|
});
|
|
1134
1143
|
|
|
1135
|
-
describe('#
|
|
1136
|
-
it('should have a
|
|
1144
|
+
describe('#iapMoveAdapterEntitiesToDB', () => {
|
|
1145
|
+
it('should have a iapMoveAdapterEntitiesToDB function', (done) => {
|
|
1137
1146
|
try {
|
|
1138
|
-
assert.equal(true, typeof a.
|
|
1147
|
+
assert.equal(true, typeof a.iapMoveAdapterEntitiesToDB === 'function');
|
|
1139
1148
|
done();
|
|
1140
1149
|
} catch (error) {
|
|
1141
1150
|
log.error(`Test Failure: ${error}`);
|
|
@@ -1229,10 +1238,10 @@ describe('[unit] Nokia_altiplano Adapter Test', () => {
|
|
|
1229
1238
|
}).timeout(attemptTimeout);
|
|
1230
1239
|
});
|
|
1231
1240
|
|
|
1232
|
-
// describe('#
|
|
1233
|
-
// it('should have a
|
|
1241
|
+
// describe('#iapHasAdapterEntity', () => {
|
|
1242
|
+
// it('should have a iapHasAdapterEntity function', (done) => {
|
|
1234
1243
|
// try {
|
|
1235
|
-
// assert.equal(true, typeof a.
|
|
1244
|
+
// assert.equal(true, typeof a.iapHasAdapterEntity === 'function');
|
|
1236
1245
|
// done();
|
|
1237
1246
|
// } catch (error) {
|
|
1238
1247
|
// log.error(`Test Failure: ${error}`);
|
|
@@ -1241,7 +1250,7 @@ describe('[unit] Nokia_altiplano Adapter Test', () => {
|
|
|
1241
1250
|
// });
|
|
1242
1251
|
// it('should find entity', (done) => {
|
|
1243
1252
|
// try {
|
|
1244
|
-
// a.
|
|
1253
|
+
// a.iapHasAdapterEntity('template_entity', // 'a9e9c33dc61122760072455df62663d2', (data) => {
|
|
1245
1254
|
// try {
|
|
1246
1255
|
// assert.equal(true, data[0]);
|
|
1247
1256
|
// done();
|
|
@@ -1257,7 +1266,7 @@ describe('[unit] Nokia_altiplano Adapter Test', () => {
|
|
|
1257
1266
|
// }).timeout(attemptTimeout);
|
|
1258
1267
|
// it('should not find entity', (done) => {
|
|
1259
1268
|
// try {
|
|
1260
|
-
// a.
|
|
1269
|
+
// a.iapHasAdapterEntity('template_entity', 'blah', (data) => {
|
|
1261
1270
|
// try {
|
|
1262
1271
|
// assert.equal(false, data[0]);
|
|
1263
1272
|
// done();
|
|
@@ -1285,18 +1294,6 @@ describe('[unit] Nokia_altiplano Adapter Test', () => {
|
|
|
1285
1294
|
});
|
|
1286
1295
|
});
|
|
1287
1296
|
|
|
1288
|
-
describe('#hasDevices', () => {
|
|
1289
|
-
it('should have a hasDevices function', (done) => {
|
|
1290
|
-
try {
|
|
1291
|
-
assert.equal(true, typeof a.hasDevices === 'function');
|
|
1292
|
-
done();
|
|
1293
|
-
} catch (error) {
|
|
1294
|
-
log.error(`Test Failure: ${error}`);
|
|
1295
|
-
done(error);
|
|
1296
|
-
}
|
|
1297
|
-
});
|
|
1298
|
-
});
|
|
1299
|
-
|
|
1300
1297
|
describe('#getDevice', () => {
|
|
1301
1298
|
it('should have a getDevice function', (done) => {
|
|
1302
1299
|
try {
|
|
@@ -1345,10 +1342,10 @@ describe('[unit] Nokia_altiplano Adapter Test', () => {
|
|
|
1345
1342
|
});
|
|
1346
1343
|
});
|
|
1347
1344
|
|
|
1348
|
-
describe('#
|
|
1349
|
-
it('should have a
|
|
1345
|
+
describe('#iapGetDeviceCount', () => {
|
|
1346
|
+
it('should have a iapGetDeviceCount function', (done) => {
|
|
1350
1347
|
try {
|
|
1351
|
-
assert.equal(true, typeof a.
|
|
1348
|
+
assert.equal(true, typeof a.iapGetDeviceCount === 'function');
|
|
1352
1349
|
done();
|
|
1353
1350
|
} catch (error) {
|
|
1354
1351
|
log.error(`Test Failure: ${error}`);
|
|
@@ -1846,5 +1843,373 @@ describe('[unit] Nokia_altiplano Adapter Test', () => {
|
|
|
1846
1843
|
}
|
|
1847
1844
|
}).timeout(attemptTimeout);
|
|
1848
1845
|
});
|
|
1846
|
+
|
|
1847
|
+
describe('#getIbnIntent - errors', () => {
|
|
1848
|
+
it('should have a getIbnIntent function', (done) => {
|
|
1849
|
+
try {
|
|
1850
|
+
assert.equal(true, typeof a.getIbnIntent === 'function');
|
|
1851
|
+
done();
|
|
1852
|
+
} catch (error) {
|
|
1853
|
+
log.error(`Test Failure: ${error}`);
|
|
1854
|
+
done(error);
|
|
1855
|
+
}
|
|
1856
|
+
}).timeout(attemptTimeout);
|
|
1857
|
+
it('should error if - missing intent', (done) => {
|
|
1858
|
+
try {
|
|
1859
|
+
a.getIbnIntent(null, (data, error) => {
|
|
1860
|
+
try {
|
|
1861
|
+
const displayE = 'intent is required';
|
|
1862
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-nokia_altiplano-adapter-getIbnIntent', displayE);
|
|
1863
|
+
done();
|
|
1864
|
+
} catch (err) {
|
|
1865
|
+
log.error(`Test Failure: ${err}`);
|
|
1866
|
+
done(err);
|
|
1867
|
+
}
|
|
1868
|
+
});
|
|
1869
|
+
} catch (error) {
|
|
1870
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1871
|
+
done(error);
|
|
1872
|
+
}
|
|
1873
|
+
}).timeout(attemptTimeout);
|
|
1874
|
+
});
|
|
1875
|
+
|
|
1876
|
+
describe('#modifyIbnIntent - errors', () => {
|
|
1877
|
+
it('should have a modifyIbnIntent function', (done) => {
|
|
1878
|
+
try {
|
|
1879
|
+
assert.equal(true, typeof a.modifyIbnIntent === 'function');
|
|
1880
|
+
done();
|
|
1881
|
+
} catch (error) {
|
|
1882
|
+
log.error(`Test Failure: ${error}`);
|
|
1883
|
+
done(error);
|
|
1884
|
+
}
|
|
1885
|
+
}).timeout(attemptTimeout);
|
|
1886
|
+
it('should error if - missing intent', (done) => {
|
|
1887
|
+
try {
|
|
1888
|
+
a.modifyIbnIntent(null, null, (data, error) => {
|
|
1889
|
+
try {
|
|
1890
|
+
const displayE = 'intent is required';
|
|
1891
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-nokia_altiplano-adapter-modifyIbnIntent', displayE);
|
|
1892
|
+
done();
|
|
1893
|
+
} catch (err) {
|
|
1894
|
+
log.error(`Test Failure: ${err}`);
|
|
1895
|
+
done(err);
|
|
1896
|
+
}
|
|
1897
|
+
});
|
|
1898
|
+
} catch (error) {
|
|
1899
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1900
|
+
done(error);
|
|
1901
|
+
}
|
|
1902
|
+
}).timeout(attemptTimeout);
|
|
1903
|
+
it('should error if - missing body', (done) => {
|
|
1904
|
+
try {
|
|
1905
|
+
a.modifyIbnIntent('fakeparam', null, (data, error) => {
|
|
1906
|
+
try {
|
|
1907
|
+
const displayE = 'body is required';
|
|
1908
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-nokia_altiplano-adapter-modifyIbnIntent', displayE);
|
|
1909
|
+
done();
|
|
1910
|
+
} catch (err) {
|
|
1911
|
+
log.error(`Test Failure: ${err}`);
|
|
1912
|
+
done(err);
|
|
1913
|
+
}
|
|
1914
|
+
});
|
|
1915
|
+
} catch (error) {
|
|
1916
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1917
|
+
done(error);
|
|
1918
|
+
}
|
|
1919
|
+
}).timeout(attemptTimeout);
|
|
1920
|
+
});
|
|
1921
|
+
|
|
1922
|
+
describe('#deleteIbnIntent - errors', () => {
|
|
1923
|
+
it('should have a deleteIbnIntent function', (done) => {
|
|
1924
|
+
try {
|
|
1925
|
+
assert.equal(true, typeof a.deleteIbnIntent === 'function');
|
|
1926
|
+
done();
|
|
1927
|
+
} catch (error) {
|
|
1928
|
+
log.error(`Test Failure: ${error}`);
|
|
1929
|
+
done(error);
|
|
1930
|
+
}
|
|
1931
|
+
}).timeout(attemptTimeout);
|
|
1932
|
+
it('should error if - missing intentType', (done) => {
|
|
1933
|
+
try {
|
|
1934
|
+
a.deleteIbnIntent(null, null, (data, error) => {
|
|
1935
|
+
try {
|
|
1936
|
+
const displayE = 'intentType is required';
|
|
1937
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-nokia_altiplano-adapter-deleteIbnIntent', displayE);
|
|
1938
|
+
done();
|
|
1939
|
+
} catch (err) {
|
|
1940
|
+
log.error(`Test Failure: ${err}`);
|
|
1941
|
+
done(err);
|
|
1942
|
+
}
|
|
1943
|
+
});
|
|
1944
|
+
} catch (error) {
|
|
1945
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1946
|
+
done(error);
|
|
1947
|
+
}
|
|
1948
|
+
}).timeout(attemptTimeout);
|
|
1949
|
+
it('should error if - missing target', (done) => {
|
|
1950
|
+
try {
|
|
1951
|
+
a.deleteIbnIntent('fakedata', null, (data, error) => {
|
|
1952
|
+
try {
|
|
1953
|
+
const displayE = 'target is required';
|
|
1954
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-nokia_altiplano-adapter-deleteIbnIntent', displayE);
|
|
1955
|
+
done();
|
|
1956
|
+
} catch (err) {
|
|
1957
|
+
log.error(`Test Failure: ${err}`);
|
|
1958
|
+
done(err);
|
|
1959
|
+
}
|
|
1960
|
+
});
|
|
1961
|
+
} catch (error) {
|
|
1962
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1963
|
+
done(error);
|
|
1964
|
+
}
|
|
1965
|
+
}).timeout(attemptTimeout);
|
|
1966
|
+
});
|
|
1967
|
+
|
|
1968
|
+
describe('#synchronizeIbnIntent - errors', () => {
|
|
1969
|
+
it('should have a synchronizeIbnIntent function', (done) => {
|
|
1970
|
+
try {
|
|
1971
|
+
assert.equal(true, typeof a.synchronizeIbnIntent === 'function');
|
|
1972
|
+
done();
|
|
1973
|
+
} catch (error) {
|
|
1974
|
+
log.error(`Test Failure: ${error}`);
|
|
1975
|
+
done(error);
|
|
1976
|
+
}
|
|
1977
|
+
}).timeout(attemptTimeout);
|
|
1978
|
+
it('should error if - missing intent', (done) => {
|
|
1979
|
+
try {
|
|
1980
|
+
a.synchronizeIbnIntent(null, (data, error) => {
|
|
1981
|
+
try {
|
|
1982
|
+
const displayE = 'intent is required';
|
|
1983
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-nokia_altiplano-adapter-synchronizeIbnIntent', displayE);
|
|
1984
|
+
done();
|
|
1985
|
+
} catch (err) {
|
|
1986
|
+
log.error(`Test Failure: ${err}`);
|
|
1987
|
+
done(err);
|
|
1988
|
+
}
|
|
1989
|
+
});
|
|
1990
|
+
} catch (error) {
|
|
1991
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1992
|
+
done(error);
|
|
1993
|
+
}
|
|
1994
|
+
}).timeout(attemptTimeout);
|
|
1995
|
+
});
|
|
1996
|
+
|
|
1997
|
+
describe('#auditIbnIntent - errors', () => {
|
|
1998
|
+
it('should have a auditIbnIntent function', (done) => {
|
|
1999
|
+
try {
|
|
2000
|
+
assert.equal(true, typeof a.auditIbnIntent === 'function');
|
|
2001
|
+
done();
|
|
2002
|
+
} catch (error) {
|
|
2003
|
+
log.error(`Test Failure: ${error}`);
|
|
2004
|
+
done(error);
|
|
2005
|
+
}
|
|
2006
|
+
}).timeout(attemptTimeout);
|
|
2007
|
+
it('should error if - missing intent', (done) => {
|
|
2008
|
+
try {
|
|
2009
|
+
a.auditIbnIntent(null, (data, error) => {
|
|
2010
|
+
try {
|
|
2011
|
+
const displayE = 'intent is required';
|
|
2012
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-nokia_altiplano-adapter-auditIbnIntent', displayE);
|
|
2013
|
+
done();
|
|
2014
|
+
} catch (err) {
|
|
2015
|
+
log.error(`Test Failure: ${err}`);
|
|
2016
|
+
done(err);
|
|
2017
|
+
}
|
|
2018
|
+
});
|
|
2019
|
+
} catch (error) {
|
|
2020
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2021
|
+
done(error);
|
|
2022
|
+
}
|
|
2023
|
+
}).timeout(attemptTimeout);
|
|
2024
|
+
});
|
|
2025
|
+
|
|
2026
|
+
describe('#getEntityOntView - errors', () => {
|
|
2027
|
+
it('should have a getEntityOntView function', (done) => {
|
|
2028
|
+
try {
|
|
2029
|
+
assert.equal(true, typeof a.getEntityOntView === 'function');
|
|
2030
|
+
done();
|
|
2031
|
+
} catch (error) {
|
|
2032
|
+
log.error(`Test Failure: ${error}`);
|
|
2033
|
+
done(error);
|
|
2034
|
+
}
|
|
2035
|
+
}).timeout(attemptTimeout);
|
|
2036
|
+
it('should error if - missing isamVer', (done) => {
|
|
2037
|
+
try {
|
|
2038
|
+
a.getEntityOntView(null, null, null, null, null, (data, error) => {
|
|
2039
|
+
try {
|
|
2040
|
+
const displayE = 'isamVer is required';
|
|
2041
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-nokia_altiplano-adapter-getEntityOntView', displayE);
|
|
2042
|
+
done();
|
|
2043
|
+
} catch (err) {
|
|
2044
|
+
log.error(`Test Failure: ${err}`);
|
|
2045
|
+
done(err);
|
|
2046
|
+
}
|
|
2047
|
+
});
|
|
2048
|
+
} catch (error) {
|
|
2049
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2050
|
+
done(error);
|
|
2051
|
+
}
|
|
2052
|
+
}).timeout(attemptTimeout);
|
|
2053
|
+
it('should error if - missing shelfName', (done) => {
|
|
2054
|
+
try {
|
|
2055
|
+
a.getEntityOntView('fakedata', null, null, null, null, (data, error) => {
|
|
2056
|
+
try {
|
|
2057
|
+
const displayE = 'shelfName is required';
|
|
2058
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-nokia_altiplano-adapter-getEntityOntView', displayE);
|
|
2059
|
+
done();
|
|
2060
|
+
} catch (err) {
|
|
2061
|
+
log.error(`Test Failure: ${err}`);
|
|
2062
|
+
done(err);
|
|
2063
|
+
}
|
|
2064
|
+
});
|
|
2065
|
+
} catch (error) {
|
|
2066
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2067
|
+
done(error);
|
|
2068
|
+
}
|
|
2069
|
+
}).timeout(attemptTimeout);
|
|
2070
|
+
it('should error if - missing demark', (done) => {
|
|
2071
|
+
try {
|
|
2072
|
+
a.getEntityOntView('fakedata', 'fakedata', null, null, null, (data, error) => {
|
|
2073
|
+
try {
|
|
2074
|
+
const displayE = 'demark is required';
|
|
2075
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-nokia_altiplano-adapter-getEntityOntView', displayE);
|
|
2076
|
+
done();
|
|
2077
|
+
} catch (err) {
|
|
2078
|
+
log.error(`Test Failure: ${err}`);
|
|
2079
|
+
done(err);
|
|
2080
|
+
}
|
|
2081
|
+
});
|
|
2082
|
+
} catch (error) {
|
|
2083
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2084
|
+
done(error);
|
|
2085
|
+
}
|
|
2086
|
+
}).timeout(attemptTimeout);
|
|
2087
|
+
});
|
|
2088
|
+
|
|
2089
|
+
describe('#getEntityOntPort - errors', () => {
|
|
2090
|
+
it('should have a getEntityOntPort function', (done) => {
|
|
2091
|
+
try {
|
|
2092
|
+
assert.equal(true, typeof a.getEntityOntPort === 'function');
|
|
2093
|
+
done();
|
|
2094
|
+
} catch (error) {
|
|
2095
|
+
log.error(`Test Failure: ${error}`);
|
|
2096
|
+
done(error);
|
|
2097
|
+
}
|
|
2098
|
+
}).timeout(attemptTimeout);
|
|
2099
|
+
it('should error if - missing isamVer', (done) => {
|
|
2100
|
+
try {
|
|
2101
|
+
a.getEntityOntPort(null, null, null, null, null, (data, error) => {
|
|
2102
|
+
try {
|
|
2103
|
+
const displayE = 'isamVer is required';
|
|
2104
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-nokia_altiplano-adapter-getEntityOntPort', displayE);
|
|
2105
|
+
done();
|
|
2106
|
+
} catch (err) {
|
|
2107
|
+
log.error(`Test Failure: ${err}`);
|
|
2108
|
+
done(err);
|
|
2109
|
+
}
|
|
2110
|
+
});
|
|
2111
|
+
} catch (error) {
|
|
2112
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2113
|
+
done(error);
|
|
2114
|
+
}
|
|
2115
|
+
}).timeout(attemptTimeout);
|
|
2116
|
+
it('should error if - missing shelfName', (done) => {
|
|
2117
|
+
try {
|
|
2118
|
+
a.getEntityOntPort('fakedata', null, null, null, null, (data, error) => {
|
|
2119
|
+
try {
|
|
2120
|
+
const displayE = 'shelfName is required';
|
|
2121
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-nokia_altiplano-adapter-getEntityOntPort', displayE);
|
|
2122
|
+
done();
|
|
2123
|
+
} catch (err) {
|
|
2124
|
+
log.error(`Test Failure: ${err}`);
|
|
2125
|
+
done(err);
|
|
2126
|
+
}
|
|
2127
|
+
});
|
|
2128
|
+
} catch (error) {
|
|
2129
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2130
|
+
done(error);
|
|
2131
|
+
}
|
|
2132
|
+
}).timeout(attemptTimeout);
|
|
2133
|
+
it('should error if - missing demark', (done) => {
|
|
2134
|
+
try {
|
|
2135
|
+
a.getEntityOntPort('fakedata', 'fakedata', null, null, null, (data, error) => {
|
|
2136
|
+
try {
|
|
2137
|
+
const displayE = 'demark is required';
|
|
2138
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-nokia_altiplano-adapter-getEntityOntPort', displayE);
|
|
2139
|
+
done();
|
|
2140
|
+
} catch (err) {
|
|
2141
|
+
log.error(`Test Failure: ${err}`);
|
|
2142
|
+
done(err);
|
|
2143
|
+
}
|
|
2144
|
+
});
|
|
2145
|
+
} catch (error) {
|
|
2146
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2147
|
+
done(error);
|
|
2148
|
+
}
|
|
2149
|
+
}).timeout(attemptTimeout);
|
|
2150
|
+
});
|
|
2151
|
+
|
|
2152
|
+
describe('#getEntityOntVlanAssociation - errors', () => {
|
|
2153
|
+
it('should have a getEntityOntVlanAssociation function', (done) => {
|
|
2154
|
+
try {
|
|
2155
|
+
assert.equal(true, typeof a.getEntityOntVlanAssociation === 'function');
|
|
2156
|
+
done();
|
|
2157
|
+
} catch (error) {
|
|
2158
|
+
log.error(`Test Failure: ${error}`);
|
|
2159
|
+
done(error);
|
|
2160
|
+
}
|
|
2161
|
+
}).timeout(attemptTimeout);
|
|
2162
|
+
it('should error if - missing isamVer', (done) => {
|
|
2163
|
+
try {
|
|
2164
|
+
a.getEntityOntVlanAssociation(null, null, null, null, null, (data, error) => {
|
|
2165
|
+
try {
|
|
2166
|
+
const displayE = 'isamVer is required';
|
|
2167
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-nokia_altiplano-adapter-getEntityOntVlanAssociation', displayE);
|
|
2168
|
+
done();
|
|
2169
|
+
} catch (err) {
|
|
2170
|
+
log.error(`Test Failure: ${err}`);
|
|
2171
|
+
done(err);
|
|
2172
|
+
}
|
|
2173
|
+
});
|
|
2174
|
+
} catch (error) {
|
|
2175
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2176
|
+
done(error);
|
|
2177
|
+
}
|
|
2178
|
+
}).timeout(attemptTimeout);
|
|
2179
|
+
it('should error if - missing shelfName', (done) => {
|
|
2180
|
+
try {
|
|
2181
|
+
a.getEntityOntVlanAssociation('fakedata', null, null, null, null, (data, error) => {
|
|
2182
|
+
try {
|
|
2183
|
+
const displayE = 'shelfName is required';
|
|
2184
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-nokia_altiplano-adapter-getEntityOntVlanAssociation', displayE);
|
|
2185
|
+
done();
|
|
2186
|
+
} catch (err) {
|
|
2187
|
+
log.error(`Test Failure: ${err}`);
|
|
2188
|
+
done(err);
|
|
2189
|
+
}
|
|
2190
|
+
});
|
|
2191
|
+
} catch (error) {
|
|
2192
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2193
|
+
done(error);
|
|
2194
|
+
}
|
|
2195
|
+
}).timeout(attemptTimeout);
|
|
2196
|
+
it('should error if - missing vlanAssociation', (done) => {
|
|
2197
|
+
try {
|
|
2198
|
+
a.getEntityOntVlanAssociation('fakedata', 'fakedata', null, null, null, (data, error) => {
|
|
2199
|
+
try {
|
|
2200
|
+
const displayE = 'vlanAssociation is required';
|
|
2201
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-nokia_altiplano-adapter-getEntityOntVlanAssociation', displayE);
|
|
2202
|
+
done();
|
|
2203
|
+
} catch (err) {
|
|
2204
|
+
log.error(`Test Failure: ${err}`);
|
|
2205
|
+
done(err);
|
|
2206
|
+
}
|
|
2207
|
+
});
|
|
2208
|
+
} catch (error) {
|
|
2209
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2210
|
+
done(error);
|
|
2211
|
+
}
|
|
2212
|
+
}).timeout(attemptTimeout);
|
|
2213
|
+
});
|
|
1849
2214
|
});
|
|
1850
2215
|
});
|