move datastore config to pbs_config workspace
This commit is contained in:
@ -8,7 +8,7 @@ use proxmox::api::{
|
||||
use proxmox::api::router::Router;
|
||||
|
||||
use pbs_api_types::{
|
||||
Authid, ZpoolListItem, ZfsRaidLevel, ZfsCompressionType,
|
||||
Authid, ZpoolListItem, ZfsRaidLevel, ZfsCompressionType, DataStoreConfig,
|
||||
NODE_SCHEMA, ZPOOL_NAME_SCHEMA, DATASTORE_SCHEMA, DISK_ARRAY_SCHEMA,
|
||||
DISK_LIST_SCHEMA, ZFS_ASHIFT_SCHEMA, UPID_SCHEMA,
|
||||
PRIV_SYS_AUDIT, PRIV_SYS_MODIFY,
|
||||
@ -18,7 +18,6 @@ use crate::tools::disks::{
|
||||
zpool_list, zpool_status, parse_zpool_status_config_tree, vdev_list_to_tree,
|
||||
DiskUsageType,
|
||||
};
|
||||
use crate::config::datastore::{self, DataStoreConfig};
|
||||
|
||||
use crate::server::WorkerTask;
|
||||
|
||||
@ -285,11 +284,11 @@ pub fn create_zpool(
|
||||
}
|
||||
|
||||
if add_datastore {
|
||||
let lock = datastore::lock_config()?;
|
||||
let lock = pbs_config::datastore::lock_config()?;
|
||||
let datastore: DataStoreConfig =
|
||||
serde_json::from_value(json!({ "name": name, "path": mount_point }))?;
|
||||
|
||||
let (config, _digest) = datastore::config()?;
|
||||
let (config, _digest) = pbs_config::datastore::config()?;
|
||||
|
||||
if config.sections.get(&datastore.name).is_some() {
|
||||
bail!("datastore '{}' already exists.", datastore.name);
|
||||
|
Reference in New Issue
Block a user