403Webshell
Server IP : 178.105.222.151  /  Your IP : 216.73.216.38
Web Server : nginx/1.28.3
System : Linux MNK 7.0.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Wed Apr 22 16:06:43 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.5.4
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/cloudinit/sources/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/cloudinit/sources/__pycache__/DataSourceAzure.cpython-314.pyc
+
��iJ:��a�Ret�0t^RIt^RIt^RIt^RIt^RIt^RIt^RIt^RIt^RI	H
uHt^RI
Ht^RIHt^RIHtHtHt^RIHtHtHtHtHt^RIt^RIHtHtHtHtH t H!t!^RI"H#t#^RI$H%t%H&t&^R	I'H(t(^R
I)H*t*H+t+H,t,^RI-H.t.H/t/^RI0H1t1^R
I2H3t3H4t4H5t5H6t6^RI7H8t8^RI9H:t:H;t;H<t<H=t=H>t>H?t?H@t@HAtAHBtBHCtCHDtDHEtEHFtF^RIGHHtH]P�!4;_uu_4]P�!R]KR7^RILtLRRR4]P�!]LP�R]!P�!^R72R7tO]^k]P�!]W4tXRtYRR/tZRt[Rt\Rt]Rt^!RR]4t_R t`]^k.RfOtaR!tbR"tcR#R$ltdR%R&lte]>R'R(l4tf]>R)R*l4tgRgR+R,llthR-tiR.tjR/tkR0R1ltl]!P�!4'd=R2t\]l!^4tn]ne]XP�R34R4]n,t[M]XP�R54Rt`R6]]R7R8][/R9R:R;R:/tpR<R8R=R>R?^d.R@R://RARB]\RCRD/./tqRE]Y.trRFtsRGtt!RHRI]P�4tvRJtwRKtxRLtyRMtzRNt{RhROlt|]>RP4t}]>RQ4t~]>][RRRR3RSRTll4t]>RgRUl4t�]>RV4t�RWt�RXt�]>RY4t�]>]`3RZl4t�]>R[4t�]>R\4t�]>R]R^l4t�]>R_R`l4t�]>RgRal4t�]vt�]v]EP33.t�Rbt�RcRdlt�R# +'giEL�;i ]P]Q3d<^RIRtS]SP�P�P�tOEL� ]Pd	RtOELi;ii;i)i�N)�Enum)�Path)�	monotonic�sleep�time)�Any�Dict�List�Optional�Tuple)�net�performance�sources�ssh_util�subp�util)�	cc_mounts)�
EventScope�	EventType)�
device_driver)�NoDHCPLeaseError�NoDHCPLeaseInterfaceError�NoDHCPLeaseMissingDhclientError)�EphemeralDHCPv4�EphemeralIPv4Network)�events)�errors�identity�imds�kvp)�netlink)
�DEFAULT_WIRESERVER_ENDPOINT�NonAzureDataSource�	OvfEnvXml�azure_ds_reporter�azure_ds_telemetry_reporter�build_minimal_ovf�dhcp_log_cb�get_boot_telemetry�get_metadata_from_fabric�get_system_info�report_diagnostic_event�report_dmesg_to_kvp�report_failure_to_fabric)�UrlError�ignore)�categoryz$6$)�strlen)�saltc��\R4h)z�Raise when called so that importing this module doesn't throw
ImportError when ds_detect() returns false. In this case, crypt
and passlib are not needed.
z/crypt and passlib not found, missing dependency)�ImportError)�_s&�C/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceAzure.py�
blowfish_hashr8Ds��
�A��
��Azure�instance-idziid-AZURE-NODEz/dev/disk/cloud/azure_resource�ext4z/var/lib/waagentz/dev/sr0c�*�]tRt^[tRtRtRtRtRtRt	R#)�PPSType�None�PreprovisionedOSDisk�Running�Savable�Unknown�N)
�__name__�
__module__�__qualname__�__firstlineno__�NONE�OS_DISK�RUNNING�SAVABLE�UNKNOWN�__static_attributes__rDr9r7r>r>[s���D�$�G��G��G��Gr9r>z/sys/firmware/acpi/tables/OEM0c��VP4F�p\P!RV4'gK"VP4p\	V4^8�gKDV^,PR4p\	V4^8�gKnV^,R8XgK~V^,PV4'gK�V^,PR4pV^,u#	R#)z|
dev.storvsc.1.%pnpinfo:
    classid=32412632-86cb-44a2-9b5c-50d1417354f5
    deviceid=00000000-0001-8899-0000-000000000000
�pnpinfo�=�deviceid�.N)�
splitlines�re�search�split�len�
startswith)�
sysctl_outrR�line�fields�columns�compss&&    r7�"find_storvscid_from_sysctl_pnpinfor_os����%�%�'��
�9�9�Z��&�&��Z�Z�\�F��6�{�a�� ��)�/�/�#�.����L�A�%���
�j�0���
�-�-�h�7�7�"�1�I�O�O�C�0�E� ��8�O�(�r9c��VP4F:p\P!W4'gK!VP4pV^,u#	R#)z�
scbus0 on ata0 bus 0
scbus1 on ata1 bus 0
scbus2 on blkvsc0 bus 0
scbus3 on blkvsc1 bus 0
scbus4 on storvsc2 bus 0
scbus5 on storvsc3 bus 0
scbus-1 on xpt0 bus 0
N)rTrUrVrW)�camcontrol_out�disk_drvr[�itemss&&  r7�find_busdev_from_diskrd�s?���)�)�+��
�9�9�X�$�$��J�J�L�E���8�O�,�r9c�R�V^8�dQhR\R\R\\,/#)�ra�busdev�return��strr)�formats"r7�__annotate__rl�s%������c��h�s�m�r9c��VP4Fep\P!W4'gK!VPR4p\	V4^8XgKDV^,PR4pV^,u#	R#)z�
<Msft Virtual CD/ROM 1.0>          at scbus1 target 0 lun 0 (cd0,pass0)
<Msft Virtual Disk 1.0>            at scbus2 target 0 lun 0 (da0,pass1)
<Msft Virtual Disk 1.0>            at scbus3 target 1 lun 0 (da1,pass2)
�(�,N)rTrUrVrWrX)rargr[rc�dev_passs&&   r7�find_dev_from_busdevrq�s_���)�)�+��
�9�9�V�"�"��J�J�s�O�E��5�z�Q�� ��8�>�>�#�.����{�"�,�r9c�0�V^8�dQhR\R\/#�rf�macrh�rj)rks"r7rlrl�s����s��s�r9c	���\V4^8XdBRPVR,VR,VR,VR,VR,VR,.4pVP4#)z1Normalize mac address with colons and lower-case.�::rrfN:rf�N:rx�N:ry�N:rz�
N:r{�N)rX�join�lower)rts&r7�normalize_mac_addressr�sQ��
�3�x�2�~��h�h�
��X�s�3�x��S��3�s�8�S��Y��E�
�K�
���9�9�;�r9c�:�V^8�dQhR\\,/#�rfrh�r
rj)rks"r7rlrl�s����t�C�y�r9c��\P!4Uu.uF%pV^,R8XgK\V^,4NK'	up#uupi)z-Get Hyper-V NICs as normalized MAC addresses.�	hv_netvsc)r
�get_interfacesr)�ns r7�get_hv_netvsc_macs_normalizedr��sJ��
�#�#�%��%�A��Q�4�;��	$��a��d�#�%����s
�A�Ac�F�V^8�dQhR\R\\,/#rsri)rks"r7rlrl�s�������#��r9c�h�\P!4Uu.uF%pV\V^,48XgKV^,NK'	ppRV9dR#\V4^8Xd-\	RV:RV:2\
PR7V^,#\	RV:RV:2\
PR7R#uupi)z0Determine the device driver to match on, if any.r�z'Assuming driver for interface with mac=z	 drivers=��logger_funcz0Unable to specify driver for interface with mac=N)r
r�rrXr,�LOG�debug�warning)rt�i�driverss&  r7�determine_device_driver_for_macr��s���
�#�#�%��%�A��'��!��-�-�	
��!���%���
�g���
�7�|�q����G�
��	�	�	
�
�q�z�����	��K�K��
��+s
�B/�
B/c�$�V^8�dQhR\/#r�ru)rks"r7rlrl�s����C�r9c���\P!V4P# \Pd+\P	RRPT44Tu#i;i)zFailed to execute: %s� )r�stdout�ProcessExecutionErrorr�r�r})�cmd�fail_rets&&r7�execute_or_debugr��sL����y�y��~�$�$�$���%�%���	�	�)�3�8�8�C�=�9����s�"�<A!� A!c� �\RR.RR7#)�sysctlzdev.storvsc�)r��r�rDr9r7�get_dev_storvsc_sysctlr��s���X�}�5��C�Cr9c��\.RO4#)�
camcontrol)r��devlistz-br�rDr9r7�get_camcontrol_dev_busr��s���;�<�<r9c��\RR.4#)r�r�r�rDr9r7�get_camcontrol_devr��s���\�9�5�6�6r9c�:�V^8�dQhR\\,/#r�)rrj)rks"r7rlrl�s��'�'�X�c�]�'r9c�4�RpV^8�dRpV^,
pR\V4,pRPW4p\4p\WC4pV'g\PR4R#\
4p\4pRPV4p\Wh4p	V	'd)\Wy4p
V
f\PR4R#V
#RPV4p\Wk4p	V	'd)\Wy4p
V
f\PR4R#V
#R#)	�00000000�00000001�000z{0}-{1}z#Fail to find storvsc id from sysctlNz	blkvsc{0}zFail to find /dev/daXz
storvsc{0})
rjrkr�r_r�r�r�r�rdrq)�port_id�g0�g1�g0g1rZ�	storvscid�camcontrol_b_outra�blkvsc�scbusx�devname�storvscs&           r7�get_resource_disk_on_freebsdr��s���	�B���{�
���A�+��	��W��	�B����B�#�D�(�)�J�2�:�D�I���	�	�7�8��-�/��'�)�N�
�
�
�	�
*�F�
"�#3�
<�F�
�&�~�>���?��I�I�-�.�����!�!�)�,�G�
"�#3�
=�F�
�&�~�>���?��I�I�-�.����r9zfreebsd-ufszresource disk is not None�/dev/zresource disk is None�data_dir�disk_aliases�
ephemeral0�apply_network_configT�&apply_network_config_for_secondary_ips�
disk_setup�
table_type�gpt�layout�	overwrite�fs_setup�
filesystem�devicezephemeral0.1�
datasource�never_destroy_ntfs�REDACTEDc	�aa�]tRtRtoRt]P]P]P0/t
Rt]Pt^tRtV3RlV3RlltRtRt]V3R	lR
l4t]RRR
RR^R^/V3RlRll4t]V3RlRl4tV3RlRltV3RlRlt]R4t]V3RlRl4tRTV3Rllt]R4t]R4tRtR t ]V3R!lR"l4t!V3R#lR$lt"V3R%lR&lt#R't$R(t%R)t&RUR*lt']R+4t(]RVV3R,lR-ll4t)]R.4t*]R/RR0R/V3R1lR2ll4t+]R34t,]V3R4lR5l4t-]R64t.]V3R7lR8l4t/]R94t0]R:4t1]V3R;lR<l4t2]RWV3R=lR>ll4t3]R?R/V3R@lRAll4t4V3RBlRClt5V3RDlRElt6]RF4t7]V3RGlRHl4t8RIt9]RJ4t:];RK4t<]RL4t=];RM4t>];RN4t?]V3ROlRPl4t@RQtARRtBRStCVtDV;tE#)X�DataSourceAzurei<r:Fc��\PPWW#4\PPVPR4Vn/VnRVn\P!\P!V\/4\.4VnRVnRVnRVn\PPVP$RR4VnRVnRVnRVnRVn\0VnR#)�azureN�data�reported_readyF)r�
DataSource�__init__�os�pathr}�seed_dir�cfg�seedr�
mergemanydict�get_cfg_by_path�DS_CFG_PATH�BUILTIN_DS_CONFIG�ds_cfg�_iso_dev�_network_config�_ephemeral_dhcp_ctx�	cloud_dir�_reported_ready_marker_file�_route_configured_for_imds� _route_configured_for_wireserver�_system_uuid�_vm_idr"�_wireserver_endpoint)�self�sys_cfg�distro�pathss&&&&r7r��DataSourceAzure.__init__Hs������#�#�D�6�A������U�^�^�W�=��
������	��(�(�
�
!�
!�'�;��
;�=N�O�
�����
�#���>B�� �+-�7�7�<�<��O�O�V�%5�,
��(�+0��'�05��-� ������$?��!r9c�$<�V^8�dQhRS[RR/#)rf�ci_pkl_versionrhN)�int)rk�
__classdict__s"�r7rl�DataSourceAzure.__annotate__\s���@�@��@��@r9c�<�\SV`V4RVnRVn\P
P
VPPRR4Vn	RVn
RVnRVnRVn
\VnR#)Nr�r�F)�super�	_unpickler�r�r�r�r}r�r�r�r�r�r�r�r"r�)r�r��	__class__s&&�r7r��DataSourceAzure._unpickle\so���
���.�)�#'�� ���
�+-�7�7�<�<��J�J� � �&�*:�,
��(�+0��'�05��-� ������$?��!r9c�h�\PPV4pV:RVP:R2#)z [seed=�])rr��__str__r�)r��roots& r7r��DataSourceAzure.__str__js'���!�!�)�)�$�/��!%�t�y�y�1�1r9c���VPfRpMHVPPR4'dRpM$VPP4R8XdRpMRpV:RVP:R2#)z/Return the subplatform metadata source details.�unknownz/devzconfig-diskrzseed-dir� (�))r�rYr~)r��subplatform_types& r7�_get_subplatform� DataSourceAzure._get_subplatformns[���9�9��(��
�Y�Y�
!�
!�&�
)�
)�,��
�Y�Y�_�_�
�&�
(�%��)��,�d�i�i�8�8r9c�&<�V^8�dQhRS[RS[/#)rf�ephipv4rh)r�bool)rkr�s"�r7rlr�{s���
�
�)=�
�$�
r9c��VP'gR#VPUu.uF!q"^,PR4^,NK#	ppRV9VnVPV9VnVP;'g
VP#uupi)F�/z169.254.169.254)�
static_routesrWr�r�r�)r�r��r�routed_networkss&&  r7�_check_if_primary�!DataSourceAzure._check_if_primaryzs����$�$�$��7>�7L�7L�M�7L�!�Q�4�:�:�c�?�1�-�-�7L��M�+<��*N��'�
�%�%��8�	
�-�

