diff options
author | Cara Salter <cara@devcara.com> | 2022-04-12 13:30:15 -0400 |
---|---|---|
committer | Cara Salter <cara@devcara.com> | 2022-04-12 13:30:15 -0400 |
commit | 1fef014508c915b388de371583b0a869684fc7ea (patch) | |
tree | 9f2f4c04c472e0883055a8b23a71f724c503ee04 /src/vm.rs | |
parent | 34af52c58daae7ad75c0871e88e7b937fcd078fb (diff) | |
download | solarlib-1fef014508c915b388de371583b0a869684fc7ea.tar.gz solarlib-1fef014508c915b388de371583b0a869684fc7ea.zip |
Add `House` definition and impls
Also rename modules to make more sense with the theme
Diffstat (limited to 'src/vm.rs')
-rw-r--r-- | src/vm.rs | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/vm.rs b/src/vm.rs deleted file mode 100644 index 8e17659..0000000 --- a/src/vm.rs +++ /dev/null @@ -1,31 +0,0 @@ -use std::convert::TryFrom; -use virt::{connect::Connect, domain::Domain;}; - -use crate::errors::Error; - - -/** - * Represents a virtual machine, that's active on some server - */ -pub struct VirtualMachine { - /// The assigned name of the VM - pub name: String, - /// The network address of the physical machine that's hosting this machine - pub host_server: String, - /// Whether or not the VM is active - pub is_active: bool, - /// The libvirtd-assigned UUID - pub uuid: String, - /// The network address of the VM - pub addr: Option<String>, - /// How much RAM (in MB) is assigned to the VM - pub assigned_mem_mb: u64, - /// How many vCPUs are assigned to the VM - pub assigned_cpus: u64, -} - -impl TryFrom<Domain> for VirtualMachine { - type Error = Error; - - fn try_from(d: Domain) -> Result<Self, Self::Error> { - |