UNPKG

n8n-nodes-arubacentralnextgen

Version:

n8n community node for Aruba Central NextGen API integration with modern monitoring and management capabilities

609 lines (608 loc) 18.7 kB
"use strict"; // descriptions/interfaces/interfaces.descriptions.ts Object.defineProperty(exports, "__esModule", { value: true }); exports.interfacesFields = exports.lldpOperations = exports.loopbackOperations = exports.lacpOperations = exports.portChannelOperations = exports.ethernetInterfaceOperations = void 0; /** * Interfaces Domain Operations * Manages ethernet interfaces, port channels, LACP, loopback interfaces, and LLDP * API Reference: https://developer.arubanetworks.com/new-central-config/reference * Base Path: /network-config/v1alpha1 */ // ============================================================================ // Ethernet Interface Operations // ============================================================================ exports.ethernetInterfaceOperations = { displayName: 'Operation', name: 'operation', type: 'options', noDataExpression: true, displayOptions: { show: { domain: ['interfaces'], resource: ['ethernetInterface'], }, }, options: [ { name: 'Get All Ethernet Interfaces', value: 'getAllEthernetInterface', description: 'Retrieve all ethernet interface profiles', action: 'Get all ethernet interfaces', }, { name: 'Get Ethernet Interface', value: 'getEthernetInterface', description: 'Get a specific ethernet interface profile by name', action: 'Get ethernet interface', }, { name: 'Create Ethernet Interface', value: 'createEthernetInterface', description: 'Create a new ethernet interface profile', action: 'Create ethernet interface', }, { name: 'Update Ethernet Interface', value: 'updateEthernetInterface', description: 'Update an existing ethernet interface profile', action: 'Update ethernet interface', }, { name: 'Delete Ethernet Interface', value: 'deleteEthernetInterface', description: 'Delete an ethernet interface profile', action: 'Delete ethernet interface', }, ], default: 'getAllEthernetInterface', }; // ============================================================================ // Port Channel Operations // ============================================================================ exports.portChannelOperations = { displayName: 'Operation', name: 'operation', type: 'options', noDataExpression: true, displayOptions: { show: { domain: ['interfaces'], resource: ['portChannel'], }, }, options: [ { name: 'Get All Port Channels', value: 'getAllPortChannel', description: 'Retrieve all port channel profiles', action: 'Get all port channels', }, { name: 'Get Port Channel', value: 'getPortChannel', description: 'Get a specific port channel profile by name', action: 'Get port channel', }, { name: 'Create Port Channel', value: 'createPortChannel', description: 'Create a new port channel profile', action: 'Create port channel', }, { name: 'Update Port Channel', value: 'updatePortChannel', description: 'Update an existing port channel profile', action: 'Update port channel', }, { name: 'Delete Port Channel', value: 'deletePortChannel', description: 'Delete a port channel profile', action: 'Delete port channel', }, ], default: 'getAllPortChannel', }; // ============================================================================ // LACP Operations // ============================================================================ exports.lacpOperations = { displayName: 'Operation', name: 'operation', type: 'options', noDataExpression: true, displayOptions: { show: { domain: ['interfaces'], resource: ['lacp'], }, }, options: [ { name: 'Get All LACP Profiles', value: 'getAllLACP', description: 'Retrieve all LACP profiles', action: 'Get all LACP profiles', }, { name: 'Get LACP Profile', value: 'getLACP', description: 'Get a specific LACP profile by name', action: 'Get LACP profile', }, { name: 'Create LACP Profile', value: 'createLACP', description: 'Create a new LACP profile', action: 'Create LACP profile', }, { name: 'Update LACP Profile', value: 'updateLACP', description: 'Update an existing LACP profile', action: 'Update LACP profile', }, { name: 'Delete LACP Profile', value: 'deleteLACP', description: 'Delete a LACP profile', action: 'Delete LACP profile', }, ], default: 'getAllLACP', }; // ============================================================================ // Loopback Interface Operations // ============================================================================ exports.loopbackOperations = { displayName: 'Operation', name: 'operation', type: 'options', noDataExpression: true, displayOptions: { show: { domain: ['interfaces'], resource: ['loopback'], }, }, options: [ { name: 'Get All Loopback Interfaces', value: 'getAllLoopback', description: 'Retrieve all loopback interface profiles', action: 'Get all loopback interfaces', }, { name: 'Get Loopback Interface', value: 'getLoopback', description: 'Get a specific loopback interface profile by name', action: 'Get loopback interface', }, { name: 'Create Loopback Interface', value: 'createLoopback', description: 'Create a new loopback interface profile', action: 'Create loopback interface', }, { name: 'Update Loopback Interface', value: 'updateLoopback', description: 'Update an existing loopback interface profile', action: 'Update loopback interface', }, { name: 'Delete Loopback Interface', value: 'deleteLoopback', description: 'Delete a loopback interface profile', action: 'Delete loopback interface', }, ], default: 'getAllLoopback', }; // ============================================================================ // LLDP Operations // ============================================================================ exports.lldpOperations = { displayName: 'Operation', name: 'operation', type: 'options', noDataExpression: true, displayOptions: { show: { domain: ['interfaces'], resource: ['lldp'], }, }, options: [ { name: 'Get All LLDP Profiles', value: 'getAllLLDP', description: 'Retrieve all LLDP profiles', action: 'Get all LLDP profiles', }, { name: 'Get LLDP Profile', value: 'getLLDP', description: 'Get a specific LLDP profile by name', action: 'Get LLDP profile', }, { name: 'Create LLDP Profile', value: 'createLLDP', description: 'Create a new LLDP profile', action: 'Create LLDP profile', }, { name: 'Update LLDP Profile', value: 'updateLLDP', description: 'Update an existing LLDP profile', action: 'Update LLDP profile', }, { name: 'Delete LLDP Profile', value: 'deleteLLDP', description: 'Delete a LLDP profile', action: 'Delete LLDP profile', }, ], default: 'getAllLLDP', }; // ============================================================================ // Common Query Parameters (reused across all getAll fields) // ============================================================================ const commonQueryParameters = [ { displayName: 'View Type', name: 'viewType', type: 'string', default: '', description: 'Filter by view type', }, { displayName: 'Object Type', name: 'objectType', type: 'string', default: '', description: 'Filter by object type', }, { displayName: 'Scope ID', name: 'scopeId', type: 'string', default: '', description: 'Scope ID for filtering results', }, { displayName: 'Persona', name: 'persona', type: 'string', default: '', description: 'Persona filter for configuration profiles', }, { displayName: 'Effective', name: 'effective', type: 'boolean', default: false, description: 'Whether to retrieve effective configuration', }, { displayName: 'Detailed', name: 'detailed', type: 'boolean', default: false, description: 'Whether to include detailed information', }, { displayName: 'Limit', name: 'limit', type: 'number', default: 100, description: 'Maximum number of items to return', typeOptions: { minValue: 1, maxValue: 1000, }, }, { displayName: 'Offset', name: 'offset', type: 'number', default: 0, description: 'Number of items to skip for pagination', typeOptions: { minValue: 0, }, }, ]; // ============================================================================ // Ethernet Interface Fields // ============================================================================ const getAllEthernetInterfaceFields = [ { displayName: 'Additional Fields', name: 'additionalFields', type: 'collection', placeholder: 'Add Field', default: {}, displayOptions: { show: { domain: ['interfaces'], resource: ['ethernetInterface'], operation: ['getAllEthernetInterface'], }, }, options: commonQueryParameters, }, ]; const getEthernetInterfaceFields = [ { displayName: 'Profile Name', name: 'profileName', type: 'string', required: true, default: '', description: 'Name of the ethernet interface profile', displayOptions: { show: { domain: ['interfaces'], resource: ['ethernetInterface'], operation: ['getEthernetInterface', 'updateEthernetInterface', 'deleteEthernetInterface'], }, }, }, ]; const createEthernetInterfaceFields = [ { displayName: 'Profile Body', name: 'profileBody', type: 'json', default: '{}', description: 'JSON configuration body for the ethernet interface profile', displayOptions: { show: { domain: ['interfaces'], resource: ['ethernetInterface'], operation: ['createEthernetInterface', 'updateEthernetInterface'], }, }, }, ]; // ============================================================================ // Port Channel Fields // ============================================================================ const getAllPortChannelFields = [ { displayName: 'Additional Fields', name: 'additionalFields', type: 'collection', placeholder: 'Add Field', default: {}, displayOptions: { show: { domain: ['interfaces'], resource: ['portChannel'], operation: ['getAllPortChannel'], }, }, options: commonQueryParameters, }, ]; const getPortChannelFields = [ { displayName: 'Profile Name', name: 'profileName', type: 'string', required: true, default: '', description: 'Name of the port channel profile', displayOptions: { show: { domain: ['interfaces'], resource: ['portChannel'], operation: ['getPortChannel', 'updatePortChannel', 'deletePortChannel'], }, }, }, ]; const createPortChannelFields = [ { displayName: 'Profile Body', name: 'profileBody', type: 'json', default: '{}', description: 'JSON configuration body for the port channel profile', displayOptions: { show: { domain: ['interfaces'], resource: ['portChannel'], operation: ['createPortChannel', 'updatePortChannel'], }, }, }, ]; // ============================================================================ // LACP Fields // ============================================================================ const getAllLACPFields = [ { displayName: 'Additional Fields', name: 'additionalFields', type: 'collection', placeholder: 'Add Field', default: {}, displayOptions: { show: { domain: ['interfaces'], resource: ['lacp'], operation: ['getAllLACP'], }, }, options: commonQueryParameters, }, ]; const getLACPFields = [ { displayName: 'Profile Name', name: 'profileName', type: 'string', required: true, default: '', description: 'Name of the LACP profile', displayOptions: { show: { domain: ['interfaces'], resource: ['lacp'], operation: ['getLACP', 'updateLACP', 'deleteLACP'], }, }, }, ]; const createLACPFields = [ { displayName: 'Profile Body', name: 'profileBody', type: 'json', default: '{}', description: 'JSON configuration body for the LACP profile', displayOptions: { show: { domain: ['interfaces'], resource: ['lacp'], operation: ['createLACP', 'updateLACP'], }, }, }, ]; // ============================================================================ // Loopback Interface Fields // ============================================================================ const getAllLoopbackFields = [ { displayName: 'Additional Fields', name: 'additionalFields', type: 'collection', placeholder: 'Add Field', default: {}, displayOptions: { show: { domain: ['interfaces'], resource: ['loopback'], operation: ['getAllLoopback'], }, }, options: commonQueryParameters, }, ]; const getLoopbackFields = [ { displayName: 'Profile Name', name: 'profileName', type: 'string', required: true, default: '', description: 'Name of the loopback interface profile', displayOptions: { show: { domain: ['interfaces'], resource: ['loopback'], operation: ['getLoopback', 'updateLoopback', 'deleteLoopback'], }, }, }, ]; const createLoopbackFields = [ { displayName: 'Profile Body', name: 'profileBody', type: 'json', default: '{}', description: 'JSON configuration body for the loopback interface profile', displayOptions: { show: { domain: ['interfaces'], resource: ['loopback'], operation: ['createLoopback', 'updateLoopback'], }, }, }, ]; // ============================================================================ // LLDP Fields // ============================================================================ const getAllLLDPFields = [ { displayName: 'Additional Fields', name: 'additionalFields', type: 'collection', placeholder: 'Add Field', default: {}, displayOptions: { show: { domain: ['interfaces'], resource: ['lldp'], operation: ['getAllLLDP'], }, }, options: commonQueryParameters, }, ]; const getLLDPFields = [ { displayName: 'Profile Name', name: 'profileName', type: 'string', required: true, default: '', description: 'Name of the LLDP profile', displayOptions: { show: { domain: ['interfaces'], resource: ['lldp'], operation: ['getLLDP', 'updateLLDP', 'deleteLLDP'], }, }, }, ]; const createLLDPFields = [ { displayName: 'Profile Body', name: 'profileBody', type: 'json', default: '{}', description: 'JSON configuration body for the LLDP profile', displayOptions: { show: { domain: ['interfaces'], resource: ['lldp'], operation: ['createLLDP', 'updateLLDP'], }, }, }, ]; // ============================================================================ // Combined Interfaces Fields Export // ============================================================================ exports.interfacesFields = [ // Ethernet Interface ...getAllEthernetInterfaceFields, ...getEthernetInterfaceFields, ...createEthernetInterfaceFields, // Port Channel ...getAllPortChannelFields, ...getPortChannelFields, ...createPortChannelFields, // LACP ...getAllLACPFields, ...getLACPFields, ...createLACPFields, // Loopback Interface ...getAllLoopbackFields, ...getLoopbackFields, ...createLoopbackFields, // LLDP ...getAllLLDPFields, ...getLLDPFields, ...createLLDPFields, ];