�+�+�
5�
5��4�4�	
��Ns�'B
�ifaceN�report_failure_if_not_primaryT�retry_sleep�timeout_minutesc
�H<�V^8�dQhRS[S[,RS[RS[RS[RS[/#)rfrrr	r
rh)rrjr�r�)rkr�s"�r7rlr��sJ���a�a���}�a�(,�	a�
�a��
a�
�ar9c�f�VPe\R4h\VPV\R7VnVRJpRp\4pWt^<,,p\P!RR\R7;_uu_4Vf�V'd\4p\V4wr�\RV:RV	:R	V
:R
\P!4:2\PR7WPnVPP#4pTf$\4T,T8d\ET4K�VfRVn\34hVR,pWPnRV9dVR,Vn#\IV4p
VPPJpVf\R4hVPMV4p
\RV:RV
:R	V
:RVPN:RVPP:R V:R!VPR:R"VPT:R2\PR7V'dIV
'gAVP)\*PV!VV
VPNVPPVR#7RR7V
uuRRR4# \$dW\R\P&R7TP)\*P,!\4T,
R
7RR7EL�\.d%\R\P0R7RTnh\2dg\RT:RX	:R	X
:R2\P0R7TP)\*P4!T
\4T,
TT	R7RR7ELh\6d.p\RT,\P0R7Rp?EL�Rp?i\8P:d_p\RTP<:RTP>:RTP@:RTPB:2\P0R7Rp?ELRp?ii;i +'giR#;i)$a�Setup ephemeral networking.

Keep retrying DHCP up to specified number of minutes.  This does
not kill dhclient, so the timeout in practice may be up to
timeout_minutes + the system-configured timeout for dhclient.

:param timeout_minutes: Number of minutes to keep retrying for.

:raises NoDHCPLeaseError: If unable to obtain DHCP lease.

:returns: True if NIC is determined to be primary.
Nz/Bringing up networking when already configured.)r�
dhcp_log_funczobtain-dhcp-leasezobtain dhcp lease��name�description�parentz,Bringing up ephemeral networking with iface=z mac=z driver=�: r�zInterface not found for DHCP)�durationT��	host_onlyzdhclient executable not foundz#Failed to obtain DHCP lease (iface=r�)�driverr�	interface�mac_addresszFile not found during DHCP %rzCommand failed: cmd=� stderr=� stdout=� exit_code=rzunknown-245zdhcp context missing ephipv4z!Obtained DHCP lease on interface z
 (primary=z router=z routes=z lease=z
 imds_routed=z wireserver_routed=)rr�routerr�lease),r��RuntimeErrorrr�r(rr�ReportEventStackr%�find_primary_nic�get_interface_detailsr,r
r�r�r�r�obtain_leaserr��_report_failurer�$ReportableErrorDhcpInterfaceNotFoundr�errorr�ReportableErrorDhcpLease�FileNotFoundErrorrr�r��stderrr��	exit_coderr�r�_ephipv4rrrr�r��(ReportableErrorDhcpOnNonPrimaryInterface)r�rrr	r
�update_primary_nicr�
start_time�deadlinertrr%r��primarys&$$$$         r7�_setup_ephemeral_networking�+DataSourceAzure._setup_ephemeral_networking�s���*�#�#�/��A��
�$3��K�K��%�$
�� �#�d�]��*.���[�
��"� 4�4��
�
$�
$�$�+�$�
�
�
�-�B�)� 0� 2��"7��">�K�C�+�!�#�v�s�/A�/A�/C�E�%(�I�I�	�6;�,�,�2� �4�4�A�A�C�E�n�=�Y�[�;�%>��%I��+�&���}�+/��(�&�(�(��+�&�E�-2�$�$�*���%�,1�-�,@��)�"�5�)�F��.�.�7�7�G���"�#A�B�B��,�,�W�5�G�#�
����N�N��)�)���3�3��9�9�� �I�I�
�"-�W��$�$��C�C�"'�%�&�~�~�&-�&;�&;�#��#�%�	��}
�
��*1�
�+�6�C�K�K���(�(��C�C�%.�[�:�%=��#'�	)��7��+�7�S�Y�Y��04�D�,��'��+�9>��V�M�$'�I�I��
�(�(��7�7�#)�%.�[�:�%=�&+�(+�	�#'�)��)��+�7�%�?�$'�I�I�����1�1��+�"�I�I�!�L�L�!�L�L�!�O�O�
�%(�I�I�
�
����y
�
�
�s��?P�I8�
A?I8�DP�,AP�8AP�P�P�!,P�A#P�1P�4P�=P�>"N&� P�&P�=P�>AP�P�P�P�P0	c�<�V^8�dQhRR/#�rfrhNrD)rkr�s"�r7rlr�5s���(�(��(r9c��RVnRVnVPfR#VPP4RVnR#)zTeardown ephemeral networking.FN)r�r�r��
clean_network�r�s&r7�_teardown_ephemeral_networking�.DataSourceAzure._teardown_ephemeral_networking4s=��+0��'�05��-��#�#�+��� � �.�.�0�#'�� r9c� <�V^8�dQhRS[/#r��r�)rkr�s"�r7rlr�?s���
�
�T�
r9c�h�VPRJ;'gVPPRJ'*#)z"Check if networking is configured.N)r�rr6s&r7�_is_ephemeral_networking_up�+DataSourceAzure._is_ephemeral_networking_up?s:��
�$�$��,�
6�
6��'�'�-�-��5�
�	
r9c�<�V^8�dQhRR/#r3rD)rkr�s"�r7rlr�Fs���47�47��47r9c��.ROp\P!V4wr#\RV:RV:RV:2\PR7R
# \Pd�p\TP\4'dB\PR4\P!4pTPT4R
p?R
#\RTP:RTP:RTP:R	TP:2\PR7\P !T4pTPT4R
p?R
#R
p?ii;i)aCheck if azure-proxy-agent is ready for communication with WS/IMDS.

If ProvisionGuestProxyAgent is true, query azure-proxy-agent status,
waiting up to 120 seconds for the proxy to negotiate with Wireserver
and configure an eBPF proxy.  Once azure-proxy-agent is ready,
it will exit with code 0 and cloud-init can then expect to be able to
communicate with these services.

Fail deployment if azure-proxy-agent is not found or otherwise returns
an error.

For more information, check out:
https://github.com/azure/guestproxyagent
z
Executing z resulted in stderr=z
 with stdout=r�zGFailed to activate Azure Guest Proxy Agent: azure-proxy-agent not foundzDFailed to activate Azure Guest Proxy Agent: status check failed cmd=rrrN)zazure-proxy-agentz--statusz--wait�120)rr,r�r�r��
isinstance�reasonr'r%r�!ReportableErrorProxyAgentNotFoundr#r�r(r�r)�&ReportableErrorProxyAgentStatusFailure)r�r��out�errr%�report_error�reportable_errors&      r7�_check_azure_proxy_agent_status�/DataSourceAzure._check_azure_proxy_agent_statusFs���%	7��C��y�y��~�H�C�#�14�c�3�@��I�I�
��
�)�)�	7��%�,�,�(9�:�:��	�	�2�� &�G�G�I���$�$�\�2�2�'�
�	�	�����������!$�	�	���A�A�%�H�!��$�$�%5�6�6��1	7�s �AA�E�AD=�=A:D=�=Ec���VP4\RVP:RVP:2\P
R7/pVPR,pRpRR/pRR	R
R///pRp/p\VPV4F�pVPR4'db\P!4'd"\P!V\RR
7wrFrWM\P!V\4wrFrWW�nM\V4wrFrWTp\RV,\PR7M	Rp	\V	\P$R7\'VP4;'gVRJp
V
'd^M^pVP)VR7/pVP-4'd:VP/R4'dVP14VP3RR7pV'g(Vf$Rp	\V	4\4P6!V	4hVP9W\4p
V
\:P<8wEd�\P!4'd4Rp	\V	\P>R7\4P6!V	4hVP-4'g4Rp	\V	\P>R7\4P6!V	4hV
\:P@8XdVPC4M\V
\:PD8XdVPG4M6V
\:PH8XdVPK4MVPM4VPO4wrFrWVP/R4'dVP14VP3RR7pVPQV4pVR\:P<PR39d(VPU\VPX!RVR74VP[VR7T;'gRVn.VP_RVRVR\P`!VR V/.4R!V/4\cV4p\eV4p\gV4pV'd)\PR"V4W�R,R	,R
&V'd#\PR#V4VVR,R&Ve(\PR$V4V'*VR,R%&VP\R8Xd&VR,'g\iVVVR&7pR'V/VR&V'g`\mV4pV'dM\PR)4\nPp!RPsVPu444VR!&W28Xd#\R+V,\PR7\w4pV'd
VVR,R,&VPy4VR,R-&VPzR.JdxVP-4'dbVP}W\R/7pVPVR07p\PR1V4V'd
VVR,R2&VP�4V#V# \ d(\RT,\PR7EK%\P"d(\RT,\PR7EK_i;i \*dELbi;i \jd.p\R(T,\PR7Rp?ELRp?ii;i \jd \R*\P$R7EL�i;i \jdT#i;i)3z�Walk all instance metadata sources returning a dict on success.

@return: A dictionary of any metadata content for this instance.
@raise: InvalidMetaDataException when the expected metadata service is
    unavailable, broken or disabled.
z
Azure VM ID: z System UUID: r�r�N�local-hostnamer��system_info�default_userrr��udf)�mtypez!Found provisioning metadata in %sz$Did not find Azure data source in %sz%s was not mountablez�Unable to find provisioning media, falling back to IMDS metadata. Be aware that IMDS metadata does not support admin passwords or custom-data (user-data only).�r
�ProvisionGuestProxyAgentT)�report_failurezNo OVF or IMDS availablez%Free BSD is not supported for PPS VMszDHCP failed while in source PPSzextended.compute.ppsType)�key�value)�imds_md�IMDSr��files�metadatar�userdata_rawz Username retrieved from IMDS: %sz Hostname retrieved from IMDS: %sz(Disable password retrieved from IMDS: %s�
ssh_pwauth)�username�hostname�disable_ssh_password_auth�ovf-env.xmlz)Failed to construct OVF from IMDS data %szRetrieved userdata from IMDSzBad userdata in IMDSzusing files cached in %s�random_seedr;F)r�rV)�pubkey_infoznegotiating returned %s�public-keys)A�_query_vm_idr,r�r�r��infor��list_possible_azure_dsr�rYr�
is_FreeBSD�mount_cb�load_azure_ds_dirr�r�r#�MountFailedErrorr�r�r0rr<�getrI�get_metadata_from_imdsr�InvalidMetaDataException�_determine_pps_typer>rIr%rK�_wait_for_pps_running_reuserL�_wait_for_pps_savable_reuserJ�_wait_for_pps_os_disk_shutdown�_wait_for_pps_unknown_reuse�_reprovision�_ppstype_from_imdsrUr#r�"ReportableErrorImdsInvalidMetadata�validate_imds_network_metadatar��updater��_username_from_imds�_hostname_from_imds�_disable_password_from_imdsr'�	Exception�_userdata_from_imds�base64�	b64decoder}rW�_get_random_seed�_iid�_negotiated�!_determine_wireserver_pubkey_info�
_report_ready�_cleanup_markers)r��crawled_data�ddir�
ovf_source�mdr�rZrX�src�msg�requires_imds_metadatar
rV�pps_type�imds_ppstype�
imds_username�
imds_hostname�imds_disable_password�contents�e�
imds_userdatar�ra�ssh_keyss&                       r7�crawl_metadata�DataSourceAzure.crawl_metadata|sw��	
������{�{�D�-�-�
/����	
����{�{�:�&���
���
#���~���|�<�=������)�$�-�-��>�C�
��>�>�'�*�*����(�(�7;�}�}��!2�%�8�4��#�u�8<�}�}��!2�8�4��#�%(�M�3D�S�3I�0�B�c� �
�'�7�*�D� #�	�	���+?�FC�
�

$�C�S�[�[�A�"&�d�m�m�!4�!J�!J�
�d�8J�� 6�"�A��	��,�,�_�,�M����+�+�-�-��w�w�1�2�2��4�4�6��1�1��1�F�G��:�-�,�C�#�C�(��2�2�3�7�7��+�+�C�9���w�|�|�#���� � �=��'�����C��6�6�s�;�;��3�3�5�5�7��'�����C��6�6�s�;�;��7�?�?�*��0�0�2��W�_�_�,��0�0�2��W�_�_�,��3�3�5��0�0�2�+/�+<�+<�+>�(�B�c��w�w�1�2�2��4�4�6��1�1��1�F�G� �2�2�7�;�L��D�'�,�,�*<�*<�#=�=��$�$��=�=�6�l���	
�+�+�G�+�<��(�(�&��	�����s����D�.�.��V�W�4E�/F�G���	
�	
�,�G�4�
�+�G�4�
� ;�G� D����I�I�8�-�H�9F�
��~�.�v�6���I�I�8�-�H�9F�L��$�%5�6� �,��I�I�:�%�
�5J�0I�L����-��9�9���|�G�'<�'<�
�,�*�*�.C���
*7��(A��W�%��/��8�M���	�	�8�9��39�3C�3C����
� 3� 3� 5�6�4�L��0���#�*�T�1�s�y�y�
� �!���6:�L��$�]�3�26�)�)�+��Z� ��/����u�$��)I�)I�)K�)K��@�@��A��K�

(��-�-�+�-�F��
�	�	�3�X�>��>F�L��,�]�;��%�%�'���|���Q&�
�'�:�S�@� #�	�	����(�(�
�'�*�S�0�c�i�i���	
��, �	��	��x�
�'�?�!�C� #�	�	����
�� !��+�.�C�K�K�����,�
����
�ss�	1Y9�;A8Y9�[(�[:�6\5�)]"�9-[%�*[%�=#[%�$[%�([7�6[7�:\2�"\-�-\2�5&]�]�"]1�0]1c�&<�V^8�dQhRS[RS[/#)rfrSrh)r�r	)rkr�s"�r7rlr�\s���+�+�T�+�d�+r9c��\4pVR,pVP'g^pMRpRpRp\P!VVR7# \d|p\T4p\4T,
p\P!YxR7pTP'g-\TP\P4'dRpRp?M=Rp?i\d-p\T4p\P!TR7pRp?MRp?ii;iTPYa'*R7\RT,\ P"R7/#)	i,N)�max_connection_errors�retry_deadline)�	exceptionrF�r�rz!Ignoring IMDS metadata due to: %sr�)rr�r� fetch_metadata_with_api_fallbackr/rjr�ReportableErrorImdsUrlErrorrA�cause�requests�ConnectionError�
ValueError�+ReportableErrorImdsMetadataParsingExceptionr#r,r�r�)	r�rSr-r�r��error_string�error_reportr%rs	&&       r7rk�&DataSourceAzure.get_metadata_from_imds[s���[�
�#�c�)���.�.�.�$&�!�$(�!�&*��9=��	��8�8�&;�-��
���
	'��u�:�L� �{�Z�/�H�!�=�=���L��2�2�2�z����X�5�5�8�8�"'�����	��u�:�L�!�M�M���L��	��	
���\�5G��H��/�,�>����	
��	s*�A�D�A1C	�	D�D�"C>�>Dc�X<�\\V`V4\PVnR#)z.Reset any cached class attributes to defaults.N)r�r��clear_cached_attrsr�UNSET�_metadata_imds)r��
attr_defaultsr�s&&�r7r��"DataSourceAzure.clear_cached_attrs�s���
�o�t�7�
�F�%�m�m��r9c��\PP4pVeR#VPfR#\	VPR4P4#)zACheck platform environment to report if this datasource may
run.
TFr_)r�ChassisAssetTag�query_systemr�r�exists)r��chassis_tags& r7�	ds_detect�DataSourceAzure.ds_detect�sJ��
�.�.�;�;�=���"���=�=� ���D�M�M�=�1�8�8�:�:r9c�X�\4\	4VP4pTP4TP'dGTPPR8Xd,TPPR4'd\4\ p\"P$P'T4'dL\)RT,\P*R7\,P.!TR	,\0.4TnM0\)R
T,\P*R7TR	,TnTR,R,Tn\,P.!TR,\6.4TnTR
,Tn\=TPR,TR,RR7R# \d"p\PRT4Rp?EL�Rp?ii;i \d"p\PRT4Rp?EL�Rp?ii;i \Pd-pTPT4Rp?TP4R#Rp?i\dCp\P!T4pTPT4Rp?TP4R#Rp?ii;i TP4i;i)z�Crawl and process datasource metadata caching metadata as attrs.

