File manager - Edit - /usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware/imc/__pycache__/guestcust_util.cpython-310.pyc
Back
o o@�d�O � @ s� d dl Z d dlZd dlZd dlZd dlmZmZmZ ddlm Z ddl mZmZ ddl mZ ddlmZ ddlmZ dd lmZ dd lmZ ddlmZ e �e�ZdZd ZdZdZdZ dZ!dd� Z"dXdd�Z#dd� Z$dd� Z%dd� Z&dd� Z'dd� Z(d d!� Z)d"d#� Z*d$d%� Z+ dYd(d)�Z,dZd*d+�Z-d,d-� Z.d.d/� Z/d0d1� Z0d2d3� Z1 d[d6d7�Z2d8d9� Z3d:d;� Z4d<d=� Z5d>d?� Z6d@dA� Z7dBdC� Z8dDdE� Z9dFdG� Z:dHdI� Z;dJdK� Z<dLdM� Z=dNdO� Z>dPdQ� Z?dRdS� Z@dTdU� ZAdVdW� ZBdS )\� N)�safeyaml�subp�util� )�Config)�PostCustomScript�PreCustomScript)� ConfigFile)�NicConfigurator)�PasswordConfigurator)�GuestCustErrorEnum)�GuestCustEventEnum)�GuestCustStateEnumz/var/log/cloud-init.log�queryNicsSupported� connected�/var/run/vmware-imc� deployPkgzenable-custom-scriptsc C s� | sd S d}d}z"t �d| � tjd| gdgd�\}}|r&|�� }W ||fS W ||fS tyI } zt �d� t �|� W Y d }~||fS d }~ww )N� zError sending the RPC commandzSending RPC command: %szvmware-rpctoolr )�rcszFailed to send RPC command)�logger�debugr �rstrip� Exception� exception)�rpc�out�err�e� r �U/usr/lib/python3/dist-packages/cloudinit/sources/helpers/vmware/imc/guestcust_util.py�send_rpc( s$ �� ��r c C s<