Total Complexity | 1 |
Total Lines | 25 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | from backuppc_clone.DataLayer import DataLayer |
||
2 | from backuppc_clone.command.BaseCommand import BaseCommand |
||
3 | from backuppc_clone.helper.PoolSync import PoolSync |
||
4 | |||
5 | |||
6 | class PoolCommand(BaseCommand): |
||
7 | """ |
||
8 | Inventories the original pool, prunes the clone pool and maintains the database |
||
9 | |||
10 | pool |
||
11 | {clone.cfg : The configuration file of the clone} |
||
12 | """ |
||
13 | |||
14 | # ------------------------------------------------------------------------------------------------------------------ |
||
15 | def _handle_command(self) -> None: |
||
16 | """ |
||
17 | Executes the command. |
||
18 | """ |
||
19 | self._io.title('Maintaining Clone Pool and Pool Metadata') |
||
20 | |||
21 | helper = PoolSync(self._io) |
||
22 | helper.synchronize() |
||
23 | |||
24 | DataLayer.instance.commit() |
||
25 | |||
27 |