move datastore config to pbs_config workspace

This commit is contained in:
Dietmar Maurer
2021-09-10 08:40:58 +02:00
parent ba3d7e19fb
commit e7d4be9d85
24 changed files with 311 additions and 342 deletions

View File

@ -11,11 +11,7 @@ use pbs_tools::format::HumanByte;
use pbs_api_types::{
User, TapeBackupJobSetup, SyncJobConfig, VerificationJobConfig,
APTUpdateInfo, GarbageCollectionStatus,
Userid, Notify, DatastoreNotify,
};
use crate::{
config::datastore::DataStoreConfig,
Userid, Notify, DatastoreNotify, DataStoreConfig,
};
const GC_OK_TEMPLATE: &str = r###"
@ -566,7 +562,7 @@ pub fn lookup_datastore_notify_settings(
let notify = DatastoreNotify { gc: None, verify: None, sync: None };
let (config, _digest) = match crate::config::datastore::config() {
let (config, _digest) = match pbs_config::datastore::config() {
Ok(result) => result,
Err(_) => return (email, notify),
};

View File

@ -1,8 +1,6 @@
use std::path::Path;
use std::process::Command;
use crate::config::datastore;
fn files() -> Vec<&'static str> {
vec![
"/etc/hostname",
@ -35,7 +33,7 @@ type FunctionMapping = (&'static str, fn() -> String);
fn function_calls() -> Vec<FunctionMapping> {
vec![
("Datastores", || {
let config = match datastore::config() {
let config = match pbs_config::datastore::config() {
Ok((config, _digest)) => config,
_ => return String::from("could not read datastore config"),
};