Spaces:
Sleeping
Sleeping
def get_service_by_name(service_name): | |
if service_name == "openvpn": | |
from openvpn.openvpn_service import OpenVPNService | |
return OpenVPNService() | |
if service_name == "corporate_email": | |
from corporate_email.corporate_email_service import CorporateEmailService | |
return CorporateEmailService() | |
if service_name == "internet_access": | |
from internet_access.internet_access_service import InternetAccessService | |
return InternetAccessService() | |
if service_name == "b2b": | |
from b2b.b2b_service import B2BService | |
return B2BService() | |
if service_name == "crm": | |
from crm.crm_service import CRMService | |
return CRMService() | |
if service_name == "one_c": | |
from one_c.one_c_service import OneCService | |
return OneCService() | |
if service_name == "borlas": | |
from borlas.borlas_service import BorlasService | |
return BorlasService() | |
if service_name == "print_and_scan": | |
from print_and_scan.print_and_scan_service import PrintAndScanService | |
return PrintAndScanService() | |
raise ValueError(f"Некорректное имя сервиса '{service_name}'") | |