@return: True on success, False on error, invalid or disabled
    datasource.
z Failed to get boot telemetry: %sNz$Failed to get system information: %sF�ubuntur�zXEphemeral resource disk '%s' exists. Merging default Azure cloud ephemeral disk configs.r�r�zdEphemeral resource disk '%s' does not exist. Not merging default Azure cloud ephemeral disk configs.rYrrZr�rXi�)�dirmodeT)r)rzr�r�r+r�r�ReportableErrorr#r7�!ReportableErrorUnhandledExceptionr�rr�rj�*maybe_remove_ubuntu_network_config_scripts�RESOURCE_DISK_PATHr�r�r�r,r�rr��#BUILTIN_CLOUD_EPHEMERAL_DISK_CONFIGr�r��DEFAULT_METADATArYrZ�write_files)r�r�r�r%rH�devpaths&     r7�	_get_data�DataSourceAzure._get_data�s)��	?�� �	C���
	2��.�.�0�L�
�/�/�1�
�K�K�K���� � �H�,������ 6�7�7�6�8�%��
�7�7�>�>�'�"�"�#�F��� �I�I�	
��)�)��e�$�&I�J��D�H�
$�J��� �I�I�	
�$�E�*�D�H�*�:�6�v�>����*�*�
�*�
%�'7�8�
��
�)��8���	��K�K�
�#�\�'�%:�E�	
���}�	?��K�K�:�A�>�>��	?��
�	C��K�K�>��B�B��	C��
�%�%�	�� � ��'��
�/�/�1���	�%�G�G��N��� � �!1�2���/�/�1��	��

