prune: allow passing namespace

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht
2022-05-06 11:27:15 +02:00
parent a7f5e64154
commit 2f5417f845
2 changed files with 13 additions and 6 deletions

View File

@ -1007,6 +1007,10 @@ pub fn prune(
store: {
schema: DATASTORE_SCHEMA,
},
ns: {
type: BackupNamespace,
optional: true,
},
},
},
returns: {
@ -1022,6 +1026,7 @@ pub fn prune_datastore(
dry_run: bool,
prune_options: PruneOptions,
store: String,
ns: Option<BackupNamespace>,
_param: Value,
rpcenv: &mut dyn RpcEnvironment,
) -> Result<String, Error> {
@ -1043,8 +1048,8 @@ pub fn prune_datastore(
worker,
auth_id,
prune_options,
&store,
datastore,
ns.unwrap_or_default(),
dry_run,
)
},