n8n-nodes-arubacentral
Version:
n8n community node for Aruba Central API integration with comprehensive monitoring, configuration, and management capabilities
252 lines (248 loc) • 10.6 kB
text/typescript
// api/monitoring/switch/switch.descriptions.ts
import { INodeProperties } from 'n8n-workflow';
import { addDescriptions } from '../../../helpers/deduplicate';
import { listSwitchesDescription } from './operations/listSwitches.descriptions';
import { getSwitchVlanInfoDescription } from './operations/getSwitchVlanInfo.descriptions';
import { getCxSwitchVlanInfoDescription } from './operations/getCxSwitchVlanInfo.descriptions';
import { getSwitchStackVlanInfoDescription } from './operations/getSwitchStackVlanInfo.descriptions';
import { getCxSwitchStackVlanInfoDescription } from './operations/getCxSwitchStackVlanInfo.descriptions';
import { getSwitchPortPoeInfoDescription } from './operations/getSwitchPortPoeInfo.descriptions';
import { getCxSwitchPortPoeInfoDescription } from './operations/getCxSwitchPortPoeInfo.descriptions';
import { getSwitchPoeInfoDescription } from './operations/getSwitchPoeInfo.descriptions';
import { getCxSwitchPoeInfoDescription } from './operations/getCxSwitchPoeInfo.descriptions';
import { getCxSwitchVsxInfoDescription } from './operations/getCxSwitchVsxInfo.descriptions';
import { getCxSwitchNeighborInfoDescription } from './operations/getCxSwitchNeighborInfo.descriptions';
import { getCxSwitchStackNeighborInfoDescription } from './operations/getCxSwitchStackNeighborInfo.descriptions';
import { getSwitchBandwidthUsageDescription } from './operations/getSwitchBandwidthUsage.descriptions';
import { getTopNSwitchesDescription } from './operations/getTopNSwitches.descriptions';
import { getSwitchDetailsDescription } from './operations/getSwitchDetails.descriptions';
import { deleteSwitchDescription } from './operations/deleteSwitch.descriptions';
import { getSwitchPortsDetailsDescription } from './operations/getSwitchPortsDetails.descriptions';
import { getCxSwitchPortsDetailsDescription } from './operations/getCxSwitchPortsDetails.descriptions';
import { getSwitchChassisDetailsDescription } from './operations/getSwitchChassisDetails.descriptions';
import { getSwitchPortsBandwidthUsageDescription } from './operations/getSwitchPortsBandwidthUsage.descriptions';
import { getCxSwitchPortsBandwidthUsageDescription } from './operations/getCxSwitchPortsBandwidthUsage.descriptions';
import { getSwitchPortsErrorsDescription } from './operations/getSwitchPortsErrors.descriptions';
import { getCxSwitchPortsErrorsDescription } from './operations/getCxSwitchPortsErrors.descriptions';
import { getSwitchStackPortDetailsDescription } from './operations/getSwitchStackPortDetails.descriptions';
import { getCxSwitchStackPortDetailsDescription } from './operations/getCxSwitchStackPortDetails.descriptions';
import { listSwitchStacksDescription } from './operations/listSwitchStacks.descriptions';
import { getSwitchStackDetailsDescription } from './operations/getSwitchStackDetails.descriptions';
import { deleteSwitchStackDescription } from './operations/deleteSwitchStack.descriptions';
/**
* Operation selector for the switch resource
*/
export const switchOperationSelector: INodeProperties = {
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
displayOptions: {
show: {
resource: ['switch'],
domain: ['monitoring'],
},
},
options: [
{
name: 'List Switches',
value: 'listSwitches',
description: 'Get a list of switches in the network',
action: 'List switches',
},
{
name: 'Get VLAN Info of the Switch',
value: 'getSwitchVlanInfo',
description: 'Get VLAN information for a switch',
action: 'Get VLAN info of the switch',
},
{
name: 'Get VLAN Info for CX Switch',
value: 'getCxSwitchVlanInfo',
description: 'Get VLAN information for a CX switch',
action: 'Get VLAN info for CX switch',
},
{
name: 'Get VLAN Info of the Switch Stack',
value: 'getSwitchStackVlanInfo',
description: 'Get VLAN information for a switch stack',
action: 'Get VLAN info of the switch stack',
},
{
name: 'Get VLAN Info of the CX Switch Stack',
value: 'getCxSwitchStackVlanInfo',
description: 'Get VLAN information for a CX switch stack',
action: 'Get VLAN info of the CX switch stack',
},
{
name: 'Get Switch Port PoE Info',
value: 'getSwitchPortPoeInfo',
description: 'Get PoE information for a switch port',
action: 'Get switch port poe info',
},
{
name: 'Get Switch Port PoE Info for CX Switch',
value: 'getCxSwitchPortPoeInfo',
description: 'Get PoE information for a CX switch port',
action: 'Get switch port poe info for CX switch',
},
{
name: 'Get Switch PoE Info',
value: 'getSwitchPoeInfo',
description: 'Get PoE information for a switch',
action: 'Get switch poe info',
},
{
name: 'Get Switch PoE Info for CX Switch',
value: 'getCxSwitchPoeInfo',
description: 'Get PoE information for a CX switch',
action: 'Get switch poe info for CX switch',
},
{
name: 'Get Switch VSX Info for CX Switch',
value: 'getCxSwitchVsxInfo',
description: 'Get VSX information for a CX switch',
action: 'Get switch vsx info for CX switch',
},
{
name: 'Get LLDP Device Neighbor Info for CX Switch',
value: 'getCxSwitchNeighborInfo',
description: 'Get LLDP neighbor information for a CX switch',
action: 'Get lldp device neighbor info for CX switch',
},
{
name: 'Get LLDP Device Neighbor Info for CX Switch Stack',
value: 'getCxSwitchStackNeighborInfo',
description: 'Get LLDP neighbor information for a CX switch stack',
action: 'Get lldp device neighbor info for CX switch stack',
},
{
name: 'Switch Bandwidth Usage',
value: 'getSwitchBandwidthUsage',
description: 'Get bandwidth usage for switches over a time period',
action: 'Get switch bandwidth usage',
},
{
name: 'Top N Switches',
value: 'getTopNSwitches',
description: 'Get top N switches by bandwidth usage',
action: 'Get top n switches',
},
{
name: 'Switch Details',
value: 'getSwitchDetails',
description: 'Get detailed information for a switch',
action: 'Get switch details',
},
{
name: 'Delete Switch',
value: 'deleteSwitch',
description: 'Delete a switch from the network',
action: 'Delete switch',
},
{
name: 'Switch Ports Details',
value: 'getSwitchPortsDetails',
description: 'Get detailed information for switch ports',
action: 'Get switch ports details',
},
{
name: 'Get Ports Details for CX Switch',
value: 'getCxSwitchPortsDetails',
description: 'Get detailed information for CX switch ports',
action: 'Get ports details for CX switch',
},
{
name: 'Switch Chassis Details',
value: 'getSwitchChassisDetails',
description: 'Get chassis details for a switch',
action: 'Get switch chassis details',
},
{
name: 'Switch Ports Bandwidth Usage',
value: 'getSwitchPortsBandwidthUsage',
description: 'Get bandwidth usage for switch ports over a time period',
action: 'Get switch ports bandwidth usage',
},
{
name: 'Ports Bandwidth Usage for CX Switch',
value: 'getCxSwitchPortsBandwidthUsage',
description: 'Get bandwidth usage for CX switch ports over a time period',
action: 'Get ports bandwidth usage for CX switch',
},
{
name: 'Switch Ports Errors',
value: 'getSwitchPortsErrors',
description: 'Get error information for switch ports',
action: 'Get switch ports errors',
},
{
name: 'CX Switch Ports Errors',
value: 'getCxSwitchPortsErrors',
description: 'Get error information for CX switch ports',
action: 'Get CX switch ports errors',
},
{
name: 'Switch Stack Port Details',
value: 'getSwitchStackPortDetails',
description: 'Get port details for a switch stack',
action: 'Get switch stack port details',
},
{
name: 'CX Switch Stack Port Details',
value: 'getCxSwitchStackPortDetails',
description: 'Get port details for a CX switch stack',
action: 'Get CX switch stack port details',
},
{
name: 'List Switch Stacks',
value: 'listSwitchStacks',
description: 'Get a list of switch stacks in the network',
action: 'List switch stacks',
},
{
name: 'Switch Stack Details',
value: 'getSwitchStackDetails',
description: 'Get detailed information for a switch stack',
action: 'Get switch stack details',
},
{
name: 'Delete Switch Stack',
value: 'deleteSwitchStack',
description: 'Delete a switch stack from the network',
action: 'Delete switch stack',
},
],
default: 'listSwitches',
};
// Combined descriptions for all operations in this resource
export const switchDescriptions: INodeProperties[] = [switchOperationSelector];
// Add each operation's descriptions
addDescriptions(switchDescriptions, listSwitchesDescription);
addDescriptions(switchDescriptions, getSwitchVlanInfoDescription);
addDescriptions(switchDescriptions, getCxSwitchVlanInfoDescription);
addDescriptions(switchDescriptions, getSwitchStackVlanInfoDescription);
addDescriptions(switchDescriptions, getCxSwitchStackVlanInfoDescription);
addDescriptions(switchDescriptions, getSwitchPortPoeInfoDescription);
addDescriptions(switchDescriptions, getCxSwitchPortPoeInfoDescription);
addDescriptions(switchDescriptions, getSwitchPoeInfoDescription);
addDescriptions(switchDescriptions, getCxSwitchPoeInfoDescription);
addDescriptions(switchDescriptions, getCxSwitchVsxInfoDescription);
addDescriptions(switchDescriptions, getCxSwitchNeighborInfoDescription);
addDescriptions(switchDescriptions, getCxSwitchStackNeighborInfoDescription);
addDescriptions(switchDescriptions, getSwitchBandwidthUsageDescription);
addDescriptions(switchDescriptions, getTopNSwitchesDescription);
addDescriptions(switchDescriptions, getSwitchDetailsDescription);
addDescriptions(switchDescriptions, deleteSwitchDescription);
addDescriptions(switchDescriptions, getSwitchPortsDetailsDescription);
addDescriptions(switchDescriptions, getCxSwitchPortsDetailsDescription);
addDescriptions(switchDescriptions, getSwitchChassisDetailsDescription);
addDescriptions(switchDescriptions, getSwitchPortsBandwidthUsageDescription);
addDescriptions(switchDescriptions, getCxSwitchPortsBandwidthUsageDescription);
addDescriptions(switchDescriptions, getSwitchPortsErrorsDescription);
addDescriptions(switchDescriptions, getCxSwitchPortsErrorsDescription);
addDescriptions(switchDescriptions, getSwitchStackPortDetailsDescription);
addDescriptions(switchDescriptions, getCxSwitchStackPortDetailsDescription);
addDescriptions(switchDescriptions, listSwitchStacksDescription);
addDescriptions(switchDescriptions, getSwitchStackDetailsDescription);
addDescriptions(switchDescriptions, deleteSwitchStackDescription);