Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
optional: true,
default: false,
},
- "backup-ns": {
+ "ns": {
schema: BACKUP_NAMESPACE_SCHEMA,
optional: true,
},
.as_str()
.unwrap_or(proxmox_sys::nodename());
- let backup_ns: BackupNamespace = match param.get("backup-ns") {
- Some(ns) => ns
- .as_str()
- .ok_or_else(|| format_err!("bad namespace {:?}", ns))?
- .parse()?,
- None => BackupNamespace::root(),
- };
+ let backup_ns = optional_ns_param(¶m)?;
let backup_type: BackupType = param["backup-type"].as_str().unwrap_or("host").parse()?;