UNPKG

n8n-nodes-awx

Version:

n8n node to interact with Ansible AWX/Tower with improved type safety

112 lines 3.43 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.inventoryFactory = exports.projectFactory = void 0; const projectFactory = (overrides = {}) => ({ id: 1, name: 'Test Project', description: 'Test project description', ...overrides }); exports.projectFactory = projectFactory; const inventoryFactory = (overrides = {}) => ({ id: 1, type: 'inventory', url: '/api/v2/inventories/1/', related: { created_by: '/api/v2/users/1/', modified_by: '/api/v2/users/1/', organization: '/api/v2/organizations/1/', inventory_sources: '/api/v2/inventories/1/inventory_sources/', groups: '/api/v2/inventories/1/groups/', hosts: '/api/v2/inventories/1/hosts/', root_groups: '/api/v2/inventories/1/root_groups/', variable_data: {}, }, summary_fields: { organization: { id: 1, name: 'Default', description: 'Default organization' }, created_by: { id: 1, username: 'admin', first_name: '', last_name: '' }, modified_by: { id: 1, username: 'admin', first_name: '', last_name: '' }, object_roles: { admin_role: { description: 'Can manage all aspects of the inventory', name: 'Admin', id: 1 }, update_role: { description: 'May update the inventory', name: 'Update', id: 2 }, adhoc_role: { description: 'May run arbitrary commands against the inventory', name: 'Ad Hoc', id: 3 }, use_role: { description: 'Can use the inventory in a job template', name: 'Use', id: 4 }, read_role: { description: 'May view settings for the inventory', name: 'Read', id: 5 }, }, user_capabilities: { edit: true, delete: true, copy: true, adhoc: true }, groups: { count: 3, results: [ { id: 1, name: 'web-servers', url: '/api/v2/groups/1/' }, { id: 2, name: 'db-servers', url: '/api/v2/groups/2/' }, { id: 3, name: 'app-servers', url: '/api/v2/groups/3/' }, ] }, total_hosts: 10, hosts_with_active_failures: 0, total_groups: 3, has_inventory_sources: false, total_inventory_sources: 0, inventory_sources_with_failures: 0, organization_id: 1, kind: '' }, name: 'Test Inventory', description: 'Test inventory for unit testing', organization: 1, kind: '', host_filter: null, variables: '{}', has_active_failures: false, total_hosts: 10, hosts_with_active_failures: 0, total_groups: 3, has_inventory_sources: false, total_inventory_sources: 0, inventory_sources_with_failures: 0, organization_id: 1, created: '2023-01-01T00:00:00.000Z', modified: '2023-01-01T00:00:00.000Z', ...overrides }); exports.inventoryFactory = inventoryFactory; //# sourceMappingURL=testDataFactory.js.map