hypha: implement subcommands and introduce destroy that tears things down properly

This commit is contained in:
Alex Zenla
2024-01-21 01:58:07 -08:00
parent ba156e43da
commit ece88e16cc
8 changed files with 228 additions and 46 deletions

View File

@ -5,6 +5,7 @@ use std::fmt::{Display, Formatter};
use std::num::ParseIntError;
use std::path::StripPrefixError;
use xenclient::XenClientError;
use xenstore::bus::XsdBusError;
pub type Result<T> = std::result::Result<T, HyphaError>;
@ -98,3 +99,15 @@ impl From<std::fmt::Error> for HyphaError {
HyphaError::new(value.to_string().as_str())
}
}
impl From<uuid::Error> for HyphaError {
fn from(value: uuid::Error) -> Self {
HyphaError::new(value.to_string().as_str())
}
}
impl From<XsdBusError> for HyphaError {
fn from(value: XsdBusError) -> Self {
HyphaError::new(value.to_string().as_str())
}
}