update functionality for the brain #2

Merged
ghe0 merged 11 commits from new-updater into main 2025-01-09 22:29:56 +00:00
2 changed files with 12 additions and 9 deletions
Showing only changes of commit b5943ba465 - Show all commits

@ -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 {

@ -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;
} }