refactor
This commit is contained in:
+11
-4
@@ -1,14 +1,15 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import timedelta
|
||||
from uuid import UUID
|
||||
|
||||
from .disk import Disk
|
||||
from .messages import CANNOT_FIND_BACKUP_DRIVE, ALREADY_IMPORTED, NOT_IMPORTED
|
||||
from .misc import MAPPER_PATH, DISK_BY_UUID
|
||||
from .zfs import ZFS
|
||||
from .commands.zfs import ZFS
|
||||
from .dataset import Dataset
|
||||
from .zfs_path import ZFSPath
|
||||
from .zpool import ZPool
|
||||
from .commands.zpool import ZPool
|
||||
|
||||
|
||||
class Pool:
|
||||
@@ -52,9 +53,15 @@ class ExternalPool(Pool):
|
||||
self._imported = False
|
||||
print(f"Exported {self.name}. Disk {self._disk.uuid} can be removed.")
|
||||
|
||||
def scrub(self, skip_if_recently_scrubbed: bool) -> None:
|
||||
def scrub(
|
||||
self, skip_if_recently_scrubbed: bool, recent_scrub_timedelta: timedelta
|
||||
) -> None:
|
||||
print(f"Scrubbing {self._name}")
|
||||
ZPool.scrub(self, skip_if_recently_scrubbed=skip_if_recently_scrubbed)
|
||||
ZPool.scrub(
|
||||
self,
|
||||
skip_if_recently_scrubbed=skip_if_recently_scrubbed,
|
||||
recent_scrub_timedelta=recent_scrub_timedelta,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def find_from_dict(cls, backup_pools: dict[str, UUID]) -> ExternalPool:
|
||||
|
||||
Reference in New Issue
Block a user