tape: MediaPool::with_config() - remove name parameter
Not required, because config already contains the pool name.
This commit is contained in:
parent
26aa9aca40
commit
2afdc7f27d
@ -73,7 +73,7 @@ pub async fn list_media(pool: Option<String>) -> Result<Vec<MediaListEntry>, Err
|
||||
|
||||
let config: MediaPoolConfig = config.lookup("pool", pool_name)?;
|
||||
|
||||
let pool = MediaPool::with_config(pool_name, status_path, &config)?;
|
||||
let pool = MediaPool::with_config(status_path, &config)?;
|
||||
|
||||
let current_time = proxmox::tools::time::epoch_i64();
|
||||
|
||||
|
@ -82,7 +82,6 @@ impl MediaPool {
|
||||
|
||||
/// Creates a new instance using the media pool configuration
|
||||
pub fn with_config(
|
||||
name: &str,
|
||||
state_path: &Path,
|
||||
config: &MediaPoolConfig,
|
||||
) -> Result<Self, Error> {
|
||||
@ -91,7 +90,7 @@ impl MediaPool {
|
||||
|
||||
let retention = config.retention.clone().unwrap_or(String::from("keep")).parse()?;
|
||||
|
||||
MediaPool::new(name, state_path, allocation, retention)
|
||||
MediaPool::new(&config.name, state_path, allocation, retention)
|
||||
}
|
||||
|
||||
/// Returns the pool name
|
||||
|
Loading…
Reference in New Issue
Block a user