- DB: add usernames/sudo_usernames columns to vm_requests table - create.php: add form inputs for usernames and sudo_usernames - send.php: capture, validate, and store both fields in DB - netbox_integration/netbox_api.php: pass custom_fields to NetBox VM API - requests.php: show usernames/sudo_usernames in request list
NetBox Integration for phpsite
This integration allows the phpsite application to communicate with a NetBox instance at 192.168.1.144 to automatically create device entries when VM requests are made.
Features
- Automatically creates device entries in NetBox when VM requests are submitted
- Stores NetBox device IDs in the local database for tracking
- Maintains compatibility with existing functionality
Configuration
To use this integration, you need to set the NetBox API token as an environment variable:
export NETBOX_API_TOKEN="your_netbox_api_token_here"
How It Works
- When a user submits a VM request through the web interface:
- The request is stored in the local database
- The system connects to the NetBox API at 192.168.1.144
- A new device entry is created in NetBox with the VM specifications
- The NetBox device ID is stored in the local database
- The request status is updated to reflect NetBox integration
Supported Operations
- Create device entries in NetBox
- Retrieve available sites, device types, and other resources
- Update local database with NetBox device IDs
Requirements
- PHP with cURL extension enabled
- Access to NetBox API at 192.168.1.144
- Valid NetBox API token with appropriate permissions