From d43fdc06a188184d6162e404c0043d8405c38bb4 Mon Sep 17 00:00:00 2001 From: Ramil_Algayev Date: Wed, 25 Dec 2024 00:50:46 +0400 Subject: [PATCH] created update functionality, :P --- cli-mock/src/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cli-mock/src/main.rs b/cli-mock/src/main.rs index a30efc4..879fb3b 100644 --- a/cli-mock/src/main.rs +++ b/cli-mock/src/main.rs @@ -138,9 +138,10 @@ async fn delete_vm(mut client: BrainCliServiceClient, uuid: &str) -> Re async fn update_vm_request( mut client: BrainCliServiceClient, node_pubkey: &str, + uuid: &str, ) -> Result<()> { let req = UpdateVmRequest { - uuid: String::new(), + uuid: uuid.to_string(), node_pubkey: node_pubkey.to_string(), vcpus: 4, memory_mb: 4096, @@ -187,7 +188,7 @@ async fn main() -> Result<()> { let contracts = list_contracts(client.clone()).await?; for contract in contracts { - if let Err(e) = update_vm_request(client.clone(), &contract.uuid).await { + if let Err(e) = update_vm_request(client.clone(), &use_default_string(), &contract.uuid).await { log::error!("Received error when updating VM {}: {e:?}", &contract.uuid); } }