1
|
|
|
""" |
2
|
|
|
BackupPC Clone |
3
|
|
|
""" |
4
|
|
|
from typing import List |
5
|
|
|
|
6
|
|
|
from cleo import Application, Command |
7
|
|
|
|
8
|
|
|
from backuppc_clone.command.AutoCommand import AutoCommand |
9
|
|
|
from backuppc_clone.command.BackupCloneCommand import BackupCloneCommand |
10
|
|
|
from backuppc_clone.command.BackupDeleteCommand import BackupDeleteCommand |
11
|
|
|
from backuppc_clone.command.BackupPreScanCommand import BackupPreScanCommand |
12
|
|
|
from backuppc_clone.command.HostDeleteCommand import HostDeleteCommand |
13
|
|
|
from backuppc_clone.command.InitCloneCommand import InitCloneCommand |
14
|
|
|
from backuppc_clone.command.InitOriginalCommand import InitOriginalCommand |
15
|
|
|
from backuppc_clone.command.PoolCommand import PoolCommand |
16
|
|
|
from backuppc_clone.command.SyncAuxiliaryCommand import SyncAuxiliaryCommand |
17
|
|
|
from backuppc_clone.command.TraversePerformanceTestCommand import TraversePerformanceTestCommand |
18
|
|
|
from backuppc_clone.command.VacuumCommand import VacuumCommand |
19
|
|
|
|
20
|
|
|
|
21
|
|
View Code Duplication |
class BackupPcCloneApplication(Application): |
|
|
|
|
22
|
|
|
""" |
23
|
|
|
The BackupPC Clone application. |
24
|
|
|
""" |
25
|
|
|
|
26
|
|
|
# ------------------------------------------------------------------------------------------------------------------ |
27
|
|
|
def __init__(self): |
28
|
|
|
""" |
29
|
|
|
Object constructor |
30
|
|
|
""" |
31
|
|
|
Application.__init__(self, 'backuppc-clone', '1.0.1') |
32
|
|
|
|
33
|
|
|
# ------------------------------------------------------------------------------------------------------------------ |
34
|
|
|
def get_default_commands(self) -> List[Command]: |
35
|
|
|
""" |
36
|
|
|
Returns the default commands of this application. |
37
|
|
|
|
38
|
|
|
:rtype: list[Command] |
39
|
|
|
""" |
40
|
|
|
commands = Application.get_default_commands(self) |
41
|
|
|
|
42
|
|
|
commands.append(AutoCommand()) |
43
|
|
|
commands.append(BackupCloneCommand()) |
44
|
|
|
commands.append(BackupDeleteCommand()) |
45
|
|
|
commands.append(BackupPreScanCommand()) |
46
|
|
|
commands.append(HostDeleteCommand()) |
47
|
|
|
commands.append(InitCloneCommand()) |
48
|
|
|
commands.append(InitOriginalCommand()) |
49
|
|
|
commands.append(PoolCommand()) |
50
|
|
|
commands.append(SyncAuxiliaryCommand()) |
51
|
|
|
commands.append(TraversePerformanceTestCommand()) |
52
|
|
|
commands.append(VacuumCommand()) |
53
|
|
|
|
54
|
|
|
return commands |
55
|
|
|
|
56
|
|
|
# ---------------------------------------------------------------------------------------------------------------------- |
57
|
|
|
|