refactor: remove Provisioner trait

refactor: abstract VmHostClient from ProxmoxClient
tests: add integration test for LnVpsProvisioner
This commit is contained in:
2025-03-03 11:07:09 +00:00
parent b7b940abff
commit 834ed44408
21 changed files with 957 additions and 709 deletions

View File

@ -7,9 +7,11 @@ edition = "2021"
name = "api"
[features]
default = ["mikrotik", "nostr-dm"]
mikrotik = []
default = ["mikrotik", "nostr-dm", "proxmox"]
mikrotik = ["dep:reqwest"]
nostr-dm = ["dep:nostr-sdk"]
proxmox = ["dep:reqwest", "dep:ssh2", "dep:tokio-tungstenite"]
libvirt = ["dep:virt"]
[dependencies]
lnvps_db = { path = "lnvps_db" }
@ -20,29 +22,32 @@ log = "0.4.21"
pretty_env_logger = "0.5.0"
serde = { version = "1.0.213", features = ["derive"] }
serde_json = "1.0.132"
reqwest = { version = "0.12.8" }
rocket = { version = "0.5.1", features = ["json"] }
rocket_okapi = { version = "0.9.0", features = ["swagger", "rapidoc"] }
schemars = { version = "0.8.22", features = ["chrono"] }
chrono = { version = "0.4.38", features = ["serde"] }
nostr = { version = "0.39.0", default-features = false, features = ["std"] }
base64 = { version = "0.22.1", features = ["alloc"] }
urlencoding = "2.1.3"
fedimint-tonic-lnd = { version = "0.2.0", default-features = false, features = ["invoicesrpc"] }
ipnetwork = { git = "https://git.v0l.io/Kieran/ipnetwork.git", rev = "35977adc8103cfc232bc95fbc32f4e34f2b6a6d7" }
rand = "0.9.0"
clap = { version = "4.5.21", features = ["derive"] }
ssh2 = "0.9.4"
ssh-key = "0.6.7"
lettre = { version = "0.11.10", features = ["tokio1-native-tls"] }
ws = { package = "rocket_ws", version = "0.1.0" }
tokio-tungstenite = { version = "^0.21", features = ["native-tls"] }
native-tls = "0.2.12"
hex = "0.4.3"
futures = "0.3.31"
#nostr-dm
nostr = { version = "0.39.0", default-features = false, features = ["std"] }
nostr-sdk = { version = "0.39.0", optional = true, default-features = false, features = ["nip44", "nip59"] }
#proxmox
tokio-tungstenite = { version = "^0.21", features = ["native-tls"], optional = true}
ssh2 = { version = "0.9.4", optional = true }
reqwest = { version = "0.12.8", optional = true }
#libvirt
virt = { version = "0.4.2", optional = true }
regex = "1.11.1"