/
var
/
opt
/
nydus
/
ops
/
customer_local_ops
/
control_panel
/
__pycache__
/
up file
home
� <�jo5 � � � d dl Z d dlZd dlmZmZmZmZ d dlmZm Z m Z mZ d dlm Z mZ e j e� ZdZdZ G d� d� Z G d � d e � Zy)� N)�Any�Tuple�Dict�List)�NydusResult�Ops�ResourceType�OpType)�retry�Retry� � c �l � e Zd ZdZdZdZdZdZg d�Ze j eededed j e� iie j eededed j e� iie j eededed j e� iie j eededed j e� iiiZd efd�Zdd edee d efd�Zy)�OSPleskzVMixin class representing common functionality and constants for Plesk between all OSes�enable_plesk�run_disable_session_ip_check�run_hide_internal_ip� setup_cmd)z&{init_conf_cmd} {init_conf_setup_flag}z-name adminz-passwd {password}z-license_agreed truez-email noreply@secureserver.netz-admin_info_not_required trueFT� �returnc � � t �)z�Find the installation directory for Plesk :raises RuntimeError: If a Plesk path cannot be found :return: Full path to Plesk installation )�NotImplementedError)�selfs �W/opt/nydus/tmp/pip-target-hb7welcc/lib/python/customer_local_ops/control_panel/plesk.py� get_plesk_dirzOSPlesk.get_plesk_dir@ s � � "�!� N�filename�dirsc � � |�dg}|}|�|j |� t j j | j � g|��� S )a� Get the path for a Plesk file/command/directory :param filename: Name of file or executable. If None, only directory is returned. :param dirs: List of directories under Plesk directory, in order of depth. These are joined to make the path. :raises RuntimeError: If a Plesk path cannot be found :return: Full path to Plesk file/command/directory �bin)�append�os�path�joinr )r r r �argss r �get_path_pleskzOSPlesk.get_path_pleskI sH � � �<��7�D������K�K��!��w�w�|�|�D�.�.�0�8�4�8�8r )NN)�__name__� __module__�__qualname__�__doc__�OP_ENABLE_PLESK�RUN_DISABLE_SESSION_IP_CHECK�RUN_HIDE_INTERNAL_IP� SETUP_CMD�"PLESK_SETUP_CMD_FORMAT_STRING_LISTr � OPENSTACKr$ �OVH�VIRTUOZZO_VM�OPENSTACK_HOSTINGCLOUD� PLESK_OPS_RESOURCE_ATTRIBUTE_MAP�strr r r&