- Split single-page into 3 pages: - index.php: product catalog with VM size cards - create.php: order form (name, domain, description) - requests.php: request history with pagination - Rewrite NetBox integration to create Virtual Machines (/virtualization/virtual-machines/) instead of DCIM devices - Add netbox_integration/netbox_api.php: NetBoxClient with createVirtualMachine(), findCluster(), findTag(), getList() - Generate new sleek product-card images (420x280) with aligned spec boxes (vcpus/ram/disk) - Add webshop CSS: product cards, nav links, hero section, order layout, responsive grid - Update redirects: send.php -> requests.php, cancel.php -> requests.php - Update E2E test for new page structure - Add .gitignore, deploy-local.sh, setup_database.sql to repo
1.3 KiB
Executable File
1.3 KiB
Executable File
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