From: Wolfgang Bumiller Date: Fri, 10 Jul 2020 09:05:19 +0000 (+0200) Subject: update proxmox crate to 0.2.0 X-Git-Tag: v0.8.6~7 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=660a34892d7fc708824d73c3deba7a87a26bd30f;p=proxmox-backup.git update proxmox crate to 0.2.0 Signed-off-by: Wolfgang Bumiller --- diff --git a/Cargo.toml b/Cargo.toml index 94ec63df..6058276d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,7 +38,7 @@ pam-sys = "0.5" percent-encoding = "2.1" pin-utils = "0.1.0" pathpatterns = "0.1.2" -proxmox = { version = "0.1.42", features = [ "sortable-macro", "api-macro" ] } +proxmox = { version = "0.2.0", features = [ "sortable-macro", "api-macro" ] } #proxmox = { git = "ssh://gitolite3@proxdev.maurer-it.com/rust/proxmox", version = "0.1.2", features = [ "sortable-macro", "api-macro" ] } #proxmox = { path = "../proxmox/proxmox", features = [ "sortable-macro", "api-macro" ] } proxmox-fuse = "0.1.0" diff --git a/src/api2/admin/datastore.rs b/src/api2/admin/datastore.rs index 66776ef6..0a93b47c 100644 --- a/src/api2/admin/datastore.rs +++ b/src/api2/admin/datastore.rs @@ -535,7 +535,7 @@ macro_rules! add_common_prune_prameters { pub const API_RETURN_SCHEMA_PRUNE: Schema = ArraySchema::new( "Returns the list of snapshots and a flag indicating if there are kept or removed.", - PruneListItem::API_SCHEMA + &PruneListItem::API_SCHEMA ).schema(); const API_METHOD_PRUNE: ApiMethod = ApiMethod::new( diff --git a/src/bin/proxmox-backup-manager.rs b/src/bin/proxmox-backup-manager.rs index 7d6af956..7ae0852f 100644 --- a/src/bin/proxmox-backup-manager.rs +++ b/src/bin/proxmox-backup-manager.rs @@ -127,7 +127,7 @@ async fn garbage_collection_status(param: Value) -> Result { let mut result = client.get(&path, None).await?; let mut data = result["data"].take(); - let schema = api2::admin::datastore::API_RETURN_SCHEMA_GARBAGE_COLLECTION_STATUS; + let schema = &api2::admin::datastore::API_RETURN_SCHEMA_GARBAGE_COLLECTION_STATUS; let options = default_table_format_options(); @@ -193,7 +193,7 @@ async fn task_list(param: Value) -> Result { let mut result = client.get("api2/json/nodes/localhost/tasks", Some(args)).await?; let mut data = result["data"].take(); - let schema = api2::node::tasks::API_RETURN_SCHEMA_LIST_TASKS; + let schema = &api2::node::tasks::API_RETURN_SCHEMA_LIST_TASKS; let options = default_table_format_options() .column(ColumnConfig::new("starttime").right_align(false).renderer(tools::format::render_epoch)) diff --git a/src/bin/proxmox_backup_client/benchmark.rs b/src/bin/proxmox_backup_client/benchmark.rs index 434250cf..6392f282 100644 --- a/src/bin/proxmox_backup_client/benchmark.rs +++ b/src/bin/proxmox_backup_client/benchmark.rs @@ -170,7 +170,7 @@ fn render_result( ) -> Result<(), Error> { let mut data = serde_json::to_value(benchmark_result)?; - let schema = BenchmarkResult::API_SCHEMA; + let schema = &BenchmarkResult::API_SCHEMA; let render_speed = |value: &Value, _record: &Value| -> Result { match value["speed"].as_f64() {