/usr/share/l.v.e-manager/utils/__pycache__
� �TiV5��� �� � d dl mZ d dl mZ d dlmZmZ d dlZd dlmZ d dl m Z mZ d dlZdZ dZd gZd � Z G d� de� � Z G d � de� � Z G d� de� � ZdS )� )�absolute_import)�print_function)�exit_with_error�run_commandN)�abstractmethod)� WhmApiRequest�WhmApiError�admin�userzIThe event UAPI::LangPHP::php_set_vhost_versions was handled successfully.c �P � | t k rt � � S t � � S )z� Factory method that returns certain class depending on owner's type :param owner: Can be 'admin' or 'user' :return: )�OWNER_ADMIN�CPanelAdminApi� CPanelUserApi)�owners �p/builddir/build/BUILDROOT/lvemanager-7.11.26-1.el9.cloudlinux.x86_64/usr/share/l.v.e-manager/utils/cpanel_api.py�get_cpanel_api_classr s% � � ���������?�?�� c � � e Zd ZdZdZi Zed� � � Zed� � � Zed� � � Z e d� � � Zd� Ze d� � � Z d � Ze d � � � Zdd�Zd S )� CPanelApiz� Abstract method that defines abstract methods that must be implemented and common methods of the derived classes z --output=jsonc � � t d� � �)zo Checks whether operation is allowed to perform :param called_method: :return: z3Method check_operation_allowed must be implemented!��NotImplementedError��self� called_methods r �check_operation_allowedz!CPanelApi.check_operation_allowed+ s � � "�"W�X�X�Xr c � � t d� � �)z^ Depending on the passed arguments, the method builds running command z3Method prepare_running_command must be implemented!r )r r �params�return_jsons r �prepare_running_commandz!CPanelApi.prepare_running_command4 s � � "�"W�X�X�Xr c � � t d� � �)z� Some results are parsed before sending back to the called. This method parses it and returns transformed result. z(Method parse_result must be implemented!r )r r �results r �parse_resultzCPanelApi.parse_result<