�/�/�1�so�
F*�
G�H�*G�5G�G�H�$H�H�J�I�.J�J�J�'J�9J�J�J�J)c��VP'dRVP9dVP4#\VPR,4#)r;)rYrrjr6s&r7�get_instance_id�DataSourceAzure.get_instance_id�s6���}�}�}�
�T�]�]� B��9�9�;���4�=�=��/�0�0r9c�F�VPR,PV4#)r�)r�rj)r�rs&&r7�device_name_to_device�%DataSourceAzure.device_name_to_device�s���{�{�>�*�.�.�t�4�4r9c�0<�V^8�dQhRS[S[,/#r�r�)rkr�s"�r7rlr��s���	0�	0�T�#�Y�	0r9c��VPVPR,4# \\3dTP	4#i;i)z
Retrieve public SSH keys.
r)�_get_public_keys_from_imdsrY�KeyErrorr��_get_public_keys_from_ovfr6s&r7�get_public_ssh_keys�#DataSourceAzure.get_public_ssh_keys�sG��
	��2�2�4�=�=��3H�I�I���*�%�	���-�-�/�/�	�s�!$�A�Ac�6<�V^8�dQhRS[RS[S[,/#�rfrVrh)�dictr
rj)rkr�s"�r7rlr��s�����$��4��9�r9c���VR,R,Uu.uFpVR,NK	pp\;QJdRT4F'gKRM	RM
!RT44'd)R	p\T\PR7\T4hR
P
\T44p\T\PR7T#uupi \d Rp\T\PR7hi;i)z�Get SSH keys from IMDS metadata.

:raises KeyError: if IMDS metadata is malformed/missing.
:raises ValueError: if key format is not supported.

:returns: List of keys.
�compute�
publicKeys�keyDataz"No SSH keys found in IMDS metadatar�c3�D"�TFp\VR7'*x�K	R#5i))rTN)�_key_is_openssh_formatted)�.0rTs& r7�	<genexpr>�=DataSourceAzure._get_public_keys_from_imds.<locals>.<genexpr>s���J��#�,��5�5�5��s� TFzKey(s) not in OpenSSH formatzRetrieved {} keys from IMDS)r�r,r�r��anyr�rkrX)r�rV�
public_keyr��log_msgs&&   r7r��*DataSourceAzure._get_public_keys_from_imds�s���	�#*�)�"4�\�"B��"B�J��9�%�%�"B�
���3�J��J�3�3�3�J��J�J�J�4�G�#�G����C��W�%�%�/�6�6�s�8�}�E����S�Y�Y�?����!���	�:�G�#�G����C��	�s�C�C�C�C�*C0c�0<�V^8�dQhRS[S[,/#r�r�)rkr�s"�r7rlr�s�����4��9�r9c��.pVPR,pRP\V44p\V\P
R7V# \d"Rp\T\P
R7T#i;i)zIGet SSH keys that were fetched from wireserver.

:returns: List of keys.
rbzRetrieved {} keys from OVFr�zNo keys available from OVF)rYrkrXr,r�r�r�)r�r�r�s&  r7r��)DataSourceAzure._get_public_keys_from_ovfsq��
��	D��}�}�]�3�H�2�9�9�#�h�-�H�G�#�G����C�
���	�	D�2�G�#�G����C���		D�s�AA�(A:�9A:c��VP#�N�r�r6s&r7�get_config_obj�DataSourceAzure.get_config_obj%s���x�x�r9c�J�\P!VP44#r�)r�instance_id_matches_system_uuidr�)r�r�s&&r7�check_instance_id�!DataSourceAzure.check_instance_id(s���6�6�t�7K�7K�7M�N�Nr9c��VP'g\P!4VnVP'g)\P!VP4VnR#R# \dp\P
!TR7hRp?ii;i \d'p\P
!YPR7hRp?ii;i)z�Query the system UUID and VM IDs, if needed.

They are initialized to None, check only if they are unset.

