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 return_type = &api2::admin::datastore::API_METHOD_GARBAGE_COLLECTION_STATUS.returns;
let options = default_table_format_options();
- format_and_print_result_full(&mut data, schema, &output_format, &options);
+ format_and_print_result_full(&mut data, return_type, &output_format, &options);
Ok(Value::Null)
}
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 return_type = &api2::node::tasks::API_METHOD_LIST_TASKS.returns;
let options = default_table_format_options()
.column(ColumnConfig::new("starttime").right_align(false).renderer(tools::format::render_epoch))
.column(ColumnConfig::new("upid"))
.column(ColumnConfig::new("status").renderer(tools::format::render_task_status));
- format_and_print_result_full(&mut data, schema, &output_format, &options);
+ format_and_print_result_full(&mut data, return_type, &output_format, &options);
Ok(Value::Null)
}
.column(ColumnConfig::new("Version"))
.column(ColumnConfig::new("ExtraInfo").header("Extra Info"))
;
- let schema = &crate::api2::node::apt::API_RETURN_SCHEMA_GET_VERSIONS;
+ let return_type = &crate::api2::node::apt::API_METHOD_GET_VERSIONS.returns;
- format_and_print_result_full(&mut packages, schema, &output_format, &options);
+ format_and_print_result_full(&mut packages, return_type, &output_format, &options);
Ok(Value::Null)
}