updater #1

Merged
ghe0 merged 13 commits from updater into master 2024-12-25 23:00:16 +00:00
Showing only changes of commit d43fdc06a1 - Show all commits

@ -138,9 +138,10 @@ async fn delete_vm(mut client: BrainCliServiceClient<Channel>, uuid: &str) -> Re
async fn update_vm_request(
mut client: BrainCliServiceClient<Channel>,
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);
}
}