import py_module.docker as docker
from .base import Base
from .export_log import Export_log
from .code_stub import Code_stub
from .mail_maintenance import Mail_maintenance
from .team_integration import Team_Integration
from .team_integration_rabbit import Team_Integration_Rabbit
from .team_integration_postgres import Team_Integration_Postgres
from .team_update import Team_Update
from .cs_update import CS_Update
from .ds_update import DS_Update
from .team_to_cs import Team_to_cs
from .docker_installer import Docker_installer
from .cert_generator import Cert_Generator
class Updates(Base):
    def preload(self):
        self.logger.info('Проверяю наличие Docker-среды');
        with Docker_installer() as run:
            pass
        self.dockercli = docker.from_env();
        self.semaphore = ["Выберите необходимое действие:",
            [
                {
                    "lang": 'Обновление "Корпоративный сервер 2024" (14752 -> 15877))',
                    "exec": CS_Update,
                    "logger_name": "CS_Update",
                    "logger_level": self.logger_level,
                },
                {
                    "lang": 'Обновление "Сервера документов" для однонодовой архитектуры (622 -> 923))',
                    "exec": DS_Update,
                    "logger_name": "DS_Update",
                    "logger_level": self.logger_level,
                },
                {
                    "lang": 'Обновление "Р7-Команда" (до версии 1.11.0-489)',
                    "exec": Team_Update,
                    "logger_name": "Team_Update",
                    "logger_level": self.logger_level,
                },
            ]
        ];
