tree-wide: rename 'backup-ns' API parameters to 'ns'

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller
2022-05-13 13:04:05 +02:00
committed by Thomas Lamprecht
parent f07e660153
commit bc21ade293
10 changed files with 111 additions and 115 deletions

View File

@ -141,7 +141,7 @@ async fn api_datastore_list_snapshots(
None => json!({}),
};
if !ns.is_root() {
args["backup-ns"] = serde_json::to_value(ns)?;
args["ns"] = serde_json::to_value(ns)?;
}
let mut result = client.get(&path, Some(args)).await?;
@ -284,7 +284,7 @@ async fn list_backup_groups(param: Value) -> Result<Value, Error> {
&path,
match backup_ns.is_root() {
true => None,
false => Some(json!({ "backup-ns": backup_ns })),
false => Some(json!({ "ns": backup_ns })),
},
)
.await?;

View File

@ -23,7 +23,7 @@ use crate::{
fn snapshot_args(ns: &BackupNamespace, snapshot: &BackupDir) -> Result<Value, Error> {
let mut args = serde_json::to_value(snapshot)?;
if !ns.is_root() {
args["backup-ns"] = serde_json::to_value(ns)?;
args["ns"] = serde_json::to_value(ns)?;
}
Ok(args)
}