MOON
Server: Apache
System: Linux vps.erhabenn.com.br 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64
User: sonne (1011)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: //usr/lib/python2.7/site-packages/azurelinuxagent/common/version.pyo
�
d�bc@s0ddlZddlZddlZddlZddljjZddljjj	Z	ddl
mZddlm
Z
mZdZd�Zd�Zd�Zd�Zd	�Ze
d
�Ze
d�Zd�Zd
�ZdZdZdZdjee�ZdZdje�Zdje�Z dje�Z!ej"e!�Z#ej"e!d�Z$ej"dje!��Z%dZ&dZ'ej"e'�Z(e�Z)e)dZ*e)dZ+e)dZ,e)dZ-ej.Z/ej.dZ0ej.dZ1ej.dZ2d�Z3d�Z4d �Z5e3�\Z6Z7d!�Z8e8�Z9d"�Z:dS(#i����N(tFlexibleVersion(tustrtget_linux_distributiont"_AZURE_GUEST_AGENT_DAEMON_VERSION_cCs8t|t�r|n	t|�}t|�tjt<dS(s�
    Sets the value of the _AZURE_GUEST_AGENT_DAEMON_VERSION_ environment variable.

    The given 'version' can be a FlexibleVersion or a string that can be parsed into a FlexibleVersion
    N(t
isinstanceRRtostenviront__DAEMON_VERSION_ENV_VARIABLE(tversiontflexible_version((sB/usr/lib/python2.7/site-packages/azurelinuxagent/common/version.pytset_daemon_version#s!cCs*ttjkr ttjt�Std�S(s�
    Retrieves the value of the _AZURE_GUEST_AGENT_DAEMON_VERSION_ environment variable.
    The value indicates the version of the daemon that started the current agent process or, if the current
    process is the daemon, the version of the current process.
    If the variable is not set (because the agent is < 2.2.53, or the process was not started by the daemon and
    the process is not the daemon itself) the function returns "0.0.0.0"
    s0.0.0.0(RRRR(((sB/usr/lib/python2.7/site-packages/azurelinuxagent/common/version.pytget_daemon_version-scCs4ddddg}tjd�}tjd�}tdd���}|j�}x�|D]�}|j|�}|j|�}|r�|jd�|d<qU|rU|jd�|d<|ddkr�d|d	<d|d
<q&|ddkr�d|d	<d|d
<q&|dd
kr&d|d	<d|d
<q&qUqUWWdQX|S(s�
    Add this workaround for detecting F5 products because BIG-IP/IQ/etc do
    not show their version info in the /etc/product-version location. Instead,
    the version and product information is contained in the /VERSION file.
    s^Version: (\d+\.\d+\.\d+)s^Product: ([\w-]+)s/VERSIONtriisBIG-IPtbigipiisBIG-IQtbigiqt	iWorkflowt	iworkflowN(tNonetretcompiletopent	readlinestmatchtgroup(tresultt
f5_versiont
f5_producttfhtcontenttlinetversion_matchestproduct_matches((sB/usr/lib/python2.7/site-packages/azurelinuxagent/common/version.pytget_f5_platform:s,





c	Cs�d}}}td�j�j�}td��{}xq|D]i}|jd�\}}}|j�}|dkr{|}q<|dkr�|}q<|dkr<|}q<q<WWdQXd|d	|||gS(
Nts/etc/cp-releases/etc/cloud-versions: treleasettaketbuildtgaiat.(Rtreadtstript	partition(	R#R$R"t	full_nametfRtkt_tv((sB/usr/lib/python2.7/site-packages/azurelinuxagent/common/version.pytget_checkpoint_platformYs
		cCsqdtj�krHtjddttj���}d|ddg}n�dtj�kr�tjddttj���}d|ddg}n�dtj�kr�tdd	�}n�d
