@itentialopensource/adapter-viptela 0.9.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 +8 -0
- package/ENHANCE.md +69 -0
- package/PROPERTIES.md +247 -0
- package/README.md +112 -542
- package/SUMMARY.md +9 -0
- package/TROUBLESHOOT.md +46 -0
- package/adapter.js +34555 -1569
- package/adapterBase.js +548 -283
- 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 +6 -0
- package/package.json +3 -3
- package/pronghorn.json +13893 -113
- package/propertiesDecorators.json +14 -0
- package/propertiesSchema.json +350 -0
- package/refs?service=git-upload-pack +0 -0
- package/report/updateReport1651360586947.json +114 -0
- package/test/integration/adapterTestIntegration.js +13161 -0
- package/test/unit/adapterBaseTestUnit.js +22 -24
- package/test/unit/adapterTestUnit.js +8053 -51
- package/utils/tbUtils.js +20 -7
package/utils/tbUtils.js
CHANGED
|
@@ -352,13 +352,7 @@ module.exports = {
|
|
|
352
352
|
|
|
353
353
|
// get database connection and existing adapter config
|
|
354
354
|
getAdapterConfig: async function getAdapterConfig() {
|
|
355
|
-
const
|
|
356
|
-
let iapDir;
|
|
357
|
-
if (this.withinIAP(newDirname)) { // when this script is called from IAP
|
|
358
|
-
iapDir = newDirname;
|
|
359
|
-
} else {
|
|
360
|
-
iapDir = path.join(this.getDirname(), 'utils', '../../../../');
|
|
361
|
-
}
|
|
355
|
+
const iapDir = this.getIAPHome();
|
|
362
356
|
const pronghornProps = this.getPronghornProps(iapDir);
|
|
363
357
|
console.log('Connecting to Database...');
|
|
364
358
|
const database = await this.connect(iapDir, pronghornProps);
|
|
@@ -434,6 +428,25 @@ module.exports = {
|
|
|
434
428
|
return stdout.trim();
|
|
435
429
|
},
|
|
436
430
|
|
|
431
|
+
/**
|
|
432
|
+
* @summary Obtain the IAP installation directory depending on how adapter is used:
|
|
433
|
+
* by IAP, or by npm run CLI interface
|
|
434
|
+
* @returns IAP installation directory
|
|
435
|
+
* @function getIAPHome
|
|
436
|
+
*/
|
|
437
|
+
getIAPHome: function getIAPHome() {
|
|
438
|
+
// if adapter started via IAP, use path injected by core
|
|
439
|
+
if (process.env.iap_home) return process.env.iap_home;
|
|
440
|
+
// adapter started via CLI `npm run <command>` so we have to be located under
|
|
441
|
+
// <IAP_HOME>/node_modules/@itentialopensource/<adapter>/ directory,
|
|
442
|
+
// use `pwd` command wihout option -P(resolving symlinks) https://linux.die.net/man/1/pwd
|
|
443
|
+
const { stdout } = this.systemSync('pwd', true);
|
|
444
|
+
if (stdout.indexOf('/node_modules') >= 0) {
|
|
445
|
+
return stdout.trim().split('/node_modules')[0];
|
|
446
|
+
}
|
|
447
|
+
return path.join(stdout.trim(), '../../../');
|
|
448
|
+
},
|
|
449
|
+
|
|
437
450
|
/**
|
|
438
451
|
* @summary connect to mongodb
|
|
439
452
|
*
|