/
var
/
opt
/
nydus
/
ops
/
customer_local_ops
/
control_panel
/
__pycache__
/
up file
home
� <�jz � �~ � d dl mZmZmZ d dlZd dlmZmZ ej e � Z G d� d� Z G d� de� Zy)� )�Dict�Any�TupleN)�Ops�OpTypec � � e Zd ZdZy)�OSISPConfigzZMixin class representing common functionality and constants for ISPConfig between all OSesN)�__name__� __module__�__qualname__�__doc__� � �[/opt/nydus/tmp/pip-target-hb7welcc/lib/python/customer_local_ops/control_panel/ispconfig.pyr r s � �dr r c � � e Zd Zej ZdZdeee f de de fd�Z deee f deee f fd�Z deee f de de fd�Zdeee f deee f fd�Zy) � ISPConfigN�payload�args�returnc � � t j d� |d }d}| j �| j |� | _ t j dt |� |� | j |� \ }}|s| j ||f|� S t j d� | j j |� d| j dd|� fS ) z�Changes the server hostname via an op for the local operating system and an op for ispconfig :param payload: A dict containing input data zISPConfig.change_hostname start�os_op�change_hostnamez:ISPConfig.change_hostname deferring to OS operation: %s.%sz!Change the hostname in ISPConfig.Tzhostname changed successfully� ) �LOG�info�os_op_instance� get_os_op�str�_change_os_hostname�build_result_from_other_result�change_ispconfig_hostname�build_result_dict��selfr r r �op_name�success� os_results r r zISPConfig.change_hostname s� � � ���2�3��� ��#�����&�"&�.�.��"7�D�����M�s��P�� �!�5�5�g�>������6�6���7K�W�U�U����4�5����5�5�g�>��T�+�+�,K�R�QX�Y�Y�Yr c �� � | j j |� }| j |� }t j d|j |j |j � |j � S )z�Changes the server hostname via an op for the local operating system :param payload: A dict containing input data z6ISPConfig.change_hostname os_op_result - %s - %s - %s) r r �get_result_datar r r&