mirror of https://gitlab.com/KKlochko/tui-rsync
Refactor the commands names. Add the service to remove all plans. Add tests for remove all command.dev
parent
76e555aefb
commit
2874dc76ad
@ -1,5 +1,5 @@
|
||||
from .remove_all_backup_plans_command import RemoveAllBackupBackupPlansCommand
|
||||
from .remove_backup_plan_destinations_command import RemoveBackupBackupPlanDestinationsCommand
|
||||
from .remove_backup_plan_command import RemoveBackupBackupPlanCommand
|
||||
from .remove_all_backup_plans_command import RemoveAllBackupPlansCommand
|
||||
from .remove_backup_plan_destinations_command import RemoveBackupPlanDestinationsCommand
|
||||
from .remove_backup_plan_command import RemoveBackupPlanCommand
|
||||
|
||||
__all__ = ['RemoveAllBackupBackupPlansCommand', 'RemoveBackupBackupPlanCommand', 'RemoveBackupBackupPlanDestinationsCommand']
|
||||
__all__ = ['RemoveAllBackupPlansCommand', 'RemoveBackupPlanCommand', 'RemoveBackupPlanDestinationsCommand']
|
||||
|
@ -1,5 +1,11 @@
|
||||
from .backup_plan_service import BackupPlanService
|
||||
from .get_all_backup_plans_service import GetAllBackupPlansService
|
||||
from .get_backup_plan_count_service import GetBackupPlanCountService
|
||||
from .remove_all_backup_plans_service import RemoveAllBackupPlansService
|
||||
|
||||
__all__ = ['BackupPlanService', 'GetAllBackupPlansService', 'GetBackupPlanCountService']
|
||||
__all__ = [
|
||||
'BackupPlanService',
|
||||
'GetAllBackupPlansService',
|
||||
'GetBackupPlanCountService',
|
||||
'RemoveAllBackupPlansService',
|
||||
]
|
||||
|
@ -0,0 +1,9 @@
|
||||
from tui_rsync.core.components.backup_plan.application.commands import RemoveAllBackupPlansCommand
|
||||
|
||||
|
||||
class RemoveAllBackupPlansService:
|
||||
def __init__(self, remove_all_backup_plan_command: RemoveAllBackupPlansCommand):
|
||||
self.remove_all_backup_plan_command = remove_all_backup_plan_command
|
||||
|
||||
def remove_all(self) -> bool:
|
||||
return self.remove_all_backup_plan_command.execute()
|
Loading…
Reference in new issue