feat: vm actions start/stop/delete

This commit is contained in:
2024-11-29 16:43:14 +00:00
parent 632a5aaa87
commit 2370204546
11 changed files with 304 additions and 45 deletions

View File

@ -1,2 +1,12 @@
use crate::host::proxmox::ProxmoxClient;
use anyhow::Result;
use lnvps_db::{VmHost, VmHostKind};
pub mod proxmox;
pub trait VmHostClient {}
pub fn get_host_client(host: &VmHost) -> Result<ProxmoxClient> {
Ok(match host.kind {
VmHostKind::Proxmox => ProxmoxClient::new(host.ip.parse()?).with_api_token(&host.api_token),
})
}