added ovmf_hash to UpdateVMResp

This commit is contained in:
Ramil_Algayev 2025-01-01 18:09:36 +04:00
parent 3ab668c4b1
commit b5943ba465
2 changed files with 12 additions and 9 deletions

@ -43,18 +43,19 @@ message NewVMReq {
message UpdateVMReq { message UpdateVMReq {
string uuid = 1; string uuid = 1;
uint32 disk_size_gb = 3; uint32 disk_size_gb = 2;
uint32 vcpus = 4; uint32 vcpus = 3;
uint32 memory_mb = 5; uint32 memory_mb = 4;
string kernel_url = 6; string kernel_url = 5;
string kernel_sha = 7; string kernel_sha = 6;
string dtrfs_url = 8; string dtrfs_url = 7;
string dtrfs_sha = 9; string dtrfs_sha = 8;
} }
message UpdateVMResp { message UpdateVMResp {
string uuid = 1; string uuid = 1;
string error = 3; string error = 2;
string ovmf_hash = 3;
} }
message VMContract { message VMContract {
@ -142,4 +143,4 @@ service BrainCliService {
rpc GetOneNode (NodeFilters) returns (NodeListResp); rpc GetOneNode (NodeFilters) returns (NodeListResp);
rpc DeleteVM (DeleteVMReq) returns (Empty); rpc DeleteVM (DeleteVMReq) returns (Empty);
rpc UpdateVM (UpdateVMReq) returns (UpdateVMResp); rpc UpdateVM (UpdateVMReq) returns (UpdateVMResp);
} }

@ -319,6 +319,7 @@ impl BrainData {
let _ = tx.send(grpc::UpdateVmResp { let _ = tx.send(grpc::UpdateVmResp {
uuid, uuid,
error: "Contract does not exist.".to_string(), error: "Contract does not exist.".to_string(),
ovmf_hash: "".to_string(),
}); });
return; return;
} }
@ -343,6 +344,7 @@ impl BrainData {
self.submit_updatevm_resp(grpc::UpdateVmResp { self.submit_updatevm_resp(grpc::UpdateVmResp {
uuid, uuid,
error: "Daemon is offline.".to_string(), error: "Daemon is offline.".to_string(),
ovmf_hash: "".to_string(),
}) })
.await; .await;
} }