{"id":49090542,"url":"https://github.com/jrjsmrtn/mock-pve-api","last_synced_at":"2026-04-20T18:04:07.818Z","repository":{"id":346986189,"uuid":"1157374691","full_name":"jrjsmrtn/mock-pve-api","owner":"jrjsmrtn","description":"Mock Proxmox VE API Server for testing and development","archived":false,"fork":false,"pushed_at":"2026-04-02T23:53:59.000Z","size":13431,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-03T09:53:40.884Z","etag":null,"topics":["api","elixir","mock-server","proxmox","proxmox-ve","testing"],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jrjsmrtn.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-13T18:41:08.000Z","updated_at":"2026-04-01T09:00:00.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/jrjsmrtn/mock-pve-api","commit_stats":null,"previous_names":["jrjsmrtn/mock-pve-api"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/jrjsmrtn/mock-pve-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrjsmrtn%2Fmock-pve-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrjsmrtn%2Fmock-pve-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrjsmrtn%2Fmock-pve-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrjsmrtn%2Fmock-pve-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jrjsmrtn","download_url":"https://codeload.github.com/jrjsmrtn/mock-pve-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrjsmrtn%2Fmock-pve-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32059139,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","elixir","mock-server","proxmox","proxmox-ve","testing"],"created_at":"2026-04-20T18:04:06.949Z","updated_at":"2026-04-20T18:04:07.810Z","avatar_url":"https://github.com/jrjsmrtn.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mock PVE API\n\n[![GHCR](https://img.shields.io/badge/GHCR-ghcr.io%2Fjrjsmrtn%2Fmock--pve--api-blue)](https://github.com/jrjsmrtn/mock-pve-api/pkgs/container/mock-pve-api)\n[![Podman Compatible](https://img.shields.io/badge/podman-compatible-326ce5.svg)](https://podman.io/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Build Status](https://github.com/jrjsmrtn/mock-pve-api/workflows/CI/badge.svg)](https://github.com/jrjsmrtn/mock-pve-api/actions)\n\nA lightweight, containerized Mock Proxmox VE API Server for testing and development. Simulates the PVE REST API across versions 7.0-9.0 with HTTPS, stateful resources, and 220 endpoints — no Proxmox infrastructure required.\n\n## Features\n\n- **220 API endpoints** with version-specific behaviour (PVE 7.0 through 9.0)\n- **HTTPS by default** matching real PVE API — self-signed certs auto-generated on first startup\n- **Stateful resource management** — VM, container, storage, pool, and firewall lifecycle\n- **Validated against proxmoxer** — the most popular Python PVE client (37/38 pass)\n- **Container-ready** — multi-arch images (amd64/arm64) on GHCR, signed with cosign\n- **CI/CD friendly** — zero external dependencies, configurable via environment variables\n- **Simulation features** — response delay, error injection, feature toggles\n\n## Quick Start\n\n### Container (recommended)\n\n```bash\n# Pull from GHCR\npodman pull ghcr.io/jrjsmrtn/mock-pve-api:latest\n\n# Run (HTTPS with auto-generated self-signed certs)\npodman run -d -p 8006:8006 -e MOCK_PVE_VERSION=8.3 ghcr.io/jrjsmrtn/mock-pve-api:latest\n\n# Test (-k for self-signed certs)\ncurl -k https://localhost:8006/api2/json/version\n```\n\nAlso works with Docker — replace `podman` with `docker`.\n\n### From source\n\n```bash\ngit clone https://github.com/jrjsmrtn/mock-pve-api.git\ncd mock-pve-api\nmix deps.get\nmix run --no-halt\n\ncurl -k https://localhost:8006/api2/json/version\n```\n\n### Makefile targets\n\n```bash\nmake container-build       # Build production image locally\nmake container-run         # Run from GHCR\nmake container-run-versions  # Run PVE 7.4, 8.0, 8.3, 9.0 simultaneously\n```\n\n## Usage Examples\n\n### curl\n\n```bash\n# Version info (no auth required)\ncurl -k https://localhost:8006/api2/json/version\n\n# Authenticate\ncurl -k -X POST https://localhost:8006/api2/json/access/ticket \\\n  -d \"username=root@pam\u0026password=secret\"\n\n# List nodes (with API token)\ncurl -k -H \"Authorization: PVEAPIToken=root@pam!test=secret\" \\\n  https://localhost:8006/api2/json/nodes\n```\n\n### proxmoxer (Python)\n\n```python\nfrom proxmoxer import ProxmoxAPI\n\npve = ProxmoxAPI(\"localhost\", port=8006, user=\"root@pam\",\n                 password=\"secret\", verify_ssl=False)\n\nprint(pve.version.get())\nprint(pve.nodes.get())\nprint(pve.nodes(\"pve-node1\").qemu.get())\n```\n\n### GitHub Actions\n\n```yaml\nservices:\n  mock-pve:\n    image: ghcr.io/jrjsmrtn/mock-pve-api:latest\n    ports: [\"8006:8006\"]\n    env:\n      MOCK_PVE_VERSION: \"8.3\"\n    options: \u003e-\n      --health-cmd \"curl -fk https://localhost:8006/api2/json/version || exit 1\"\n      --health-interval 10s\n      --health-timeout 5s\n      --health-retries 5\n      --health-start-period 10s\n```\n\n### Multi-version testing\n\n```bash\npodman run -d -p 8074:8006 -e MOCK_PVE_VERSION=7.4 ghcr.io/jrjsmrtn/mock-pve-api:latest\npodman run -d -p 8083:8006 -e MOCK_PVE_VERSION=8.3 ghcr.io/jrjsmrtn/mock-pve-api:latest\npodman run -d -p 8090:8006 -e MOCK_PVE_VERSION=9.0 ghcr.io/jrjsmrtn/mock-pve-api:latest\n\ncurl -k https://localhost:8074/api2/json/version  # PVE 7.4\ncurl -k https://localhost:8083/api2/json/version  # PVE 8.3\ncurl -k https://localhost:8090/api2/json/version  # PVE 9.0\n```\n\n## Configuration\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `MOCK_PVE_VERSION` | `8.3` | PVE version to simulate (7.0-9.0) |\n| `MOCK_PVE_PORT` | `8006` | Server port |\n| `MOCK_PVE_HOST` | `0.0.0.0` | Bind address |\n| `MOCK_PVE_SSL_ENABLED` | `true` | HTTPS enabled; set `false` for HTTP |\n| `MOCK_PVE_SSL_KEYFILE` | `certs/server.key` | SSL private key (auto-generated if missing) |\n| `MOCK_PVE_SSL_CERTFILE` | `certs/server.crt` | SSL certificate (auto-generated if missing) |\n| `MOCK_PVE_DELAY` | `0` | Response delay in milliseconds |\n| `MOCK_PVE_ERROR_RATE` | `0` | Simulate error percentage (0-100) |\n| `MOCK_PVE_ENABLE_SDN` | `true` | Enable SDN endpoints (8.0+) |\n| `MOCK_PVE_ENABLE_FIREWALL` | `true` | Enable firewall endpoints |\n| `MOCK_PVE_ENABLE_BACKUP_PROVIDERS` | `true` | Enable backup provider endpoints (8.2+) |\n| `MOCK_PVE_LOG_LEVEL` | `info` | Logging level (debug/info/warn/error) |\n\n## Supported PVE Versions\n\n| Version | Key Features |\n|---------|-------------|\n| **7.0-7.4** | Core virtualisation, containers, storage, Ceph |\n| **8.0** | + SDN (tech preview), realm sync, resource mappings |\n| **8.1** | + Notifications, webhooks, filters |\n| **8.2** | + Backup providers, VMware import |\n| **8.3** | + OVA import improvements |\n| **9.0** | + SDN fabrics, HA affinity rules, LVM snapshots |\n\n## API Coverage\n\n220 endpoints across all categories:\n\n- **Access** — users, groups, roles, domains, ACL, tickets, tokens\n- **Cluster** — status, config, resources, HA, backup jobs, replication, options\n- **Nodes** — listing, DNS, APT, network, disks, tasks, hardware, time\n- **VMs (QEMU)** — full lifecycle, config, snapshots, cloning, migration, agent\n- **Containers (LXC)** — full lifecycle, config, snapshots, cloning\n- **Storage** — cluster and node level, content, volumes, upload\n- **SDN** — zones, vnets, subnets, controllers (8.0+)\n- **Firewall** — cluster, node, VM/CT level rules, aliases, ipsets, groups\n- **Notifications** — endpoints, matchers, targets (8.1+)\n- **Metrics** — RRD data for nodes, VMs, containers, storage\n\n## Development\n\n```bash\nmix deps.get          # Install dependencies\nmix test              # Run 1080 tests\nmix format            # Format code\nmake install-hooks    # Install lefthook git hooks\nmake validate         # Full quality pipeline\n```\n\n### Client examples\n\n```bash\n# Shell/curl example\n./examples/shell/test-endpoints.sh\n\n# proxmoxer integration test (pip install proxmoxer requests)\npython3 examples/proxmoxer/test_proxmoxer.py\n```\n\n### Container images\n\n- **Registry**: `ghcr.io/jrjsmrtn/mock-pve-api`\n- **Base**: Alpine 3.22 (~41 MB)\n- **Architectures**: `linux/amd64`, `linux/arm64`\n- **Security**: Non-root user, cosign-signed, SBOM/provenance attestations\n\n## Documentation\n\n**Tutorials**: [Getting Started](docs/tutorials/getting-started.md) | [Your First Test](docs/tutorials/your-first-test.md) | [Understanding Versions](docs/tutorials/understanding-versions.md)\n\n**How-To**: [Client Integration](docs/how-to/client-integration.md) | [Multi-Version Testing](docs/how-to/multi-version-testing.md) | [Container Deployment](docs/how-to/container-deployment.md) | [CI/CD Setup](docs/how-to/setup-ci-cd.md)\n\n**Reference**: [API Reference](docs/reference/api-reference.md) | [Environment Variables](docs/reference/environment-variables.md) | [Client Examples](docs/reference/client-examples.md) | [Quality Gates](docs/reference/quality-gates.md)\n\n**Explanation**: [Architecture Decisions](docs/explanation/architecture-decisions.md) | [Version Compatibility](docs/explanation/version-compatibility.md) | [State Management](docs/explanation/state-management.md)\n\n**Architecture**: [C4 Model](docs/architecture/README.md) | [ADRs](docs/adr/)\n\n## License\n\nMIT - see [LICENSE](LICENSE).\n\n## Support\n\n- [Issues](https://github.com/jrjsmrtn/mock-pve-api/issues)\n- [Discussions](https://github.com/jrjsmrtn/mock-pve-api/discussions)\n- [Security Policy](SECURITY.md)\n\n## Related Projects\n\n- [pvex](https://github.com/jrjsmrtn/pvex) - Elixir client for Proxmox VE\n- [proxmoxer](https://github.com/proxmoxer/proxmoxer) - Python Proxmox API wrapper\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrjsmrtn%2Fmock-pve-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjrjsmrtn%2Fmock-pve-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrjsmrtn%2Fmock-pve-api/lists"}