Can assign a group to VMs
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -21,7 +21,7 @@ struct VMUuid {
|
||||
|
||||
/// Create a new VM
|
||||
pub async fn create(client: LibVirtReq, req: web::Json<VMInfo>) -> HttpResult {
|
||||
let domain = match req.0.as_tomain() {
|
||||
let domain = match req.0.as_domain() {
|
||||
Ok(d) => d,
|
||||
Err(e) => {
|
||||
log::error!("Failed to extract domain info! {e}");
|
||||
@ -83,6 +83,8 @@ pub async fn get_single(client: LibVirtReq, id: web::Path<SingleVMUUidReq>) -> H
|
||||
}
|
||||
};
|
||||
|
||||
log::debug!("INFO={info:#?}");
|
||||
|
||||
let state = client.get_domain_state(id.uid).await?;
|
||||
|
||||
Ok(HttpResponse::Ok().json(VMInfoAndState {
|
||||
@ -112,7 +114,7 @@ pub async fn update(
|
||||
id: web::Path<SingleVMUUidReq>,
|
||||
req: web::Json<VMInfo>,
|
||||
) -> HttpResult {
|
||||
let mut domain = match req.0.as_tomain() {
|
||||
let mut domain = match req.0.as_domain() {
|
||||
Ok(d) => d,
|
||||
Err(e) => {
|
||||
log::error!("Failed to extract domain info! {e}");
|
||||
|
Reference in New Issue
Block a user