api2/tape/backup: add 'force-media-set' parameter to manual backup

so that a user can force a new media set, e.g. if he uses the
allocation policy 'continue', but wants to manually start a new
media-set.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak
2021-05-10 16:45:53 +02:00
committed by Dietmar Maurer
parent 10f788b7eb
commit e953029e8f
4 changed files with 31 additions and 9 deletions

View File

@ -129,7 +129,7 @@ pub async fn list_media(
// Call start_write_session, so that we show the same status a
// backup job would see.
pool.force_media_availability();
pool.start_write_session(current_time)?;
pool.start_write_session(current_time, false)?;
for media in pool.list_media() {
let expired = pool.media_is_expired(&media, current_time);