another import cleanup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller
2021-09-01 14:37:11 +02:00
parent 42dad3abd3
commit 4c1b776168
20 changed files with 42 additions and 41 deletions

View File

@ -27,7 +27,7 @@ pub fn get_lvm_devices(
let mut command = std::process::Command::new(PVS_BIN_PATH);
command.args(&["--reportformat", "json", "--noheadings", "--readonly", "-o", "pv_name"]);
let output = crate::tools::run_command(command, None)?;
let output = pbs_tools::run_command(command, None)?;
let mut device_set: HashSet<u64> = HashSet::new();

View File

@ -19,7 +19,7 @@ use proxmox::sys::linux::procfs::{MountInfo, mountinfo::Device};
use proxmox::{io_bail, io_format_err};
use proxmox::api::api;
use crate::api2::types::{BLOCKDEVICE_NAME_REGEX, StorageStatus};
use pbs_api_types::{BLOCKDEVICE_NAME_REGEX, StorageStatus};
mod zfs;
pub use zfs::*;
@ -574,7 +574,7 @@ pub fn get_lsblk_info() -> Result<Vec<LsblkInfo>, Error> {
let mut command = std::process::Command::new("lsblk");
command.args(&["--json", "-o", "path,parttype,fstype"]);
let output = crate::tools::run_command(command, None)?;
let output = pbs_tools::run_command(command, None)?;
let mut output: serde_json::Value = output.parse()?;
@ -886,7 +886,7 @@ pub fn reread_partition_table(disk: &Disk) -> Result<(), Error> {
command.arg("--rereadpt");
command.arg(disk_path);
crate::tools::run_command(command, None)?;
pbs_tools::run_command(command, None)?;
Ok(())
}
@ -905,7 +905,7 @@ pub fn inititialize_gpt_disk(disk: &Disk, uuid: Option<&str>) -> Result<(), Erro
command.arg(disk_path);
command.args(&["-U", uuid]);
crate::tools::run_command(command, None)?;
pbs_tools::run_command(command, None)?;
Ok(())
}
@ -922,7 +922,7 @@ pub fn create_single_linux_partition(disk: &Disk) -> Result<Disk, Error> {
command.args(&["-n1", "-t1:8300"]);
command.arg(disk_path);
crate::tools::run_command(command, None)?;
pbs_tools::run_command(command, None)?;
let mut partitions = disk.partitions()?;
@ -975,7 +975,7 @@ pub fn create_file_system(disk: &Disk, fs_type: FileSystemType) -> Result<(), Er
command.args(&["-t", &fs_type]);
command.arg(disk_path);
crate::tools::run_command(command, None)?;
pbs_tools::run_command(command, None)?;
Ok(())
}
@ -1013,7 +1013,7 @@ pub fn get_fs_uuid(disk: &Disk) -> Result<String, Error> {
command.args(&["-o", "export"]);
command.arg(disk_path);
let output = crate::tools::run_command(command, None)?;
let output = pbs_tools::run_command(command, None)?;
for line in output.lines() {
if let Some(uuid) = line.strip_prefix("UUID=") {

View File

@ -91,7 +91,7 @@ pub fn get_smart_data(
};
command.arg(disk_path);
let output = crate::tools::run_command(command, None)?;
let output = pbs_tools::run_command(command, None)?;
let output: serde_json::Value = output.parse()?;

View File

@ -147,7 +147,7 @@ pub fn zpool_list(pool: Option<String>, verbose: bool) -> Result<Vec<ZFSPoolInfo
if let Some(pool) = pool { command.arg(pool); }
let output = crate::tools::run_command(command, None)?;
let output = pbs_tools::run_command(command, None)?;
parse_zpool_list(&output)
}

View File

@ -364,7 +364,7 @@ pub fn zpool_status(pool: &str) -> Result<Vec<(String, String)>, Error> {
let mut command = std::process::Command::new("zpool");
command.args(&["status", "-p", "-P", pool]);
let output = crate::tools::run_command(command, None)?;
let output = pbs_tools::run_command(command, None)?;
parse_zpool_status(&output)
}