del: stale code
This commit is contained in:
+1
-13
@@ -354,10 +354,6 @@ class Pool:
|
|||||||
def name(self) -> str:
|
def name(self) -> str:
|
||||||
return self._name
|
return self._name
|
||||||
|
|
||||||
# TODO what's with this?
|
|
||||||
# def datasets_to_backup(self, do_not_backup: list[str]) -> list[Dataset]:
|
|
||||||
# return [d for d in self.datasets if d.qualified_name not in do_not_backup]
|
|
||||||
|
|
||||||
|
|
||||||
class ExternalPool(Pool):
|
class ExternalPool(Pool):
|
||||||
def __init__(self, name: str, disk: Disk):
|
def __init__(self, name: str, disk: Disk):
|
||||||
@@ -376,7 +372,7 @@ class ExternalPool(Pool):
|
|||||||
if not self._imported:
|
if not self._imported:
|
||||||
raise ValueError(NOT_IMPORTED, self.name)
|
raise ValueError(NOT_IMPORTED, self.name)
|
||||||
self._export_pool()
|
self._export_pool()
|
||||||
self._disk.encrypt() # TODO inline?
|
self._disk.encrypt()
|
||||||
self._imported = False
|
self._imported = False
|
||||||
print(f"Exported {self.name}. Disk {self._disk.uuid} can be removed.")
|
print(f"Exported {self.name}. Disk {self._disk.uuid} can be removed.")
|
||||||
|
|
||||||
@@ -400,14 +396,6 @@ class ExternalPool(Pool):
|
|||||||
print(CANNOT_FIND_BACKUP_DRIVE)
|
print(CANNOT_FIND_BACKUP_DRIVE)
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
# TODO what's with this?
|
|
||||||
# def datasets_to_backup(self, do_not_backup: list[str]) -> list[Dataset]:
|
|
||||||
# def replace_pool_name(old_name: str):
|
|
||||||
# "/".join([self._name, old_name.split("/", maxsplit=1)[1]])
|
|
||||||
#
|
|
||||||
# do_not_backup_correct_name = [replace_pool_name(item) for item in do_not_backup]
|
|
||||||
# return [d for d in self.datasets if d.qualified_name not in do_not_backup_correct_name]
|
|
||||||
|
|
||||||
def clean_old_snapshots(self):
|
def clean_old_snapshots(self):
|
||||||
print("Cleaning old snapshots")
|
print("Cleaning old snapshots")
|
||||||
for dataset in self.datasets:
|
for dataset in self.datasets:
|
||||||
|
|||||||
Reference in New Issue
Block a user