Skip to main content
Glama
README.md•3.41 kB
# ProxmoxMCP Test Scripts This folder contains various test scripts and demo programs for the ProxmoxMCP project. ## šŸ“ File Description ### šŸ”§ VM Management Tests - **`test_vm_power.py`** - VM power management functionality test - Test VM start, stop, restart and other operations - Check VM status and available operations - **`test_vm_start.py`** - VM startup functionality specific test - Dedicated test for VM startup functionality - Suitable for single VM startup testing - **`test_create_vm.py`** - VM creation functionality test - Test complete workflow of creating new virtual machines - Verify 1 CPU core + 2GB RAM + 10GB storage configuration ### 🌐 API Tests - **`test_openapi.py`** - OpenAPI service comprehensive test - Test all API endpoints - Include VM creation, power management and other functionalities - Verify integration with Open WebUI ## šŸš€ Usage ### Environment Setup ```bash # Activate virtual environment source ../.venv/bin/activate # Set configuration path (if needed) export PROXMOX_MCP_CONFIG=../proxmox-config/config.json ``` ### Running Tests #### 1. Test VM Power Management ```bash python test_vm_power.py ``` #### 2. Test VM Creation ```bash python test_create_vm.py ``` #### 3. Test OpenAPI Service ```bash python test_openapi.py ``` #### 4. Test VM Startup ```bash python test_vm_start.py ``` ## šŸ“‹ Test Coverage ### āœ… Tested Features - [x] VM list retrieval - [x] VM status query - [x] VM power management (start/stop/restart/shutdown) - [x] VM creation (support custom CPU/memory/storage) - [x] Storage type auto-detection - [x] Disk format intelligent selection - [x] OpenAPI service integration - [x] Error handling verification ### šŸŽÆ Test Scenarios - **Basic functionality**: Connection, authentication, basic operations - **VM lifecycle**: Create, start, stop, delete - **Storage compatibility**: LVM, filesystem storage - **API integration**: REST API calls and responses - **Error recovery**: Exception handling ## šŸ”— Related Documentation - **Main project documentation**: [../README.md](../README.md) - **VM creation guide**: [../VM_CREATION_GUIDE.md](../VM_CREATION_GUIDE.md) - **OpenAPI deployment**: [../OPENAPI_DEPLOYMENT.md](../OPENAPI_DEPLOYMENT.md) - **Quick deployment**: [../QUICK_DEPLOY_8811.md](../QUICK_DEPLOY_8811.md) ## šŸ“Š Test Results Examples ### Success Cases ``` āœ… VM 995: Created successfully (local-lvm, raw) āœ… VM 996: Created successfully (vm-storage, raw) āœ… VM 998: Created successfully (local-lvm, raw) āœ… VM 999: Created successfully (local-lvm, raw) ``` ### API Endpoint Verification ``` āœ… get_nodes: 200 - 134 chars āœ… get_vms: 200 - 1843 chars āœ… create_vm: 200 - VM created successfully āœ… start_vm: 200 - VM started successfully ``` ## šŸ› ļø Troubleshooting If tests fail, please check: 1. **Configuration file**: Whether `../proxmox-config/config.json` is correct 2. **Network connection**: Whether Proxmox server is reachable 3. **Authentication info**: Whether API token is valid 4. **Service status**: Whether OpenAPI service is running on port 8811 ## šŸ“ Contributing Guidelines When adding new tests, please: 1. Use descriptive filenames (e.g., `test_function_name.py`) 2. Include detailed docstrings 3. Add appropriate error handling 4. Update this README file --- **Last Updated**: December 2024 **Maintainer**: ProxmoxMCP Development Team

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/RekklesNA/ProxmoxMCP-Plus'

If you have feedback or need assistance with the MCP directory API, please join our Discord server