Update documentation structure and enhance .gitignore

- Added generated index files and report directories to .gitignore to prevent unnecessary tracking of transient files.
- Updated README links to reflect new documentation paths for better navigation.
- Improved documentation organization by ensuring all links point to the correct locations, enhancing user experience and accessibility.
This commit is contained in:
defiQUG
2025-12-12 21:18:55 -08:00
parent 664707d912
commit fe0365757a
106 changed files with 4666 additions and 2294 deletions
+33
View File
@@ -8,17 +8,50 @@ import { ResourceProvider } from '../../types/resource.js'
import { logger } from '../../lib/logger.js'
import type { ProxmoxCluster, ProxmoxVM, ProxmoxVMConfig } from './types.js'
/**
* Proxmox VE Infrastructure Adapter
*
* Implements the InfrastructureAdapter interface for Proxmox VE infrastructure.
* Provides resource discovery, creation, update, deletion, metrics, and health checks.
*
* @example
* ```typescript
* const adapter = new ProxmoxAdapter({
* apiUrl: 'https://proxmox.example.com:8006',
* apiToken: 'token-id=...'
* });
* const resources = await adapter.discoverResources();
* ```
*/
export class ProxmoxAdapter implements InfrastructureAdapter {
readonly provider: ResourceProvider = 'PROXMOX'
private apiUrl: string
private apiToken: string
/**
* Create a new Proxmox adapter instance
*
* @param config - Configuration object
* @param config.apiUrl - Proxmox API URL (e.g., 'https://proxmox.example.com:8006')
* @param config.apiToken - Proxmox API token in format 'token-id=...' or 'username@realm!token-id=...'
*/
constructor(config: { apiUrl: string; apiToken: string }) {
this.apiUrl = config.apiUrl
this.apiToken = config.apiToken
}
/**
* Discover all resources across all Proxmox nodes
*
* @returns Array of normalized resources (VMs) from all nodes
* @throws {Error} If API connection fails or nodes cannot be retrieved
* @example
* ```typescript
* const resources = await adapter.discoverResources();
* console.log(`Found ${resources.length} VMs`);
* ```
*/
async discoverResources(): Promise<NormalizedResource[]> {
try {
const nodes = await this.getNodes()