n8n-nodes-arubacentral
Version:
n8n community node for Aruba Central API integration with comprehensive monitoring, configuration, and management capabilities
51 lines (50 loc) • 2.15 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.monitoringOperations = void 0;
exports.hasOperation = hasOperation;
const ap_methods_1 = require("./ap/ap.methods");
const client_methods_1 = require("./client/client.methods");
const site_methods_1 = require("./site/site.methods");
const events_methods_1 = require("./events/events.methods");
const switch_methods_1 = require("./switch/switch.methods");
const gateway_methods_1 = require("./gateway/gateway.methods");
const label_methods_1 = require("./label/label.methods");
const mobilitycontroller_methods_1 = require("./mobilitycontroller/mobilitycontroller.methods");
const network_methods_1 = require("./network/network.methods");
const swarm_methods_1 = require("./swarm/swarm.methods");
const vpn_methods_1 = require("./vpn/vpn.methods");
const logger_1 = require("../../helpers/logger");
/**
* Operations available in the monitoring domain
*/
exports.monitoringOperations = {
ap: ap_methods_1.apOperations,
client: client_methods_1.clientOperations,
events: events_methods_1.eventsOperations,
gateway: gateway_methods_1.gatewayOperations,
label: label_methods_1.labelOperations,
mobilitycontroller: mobilitycontroller_methods_1.mobilitycontrollerOperations,
network: network_methods_1.networkOperations,
site: site_methods_1.siteOperations,
swarm: swarm_methods_1.swarmOperations,
switch: switch_methods_1.switchOperations,
vpn: vpn_methods_1.vpnOperations,
};
/**
* Check if an operation exists in the monitoring domain
*
* @param resource Resource name (ap, client, switch, etc.)
* @param operation Operation name
* @returns boolean indicating if the operation exists
*/
function hasOperation(resource, operation) {
if (!exports.monitoringOperations[resource]) {
logger_1.logger.debug('monitoring:check', `Resource "${resource}" not found`);
return false;
}
if (!exports.monitoringOperations[resource][operation]) {
logger_1.logger.debug('monitoring:check', `Operation "${operation}" not found in resource "${resource}"`);
return false;
}
return true;
}