tj�kr�tjddttj���}d|ddg}nCyttj��dg}Wn#t	k
r>dd
ddg}nXt
jjd�rhd|d<d|d<nt
jjd�r�d|d<nt
jjd�r�d|d<nt
jjd�r�d|d<nt
jjd�r�t
�}nt
jjd�rt�}nt
jjd�r(ddddg}nt
jjd�rGd |d<n|djd!�jd"�j�|d<|S(#NtFreeBSDs\-.*\ZR!tfreebsdtOpenBSDtopenbsdtLinuxitalpinesNS-BSDtnsbsdtUNKNOWNtFFFFs/etc/oracle-releasetoracleisOracle Linuxis/etc/euleros-releaseteuleross/etc/UnionTech-releasetuoss/etc/mariner-releasetmariners/shared/vadcs/etc/cp-releases/home/guestshell/azuretiosxetcsr1000vsCisco IOSXE Linuxs/etc/photon-releasetphotonost"t (tplatformtsystemRtsubRR"Rtlisttdistt	ExceptionRtpathtexistsR R/R(tlower(R"tosinfo((sB/usr/lib/python2.7/site-packages/azurelinuxagent/common/version.pyt
get_distroisD!!!






&tAbsenttFailedcCsFy-tjddddg�}|r(|StSWntk
rAtSXdS(s�
    This uses the Linux kernel's 'modinfo' command to retrieve the
    "version" field for the "hv_vmbus" kernel module (the LIS
    drivers). This is the documented method to retrieve the LIS module
    version. Every Linux guest on Hyper-V will have this driver, but
    it may not be installed as a module (it could instead be built
    into the kernel). In that case, this will return "Absent" instead
    of the version, indicating the driver version can be deduced from
    the kernel version. It will only return "Failed" in the presence
    of an exception.

    This function is used to generate telemetry for the version of the
    LIS drivers installed on the VM. The function and associated
    telemetry can be removed after a few releases.
    tmodinfos-FRthv_vmbusN(t	shellutiltrun_commandtCOMMAND_ABSENTRGtCOMMAND_FAILED(tmodinfo_output((sB/usr/lib/python2.7/site-packages/azurelinuxagent/common/version.pytget_lis_version�s
cCsWy*tjddg�jd�d}|SWn&tjk
rAtStk
rRtSXdS(Nt	logrotates	--versions
i(RQRRtsplittCommandErrorRSRGRT(tlogrotate_version((sB/usr/lib/python2.7/site-packages/azurelinuxagent/common/version.pyt
has_logrotate�s"
tWALinuxAgentsAzure Linux Agents2.7.3.0s{0}-{1}s�
The Azure Linux Agent supports the provisioning and running of Linux
VMs in the Azure cloud. This package should be installed on Linux disk
images that are built to run in the Azure environment.
s{0}-*s	{0}-*.zips{0}-(.*)s\.zips.*/{0}tIAASs6.*/WALinuxAgent-(\d+.\d+.\d+[.\d+]*).*-run-exthandlersiiiicCs�tj�}tj�}|dtjjkrA|tjj7}n|t|�jtjj�d}tj	|�}|r�|j
d�}nt}t}|t
|�fS(Ni����ii(Rtgetcwdtconftget_lib_dirRHtseptlenRXtAGENT_NAME_PATTERNRRtAGENT_LONG_VERSIONt
AGENT_VERSIONR(RHtlib_dirtagentRR((sB/usr/lib/python2.7/site-packages/azurelinuxagent/common/version.pytset_current_agent�s#cCs(tjj|�}tjt|�dk	S(N(RRHtbasenameRRtAGENT_PKG_PATTERNR(RH((sB/usr/lib/python2.7/site-packages/azurelinuxagent/common/version.pytis_agent_packagescCs(tjj|�}tjt|�dk	S(N(RRHRiRRRcR(RH((sB/usr/lib/python2.7/site-packages/azurelinuxagent/common/version.pyt
is_agent_path
scCsd}tjjd�rIgtjd�D]}|j�r(|^q(}ng}x�|D]�}yqttjjd|d�d�j�}t	j
|�}|r�|jd�}tdkr�|j
d�}nPnWqVtk
r�qVqVXqVW|dkr�t}n|S(Ns/proctcmdlinetrbiisUTF-8(RRRHtisdirtlistdirtisdigitRtjoinR'tEXT_HANDLER_REGEXRRtPY_VERSION_MAJORtdecodetIOErrortCURRENT_VERSION(RgtpidtpidstpnameR((sB/usr/lib/python2.7/site-packages/azurelinuxagent/common/version.pytset_goal_state_agents$1
'
	cCs
ttkS(N(t
CURRENT_AGENTRd(((sB/usr/lib/python2.7/site-packages/azurelinuxagent/common/version.pytis_current_agent_installed.s(;RRRBtsystazurelinuxagent.common.conftcommonR_t&azurelinuxagent.common.utils.shellutiltutilsRQt-azurelinuxagent.common.utils.flexible_versionRtazurelinuxagent.common.futureRRRR
RR R/RLRSRTRVR[t
AGENT_NAMEtAGENT_LONG_NAMERetformatRdtAGENT_DESCRIPTIONtAGENT_DIR_GLOBtAGENT_PKG_GLOBt
AGENT_PATTERNRRcRjtAGENT_DIR_PATTERNtAGENT_EXECUTION_MODEtEXT_HANDLER_PATTERNRst
__distro__tDISTRO_NAMEtDISTRO_VERSIONtDISTRO_CODE_NAMEtDISTRO_FULL_NAMEtversion_infot
PY_VERSIONRttPY_VERSION_MINORtPY_VERSION_MICRORhRkRlR|RwR{tGOAL_STATE_AGENT_VERSIONR}(((sB/usr/lib/python2.7/site-packages/azurelinuxagent/common/version.pyt<module>s^	
	
			5