From ca60c371e25a404af9bc70eda0a4ca5717fbe490 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Wed, 8 May 2019 12:35:15 +0200 Subject: [PATCH] api: rename h2upload to backup --- src/api2/admin/datastore.rs | 6 +++--- src/api2/admin/datastore/{h2upload.rs => backup.rs} | 4 ++-- src/bin/h2test.rs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) rename src/api2/admin/datastore/{h2upload.rs => backup.rs} (98%) diff --git a/src/api2/admin/datastore.rs b/src/api2/admin/datastore.rs index 71e6df1b..81ebd294 100644 --- a/src/api2/admin/datastore.rs +++ b/src/api2/admin/datastore.rs @@ -20,7 +20,7 @@ use crate::server::WorkerTask; mod pxar; mod upload; -mod h2upload; +mod backup; fn group_backups(backup_list: Vec) -> HashMap> { @@ -405,9 +405,9 @@ pub fn router() -> Router { Router::new() .upgrade(upload::api_method_upgrade_upload())) .subdir( - "h2upload", + "backup", Router::new() - .upgrade(h2upload::api_method_upgrade_h2upload())) + .upgrade(backup::api_method_upgrade_backup())) .subdir( "gc", Router::new() diff --git a/src/api2/admin/datastore/h2upload.rs b/src/api2/admin/datastore/backup.rs similarity index 98% rename from src/api2/admin/datastore/h2upload.rs rename to src/api2/admin/datastore/backup.rs index 075a5f82..47bfad61 100644 --- a/src/api2/admin/datastore/h2upload.rs +++ b/src/api2/admin/datastore/backup.rs @@ -17,10 +17,10 @@ use crate::api_schema::*; use crate::server::formatter::*; use crate::server::WorkerTask; -pub fn api_method_upgrade_h2upload() -> ApiAsyncMethod { +pub fn api_method_upgrade_backup() -> ApiAsyncMethod { ApiAsyncMethod::new( upgrade_h2upload, - ObjectSchema::new("Experimental h2 server") + ObjectSchema::new("Upgraded to backup protocol.") .required("store", StringSchema::new("Datastore name.")), ) } diff --git a/src/bin/h2test.rs b/src/bin/h2test.rs index 1b1436f5..c52b2038 100644 --- a/src/bin/h2test.rs +++ b/src/bin/h2test.rs @@ -50,7 +50,7 @@ fn run() -> Result<(), Error> { let mut client = HttpClient::new(host, username)?; - let h2client = client.h2upgrade("/api2/json/admin/datastore/store2/h2upload"); + let h2client = client.h2upgrade("/api2/json/admin/datastore/store2/backup"); let res = h2client.and_then(|mut h2| { println!("start http2");