src/bin/proxmox_backup_manager/disk.rs: add cli to create mounted disks

This commit is contained in:
Dietmar Maurer
2020-06-17 08:07:54 +02:00
parent d0eccae37d
commit 1aef491e24
2 changed files with 90 additions and 2 deletions

View File

@ -62,7 +62,7 @@ pub struct DatastoreMountInfo {
},
)]
/// List systemd datastore mount units.
fn list_datastore_mounts() -> Result<Vec<DatastoreMountInfo>, Error> {
pub fn list_datastore_mounts() -> Result<Vec<DatastoreMountInfo>, Error> {
lazy_static::lazy_static! {
static ref MOUNT_NAME_REGEX: regex::Regex = regex::Regex::new(r"^mnt-datastore-(.+)\.mount$").unwrap();
@ -123,7 +123,7 @@ fn list_datastore_mounts() -> Result<Vec<DatastoreMountInfo>, Error> {
},
)]
/// Create a Filesystem on an unused disk. Will be mounted under '/mnt/datastore/<name>'.".
fn create_datastore_disk(
pub fn create_datastore_disk(
name: String,
disk: String,
add_datastore: Option<bool>,