Raise as reportable error on failure.
r�N)r��system_uuid)	r�r�query_system_uuidrr�ReportableErrorVmIdentificationr��convert_system_uuid_to_vm_idr��r�r%s& r7rc�DataSourceAzure._query_vm_id,s���� � � �
N�$,�$>�$>�$@��!��{�{�{�
�&�C�C��%�%������ �
N��<�<�u�M�M��
N���
��<�<�#�1B�1B����
�s/�A*�%B�*B�5B�B�C�!C�Cc���VP4\PPVPPR4R4p\PP
V4'dh\P!V4P4p\P!VP4pVP4VPV39dV#VP#)r�r;)rcr�r�r}r��	get_cpathr�r�load_text_file�stripr�byte_swap_system_uuidr�r~)r��previous�
prev_iid_path�
swapped_ids&&  r7r�DataSourceAzure._iidCs�������������J�J� � ��(�-�
�
��7�7�>�>�-�(�(��*�*�=�9�?�?�A�H�!�7�7��8I�8I�J�J��~�~��D�$5�$5�z�#B�B���� � � r9c��Rp\P!RR\R7;_uu_4\P!V4pRRR4Vf Rp\V\PR7R#\RV,\PR7R# +'giLW;i \d+p\\T4\PR7hRp?ii;i)z�Use the netlink socket provided to wait for nic detach event.
NOTE: The function doesn't close the socket. The caller owns closing
the socket and disposing it safely.
Nzwait-for-nic-detachzwait for nic detachrzHPreprovisioned nic not detached as expected. Proceeding without failing.r�z%The preprovisioned nic %s is detached)rrr%r!�wait_for_nic_detach_eventr,r�r�r��AssertionErrorrjr%)r��nl_sock�ifnamer�r%s&&   r7�_wait_for_nic_detach�$DataSourceAzure._wait_for_nic_detachUs���	��F��(�(�*�1�(���
!�:�:�7�C����~�2��(�����E�'�;�f�D� #�	�	�����"�	�#�C��J�C�I�I�F���	�s4�'B"�B�)B"�+"B"�B	�B"�"C�-%C�Cc�,<�V^8�dQhRS[RS[RS[/#)rfr��retriesr	)rjr��float)rkr�s"�r7rlr�vs%�������$'��<A�r9c�T�\V4FnpVPPPV4'd&\	RV,\
PR7R#V^,V8gKc\V4Kp	\	RWV,3,\
PR7R#)zThe link %s is up.r�z;The link %s is not up after %f seconds, continuing anyways.N)�ranger��
networking�try_set_link_upr,r�rdr)r�r�rr	r�s&&&& r7�wait_for_link_up� DataSourceAzure.wait_for_link_upus����w��A��{�{�%�%�5�5�f�=�=�'�(�6�1�s�x�x����A��� ��k�"� �
$�M��[�0�1�2��H�H�
r9c��VPp\PRV4\P!VRP\P!4\4R74\R\PR7R#)z*Creating a marker file to report ready: %sz{pid}: {time}
)�pidrzRSuccessfully created reported ready marker file while in the preprovisioning pool.r�N)r�r�rdr�
write_filerkr��getpidrr,r�)r�r�s& r7�_create_report_ready_marker�+DataSourceAzure._create_report_ready_marker�s\���/�/�����=�t�D�����#�*�*�r�y�y�{���*�H�	
�	 �
1��	�	�	
r9�
create_marker�expect_url_errorc�*<�V^8�dQhRS[RS[RR/#)rfrrrhNr:)rkr�s"�r7rlr��s+���$/�$/��$/��	$/�

�$/r9c��VP4RTnT'dTP4R#R# \dpT'd>\T\4'd(\	R\
PR7RTnRp?LsRp\	T\
PR7\P!T4ThRp?ii;i)z�Report ready for PPS, creating the marker file upon completion.

:raises sources.InvalidMetaDataException: On error reporting ready.
z,Ignoring http call failure, it was expected.r�Nz9Failed reporting ready while in the preprovisioning pool.F)
r�rzrAr/r,r�r�r�r%rrlr�r
)r�rrr%r�s&$$  r7�_report_ready_for_pps�%DataSourceAzure._report_ready_for_pps�s���	G���� �,!�����,�,�.���/�	G� �J�u�h�$?�$?�'�B� #�	�	��
!%��
�
�P��(�����C��6�6�s�;��F��%	G�s�5�B>�AB9�4B9�9B>c���\PR4.pRpRp\P!RR\	V4,\
R7;_uu_4\P!W4pRRR4VPV4\RV,\PR7VPV4V'g+\PR	V4VPV^RR
7pV'd\PR4R#VP4K� +'giL�;i \d0p\\T4\PR7Rp?R#Rp?ii;i)z6Wait until the primary nic for the vm is hot-attached.z*Waiting for primary nic to be hot-attachedFNzwait-for-nic-attachz4wait for nic attach after %d nics have been attachedrzDetected nic %s attached.r�z!Checking if %s is the primary nic)rr
rzFound primary nic for this VM.)r�rdrrrXr%r!�wait_for_nic_attach_event�appendr,rr0r7r�rjr%)r�r��
nics_found�primary_nic_foundr�r%s&&    r7�"_wait_for_hot_attached_primary_nic�2DataSourceAzure._wait_for_hot_attached_primary_nic�s0��	���=�>�3	G��J� %������,�,�.�N��j�/�*�-�
��%�>�>���F���!�!�&�)�'�/�&�8�c�h�h���%�%�f�-�
)��H�H�@�&�I�(,�(H�(H�$�(*�6;�)I�)�%�%��H�H�=�>���7�7�9�M���P�	G�#�C��J�C�I�I�F�F��	G�s<�<D,�D�*BD,�0D,�D,�D)	�$D,�,E&�7$E!�!E&c�4<�V^8�dQhRS[P/#r�)�socket)rkr�s"�r7rlr��s�����f�m�m�r9c��\P!4# \Pd%p\RT2\P
R7hRp?ii;i)z!Failed to create netlink socket: r�N)r!�create_bound_netlink_socket�NetlinkCreateSocketErrorr,r�r%r�s& r7�_create_bound_netlink_socket�,DataSourceAzure._create_bound_netlink_socket�sJ��	��6�6�8�8���/�/�	�#�3�E�7�;��I�I�
�
��	�s��A�A�Ac��VPRR7\R\PR7\	R4\
P!4h)z4Report ready and wait for host to initiate shutdown.F)rz"Waiting for host to shutdown VM...r�i�3�)rr,r�rdrr�ReportableErrorOsDiskPpsFailurer6s&r7rp�.DataSourceAzure._wait_for_pps_os_disk_shutdowns?��	
�"�"��"�7��0����	
�	�h���4�4�6�6r9c�<�V^8�dQhRR/#r3rD)rkr�s"�r7rlr�s���".�".�T�".r9c��VP4pVPeVPPf\R4hVPPpVP	4\
P
RV4\P!RR\R7;_uu_4\P!W4RRR4VP4VP!4R# \d-p\RT,\
PR7Rp?L\Rp?ii;i +'giLl;i TP4i;i)	z9Report ready and wait for nic link to switch upon re-use.Nzmissing ephemeral contextz#Wait for vnetswitch to happen on %sz!wait-for-media-disconnect-connectzwait for vnet switchrz'Error while waiting for vnet switch: %sr�)r!r�rrrr�r�rrr%r!�!wait_for_media_disconnect_connectr�r,r%�closer7)r�r�rr�s&   r7rn�+DataSourceAzure._wait_for_pps_running_reuse
s���3�3�5��	��(�(�0��+�+�1�1�9�"�#>�?�?��,�,�2�2�E��&�&�(��I�I�5��
��(�(�8�2�(���
��=�=�g�M�
�
�M�M�O�	
�+�+�-��&��+�A�A�E�$'�I�I���������
�M�M�O�sH�BD3�$D �&C&�<D3�&D�1"D�D �D�D � D0	�+D3�3Ec��VP4pVPRR7VP4VPV4VPV4VP4R# \Pd4p\RT,\PR7RTnRp?LwRp?ii;i TP4i;i)z@Report ready and wait for nic(s) to be hot-attached upon re-use.T)rzLIgnoring failure while tearing down networking, NIC was likely unplugged: %rr�N)r!rr7rr�r,r�rdr�r�rr))r�r�r�s&  r7ro�+DataSourceAzure._wait_for_pps_savable_reuse2s����3�3�5��	��&�&��&�=�
0��3�3�5�
�%�%�g�.��3�3�G�<��M�M�O���-�-�
0�'�3�56�7� #����
,0��(�(��

0��
�M�M�O�s3�B4�A)�"B4�)B1�>)B,�'B4�,B1�1B4�4Cc��\PPVP4'dR#VP	4VP4R#)z0Report ready if needed for unknown/recovery PPS.N)r�r��isfiler�rr7r6s&r7rq�+DataSourceAzure._wait_for_pps_unknown_reuseHs:���7�7�>�>�$�:�:�;�;���"�"�$�	
�+�+�-r9c� <�V^8�dQhRS[/#r�)�bytes)rkr�s"�r7rlr�Us��� � �E� r9c���^pRpV'gzVP4'gV^,
pVP^R7\P!RR\
R7;_uu_4\P!4pRRR4K�\RV,\PR7V# \dK�i;i \dTP4RRR4K�i;i +'giK�;i)z0Poll IMDs for reprovisiondata XML document data.NrQzget-reprovision-data-from-imdszget reprovision data from imdsrz#attempted dhcp %d times after reuser�)
r<r0rrrr%r�fetch_reprovision_datar/r7r,r�r�)r��
dhcp_attempts�reprovision_datas&  r7�
_poll_imds�DataSourceAzure._poll_imdsTs����
�,0��"��3�3�5�5���"�
���4�4�Q�4�G��(�(�5�<�(���
�'+�'B�'B�'D�$�
��	 �1�M�A��	�	�	
� ���%(����� ���7�7�9���������s;�B*�$C&�&B<�*B9�8B9�<C#�C&�"C#�#C&�&C7	c�@<�V^8�dQhRS[PRS[RS[/#)rfr%rrh)rr�r�)rkr�s"�r7rlr�ss0���B�B��+�+�B�8<�B�	
�Br9c�8�VPVPR7p\RV2\PR7\4\P!V4pV'dV#VP4'd=\R\PR7\VPVR7RVnR#\R	\PR7VP4VP^R
7\VPVR7RVnR# \d-p\RT,\PR7Rp?L�Rp?ii;i \ dLgi;i \d.p\RT,\PR7Rp?R#Rp?ii;i)
a�Report failure to Azure host and fabric.

For errors that may be recoverable (e.g. DHCP), host_only provides a
mechanism to report the failure that can be updated later with success.
DHCP will not be attempted if host_only=True and networking is down.

@param error: Error to report.
@param host_only: Only report to host (error may be recoverable).
@return: The success status of sending the failure signal.
��vm_idz#Azure datasource failure occurred: r�z>Using cached ephemeral dhcp context to report failure to Azure)�endpoint�encoded_reportTz@Failed to report failure using cached ephemeral dhcp context: %sNz3Using new ephemeral dhcp to report failure to AzurerQz5Failed to report failure using new ephemeral dhcp: %sF)�as_encoded_reportr�r,r�r%r-r �report_via_kvpr<r�r.r�r�rzr7r0r)r�r%rr=�reportedr�s&&&   r7r#�DataSourceAzure._report_failurersv���0�0�t�{�{�0�C���1�.�1A�B��	�	�	
�	���%�%�n�5����O��+�+�-�-�
�'�1� #�	�	��
)�!�6�6�#1��$(�� ��	�#�E��I�I�
�
�/�/�1�
��0�0��0�D�
%��2�2�-�
� $�D����/�
�'�8�:;�<� #�	�	����
��$�
��
���	�#�G�!�K��I�I�
�
�
��
	�sT�<9D�8+E!�$E�6E!�E
�!"E�E
�E�E!�E�E!�!F�,"F�Frac�f<�V^8�dQhRS[S[S[,,RS[S[S[,,/#)rfrarh)rr
rj)rkr�s"�r7rlr��s/��� � �&�t�C�y�1� �	�$�s�)�	� r9c�@�\4\P!VPR7\	VP
VPVPVR7pRTnRTnT# \d)p\RT,\PR7hRp?ii;i)z�Tells the fabric provisioning has completed.

:param pubkey_info: Fingerprints of keys to request from Wireserver.

:raises Exception: if failed to report.

:returns: List of SSH keys, if requested.
r:)r<r��iso_devrazQError communicating with Azure fabric; You may experience connectivity issues: %sr�NT)
r-r �report_success_to_hostr�r*r�r�r�rzr,r�r�r�)r�rar�r�s&$  r7r��DataSourceAzure._report_ready�s���	���"�"����5�
	�+��2�2��{�{��
�
�'�	�D���
��������	�#�*�,-�.��K�K�
�

��
	�s�-A*�*B�5#B�Bc�6<�V^8�dQhRS[RS[S[,/#r�)r�rrj)rkr�s"�r7rlr��s�����$��8�C�=�r9c��VR,R,R,# \d.p\RT,\PR7Rp?R#Rp?ii;i)�extendedr��ppsTypez2Could not retrieve pps configuration from IMDS: %sr�N)rzr,r�r�)r�rVr�s&& r7rs�"DataSourceAzure._ppstype_from_imds�sH��	��:�&�y�1�)�<�<���	�#�D�q�H��I�I�
���	�s��A�"A�Ac�,<�V^8�dQhRS[RS[RS[/#)rf�ovf_cfgrVrh)r�r>)rkr�s"�r7rlr��s"�����4��$��7�r9c��\PPVP4'd\P
pEMpVP
RR4\PP8Xg/VPV4\PP8Xd\PpEMVP
RR4\PP8Xg/VPV4\PP8Xd\PpM�VP
R4RJg^VP
RR4\PP8Xg/VPV4\PP8Xd\PpM\Pp\RVP,\PR7V#)z@Determine PPS type using OVF, IMDS data, and reprovision marker.�PreprovisionedVMTypeN�PreprovisionedVmTzPPS type: %sr�)r�r�r.r�r>rMrjrLrUrsrJrKrIr,r�rd)r�rMrVr�s&&& r7rm�#DataSourceAzure._determine_pps_type�s/��
�7�7�>�>�$�:�:�;�;����H��K�K�.��5����9N�9N�N��&�&�w�/�7�?�?�3H�3H�H����H��K�K�.��5����9N�9N�N��&�&�w�/�7�?�?�3H�3H�H����H��K�K�*�+�t�3��{�{�1�4�8����$�$�%��&�&�w�/�7�?�?�3H�3H�H����H��|�|�H���X�^�^�+����	
��r9c���VP4p\P!RR\R7;_uu_4\	V4wr#pW#VRV/3uuRRR4# +'giR#;i)zbInitiate the reprovisioning workflow.

Ephemeral networking is up upon successful reprovisioning.
zreprovisioning-read-azure-ovfz$read azure ovf during reprovisioningrr_N)r6rrr%�read_azure_ovf)r�r�r��udr�s&    r7rr�DataSourceAzure._reprovisions`���?�?�$��
�
$�
$�0�>�$�
�
�
)��2�K�B�C��C�-��!:�;�

�
�
�
�s�A�A'	c�L<�V^8�dQhRS[RS[RS[S[S[,,/#)rfr�rVrh)r�rr
rj)rkr�s"�r7rlr�s.�������%)��	�$�s�)�	�r9c��RpVPV4V# \\3dRTPRR4pRP	Te\T4M^4p\
T\PR7T#i;i)z�Determine the fingerprints we need to retrieve from Wireserver.

:return: List of keys to request from Wireserver, if any, else None.
N�_pubkeysz"Retrieved {} fingerprints from OVFr�)	r�r�r�rjrkrXr,r�r�)r�r�rVrar�s&$$  r7r��1DataSourceAzure._determine_wireserver_pubkey_infos���,0��	D��+�+�G�4����
�*�%�	D��'�'�*�d�3�K�:�A�A�$/�$;��K� ���G�
$�G����C���
	D�s��AA9�8A9c�F�\P!VP4R#)zCleanup any marker files.N)r�del_filer�r6s&r7r�� DataSourceAzure._cleanup_markers#s���
�
�d�6�6�7r9c���VPP4p\VVVPP	\
R4R7\
4R# \
4i;i)F)�is_new_instance�
preserve_ntfsN)r��
get_ipath_cur�address_ephemeral_resizer�rj�DS_CFG_KEY_PRESERVE_NTFSr-)r�r�r^�instance_dirs&&& r7�activate�DataSourceAzure.activate'sO���z�z�/�/�1��	"�$�� /�"�k�k�o�o�.F��N�
�
 �!���
 �!�s�,A�A c�x�VPPR/4PR/4PR4#)rr��platformFaultDomain�rYrjr6s&r7�availability_zone�!DataSourceAzure.availability_zone4s4��
�M�M���f�b�)�
�S��B�
�
�S�&�
'�	
r9c�
�VP'dyVP\P8wdZVPP	R4'd9\VPR,VPP	R4R7#\4# \d*p\PR\T44Rp?L:Rp?ii;i \d+p\PR\T44Rp?/#Rp?ii;i)z:Generate network configuration according to configuration.r��networkr�)r�z?Failed generating network config from IMDS network metadata: %sNz-Failed generating fallback network config: %s)r�rr�r�rj�6generate_network_config_from_instance_network_metadatarzr�r%rj�-_generate_network_config_from_fallback_config)r�r�s& r7�_generate_network_config�(DataSourceAzure._generate_network_config<s���

�����#�#�w�}�}�4������ 6�7�7�
�M��'�'�	�2�;?�;�;�?�?�@�<���	O�@�B�B���
��	�	�5���F����
���	O��I�I�E�s�1�v�N�N��	��	O�s0�6B�	C
�C
�!C�C
�
D�C=�=Dc��VP'd,VP\P8wd
VP#VP4VnVP#)z,Provide network configuration v2 dictionary.)r�rr�ror6s&r7�network_config�DataSourceAzure.network_config[sJ������D�$8�$8�G�M�M�$I��'�'�'�#�<�<�>����#�#�#r9c�x�VPPR/4PR/4PR4#)rr��locationrhr6s&r7�region�DataSourceAzure.regiones1���}�}� � ���,�0�0��B�?�C�C�J�O�Or9c�&<�V^8�dQhRS[RS[/#r��r�r�)rkr�s"�r7rlr�js���-�-�d�-�t�-r9c��\4pVR,pVR,Uu.uFp\VR,4NK	ppTUu.uF
qfT9gKTNK	ppT'gR#\RT:R	T:2\
PR7TP'dTPP'gR#\P!TPP4pT'd\T\4'gR#\T4pY�9d$\R
T:R	T:2\
PR7R#uupi \d6\RTP	R4,\
PR7R#i;iuupi)z=Validate IMDS network config and report telemetry for errors.rlr�
macAddressz6IMDS network metadata has incomplete configuration: %rr�FTz8IMDS network metadata is missing configuration for NICs rz-IMDS network metadata is missing primary NIC )
r�rr�r,rjr�r�r�rr
�get_interface_macrArj)	r�rV�
local_macsrrr��	imds_macs�m�missing_macs�primary_macs	&&       r7ru�.DataSourceAzure.validate_imds_network_metadataisI��3�4�
�	�$�Y�/�N�(��4��4�A�&�a��o�6�4�
��$.�D�:�a�)�1C���:��D�����^�
-����	
��'�'�'�t�/G�/G�/M�/M�/M���+�+�D�,D�,D�,J�,J�K���*�[�#�">�">��+�K�8���&�#���0��K�K�
���O���	�#�H��+�+�i�(�)��K�K�
�
�
	��Es-�D8�D3�D8�E;�E;�3D8�8<E8�7E8c�:�\P!\4R#)z�
Remove resource disk entries from fstab, which are configured
by cloud-init i.e. lines containing "/dev/disk/cloud/azure_resource"
and cloudconfig comment.
N)r�
cleanup_fstabr�r6s&r7�_cleanup_resourcedisk_fstab�+DataSourceAzure._cleanup_resourcedisk_fstab�s��	��� 2�3r9c�&�VP4R#r�)r�r6s&r7�clean�DataSourceAzure.clean�s���(�(�*r9)r�r�r�r�r�r�r�r�r�r�r�r�r�rYr�r�rZ)rDr�)�dg�������?)F)FrErFrGrH�dsnamer�NETWORKr�BOOT_NEW_INSTANCE�BOOT�default_update_eventsr�rr�r��_ci_pkl_versionr�r�r�r�r&rr0r7r<rIr�rkr�r�r�r�r�r�r�r�r�r�rcrr�rr
rrr!rprnrorqr6r#r�rsrmrrr�r�rd�propertyrirorrrvrur�r�rN�__classdictcell__�
__classcell__)r�r�s@@r7r�r�<s�����
�F�����'�'��N�N�
����K��]�]�N��O�@�(@�@�2�
9�!�
�!�
�*!�a� $�a�/3�	a�
�a� !�
a�a�!�a�F!�(�!�(�
�
�47�47�l!�\�!�\�|!�+�!�+�Z,�
!�;�!�;�!�F�!�F�P1�
5�!�	0�!�	0���6�� �O��.!�$!��!��>!���!��&!�

�!�

�!�$/�#�$/�"'�	$/�$/�!�$/�L!�6G�!�6G�p!��!��!�	7�!�	7�!�".�!�".�H!��!��*!�	.�!�	.�!� �!� �:!�B�B�!�B�H!� �48� � �!� �D����:!�<�!�<�!��!��$8�!�
�!�
��
��
�!��!��<�$��$��P��P�!�-�!�-�^4�+�+r9r�c�V�VR,R,R,# \dR#i;i)r��	osProfile�
adminUsernameN�r���	imds_datas&r7rwrw�s.�����#�K�0��A�A���������(�(c�H�VR,R,# \dR#i;i)r��userDataNr�r�s&r7r{r{�s)�����#�J�/�/������s��!�!c�V�VR,R,R,# \dR#i;i)r�r��computerNameNr�r�s&r7rxrx�s.�����#�K�0��@�@������r�c�\�VR,R,R,R8H# \dR#i;i)r�r��disablePasswordAuthentication�trueNr�r�s&r7ryry�s;����i� ��-�.M�N��
�	
������s��+�+c��RVP49dR#\P!4pVPV4pTP
RJ# \dR#i;i)z7
Validate whether or not the key is OpenSSH-formatted.
z
FN)r�r�AuthKeyLineParser�parse�	TypeError�keytype)rT�parser�akls&  r7r�r��s[��
�������
�
'�
'�
)�F���l�l�3����;�;�d�"�"������s�A
�
A�Ac�8�RF�p.p\^V4FrpW,\V4,p\PP	V4'gKBVPV\PP
V434Kt	V'gK�Vu#	.#)�-part)r��pr�)rrjr�r�r�r�realpath)r��maxnum�suff�found�pnum�ppaths&&    r7�_partitions_on_devicer��sx��"�����!�V�$�D��N�S��Y�.�E��w�w�~�~�e�$�$����d�B�G�G�$4�$4�U�$;�<�=�%��5��L�#��Ir9c��\P!RRR7p\PRV4\P
P
V4V9#)z	TYPE=ntfsT)�no_cachezntfs_devices found = %s)r�find_devs_withr�r�r�r�r�)r��ntfs_devicess& r7�_has_ntfs_filesystemr��s=���&�&�{�T�B�L��I�I�'��6�
�7�7���G�$��4�4r9c
�$�V'd'RRP\4:R\:R2pRV3#\PPV4'gRRV,3#\PRV\PPV44\V4pV'gRRV,3#\V4pV^8�d4RV:R	R
PVUu.uFqU^,NK
	up4:2pRV3#V^8Xd
V^,wrgMV^,wrg\V4'gRV:RV:R
V:R2pRV3#\R4pRV:RV:R
V:R2p	\P!RR\R7;_uu_4p
\ P"!VVRRR/RR7pT^8wdYRT,T
n\P+RRP\4\4RT	R T,,3uuRRR4#RRR4RT	R!,3#uupi \ P$dYpRT
nR\)T49dRT	R,3uRp?uuRRR4#RT	RT:RT:2,3uRp?uuRRR4#Rp?ii;i +'giL�;i)"acDetermine if the ephemeral drive at devpath should be reformatted.

A fresh ephemeral disk is formatted by Azure and will:
  a.) have a partition table (dos or gpt)
  b.) have 1 partition that is ntfs formatted, or
      have 2 partitions with the second partition ntfs formatted.
      (larger instances with >2TB ephemeral disk have gpt, and will
       have a microsoft reserved partition as part 1.  LP: #1686514)
  c.) the ntfs partition will have no files other than possibly
      'dataloss_warning_readme.txt'

User can indicate that NTFS should never be destroyed by setting
DS_CFG_KEY_PRESERVE_NTFS in dscfg.
If data is found on NTFS, user is warned to set DS_CFG_KEY_PRESERVE_NTFS
to make sure cloud-init does not accidentally wipe their data.
If cloud-init cannot mount the disk to check for data, destruction
will be allowed, unless the dscfg key is set.z#config says to never destroy NTFS (rSz), skipping checksFzdevice %s does not existzResolving realpath of %s -> %szdevice %s was not partitionedzdevice z had 3 or more partitions: r�z
partition r�z) on device z was not ntfs formattedc��\RR.4p\\P!V4Uu.uFq"P	4V9gKVNK	up4#uupi)zdataloss_warning_readme.txtzsystem volume information)�setrXr��listdirr~)�mp�ignored�fs&  r7�count_files�+can_dev_be_reformatted.<locals>.count_files&sI���
*�,G�H�
���r�z�z�"�~�J�~�!����'�1I�A�A�~�J�K�K��Js�A�Az was ntfs formattedzmount-ntfs-and-countr�ntfs�LANG�C)rP�update_env_for_mount�	log_errorzcannot mount ntfszunknown filesystem type 'ntfs'Tz^ but this system cannot mount NTFS, assuming there are no important files. Formatting allowed.Nz but mount of z	 failed: zmounted and counted %d fileszxit looks like you're using NTFS on the ephemeral disk, to ensure that filesystem does not get wiped, set %s.%s in configz but had %d files on it.z3 and had no important files. Safe for reformatting.)r}r�rbr�r�r�r�r�r�r�rXr�r&rrr%rrgrirrjr�)
r�r_r��
partitions�
partition_lenr��	cand_part�	cand_pathr��bmsg�evt�
file_countr�s
&&           r7�can_dev_be_reformattedr��s���&�}��H�H�[�!�$�
���c�z��
�7�7�>�>�'�"�"��0�7�:�:�:��I�I�(�'�2�7�7�3C�3C�G�3L��'�w�/�J���5��?�?�?��
�O�M��q����H�H�J�/�J�q��d�d�J�/�0�
���c�z�����)�!�}��	�9�)�!�}��	��	�*�*����
��
�c�z�� �L�!�L�	����D�
�	 �	 �
#�*� �
�
�

�	P�������&,�c�]���J�(��?�<�z�I�C�O��K�K�'�����%�(�
��$�!;�j�!H�H�H�G
�
�4�5
�J��M�M�M�M��G0��V�$�$�	P�1�C�O�/�3�q�6�9��� /�/���!
�
�0�$�)�Q�!O�O�O�O�1
�
��	P��
�
�sU�H
�8I?�:H�AI?�I<�$!I7�I<�I?�I7�'I<�(I?�7I<�<I?�?J	Fc�H�V^8�dQhR\R\R\R\/#)rfrcr�r^r_)rjr�)rks"r7rlrl\s0��(�(��(�
�(��(��	(r9c��\PPV4'g%\RV,\P
R7R#\RV,\P
R7RpRpV'dRRrTM
\
W4wrE\PRWE4V'gR#RF�p\PPVRR	V,4pR
V:RV:R2p\PPV4'd0\P!V4\PR
V4K�\PRV4K�	R# \d"p	\PRY�4Rp	?	K�Rp	?	ii;i)z,Ephemeral resource disk '%s' does not exist.r�Nz$Ephemeral resource disk '%s' exists.FTzFirst instance boot.zreformattable=%s: %s�sem�config_zMarker "z" for module "�"z%s removed.z%s: remove failed! (%s)z%s did not exist.)r��mounts)r�r�r�r,r�r�r�r}�unlinkr'r�)
rcr�r^r_�resultr��mod�sempathr�r�s
&&&&      r7rara[s���7�7�>�>�'�"�"��:�W�D��	�	�	
�	��2�W�<��	�	�	
�
�F�
�C���3��,�W�D����I�I�$�f�2���'���'�'�,�,�|�U�I��O�D��07��=��
�7�7�>�>�'�"�"�
@��	�	�'�"��	�	�-��.�
�I�I�)�4�0�(���	%�
@����5�t�?�?��
@�s�,E�E=�E8�8E=c��RpV'gR#V'g/p\P!W4VP4FKwrE\PPW4pRV9d	V!WV4p\P!WeRR7KM	R#)c�F�\P!V4pVP4F8pRVP9gKVP\
8wgK-\
VnK:	\P!V4# \d\PRT4Tu#i;i)z>Azure provides the UserPassword in plain text. So we redact it�UserPasswordz#failed to redact userpassword in %s)
�ET�
fromstring�iter�tag�text�DEF_PASSWD_REDACTION�tostringrzr��critical)�cnt�fnamer��elems&&  r7�_redact_password�%write_files.<locals>._redact_password�sy��	��=�=��%�D��	�	���"�d�h�h�.��	�	�%9�9� 4�D�I�$��;�;�t�$�$���	��L�L�>��F��J�	�s�7A:�A:�$A:�:#B �B Nr_i�)�filename�content�mode)r�
ensure_dirrcr�r�r}r)�datadirrXr�r�rr�r�s&&&    r7r�r��sg��
�������O�O�G�%�����
�������W�+���D� �&�w�6�G�����e�D�	'r9c��\P!V4p/p/pVP;'gRpVP'dVPVR&VP'dVPVR&VP
eVP
'*VR&MVP'dRVR&/pVP'dVPVR&VP'd3RVR&\VP8wd\VP4VR	&V'dR
V/VR&VPVR&\R
VP,\PR7VPVR&\RVP,\PR7VPVR&\RVP,\PR7W$V3#)z�Parse OVF XML contents.

:return: Tuple of metadata, configuration, userdata dicts.

:raises NonAzureDataSource: if XML is not in Azure's format.
:raises errors.ReportableError: if XML is unparsable or invalid.
r�rLrXr[TrF�lock_passwd�
hashed_passwdrNrMrPzPreprovisionedVm: %sr�rOzPreprovisionedVMType: %srRzProvisionGuestProxyAgent: %s)r$�
parse_text�custom_datar]�public_keysr^�passwordr\r��encrypt_pass�preprovisioned_vmr,r�rd�preprovisioned_vm_type�provision_guest_proxy_agent)r��ovf_envr�r�rT�defusers&     r7rSrS�s����"�"�8�,�G��B�
�C�	�	�	�	"�	"��B�����&�/�/��������!�-�-��J���(�(�4� '� A� A�A��L��	�	�	�	� ��L���G�����!�*�*��������!&��
���7�#3�#3�3�'3�G�4D�4D�'E�G�O�$��,�g�6��M��%�7�7�C������!:�!:�:��H�H��
#*�"@�"@�C����"�W�%C�%C�C��H�H��
'.�&I�&I�C�"�#��&��)L�)L�L��H�H��
�C�=�r9c��\V4#r�)r8)r�s&r7r�r��s
����"�"r9c�R�\P!4pV'd
V^,#R#)rN)r
�find_candidate_nics)�candidate_nicss r7r r �s!���,�,�.�N���a� � �r9c���\V4;_uu_4pVPR4RRR4R# +'giR#;i \d\P	RT4R#i;i)z;Return boolean indicating path to cdrom device has content.iNTzcdrom (%s) is not configuredF)�open�read�IOErrorr�r�)�	cdrom_dev�fps& r7�_check_freebsd_cdromr�sS��=�
�)�_�_���G�G�D�M���_�_�_�
���=��	�	�0�)�<��=�s*�A�2�A�A	�A�A�!A+�*A+c��VfR#\P!VRR7p\P!V4P	4#)zEReturn content random seed file if available, otherwise,
return None.NT)�quiet)r�load_binary_filer|�	b64encode�decode)�sourcer�s& r7r~r~�s:���~��� � ��t�4�D����D�!�(�(�*�*r9c#�"�Vx�\x�\P!4'dRp\V4'dVx�M.RF(p\P!RV,4Rjx�L
K*	V'dVx�R#R#L5i)z/dev/cd0zTYPE=%sN)�iso9660rO)�DEFAULT_PROVISIONING_ISO_DEVrrfrr�)r��	cache_dirr�fstypes&&  r7rere	sh���
�J�
&�&�������	��	�*�*��O��(�F��*�*�9�v�+=�>�>�>�)�����
?�s�A%B�'B�(B�8	Bc	��\PPVR4p\PPV4'g\	R4h\
P!R4;_uu_4\VR4;_uu_4pVP4pRRR4RRR4\X4wrEpWEVRV/3# +'giL-;i +'giL8;i)r_zNo ovf-env file foundzReading ovf-env.xml�rbN)
r�r�r}r.r#r�Timedr�rrS)�
source_dir�ovf_filerr�r�rTr�s&      r7rhrhs����w�w�|�|�J�
�6�H�
�7�7�>�>�(�#�#� �!8�9�9�	�	�	�0�	1�	1�4��$�3G�3G�2��7�7�9��4H�	1�!��*�K�B�C��C�-��2�3�3�	4H�3G��	1�	1�s$�/C
�B:	�C
�:C

�C
�
C	c�<�V^8�dQhR\R\R\/#)rf�network_metadatar�rhry)rks"r7rlrl's-��M�M��M�-1�M�
�	Mr9c
���R^R//p\VR,4EF�wr4RpRPVR7pRV^,^d,/pV^8�dRVR&R	R
RVRR/pR F�p	VPV	/4PR.4p
V
'g\P	RW�4KER
pV	R
8XdRpMRpV
'd
R
VR&WxR&V'gKnV
R,FvpWI,R,^,PRV4p
VR,pVPR4'g.VR&VR,PRPW�R74Kx	K�	V'dmV'de\
VR,4pVPRRVP4/RV/4\V4pV'd
VVR,R&W�R,V&EK�\P	RVVV4EK�	V#)!z�Convert imds network metadata dictionary to network v2 configuration.

:param: network_metadata: Dict of "network" key from instance metadata.

:return: Dictionary containing network version 2 standard configuration.
�version�	ethernetsrFzeth{idx})�idxzroute-metriczuse-dns�dhcp4Tzdhcp4-overrides�dhcp6�ipv4�	ipAddresszNo %s addresses found for: %r�24�128zdhcp6-overrides:�NN�subnet�prefix�privateIpAddress�	addressesz
{ip}/{prefix})�ipr#r{�match�
macaddresszset-namerz<No configuration for: %s (dev_config=%r) (has_ip_address=%r))r�ipv6)
�	enumeraterkrjr�r�rrrvr~r�)rr��	netconfigr�intf�has_ip_address�nicname�
dhcp_override�
dev_config�	addr_typer%�default_prefix�addr�	netPrefix�	privateIprtrs&$               r7rmrm&s���"+�A�{�B� ?�I��/��<�=�	�����#�#��#�,��'�#��'�S��9�
���7�',�M�)�$��T��}��U�&
�
�
*�I�����B�/�3�3�K��D�I���	�	�9�9�K��!�N��F�"�!%��!&���*.�J�w�'�5B�0�1�9��!�"�
�
�� �O�H�5�a�8�<�<��n��	�!�!3�4�	�!�~�~�k�2�2�.0�J�{�+��;�'�.�.�#�*�*�i�*�J��&�-*�B�.�'��\�(:�;�C�����<�����5�z�7�K�
�5�S�9�F��06�
�7�#�H�-�.8�k�"�7�+���	�	�J����		
�w>�B�r9c�$�V^8�dQhR\/#r�)r�)rks"r7rlrlxs����t�r9c�@�\P!RR7pVf/#V#)zlGenerate fallback network config.

@return: Dictionary containing network version 2 standard configuration.
T)�
config_driver)r
�generate_fallback_configr�s r7rnrnws#���
&�
&�T�
:�C�
�{��	��Jr9c���V'g\pRpVF�p\PPV4'gK*V'gK\PR\PP\PP.4Rp\PPV4'd\P!V4K�\P!V4K�	R#)a�Remove Azure-specific ubuntu network config for non-primary nics.

@param paths: List of networking scripts or directories to remove when
    present.

In certain supported ubuntu images, static udev rules or netplan yaml
config is delivered in the base ubuntu image to support dhcp on any
additional interfaces which get attached by a customer at some point
after initial boot. Since the Azure datasource can now regenerate
network configuration as metadata reports these new devices, we no longer
want the udev rules or netplan's 90-hotplug-azure.yaml to configure
networking on eth1 or greater as it might collide with cloud-init's
configuration.

Remove the any existing extended network scripts if the datasource is
enabled to write network per-boot.
Fz|Removing Ubuntu extended network scripts because cloud-init updates Azure network configuration on the following events: %s.TN)�UBUNTU_EXTENDED_NETWORK_SCRIPTSr�r�r�r�rdrr�rU�BOOT_LEGACY�isdirr�del_dirr[)r��loggedr�s&  r7r�r��s���&�/��
�F���
�7�7�>�>�$�������-��^�^�)�)�9�+@�+@�+F�+F�G�	����w�w�}�}�T�"�"����T�"��
�
�d�#�r9c�8�\P!V\4#r�)r�list_from_depends�datasources)�dependss&r7�get_datasource_listrD�s���$�$�W�k�:�:r9c��V^8�dQhR\\,R\\\,\\,3,/#)rfrrh)rrjr)rks"r7rlrl�s2�����C�=��
�8�C�=�(�3�-�'�(�r9c�j�VfR#\P!4pVFwr#rEW 8XgKW43u#	R#)N)NN)r
r�)r�
interfaces�interface_name�
interface_mac�interface_driverr6s&     r7r!r!�sE��
�}����#�#�%�J�>H�:��'7��"� �2�2�?I��r9c�~�V^8�dQh/^\9d
\;R&^\9d\\,;R&#)rfr8�PLATFORM_ENTROPY_SOURCE)�__conditional_annotations__rrrj)rks"r7rlrls7��
�
�f��3��g�xJ�I��#��I�yr9)z"/etc/netplan/90-hotplug-azure.yamlz /usr/local/sbin/ephemeral_eth.shz+/etc/udev/rules.d/10-net-device-added.rulesz#/run/network/interfaces.ephemeral.dr�)�)�rMr|�	functools�loggingr��os.pathrUr�warnings�xml.etree.ElementTree�etree�ElementTreer��enumr�pathlibrrrr�typingrr	r
rrr��	cloudinitr
rrrrr�cloudinit.configr�cloudinit.eventrr�
cloudinit.netr�cloudinit.net.dhcprrr�cloudinit.net.ephemeralrr�cloudinit.reportingr�cloudinit.sources.azurerrrr �cloudinit.sources.helpersr!�cloudinit.sources.helpers.azurer"r#r$r%r&r'r(r)r*r+r,r-r.�cloudinit.url_helperr/�catch_warnings�simplefilter�DeprecationWarning�crypt�partial�rand_strr8r5�AttributeError�passlib.hash�passlib�hash�sha512_crypt�	getLoggerrEr��DS_NAMEr�r��
DEFAULT_FS�AGENT_SEED_DIRr
r>rLr;r_rdrqrr�r�r�r�r�r�r�rf�res_diskr�r�r�r�rbr�r�r�rwr{rxryr�r�r�r�rar�rSr�r rr~rerhrmrnr��DataSourceAzureNet�DEP_FILESYSTEMrBrDr!rl)rMs@r7�<module>rvs$����
���	��	�
��"�"���'�'�3�3��E�E�&�1�'���
J�&�?�?�-�����*��	�	 �	 �	"�	"����h�1C�D��
#�#�*�*�
���C��
�
�R� 8�9�:��M��(����!��
��!�#3�4��6��
�
�#��)���d��*J��I�#���,�&�"���������4�D�=�7�'�V�?�?����J�+�A�.�H����	�	�-�.�$�x�/���	�	�)�*�"�����\�#5�6��D�,�d�	�����%��s�e���
���,�
�H�n�E�F�	'�#��W�%��/��"��g+�g�(�(�g+�T+����#�"
��5��5��mN��mN�`�&�!��	(��(�V�E��E�8�4��4�n#�������3�+��+�(�����
4��
4��M��M�`�����"$��"$�L%���w�-�-�/�0���;��CD
#�	"�	"��	�^�$��
�����1�1�6�6�
���	�	�	���sB�L�$K,�=>L�,K=	�7	L�	M�
$L1�1
M�;M�?M�M

Youez - 2016 - github.com/yon3zu
LinuXploit