@itentialopensource/adapter-viptela 0.8.0 → 0.10.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.
- package/CHANGELOG.md +24 -0
- package/ENHANCE.md +69 -0
- package/PROPERTIES.md +247 -0
- package/README.md +113 -470
- package/SUMMARY.md +9 -0
- package/TROUBLESHOOT.md +46 -0
- package/adapter.js +33515 -61
- package/adapterBase.js +581 -279
- package/entities/.generic/action.json +5 -5
- package/entities/AdministrationAuditLog/action.json +252 -0
- package/entities/AdministrationAuditLog/schema.json +30 -0
- package/entities/AdministrationUserAndGroup/action.json +533 -0
- package/entities/AdministrationUserAndGroup/mockdatafiles/findUserGroups-default.json +4 -0
- package/entities/AdministrationUserAndGroup/mockdatafiles/findUserGroupsAsKeyValue-default.json +5 -0
- package/entities/AdministrationUserAndGroup/mockdatafiles/findUsers-default.json +3 -0
- package/entities/AdministrationUserAndGroup/mockdatafiles/getColoGroups-default.json +6 -0
- package/entities/AdministrationUserAndGroup/mockdatafiles/getVpnGroups-default.json +5 -0
- package/entities/AdministrationUserAndGroup/schema.json +44 -0
- package/entities/CertificateManagementDevice/action.json +517 -0
- package/entities/CertificateManagementDevice/mockdatafiles/getRootCertChains-default.json +3 -0
- package/entities/CertificateManagementDevice/schema.json +43 -0
- package/entities/ClusterManagement/action.json +477 -0
- package/entities/ClusterManagement/mockdatafiles/getConfiguredIPList-default.json +5 -0
- package/entities/ClusterManagement/mockdatafiles/getConnectedDevices-default.json +3 -0
- package/entities/ClusterManagement/mockdatafiles/getConnectedDevicesPerTenant-default.json +3 -0
- package/entities/ClusterManagement/mockdatafiles/getTenantsList-default.json +4 -0
- package/entities/ClusterManagement/mockdatafiles/listVmanages-default.json +4 -0
- package/entities/ClusterManagement/schema.json +41 -0
- package/entities/ColocationCluster/action.json +229 -0
- package/entities/ColocationCluster/schema.json +29 -0
- package/entities/ColocationServiceChain/action.json +86 -0
- package/entities/ColocationServiceChain/mockdatafiles/getEdgeDevices-default.json +5 -0
- package/entities/ColocationServiceChain/mockdatafiles/getpnfDevices-default.json +5 -0
- package/entities/ColocationServiceChain/schema.json +22 -0
- package/entities/ColocationServiceGroup/action.json +148 -0
- package/entities/ColocationServiceGroup/mockdatafiles/getAvailableChains-default.json +6 -0
- package/entities/ColocationServiceGroup/schema.json +25 -0
- package/entities/ConfigurationDisasterRecovery/action.json +696 -0
- package/entities/ConfigurationDisasterRecovery/mockdatafiles/downloadReplicationData-default.json +5 -0
- package/entities/ConfigurationDisasterRecovery/mockdatafiles/getDisasterRecoveryStatus-default.json +6 -0
- package/entities/ConfigurationDisasterRecovery/mockdatafiles/getLocalDataCenterState-default.json +6 -0
- package/entities/ConfigurationDisasterRecovery/mockdatafiles/getReachabilityInfo-default.json +5 -0
- package/entities/ConfigurationDisasterRecovery/mockdatafiles/getRemoteDCMembersState-default.json +3 -0
- package/entities/ConfigurationDisasterRecovery/mockdatafiles/getRemoteDataCenterState-default.json +6 -0
- package/entities/ConfigurationDisasterRecovery/schema.json +52 -0
- package/entities/ConfigurationFeatureList/action.json +46 -0
- package/entities/ConfigurationFeatureList/schema.json +20 -0
- package/entities/CreateABackupSnapshot/action.json +24 -0
- package/entities/CreateABackupSnapshot/schema.json +19 -0
- package/entities/DataCollectionAgent/action.json +470 -0
- package/entities/DataCollectionAgent/mockdatafiles/getTemplatePolicyDefinitionsDCA-default.json +5 -0
- package/entities/DataCollectionAgent/mockdatafiles/getVPNListsDCA-default.json +3 -0
- package/entities/DataCollectionAgent/mockdatafiles/getVedgeTemplateListDCA-default.json +6 -0
- package/entities/DataCollectionAgent/mockdatafiles/getVsmartTemplateListDCA-default.json +5 -0
- package/entities/DataCollectionAgent/mockdatafiles/listAllDevicesDCA-default.json +5 -0
- package/entities/DataCollectionAgent/schema.json +41 -0
- package/entities/DeviceActions/action.json +243 -0
- package/entities/DeviceActions/mockdatafiles/generateSecurityDevicesList-default.json +5 -0
- package/entities/DeviceActions/schema.json +13 -1
- package/entities/DeviceConfigHistory/action.json +294 -0
- package/entities/DeviceConfigHistory/schema.json +32 -0
- package/entities/MonitoringAlarmsDetails/action.json +684 -0
- package/entities/MonitoringAlarmsDetails/mockdatafiles/listDisabledAlarm-default.json +5 -0
- package/entities/MonitoringAlarmsDetails/schema.json +51 -0
- package/entities/MonitoringColocationCluster/action.json +360 -0
- package/entities/MonitoringColocationCluster/mockdatafiles/getClusterConfigByClusterId-default.json +3 -0
- package/entities/MonitoringColocationCluster/mockdatafiles/getClusterPortMappingByClusterId-default.json +3 -0
- package/entities/MonitoringColocationCluster/mockdatafiles/getPNFConfig-default.json +3 -0
- package/entities/MonitoringColocationCluster/mockdatafiles/getServiceGroupByClusterId-default.json +3 -0
- package/entities/MonitoringColocationCluster/mockdatafiles/getSystemStatusByDeviceId-default.json +6 -0
- package/entities/MonitoringColocationCluster/mockdatafiles/getVNFAlarmCount-default.json +6 -0
- package/entities/MonitoringColocationCluster/mockdatafiles/getVNFEventsCountDetail-default.json +4 -0
- package/entities/MonitoringColocationCluster/mockdatafiles/getVNFEventsDetail-default.json +3 -0
- package/entities/MonitoringColocationCluster/mockdatafiles/getVNFInterfaceDetail-default.json +3 -0
- package/entities/MonitoringColocationCluster/mockdatafiles/getpnfDetails-default.json +5 -0
- package/entities/MonitoringColocationCluster/mockdatafiles/getvnfByDeviceId-default.json +4 -0
- package/entities/MonitoringColocationCluster/mockdatafiles/listNetworkFunctionMap-default.json +3 -0
- package/entities/MonitoringColocationCluster/schema.json +35 -0
- package/entities/MonitoringDeviceDetails/action.json +40 -0
- package/entities/MonitoringDeviceDetails/schema.json +3 -1
- package/entities/MonitoringDeviceStatisticsDetails/action.json +109 -0
- package/entities/MonitoringDeviceStatisticsDetails/mockdatafiles/generateDeviceStatisticsData-default.json +3 -0
- package/entities/MonitoringDeviceStatisticsDetails/mockdatafiles/getActiveAlarms-default.json +5 -0
- package/entities/MonitoringDeviceStatisticsDetails/mockdatafiles/getStatDataFieldsByStateDataType-default.json +6 -0
- package/entities/MonitoringDeviceStatisticsDetails/mockdatafiles/getStatisticsType-default.json +4 -0
- package/entities/MonitoringDeviceStatisticsDetails/schema.json +23 -0
- package/entities/MonitoringEvents/action.json +378 -0
- package/entities/MonitoringEvents/mockdatafiles/getComponentsAsKeyValue-default.json +4 -0
- package/entities/MonitoringEvents/mockdatafiles/getEventTypesAsKeyValue-default.json +3 -0
- package/entities/MonitoringEvents/schema.json +36 -0
- package/entities/RealTimeMonitoringAAA/action.json +109 -0
- package/entities/RealTimeMonitoringAAA/mockdatafiles/getAllDeviceUsers-default.json +5 -0
- package/entities/RealTimeMonitoringAAA/mockdatafiles/getUsersFromDevice-default.json +6 -0
- package/entities/RealTimeMonitoringAAA/schema.json +23 -0
- package/entities/SSLProxyCertificateManagementDevice/action.json +494 -0
- package/entities/SSLProxyCertificateManagementDevice/mockdatafiles/getSslProxyList-default.json +4 -0
- package/entities/SSLProxyCertificateManagementDevice/schema.json +42 -0
- package/entities/ScheduledBackupRestore/action.json +189 -0
- package/entities/ScheduledBackupRestore/schema.json +27 -0
- package/entities/SystemCloudService/action.json +313 -0
- package/entities/SystemCloudService/schema.json +33 -0
- package/entities/SystemContainer/action.json +189 -0
- package/entities/SystemContainer/mockdatafiles/getCustomApp-default.json +3 -0
- package/entities/SystemContainer/schema.json +27 -0
- package/entities/TroubleshootingToolsDashboard/action.json +128 -0
- package/entities/TroubleshootingToolsDashboard/schema.json +24 -0
- package/entities/TroubleshootingToolsDeviceConnectivity/action.json +288 -0
- package/entities/TroubleshootingToolsDeviceConnectivity/schema.json +32 -0
- package/entities/TroubleshootingToolsDeviceSoftwarePackage/action.json +85 -0
- package/entities/TroubleshootingToolsDeviceSoftwarePackage/schema.json +22 -0
- package/entities/TroubleshootingToolsDeviceSoftwareUpdate/action.json +86 -0
- package/entities/TroubleshootingToolsDeviceSoftwareUpdate/schema.json +22 -0
- package/entities/TroubleshootingToolsDiagnostics/action.json +977 -0
- package/entities/TroubleshootingToolsDiagnostics/schema.json +65 -0
- package/entities/TroubleshootingToolsSoftwareActions/action.json +232 -0
- package/entities/TroubleshootingToolsSoftwareActions/mockdatafiles/findSoftwareImages-default.json +6 -0
- package/entities/TroubleshootingToolsSoftwareActions/mockdatafiles/findSoftwareImagesWithFilters-default.json +5 -0
- package/entities/TroubleshootingToolsSoftwareActions/schema.json +29 -0
- package/error.json +12 -0
- package/package.json +19 -14
- package/pronghorn.json +14062 -90
- package/propertiesDecorators.json +14 -0
- package/propertiesSchema.json +369 -0
- package/refs?service=git-upload-pack +0 -0
- package/report/updateReport1642735010496.json +95 -0
- package/report/updateReport1651360586947.json +114 -0
- package/sampleProperties.json +16 -4
- package/test/integration/adapterTestBasicGet.js +1 -1
- package/test/integration/adapterTestIntegration.js +13175 -5
- package/test/unit/adapterBaseTestUnit.js +29 -27
- package/test/unit/adapterTestUnit.js +8633 -15
- package/utils/addAuth.js +94 -0
- package/utils/basicGet.js +1 -14
- package/utils/entitiesToDB.js +224 -0
- package/utils/modify.js +4 -4
- package/utils/packModificationScript.js +1 -1
- package/utils/patches2bundledDeps.js +90 -0
- package/utils/removeHooks.js +20 -0
- package/utils/tbScript.js +14 -8
- package/utils/tbUtils.js +111 -19
- package/utils/troubleshootingAdapter.js +2 -26
|
@@ -61,11 +61,15 @@ global.pronghornProps = {
|
|
|
61
61
|
token_cache: 'local',
|
|
62
62
|
auth_field: 'header.headers.Authorization',
|
|
63
63
|
auth_field_format: 'Basic {b64}{username}:{password}{/b64}',
|
|
64
|
-
auth_logging: false
|
|
64
|
+
auth_logging: false,
|
|
65
|
+
client_id: '',
|
|
66
|
+
client_secret: '',
|
|
67
|
+
grant_type: ''
|
|
65
68
|
},
|
|
66
69
|
healthcheck: {
|
|
67
70
|
type: 'none',
|
|
68
|
-
frequency: 60000
|
|
71
|
+
frequency: 60000,
|
|
72
|
+
query_object: {}
|
|
69
73
|
},
|
|
70
74
|
throttle: {
|
|
71
75
|
throttle_enabled: false,
|
|
@@ -193,7 +197,7 @@ function runErrorAsserts(data, error, code, origin, displayStr) {
|
|
|
193
197
|
}
|
|
194
198
|
|
|
195
199
|
// require the adapter that we are going to be using
|
|
196
|
-
const AdapterBase = require('../../adapterBase
|
|
200
|
+
const AdapterBase = require('../../adapterBase');
|
|
197
201
|
|
|
198
202
|
// delete the .DS_Store directory in entities -- otherwise this will cause errors
|
|
199
203
|
const dirPath = path.join(__dirname, '../../entities/.DS_Store');
|
|
@@ -313,8 +317,8 @@ describe('[unit] Adapter Base Test', () => {
|
|
|
313
317
|
});
|
|
314
318
|
it('should return a list of functions', (done) => {
|
|
315
319
|
const returnedFunctions = ['addEntityCache', 'capabilityResults', 'checkActionFiles', 'checkProperties', 'connect', 'encryptProperty',
|
|
316
|
-
'entityInList', '
|
|
317
|
-
'
|
|
320
|
+
'entityInList', 'getAllCapabilities', 'getAllFunctions', 'healthCheck', 'iapFindAdapterPath', 'iapGetAdapterQueue', 'iapGetAdapterWorkflowFunctions', 'iapMakeBrokerCall', 'iapMoveAdapterEntitiesToDB',
|
|
321
|
+
'iapRunAdapterBasicGet', 'iapRunAdapterConnectivity', 'iapRunAdapterHealthcheck', 'iapSuspendAdapter', 'iapTroubleshootAdapter', 'iapUnsuspendAdapter', 'iapUpdateAdapterConfiguration', 'refreshProperties', 'addListener',
|
|
318
322
|
'emit', 'eventNames', 'getMaxListeners', 'listenerCount', 'listeners', 'off', 'on', 'once', 'prependListener',
|
|
319
323
|
'prependOnceListener', 'rawListeners', 'removeAllListeners', 'removeListener', 'setMaxListeners'];
|
|
320
324
|
try {
|
|
@@ -333,10 +337,10 @@ describe('[unit] Adapter Base Test', () => {
|
|
|
333
337
|
}).timeout(attemptTimeout);
|
|
334
338
|
});
|
|
335
339
|
|
|
336
|
-
describe('#
|
|
337
|
-
it('should have a
|
|
340
|
+
describe('#iapGetAdapterWorkflowFunctions', () => {
|
|
341
|
+
it('should have a iapGetAdapterWorkflowFunctions function', (done) => {
|
|
338
342
|
try {
|
|
339
|
-
assert.equal(true, typeof a.
|
|
343
|
+
assert.equal(true, typeof a.iapGetAdapterWorkflowFunctions === 'function');
|
|
340
344
|
done();
|
|
341
345
|
} catch (error) {
|
|
342
346
|
log.error(`Test Failure: ${error}`);
|
|
@@ -345,7 +349,7 @@ describe('[unit] Adapter Base Test', () => {
|
|
|
345
349
|
});
|
|
346
350
|
it('should retrieve workflow functions', (done) => {
|
|
347
351
|
try {
|
|
348
|
-
const expectedFunctions = a.
|
|
352
|
+
const expectedFunctions = a.iapGetAdapterWorkflowFunctions([]);
|
|
349
353
|
try {
|
|
350
354
|
assert.equal(0, expectedFunctions.length);
|
|
351
355
|
done();
|
|
@@ -422,10 +426,10 @@ describe('[unit] Adapter Base Test', () => {
|
|
|
422
426
|
}).timeout(attemptTimeout);
|
|
423
427
|
});
|
|
424
428
|
|
|
425
|
-
describe('#
|
|
426
|
-
it('should have a
|
|
429
|
+
describe('#iapGetAdapterQueue', () => {
|
|
430
|
+
it('should have a iapGetAdapterQueue function', (done) => {
|
|
427
431
|
try {
|
|
428
|
-
assert.equal(true, typeof a.
|
|
432
|
+
assert.equal(true, typeof a.iapGetAdapterQueue === 'function');
|
|
429
433
|
done();
|
|
430
434
|
} catch (error) {
|
|
431
435
|
log.error(`Test Failure: ${error}`);
|
|
@@ -434,7 +438,7 @@ describe('[unit] Adapter Base Test', () => {
|
|
|
434
438
|
});
|
|
435
439
|
it('should get information for all of the requests currently in the queue', (done) => {
|
|
436
440
|
try {
|
|
437
|
-
const expectedFunctions = a.
|
|
441
|
+
const expectedFunctions = a.iapGetAdapterQueue();
|
|
438
442
|
try {
|
|
439
443
|
assert.equal(0, expectedFunctions.length);
|
|
440
444
|
done();
|
|
@@ -839,12 +843,10 @@ describe('[unit] Adapter Base Test', () => {
|
|
|
839
843
|
}).timeout(attemptTimeout);
|
|
840
844
|
});
|
|
841
845
|
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
describe('#updateAdapterConfiguration', () => {
|
|
845
|
-
it('should have a updateAdapterConfiguration function', (done) => {
|
|
846
|
+
describe('#iapUpdateAdapterConfiguration', () => {
|
|
847
|
+
it('should have a iapUpdateAdapterConfiguration function', (done) => {
|
|
846
848
|
try {
|
|
847
|
-
assert.equal(true, typeof a.
|
|
849
|
+
assert.equal(true, typeof a.iapUpdateAdapterConfiguration === 'function');
|
|
848
850
|
done();
|
|
849
851
|
} catch (error) {
|
|
850
852
|
log.error(`Test Failure: ${error}`);
|
|
@@ -853,7 +855,7 @@ describe('[unit] Adapter Base Test', () => {
|
|
|
853
855
|
});
|
|
854
856
|
it('should return no updated if no changes are provided', (done) => {
|
|
855
857
|
try {
|
|
856
|
-
a.
|
|
858
|
+
a.iapUpdateAdapterConfiguration(null, null, null, null, null, (data, error) => {
|
|
857
859
|
try {
|
|
858
860
|
assert.equal('No configuration updates to make', data.response);
|
|
859
861
|
done();
|
|
@@ -869,10 +871,10 @@ describe('[unit] Adapter Base Test', () => {
|
|
|
869
871
|
}).timeout(attemptTimeout);
|
|
870
872
|
it('should throw an error if missing configuration file', (done) => {
|
|
871
873
|
try {
|
|
872
|
-
a.
|
|
874
|
+
a.iapUpdateAdapterConfiguration(null, { name: 'fakeChange' }, null, null, null, (data, error) => {
|
|
873
875
|
try {
|
|
874
876
|
const displayE = 'configFile is required';
|
|
875
|
-
runErrorAsserts(data, error, 'AD.300', 'Test-Base-adapterBase-
|
|
877
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-Base-adapterBase-iapUpdateAdapterConfiguration', displayE);
|
|
876
878
|
done();
|
|
877
879
|
} catch (err) {
|
|
878
880
|
log.error(`Test Failure: ${err}`);
|
|
@@ -886,10 +888,10 @@ describe('[unit] Adapter Base Test', () => {
|
|
|
886
888
|
}).timeout(attemptTimeout);
|
|
887
889
|
it('if not package.json, entity is required', (done) => {
|
|
888
890
|
try {
|
|
889
|
-
a.
|
|
891
|
+
a.iapUpdateAdapterConfiguration('notPackage', { name: 'fakeChange' }, null, null, null, (data, error) => {
|
|
890
892
|
try {
|
|
891
893
|
const displayE = 'Unsupported Configuration Change or Missing Entity';
|
|
892
|
-
runErrorAsserts(data, error, 'AD.999', 'Test-Base-adapterBase-
|
|
894
|
+
runErrorAsserts(data, error, 'AD.999', 'Test-Base-adapterBase-iapUpdateAdapterConfiguration', displayE);
|
|
893
895
|
done();
|
|
894
896
|
} catch (err) {
|
|
895
897
|
log.error(`Test Failure: ${err}`);
|
|
@@ -903,10 +905,10 @@ describe('[unit] Adapter Base Test', () => {
|
|
|
903
905
|
}).timeout(attemptTimeout);
|
|
904
906
|
it('if not package.json, type is required', (done) => {
|
|
905
907
|
try {
|
|
906
|
-
a.
|
|
908
|
+
a.iapUpdateAdapterConfiguration('notPackage', { name: 'fakeChange' }, 'entity', null, null, (data, error) => {
|
|
907
909
|
try {
|
|
908
910
|
const displayE = 'type is required';
|
|
909
|
-
runErrorAsserts(data, error, 'AD.300', 'Test-Base-adapterBase-
|
|
911
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-Base-adapterBase-iapUpdateAdapterConfiguration', displayE);
|
|
910
912
|
done();
|
|
911
913
|
} catch (err) {
|
|
912
914
|
log.error(`Test Failure: ${err}`);
|
|
@@ -920,10 +922,10 @@ describe('[unit] Adapter Base Test', () => {
|
|
|
920
922
|
}).timeout(attemptTimeout);
|
|
921
923
|
it('if not package.json, entity must be valid', (done) => {
|
|
922
924
|
try {
|
|
923
|
-
a.
|
|
925
|
+
a.iapUpdateAdapterConfiguration('notPackage', { name: 'fakeChange' }, 'fakeEntity', 'fakeType', null, (data, error) => {
|
|
924
926
|
try {
|
|
925
927
|
const displayE = 'Incomplete Configuration Change: Invalid Entity - fakeEntity';
|
|
926
|
-
runErrorAsserts(data, error, 'AD.999', 'Test-Base-adapterBase-
|
|
928
|
+
runErrorAsserts(data, error, 'AD.999', 'Test-Base-adapterBase-iapUpdateAdapterConfiguration', displayE);
|
|
927
929
|
done();
|
|
928
930
|
} catch (err) {
|
|
929
931
|
log.error(`Test Failure: ${err}`);
|