404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.149.29.190: ~ $
3

\�me�#�@s�UddlZddlZddlZddlZddlZddlZddlZddljj	Z
ddlmZddl
mZddlmZmZddlmZmZmZmZddlZddlmZmZmZmZmZddlmZmZddl m!Z!dd	l"m#Z#m$Z$m%Z%dd
l&m'Z'm(Z(ddl)m*Z*ddl+m,Z,m-Z-m.Z.m/Z/dd
l0m1Z1ddl2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;m<Z<m=Z=m>Z>m?Z?m@Z@mAZAddlBmCZCy.ddlDZDejEeDjDdejFdd���d�ZGeGWnPeHeIfk
�r�yddlJZJeJjKjLjKZGWneHk
�r�dd�ZGYnXYnXejMeN�ZOdZPddiZQdZRdZSdZTdZUGdd�de�ZVdZWeeXWd d!d"d#gZYd$d%�ZZd&d'�Z[eXeXeeXd(�d)d*�Z\eXeXd+�d,d-�Z]e8eeXd.�d/d0��Z^e8eXeeXd+�d1d2��Z_d|eXd.�d3d4�Z`d5d6�Zad7d8�Zbd9d:�ZceeXd.�d;d<�Zdeje��rd=ZSedd>�Zfefdk	�r
eOjgd?�d@efZRn
eOjgdA�dZWeTdBeRidCdCdD�ZhdBdEdFgdCdG�ieSdHdI�gdJ�ZidKePgZjdLZkdMZldNZmGdOdP�dPejn�ZodQdR�ZpdSdT�ZqdUdV�ZrdWdX�ZsdYdZ�Ztd}d[d\�Zue8d]d^��Zve8d_d`��Zwe8eRdadafeXeXexexdb�dcdd��Zye8d~dedf��Zze8dgdh��Z{didj�Z|e8dkdl��Z}e8eWfdmdn��Z~e8dodp��Ze8dqdr��Z�e8e�exe�ds�dtdu��Z�e8e�d.�dvdw��Z�e8ddxdy��Z�eoZ�eoej�ffgZ�dzd{�Z�dS)��N)�Enum)�Path)�sleep�time)�Any�Dict�List�Optional)�net�sources�ssh_util�subp�util)�
EventScope�	EventType)�
device_driver)�NoDHCPLeaseError�NoDHCPLeaseInterfaceError�NoDHCPLeaseMissingDhclientError)�EphemeralDHCPv4�EphemeralIPv4Network)�events)�errors�identity�imds�kvp)�netlink)�DEFAULT_WIRESERVER_ENDPOINT�BrokenAzureDataSource�NonAzureDataSource�	OvfEnvXml�azure_ds_reporter�azure_ds_telemetry_reporter�build_minimal_ovf�dhcp_log_cb�get_boot_telemetry�get_ip_from_lease_value�get_metadata_from_fabric�get_system_info�push_log_to_kvp�report_diagnostic_event�report_failure_to_fabric)�UrlErrorz$6$�)Zstrlen)ZsaltcCstd��dS)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 dependencyN)�ImportError)�_�r0�%/usr/lib/python3.6/DataSourceAzure.py�
blowfish_hashBsr2�Azurezinstance-idziid-AZURE-NODEz/dev/disk/cloud/azure_resourceZext4z/var/lib/waagentz/dev/sr0c@s eZdZdZdZdZdZdZdS)�PPSType�NoneZPreprovisionedOSDiskZRunningZSavableZUnknownN)�__name__�
__module__�__qualname__�NONE�OS_DISK�RUNNING�SAVABLE�UNKNOWNr0r0r0r1r4Ys
r4z/sys/firmware/acpi/tables/OEM0z"/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.dcCs�xz|j�D]n}tjd|�r
|j�}t|�dkr
|djd�}t|�dkr
|ddkr
|dj|�r
|djd�}|dSq
Wd	S)
z�
    dev.storvsc.1.%pnpinfo:
        classid=32412632-86cb-44a2-9b5c-50d1417354f5
        deviceid=00000000-0001-8899-0000-000000000000
    Zpnpinfo���=r�deviceid��.N)�
splitlines�re�search�split�len�
startswith)�
sysctl_outrA�lineZfields�columns�compsr0r0r1�"find_storvscid_from_sysctl_pnpinfomsrNcCs2x,|j�D] }tj||�r
|j�}|dSq
WdS)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
    rN)rDrErFrG)�camcontrol_outZdisk_drvrK�itemsr0r0r1�find_busdev_from_disk�s
rQ)rO�busdev�returncCsNxH|j�D]<}tj||�r
|jd�}t|�dkr
|djd�}|dSq
WdS)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)
    �(r?rB�,rN)rDrErFrGrH)rOrRrKrPZdev_passr0r0r1�find_dev_from_busdev�s
rV)�macrSc	CsZt|�dkrRdj|dd�|dd�|dd�|dd�|dd�|dd�g�}|j�S)	z1Normalize mac address with colons and lower-case.��:rr?����
)rH�join�lower)rWr0r0r1�normalize_mac_address�sBr`)rScCsdd�tj�D�S)z-Get Hyper-V NICs as normalized MAC addresses.cSs$g|]}|ddkrt|d��qS)r?�	hv_netvscrB)r`)�.0�nr0r0r1�
<listcomp>�sz1get_hv_netvsc_macs_normalized.<locals>.<listcomp>)r
�get_interfacesr0r0r0r1�get_hv_netvsc_macs_normalized�srfcsf�fdd�tj�D�}d|kr"dSt|�dkrLtd�|ftjd�|dStd�|ftjd�d	S)
z0Determine the device driver to match on, if any.cs$g|]}�t|d�kr|d�qS)rBr?)r`)rb�i)rWr0r1rd�sz3determine_device_driver_for_mac.<locals>.<listcomp>rarBz4Assuming driver for interface with mac=%s drivers=%r)�logger_funcrz=Unable to specify driver for interface with mac=%s drivers=%rN)r
rerHr*�LOG�debug�warning)rWZdriversr0)rWr1�determine_device_driver_for_mac�s


rlcCs:ytj|�jStjk
r4tjddj|��|SXdS)NzFailed to execute: %s� )r
�stdout�ProcessExecutionErrorrirjr^)�cmd�fail_retr0r0r1�execute_or_debug�s
rrcCstddgdd�S)NZsysctlzdev.storvsc�)rq)rrr0r0r0r1�get_dev_storvsc_sysctl�srtcCstdddg�S)N�
camcontrol�devlistz-b)rrr0r0r0r1�get_camcontrol_dev_bus�srwcCstddg�S)Nrurv)rrr0r0r0r1�get_camcontrol_dev�srxcCs�d}|dkrd}|d}dt|�}dj||�}t�}t||�}|sRtjd�dSt�}t�}dj|�}t||�}	|	r�t	||	�}
|
dkr�tjd	�dS|
Sd
j|�}t||�}	|	r�t	||	�}
|
dkr�tjd	�dS|
SdS)NZ00000000rBZ00000001r?Z000z{0}-{1}z#Fail to find storvsc id from sysctlz	blkvsc{0}zFail to find /dev/daXz
storvsc{0})
�str�formatrtrNrirjrwrxrQrV)Zport_idZg0Zg1Zg0g1rJZ	storvscidZcamcontrol_b_outrOZblkvscZscbusxZdevnameZstorvscr0r0r1�get_resource_disk_on_freebsd�s<









r{zfreebsd-ufsrBzresource disk is not Nonez/dev/zresource disk is NoneZ
ephemeral0T)�data_dir�disk_aliases�apply_network_config�&apply_network_config_for_secondary_ipsZgpt�d)Z
table_typeZlayoutZ	overwritezephemeral0.1)Z
filesystemZdevice)�
disk_setupZfs_setupZ
datasourceZnever_destroy_ntfszTemporary StorageZREDACTEDcseZdZdZejejejhiZ	dZ
ejZ
dZdd�Zedd��fdd	�Zd
d�Zdd
�Zeeed�dd��Zeddddd�eeeeeed�dd��Zedd�dd��Zed�dd�Zedd��Zeeed�dd ��Zff�fd!d"�	Z ed#d$��Z!ed%d&��Z"d'd(�Z#d)d*�Z$ee%ed�d+d,��Z&e'e%ed-�d.d/�Z(e%ed�d0d1�Z)d2d3�Z*d4d5�Z+drd6d7�Z,ed8d9��Z-edseee.d<�d=d>��Z/ed?d@��Z0edddA�eeddB�dCdD��Z1edEdF��Z2ee3j3d�dGdH��Z4edIdJ��Z5edd�dKdL��Z6edMdN��Z7edOdP��Z8ee9d�dQdR��Z:edte;j<eedS�dTdU��Z=eddV�ee%eee%edW�dXdY��Z>e'eed-�dZd[�Z?e'e'e@d\�d]d^�ZAed_d`��ZBee'e'ee%eda�dbdc��ZCddde�ZDedfdg��ZEeFdhdi��ZGedjdk��ZHeFdldm��ZIeFdndo��ZJee'ed-�dpdq��ZK�ZLS)u�DataSourceAzurer3FrBcCs�tjj||||�tjj|jd�|_i|_d|_t	j
t	j|ti�t
g�|_d|_d|_d|_d|_d|_t|_tjj|jdd�|_dS)NZazureF�data�reported_ready)r�
DataSource�__init__�os�pathr^�seed_dir�cfg�seedr�
mergemanydictZget_cfg_by_path�DS_CFG_PATH�BUILTIN_DS_CONFIG�ds_cfg�_iso_dev�_network_config�_ephemeral_dhcp_ctx�_route_configured_for_imds� _route_configured_for_wireserverr�_wireserver_endpoint�	cloud_dir�_reported_ready_marker_file)�self�sys_cfg�distro�pathsr0r0r1r�HszDataSourceAzure.__init__N)�ci_pkl_versionrScsDt�j|�d|_d|_d|_d|_t|_tj	j
|jjdd�|_
dS)NFr�r�)�super�	_unpickler�r�r�r�rr�r�r�r^r�r�r�)r�r�)�	__class__r0r1r�ZszDataSourceAzure._unpicklecCstjj|�}d||jfS)Nz%s [seed=%s])rr��__str__r�)r��rootr0r0r1r�fszDataSourceAzure.__str__cCsH|jdkrd}n*|jjd�r"d}n|jj�dkr6d}nd}d||jfS)z/Return the subplatform metadata source details.N�unknownz/devzconfig-diskrzseed-dirz%s (%s))r�rIr_)r�Zsubplatform_typer0r0r1�_get_subplatformjs
z DataSourceAzure._get_subplatform)�ephipv4rScCs<|js
dSdd�|jD�}d|k|_|j|k|_|jp:|jS)NFcSsg|]}|djd�d�qS)r�/)rG)rb�rr0r0r1rd|sz5DataSourceAzure._check_if_primary.<locals>.<listcomp>z169.254.169.254)�
static_routesr�r�r�)r�r�Zrouted_networksr0r0r1�_check_if_primaryvs
z!DataSourceAzure._check_if_primaryT�)�iface�report_failure_if_not_primary�retry_sleep�timeout_minutes)r�r�r�r�rScCsr|jdk	rtd��td|tj�ftjd�t|j|t	d�|_d}t
�}||d}tjddt
d	����x4|dk�r�y|jj�}Wn�tk
r�td
tjd�|jtjt
�|d�dd
�Yn�tk
r�tdtjd�d|_�Yn�tk
�r.td|tjd�|jtjt
�||d�dd
�YnHtjk
�rt}z(td|j|j|j|jftjd�WYdd}~XnX|dk�r�t
�||k�r�t|�qlPqlW|dk�r�d|_t��|d}||j_d|k�r�t |d�|_!t"|�}	|jj#}
|
dk�rtd��|j$|
�}td|||	|
j%|
j&||j'|j(ftjd�|�rd|�rd|jtj)||	|
j%|
j&|d�dd
�|SQRXdS)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.z2Bringing up ephemeral networking with iface=%s: %r)rh)r�Z
dhcp_log_func�<zobtain-dhcp-leasezobtain dhcp lease)�name�description�parentzInterface not found for DHCP)�durationT)�	host_onlyzdhclient executable not foundz&Failed to obtain DHCP lease (iface=%s))r��	interfacez7Command failed: cmd=%r stderr=%r stdout=%r exit_code=%sr�zunknown-245zdhcp context missing ephipv4z{Obtained DHCP lease on interface %r (primary=%r driver=%r router=%r routes=%r lease=%r imds_routed=%r wireserver_routed=%r))r��driver�routerr��lease)*r��RuntimeErrorr*r
rerirjrr�r$rr�ReportEventStackr!Zobtain_leaserrk�_report_failurerZ$ReportableErrorDhcpInterfaceNotFoundr�errorrZReportableErrorDhcpLeaser
rorp�stderrrnZ	exit_coderr�r&r�rZ_ephipv4r�r�r�r�r�Z(ReportableErrorDhcpOnNonPrimaryInterface)r�r�r�r�r�r��
start_timeZdeadliner�r�r�Zprimaryr0r0r1�_setup_ephemeral_networking�s�









z+DataSourceAzure._setup_ephemeral_networking)rScCs.d|_d|_|jdkrdS|jj�d|_dS)zTeardown ephemeral networking.FN)r�r�r�Z
clean_network)r�r0r0r1�_teardown_ephemeral_networking s

z.DataSourceAzure._teardown_ephemeral_networkingcCs|jdkp|jjdkS)z"Check if networking is configured.N)r�r�)r�r0r0r1�_is_ephemeral_networking_up+s
z+DataSourceAzure._is_ephemeral_networking_upc)Cs&i}|jd}d}ddi}ddddiii}d}i}�x2t|j|�D�]}yt|jd�r�tj�rvtj|td	d
�\}}}}ntj|t�\}}}}||_nt|�\}}}}|}t	d|t
jd�PWqBtk
r�t	d
|t
jd�wBYqBtj
k
�rt	d|t
jd�wBYqBtk
�rP}	z&d|	}
t	|
t
jd�tj|
��WYdd}	~	XqBXqBWd}
t	|
t
jd�t|j��pz|dk}|�r�dnd}y|j|d�Wntk
�r�YnXi}
|j��r�|jdd�}
|
�r�|dk�r�d}
t	|
�tj|
��|j||
�}|tjk�r�tj��r2d}
t	|
t
jd�tj|
��|j��sXd}
t	|
t
jd�tj|
��|tjk�rn|j�n4|tjk�r�|j�n|tjk�r�|j �n|j!�|j"�\}}}}|jdd�}
|j#|
�}|dtjj$fk�r�|j%t&j'd|d��|j(|
d�|�pd|_)|j*||tj+|d|
ig�|d��t,|
�}t-|
�}t.|
�}|�rbt
jd|�||ddd<|�r�t
jd |�||d!d<|�r�t
jd"|�||d!d#<|j)dk�r|d$�ryt/|||d%�}d&|i|d$<Wn6t0k
�r
}zt	d'|t
jd�WYdd}~XnX|�slt1|
�}|�rlt
jd(�yt2j3dj4|j5���|d)<Wn$t0k
�rjt	d*t
jd�YnX||k�r�t	d+|t
jd�t6�}|�r�||d!d,<|j7�|d!d-<|j8d.k�r"|j��r"|j9||
d/�}y|j:|d0�}Wnt0k
�r�Yn(Xt
jd1|�|�r||d!d2<|j;�|S)3aWalk 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.
        r|Nzlocal-hostnamers�system_info�default_userr�z/dev/�udf)�mtypez!Found provisioning metadata in %s)rhz$Did not find Azure data source in %sz%s was not mountablezBrokenAzureDataSource: %sz�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�)r�T)�report_failurezNo OVF or IMDS availablez%Free BSD is not supported for PPS VMszDHCP failed while in source PPSzextended.compute.ppsType)�key�value)�imds_mdZIMDSr)r��files�metadata�userdata_rawz Username retrieved from IMDS: %sz Hostname retrieved from IMDS: %sr�z(Disable password retrieved from IMDS: %sZdisable_passwordr�)�username�hostnameZ
disableSshPwdzovf-env.xmlz)Failed to construct OVF from IMDS data %szRetrieved userdata from IMDSr�zBad userdata in IMDSzusing files cached in %sZrandom_seedzinstance-idF)r�r�)�pubkey_infoznegotiating returned %szpublic-keys)<r��list_possible_azure_dsr�rIr�
is_FreeBSD�mount_cb�load_azure_ds_dirr�r*rirjr�MountFailedErrorrr�r�InvalidMetaDataExceptionrk�boolr�rr��get_metadata_from_imds�_determine_pps_typer4r9r;�_wait_for_pps_running_reuser<�_wait_for_pps_savable_reuser:�_wait_for_pps_os_disk_shutdown�_wait_for_pps_unknown_reuse�_reprovision�_ppstype_from_imdsr�r�rZ"ReportableErrorImdsInvalidMetadata�validate_imds_network_metadatar��updater��_username_from_imds�_hostname_from_imds�_disable_password_from_imdsr#�	Exception�_userdata_from_imds�base64Z	b64decoder^rG�_get_random_seed�_iid�_negotiated�!_determine_wireserver_pubkey_info�
_report_ready�_cleanup_markers)r��crawled_data�ddirZ
ovf_source�mdr�r�r��src�exc�msgZrequires_imds_metadatar�r��pps_typeZimds_ppstypeZ
imds_usernameZ
imds_hostnameZimds_disable_password�contents�eZ
imds_userdatar�r��ssh_keysr0r0r1�crawl_metadata2s



 













zDataSourceAzure.crawl_metadata)r�rSc	Cs�t�}|d}|jsd}nd}d}d}ytj||d�Stk
r�}z@t|�}t�|}tj||d�}|jr�t|j	t
j�r�d}WYdd}~Xn6tk
r�}zt|�}tj
|d�}WYdd}~XnX|j||d�td|tjd	�iS)
Ni,�)�max_connection_errors�retry_deadline)�	exceptionr�F)r�)r�z!Ignoring IMDS metadata due to: %s)rh)rr�rZ fetch_metadata_with_api_fallbackr,ryrZReportableErrorImdsUrlError�
isinstance�cause�requests�ConnectionError�
ValueErrorZ+ReportableErrorImdsMetadataParsingExceptionr�r*rirk)	r�r�r�r�r�Zerror_stringZerror_reportr�r�r0r0r1r�s8



z&DataSourceAzure.get_metadata_from_imdscstt|�j|�tj|_dS)z.Reset any cached class attributes to defaults.N)r�r��clear_cached_attrsr�UNSET�_metadata_imds)r�Z
attr_defaults)r�r0r1r6sz"DataSourceAzure.clear_cached_attrscCs4tjj�}|dk	rdS|jdkr$dSt|jd�j�S)zQCheck platform environment to report if this datasource may
        run.
        NTFzovf-env.xml)rZChassisAssetTagZquery_systemr�r�exists)r�Zchassis_tagr0r0r1�	ds_detect;s

zDataSourceAzure.ds_detectc5Cs�y
t�Wn.tk
r8}ztjd|�WYdd}~XnXy
t�Wn.tk
rr}ztjd|�WYdd}~XnXz|ytjtjd|jd�}Wn^t	j
k
r�}z|j|�dSd}~Xn4tk
r�}zt	j|�}|j|�dSd}~XnXWd|j
�X|j�r&|jjdk�r&|jjd��r&t�t}tjj|��r`td	|tjd
�tj|dtg�|_ntd|tjd
�|d|_|d
d|_tj|d
tg�|_|d|_t|jd|ddd�dS)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: %szCrawl of metadata service)Zlogfuncr��funcFZubuntur~zXEphemeral resource disk '%s' exists. Merging default Azure cloud ephemeral disk configs.)rhr�zdEphemeral resource disk '%s' does not exist. Not merging default Azure cloud ephemeral disk configs.r�rr�r|r�i�)�dirmodeT) r%r�rirkr(rZlog_timerjr�r�ReportableErrorr�Z!ReportableErrorUnhandledExceptionr�r�r�r��get�*maybe_remove_ubuntu_network_config_scripts�RESOURCE_DISK_PATHr�r�rr*r��#BUILTIN_CLOUD_EPHEMERAL_DISK_CONFIGr�r�DEFAULT_METADATAr�r��write_files)r�r�r�r�Zreportable_error�devpathr0r0r1�	_get_dataJsZ









zDataSourceAzure._get_datacCs(|jsd|jkr|j�St|jd�S)Nzinstance-id)r�r�ry)r�r0r0r1�get_instance_id�szDataSourceAzure.get_instance_idcCs|jdj|�S)Nr})r�r	)r�r�r0r0r1�device_name_to_device�sz%DataSourceAzure.device_name_to_devicecCs2y|j|jd�Sttfk
r(YnX|j�S)z+
        Retrieve public SSH keys.
        r)�_get_public_keys_from_imdsr��KeyErrorr�_get_public_keys_from_ovf)r�r0r0r1�get_public_ssh_keys�s
z#DataSourceAzure.get_public_ssh_keys)r�rScCs�ydd�|ddD�}Wn(tk
rBd}t|tjd��YnXtdd�|D��rpd	}t|tjd�t|��d
jt|��}t|tjd�|S)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.
        cSsg|]}|d�qS)ZkeyDatar0)rbZ
public_keyr0r0r1rd�sz>DataSourceAzure._get_public_keys_from_imds.<locals>.<listcomp>�computeZ
publicKeysz"No SSH keys found in IMDS metadata)rhcss|]}t|d�VqdS))r�N)�_key_is_openssh_formatted)rbr�r0r0r1�	<genexpr>�sz=DataSourceAzure._get_public_keys_from_imds.<locals>.<genexpr>zKey(s) not in OpenSSH formatzRetrieved {} keys from IMDS)rr*rirj�anyrrzrH)r�r�r��log_msgr0r0r1r�sz*DataSourceAzure._get_public_keys_from_imdscCsZg}y*|jd}djt|��}t|tjd�Wn&tk
rTd}t|tjd�YnX|S)zYGet SSH keys that were fetched from wireserver.

        :returns: List of keys.
        zpublic-keyszRetrieved {} keys from OVF)rhzNo keys available from OVF)r�rzrHr*rirjr)r�r�rr0r0r1r�s
z)DataSourceAzure._get_public_keys_from_ovfcCs|jS)N)r�)r�r0r0r1�get_config_obj�szDataSourceAzure.get_config_objcCstj|j��S)N)rZinstance_id_matches_system_uuidr)r�r�r0r0r1�check_instance_id�sz!DataSourceAzure.check_instance_idcCsZtjj|jjd�d�}tj�}tjj|�rVtj	|�j
�}tj|�}|j�||gkrV|S|S)Nr�zinstance-id)
r�r�r^r�Z	get_cpathrZquery_system_uuidrr�	load_file�stripZbyte_swap_system_uuidr_)r�ZpreviousZ
prev_iid_pathZsystem_uuidZ
swapped_idr0r0r1r��s
zDataSourceAzure._iidcCs�y\d}tjddtd��tj|�}WdQRX|dkrHd}t|tjd�ntd|tjd�Wn6t	k
r�}ztt
|�tjd��WYdd}~XnXdS)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 detach)r�r�r�zHPreprovisioned nic not detached as expected. Proceeding without failing.)rhz%The preprovisioned nic %s is detached)rr�r!rZwait_for_nic_detach_eventr*rirkrj�AssertionErrorryr�)r��nl_sock�ifnamer�r�r0r0r1�_wait_for_nic_detach�s 
z$DataSourceAzure._wait_for_nic_detachr�皙�����?)r"�retriesr�cCsfx`t|�D]:}|jjj|�r0td|tjd�P|d|kr
t|�q
Wtd|||ftjd�dS)NzThe link %s is up.)rhrBz;The link %s is not up after %f seconds, continuing anyways.)�ranger�Z
networkingZtry_set_link_upr*ri�infor)r�r"r%r�rgr0r0r1�wait_for_link_upsz DataSourceAzure.wait_for_link_upcCs@|j}tjd|�tj|djtj�t�d��t	dtj
d�dS)Nz*Creating a marker file to report ready: %sz{pid}: {time}
)�pidrzRSuccessfully created reported ready marker file while in the preprovisioning pool.)rh)r�rir'r�
write_filerzr��getpidrr*rj)r�r�r0r0r1�_create_report_ready_marker"sz+DataSourceAzure._create_report_ready_marker)�
create_marker�expect_url_error)r-r.rScCs�y|j�Wndtk
rp}zH|rBt|t�rBtdtjd�d|_nd}t|tjd�t	j
|�|�WYdd}~XnXd|_|r�|j�dS)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.)rhNz9Failed reporting ready while in the preprovisioning pool.F)
r�r�r�r,r*rirjr�r�rr�r�r,)r�r-r.r�r�r0r0r1�_report_ready_for_pps/s
z%DataSourceAzure._report_ready_for_ppscCs�tjd�y�g}d}x�d}tjddt|�td��tj||�}WdQRX|j|�t	d|tjd�|j
|�|s�tjd	|�|j|d
dd�}|r�tjd�Pq|j�qWWn4t
k
r�}zt	t|�tjd�WYdd}~XnXdS)
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 attached)r�r�r�zDetected nic %s attached.)rhz!Checking if %s is the primary nicr�)r�r�r�zFound primary nic for this VM.)rir'rr�rHr!rZwait_for_nic_attach_event�appendr*r(r�r�r ryr�)r�r!Z
nics_foundZprimary_nic_foundr"r�r0r0r1�"_wait_for_hot_attached_primary_nicVs:




z2DataSourceAzure._wait_for_hot_attached_primary_niccCsHytj�Stjk
rB}ztd|��tjd��WYdd}~XnXdS)Nz!Failed to create netlink socket: )rh)rZcreate_bound_netlink_socketZNetlinkCreateSocketErrorr*rir�)r�r�r0r0r1�_create_bound_netlink_socket�s
z,DataSourceAzure._create_bound_netlink_socketcCs.|jdd�tdtjd�td�td��dS)z4Report ready and wait for host to initiate shutdown.F)r-z"Waiting for host to shutdown VM...)rhi�3�zShutdown failure for PPS disk.N)r/r*rir'rr)r�r0r0r1r��s
z.DataSourceAzure._wait_for_pps_os_disk_shutdowncCs�|j�}z�|jdks |jjdkr(td��|jj}|j�tjd|�tjddt	d��Lyt
j||�Wn4tk
r�}zt
d|tjd�WYdd}~XnXWdQRXWd|j�X|j�dS)	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 switch)r�r�r�z'Error while waiting for vnet switch: %s)rh)r2r�r�r�r/rirjrr�r!rZ!wait_for_media_disconnect_connectr r*r��closer�)r�r!r�r�r0r0r1r��s,

*
z+DataSourceAzure._wait_for_pps_running_reusecCs�|j�}zn|jdd�y|j�Wn<tjk
r^}ztd|tjd�d|_WYdd}~XnX|j	|�|j
|�Wd|j�XdS)z@Report ready and wait for nic(s) to be hot-attached upon re-use.T)r.zLIgnoring failure while tearing down networking, NIC was likely unplugged: %r)rhN)r2r/r�r
ror*rir'r�r#r1r3)r�r!r�r0r0r1r��s

z+DataSourceAzure._wait_for_pps_savable_reusecCs&tjj|j�rdS|j�|j�dS)z0Report ready if needed for unknown/recovery PPS.N)r�r��isfiler�r/r�)r�r0r0r1r��sz+DataSourceAzure._wait_for_pps_unknown_reusecCs�d}d}x�|s�|j�sF|d7}y|jdd�Wntk
rDw
YnXtjddtd��2ytj�}Wntk
r�|j	�w
YnXWdQRXq
Wt
d	|tjd
�|S)z0Poll IMDs for reprovisiondata XML document data.rNrBr�)r�zget-reprovision-data-from-imdszget reprovision data from imds)r�r�r�z#attempted dhcp %d times after reuse)rh)
r�r�rrr�r!rZfetch_reprovision_datar,r�r*rirj)r�Z
dhcp_attemptsZreprovision_datar0r0r1�
_poll_imds�s,

zDataSourceAzure._poll_imds)r�r�rSc Cstd|j���tjd�tj|�}|r*|S|j�r�y&tdtjd�t|j	|d�d|_
dStk
r�}ztd|tjd�WYdd}~XnXyTtdtjd�|j�y|j
d	d
�Wntk
r�YnXt|j	|d�d|_
dStk
�r}ztd|tjd�WYdd}~XnXdS)
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.
        z#Azure datasource failure occurred: )rhz>Using cached ephemeral dhcp context to report failure to Azure)�endpointr�Tz@Failed to report failure using cached ephemeral dhcp context: %sNz3Using new ephemeral dhcp to report failure to Azurer�)r�z5Failed to report failure using new ephemeral dhcp: %sF)r*Zas_encoded_reportrir�rZreport_failure_to_hostr�rjr+r�r�r�r�r�r)r�r�r�Zreportedr�r0r0r1r�sL



zDataSourceAzure._report_failure)r�)r�rScCsftj�yt|j|j|d�}Wn6tk
rT}ztd|tjd��WYdd}~XnXd|_d|_	|S)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.
        )r6Ziso_devr�zQError communicating with Azure fabric; You may experience connectivity issues: %s)rhNT)
rZreport_success_to_hostr'r�r�r�r*rirkr�)r�r�r�r�r0r0r1r�Ls
zDataSourceAzure._report_readycCsHy|dddStk
rB}ztd|tjd�dSd}~XnXdS)NZextendedrZppsTypez2Could not retrieve pps configuration from IMDS: %s)rh)r�r*rirj)r�r�r�r0r0r1r�ms
z"DataSourceAzure._ppstype_from_imds)�ovf_cfgr�rScCs�tjj|j�rtj}n�|jdd�tjjks<|j	|�tjjkrDtj}np|jdd�tj
jksj|j	|�tj
jkrrtj
}nB|jd�dks�|jdd�tjjks�|j	|�tjjkr�tj}ntj}t
d|jtjd�|S)z@Determine PPS type using OVF, IMDS data, and reprovision marker.�PreprovisionedVMTypeN�PreprovisionedVmTzPPS type: %s)rh)r�r�r4r�r4r=r	r<r�r�r:r;r9r*rir')r�r7r�r�r0r0r1r�ws"

z#DataSourceAzure._determine_pps_typecCsB|j�}tjddtd�� t|�\}}}|||d|ifSQRXdS)zrInitiate the reprovisioning workflow.

        Ephemeral networking is up upon successful reprovisioning.
        zreprovisioning-read-azure-ovfz$read azure ovf during reprovisioning)r�r�r�zovf-env.xmlN)r5rr�r!�read_azure_ovf)r�r�r��udr�r0r0r1r��s
zDataSourceAzure._reprovision)r�r�rScCsdd}y|j|�WnLttfk
r^|jdd�}dj|dk	rFt|�nd�}t|tjd�YnX|S)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)rh)	rrrr	rzrHr*rirj)r�r�r�r�rr0r0r1r��sz1DataSourceAzure._determine_wireserver_pubkey_infocCstj|j�dS)zCleanup any marker files.N)r�del_filer�)r�r0r0r1r��sz DataSourceAzure._cleanup_markerscCs<|jj�}zt|||jjtd�d�Wdt|jd�XdS)NF)�is_new_instance�
preserve_ntfsZdef_log_file)r�Z
get_ipath_cur�address_ephemeral_resizer�r	�DS_CFG_KEY_PRESERVE_NTFSr)r�)r�r�r>�instance_dirr0r0r1�activate�s
zDataSourceAzure.activatecCs|jjdi�jdi�jd�S)NrrZplatformFaultDomain)r�r	)r�r0r0r1�availability_zone�sz!DataSourceAzure.availability_zonecCs�|jrl|jtjkrl|jjd�rlyt|jd|jjd�d�Stk
rj}ztjdt	|��WYdd}~XnXyt
�Stk
r�}ztjdt	|��WYdd}~XnXiS)z:Generate network configuration according to configuration.r~�networkr)rz?Failed generating network config from IMDS network metadata: %sNz-Failed generating fallback network config: %s)rrrr�r	�6generate_network_config_from_instance_network_metadatar�rir�ry�-_generate_network_config_from_fallback_config)r�r�r0r0r1�_generate_network_config�s"
"z(DataSourceAzure._generate_network_configcCs(|jr|jtjkr|jS|j�|_|jS)z,Provide network configuration v2 dictionary.)r�rrrH)r�r0r0r1�network_config�s
zDataSourceAzure.network_configcCs|jjdi�jdi�jd�S)Nrr�location)r�r	)r�r0r0r1�region�szDataSourceAzure.regioncs�t�}y|d}dd�|dD��Wn,tk
rPtd|jd�tjd�dSX�fdd�|D�}|sld	Std
||ftjd�|js�|jjr�dStj	|jj�}|s�t
|t�r�dSt|�}||kr�td||ftjd�dS)z=Validate IMDS network config and report telemetry for errors.rEcSsg|]}t|d��qS)�
macAddress)r`)rbrgr0r0r1rdszBDataSourceAzure.validate_imds_network_metadata.<locals>.<listcomp>r�z6IMDS network metadata has incomplete configuration: %r)rhFcsg|]}|�kr|�qSr0r0)rb�m)�	imds_macsr0r1rdsTz>IMDS network metadata is missing configuration for NICs %r: %rz3IMDS network metadata is missing primary NIC %r: %r)
rfrr*r	rirkr�r�r
Zget_interface_macr�ryr`)r�r�Z
local_macsrIZmissing_macsZprimary_macr0)rNr1r��s<



z.DataSourceAzure.validate_imds_network_metadata)N)r�r$)F)Mr6r7r8ZdsnamerZNETWORKrZBOOT_NEW_INSTANCE�BOOTZdefault_update_eventsr�rrrZ_ci_pkl_versionr��intr�r�r�r"rr�r�r	ryr�r�r�r�rr�rrrrrrr�dictrrrrr�r#�floatr(r,r/r1�socketr2r�r�r�r��bytesr5rrr�r�r�r4r�r�r�r�rC�propertyrDrHrIrKr��
__classcell__r0r0)r�r1r�;s�


W-M
 

!9
$>


r�cCs*y|dddStk
r$dSXdS)Nr�	osProfileZ
adminUsername)r)�	imds_datar0r0r1r�-sr�cCs&y|ddStk
r dSXdS)NrZuserData)r)rXr0r0r1r�4sr�cCs*y|dddStk
r$dSXdS)NrrWZcomputerName)r)rXr0r0r1r�;sr�cCs.y|ddddkStk
r(dSXdS)NrrWZdisablePasswordAuthentication�true)r)rXr0r0r1r�Bs
r�cCsFd|j�krdStj�}y|j|�}Wntk
r:dSX|jdk	S)z?
    Validate whether or not the key is OpenSSH-formatted.
    z
FN)rrZAuthKeyLineParser�parse�	TypeErrorZkeytype)r��parserZaklr0r0r1rLsrcCsdx^dD]V}g}xDtd|�D]6}||t|�}tjj|�r|j|tjj|�f�qW|r|SqWgS)N�-part�prsrB)r]r^rs)r&ryr�r�rr0�realpath)rZmaxnumZsuff�foundZpnumZppathr0r0r1�_partitions_on_device]s
racCs*tjddd�}tjd|�tjj|�|kS)Nz	TYPE=ntfsT)Zno_cachezntfs_devices found = %s)r�find_devs_withrirjr�r�r_)rZntfs_devicesr0r0r1�_has_ntfs_filesystemjsrccCs�|rddjt�tf}d|fStjj|�s6dd|fStjd|tjj|��t	|�}t
|�dkrldd|fSt
|�dkr�d	|d
jdd�|D��f}d|fSt
|�dkr�|d
\}}n|d\}}t|�s�d|||f}d|fStdd��}d|||f}t
jddtd���}ytj||dddidd�}	WnTtjk
�r|}
z4d|_dt|
�k�r^d|dfSd|d||
ffSd}
~
XnX|	dk�r�d|	|_tjddjt�t�d|d |	fSWdQRXd|d!fS)"a�Determine 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 (%s.%s), skipping checksrCFzdevice %s does not existzResolving realpath of %s -> %srzdevice %s was not partitionedr?z&device %s had 3 or more partitions: %srmcSsg|]}|d�qS)rBr0)rbr^r0r0r1rd�sz*can_dev_be_reformatted.<locals>.<listcomp>rBz5partition %s (%s) on device %s was not ntfs formattedcs(tddg��t�fdd�tj|�D��S)Nzdataloss_warning_readme.txtzsystem volume informationcsg|]}|j��kr|�qSr0)r_)rb�f)�ignoredr0r1rd�sz?can_dev_be_reformatted.<locals>.count_files.<locals>.<listcomp>)�setrHr��listdir)Zmpr0)rer1�count_files�s
z+can_dev_be_reformatted.<locals>.count_filesz1partition %s (%s) on device %s was ntfs formattedzmount-ntfs-and-count)r�r�r�ZntfsZLANG�C)r�Zupdate_env_for_mountZ	log_errorzcannot mount ntfszunknown filesystem type 'ntfs'Tz^ but this system cannot mount NTFS, assuming there are no important files. Formatting allowed.z but mount of %s failed: %sNzmounted 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�rAr�r�rrirjr_rarHrcr"rr�r!rr�r�r�ryrk)rr?r�Z
partitionsZ	cand_partZ	cand_pathrh�bmsgZevtZ
file_countr�r0r0r1�can_dev_be_reformattedqsr
 

rkF)rBrr>r?c
Cstjj|�s"td|tjd�dStd|tjd�d}d}|rJd\}}nt||�\}}tjd||�|sndSx�dD]�}tjj|d
d|�}d||f}tjj|��r�ytj|�tjd
|�Wn0t	k
r�}	ztj
d||	�WYdd}	~	XnXqttjd|�qtWdS)Nz,Ephemeral resource disk '%s' does not exist.)rhz$Ephemeral resource disk '%s' exists.FT�First instance boot.zreformattable=%s: %sr��mountsZsemZconfig_zMarker "%s" for module "%s"z%s removed.z%s: remove failed! (%s)z%s did not exist.)Trl)r�rm)r�r�rr*rirjrkr^�unlink�FileNotFoundErrorrk)
rBrr>r?�resultr��modZsempathrjr�r0r0r1r@�s6




"r@cCsndd�}|sdS|si}tj||�xD|j�D]8\}}tjj||�}d|krV|||�}tj||dd�q.WdS)NcSsfy@tj|�}x*|j�D]}d|jkr|jtkrt|_qWtj|�Stk
r`tj	d|�|SXdS)z>Azure provides the UserPassword in plain text. So we redact itZUserPasswordz#failed to redact userpassword in %sN)
�ETZ
fromstring�iter�tag�text�DEF_PASSWD_REDACTIONZtostringr�riZcritical)Zcnt�fnamer��elemr0r0r1�_redact_password
s




z%write_files.<locals>._redact_passwordzovf-env.xmli�)�filename�content�mode)rZ
ensure_dirrPr�r�r^r*)Zdatadirr�rryr�r{rwr0r0r1rs
rcCs�tj|�}i}i}|jpd}|jr,|j|d<|jr<|j|d<|jdk	rT|j|d<n|jrbd|d<i}|jrv|j|d<|jr�d|d	<t|jkr�t	|j�|d
<|r�d|i|d<|j
|d
<td|j
tj
d�|j|d<td|jtj
d�|||fS)z�Parse OVF XML contents.

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

    :raises NonAzureDataSource: if XML is not in Azure's format.
    :raises BrokenAzureDataSource: if XML is unparseable or invalid.
    rszlocal-hostnamer<NZ
ssh_pwauthTr�FZlock_passwdZ
hashed_passwdr�r�r9zPreprovisionedVm: %s)rhr8zPreprovisionedVMType: %s)r Z
parse_textZcustom_datar�Zpublic_keysZdisable_ssh_password_auth�passwordr�rv�encrypt_passZpreprovisioned_vmr*rir'Zpreprovisioned_vm_type)r�Zovf_envr�r�r;Zdefuserr0r0r1r:(s<	










r:cCst|�S)N)r2)r}r0r0r1r~Zsr~cCsHy"t|��}|jd�dSQRXWn tk
rBtjd|�YnXdS)z;Return boolean indicating path to cdrom device has content.iTNzcdrom (%s) is not configuredF)�open�read�IOErrorrirj)�	cdrom_dev�fpr0r0r1�_check_freebsd_cdrom^s

r�cCs*|dkrdStj|ddd�}tj|�j�S)zIReturn content random seed file if available, otherwise,
    return None.NTF)�quiet�decode)rrr�Z	b64encoder�)�sourcer�r0r0r1r�js
r�ccsX|VtVtj�r(d}t|�rJ|Vn"x dD]}tjd|�EdHq.W|rT|VdS)Nz/dev/cd0�iso9660r�zTYPE=%s)r�r�)�DEFAULT_PROVISIONING_ISO_DEVrr�r�rb)r��	cache_dirr�Zfstyper0r0r1r�s
r�cCs^tjj|d�}tjj|�s"td��t|d��}|j�}WdQRXt|�\}}}|||d|ifS)Nzovf-env.xmlzNo ovf-env file found�rb)r�r�r^r4rrr�r:)Z
source_dirZovf_filer�r�r�r;r�r0r0r1r��sr�)�network_metadatarrScCs�did�}�xvt|d�D�]d\}}d}dj|d�}d|dd	i}d
|dd�}x�d#D]�}	|j|	i�jdg�}
|
s�tjd|	|�qVd
}|	dkr�d}nd}|
r�d
|d<||d<|s�qVx`|
dd�D]P}||	ddjd|�}
|d}|jd��s�g|d<|djdj||
d��q�WqVW|�rp|�rpt|d�}|jd|j�i|d��t	|�}|�rb||dd <||d!|<qtjd"|||�qW|S)$z�Convert imds network metadata dictionary to network v2 configuration.

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

    :return: Dictionary containing network version 2 standard configuration.
    r?)�version�	ethernetsr�Fzeth{idx})�idxzroute-metricrBr�T)Zdhcp4zdhcp4-overrides�dhcp6�ipv4�ipv6Z	ipAddresszNo %s addresses found for: %rZ24Z128r�zdhcp6-overridesNZsubnetr�prefixZprivateIpAddress�	addressesz
{ip}/{prefix})Zipr�rLZ
macaddress)�matchzset-namer�r�r�z<No configuration for: %s (dev_config=%r) (has_ip_address=%r))r�r�)
�	enumeraterzr	rirjr0r`r�r_rl)r�rZ	netconfigr�ZintfZhas_ip_addressZnicnameZ
dhcp_overrideZ
dev_configZ	addr_typer�Zdefault_prefixZaddrZ	netPrefixZ	privateIprWr�r0r0r1rF�sZ


rFcCstjdd�}|dkriS|S)ztGenerate fallback network config.

    @return: Dictionary containing network version 2 standard configuration.
    T)Z
config_driverN)r
Zgenerate_fallback_config)r�r0r0r1rG�srGcCsl|st}d}xZ|D]R}tjj|�r|sBtjdtjjtj	jg�d}tjj
|�rZtj|�qtj
|�qWdS)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�rrir'rrOr�ZBOOT_LEGACY�isdirrZdel_dirr=)r�Zloggedr�r0r0r1r
�s
r
cCstj|t�S)N)rZlist_from_depends�datasources)Zdependsr0r0r1�get_datasource_list&sr�)N)r-)N)N)�r��	functoolsZloggingr�Zos.pathrErSZxml.etree.ElementTreeZetreeZElementTreerr�enumrZpathlibrrrZtypingrrrr	r�Z	cloudinitr
rrr
rZcloudinit.eventrrZ
cloudinit.netrZcloudinit.net.dhcprrrZcloudinit.net.ephemeralrrZcloudinit.reportingrZcloudinit.sources.azurerrrrZcloudinit.sources.helpersrZcloudinit.sources.helpers.azurerrrr r!r"r#r$r%r&r'r(r)r*r+Zcloudinit.url_helperr,Zcrypt�partialZrand_strr2r.�AttributeErrorZpasslib�hashZsha512_cryptZ	getLoggerr6riZDS_NAMEr
rZ
DEFAULT_FSZAGENT_SEED_DIRr�r4ZPLATFORM_ENTROPY_SOURCEryr�rNrQrVr`rfrlrrrtrwrxr{r�Zres_diskrjr�rr�rAZDEF_EPHEMERAL_LABELrvr�r�r�r�r�r�rrarcrkr�r@rr:r~r�r�r�r�rQrFrGr
ZDataSourceAzureNetZDEP_FILESYSTEMr�r�r0r0r0r1�<module>s�D"


	+




{


n'2I&

Filemanager

Name Type Size Permission Actions
DataSourceAkamai.cpython-36.opt-1.pyc File 8.18 KB 0644
DataSourceAkamai.cpython-36.pyc File 8.18 KB 0644
DataSourceAliYun.cpython-36.opt-1.pyc File 3.22 KB 0644
DataSourceAliYun.cpython-36.pyc File 3.22 KB 0644
DataSourceAltCloud.cpython-36.opt-1.pyc File 6.74 KB 0644
DataSourceAltCloud.cpython-36.pyc File 6.74 KB 0644
DataSourceAzure.cpython-36.opt-1.pyc File 47.95 KB 0644
DataSourceAzure.cpython-36.pyc File 47.95 KB 0644
DataSourceBigstep.cpython-36.opt-1.pyc File 1.84 KB 0644
DataSourceBigstep.cpython-36.pyc File 1.84 KB 0644
DataSourceCloudSigma.cpython-36.opt-1.pyc File 3.62 KB 0644
DataSourceCloudSigma.cpython-36.pyc File 3.62 KB 0644
DataSourceCloudStack.cpython-36.opt-1.pyc File 5.97 KB 0644
DataSourceCloudStack.cpython-36.pyc File 5.97 KB 0644
DataSourceConfigDrive.cpython-36.opt-1.pyc File 8.18 KB 0644
DataSourceConfigDrive.cpython-36.pyc File 8.18 KB 0644
DataSourceDigitalOcean.cpython-36.opt-1.pyc File 3.65 KB 0644
DataSourceDigitalOcean.cpython-36.pyc File 3.65 KB 0644
DataSourceEc2.cpython-36.opt-1.pyc File 23.49 KB 0644
DataSourceEc2.cpython-36.pyc File 23.49 KB 0644
DataSourceExoscale.cpython-36.opt-1.pyc File 5.92 KB 0644
DataSourceExoscale.cpython-36.pyc File 5.92 KB 0644
DataSourceGCE.cpython-36.opt-1.pyc File 9.83 KB 0644
DataSourceGCE.cpython-36.pyc File 9.93 KB 0644
DataSourceHetzner.cpython-36.opt-1.pyc File 3.78 KB 0644
DataSourceHetzner.cpython-36.pyc File 3.78 KB 0644
DataSourceIBMCloud.cpython-36.opt-1.pyc File 12.44 KB 0644
DataSourceIBMCloud.cpython-36.pyc File 12.44 KB 0644
DataSourceLXD.cpython-36.opt-1.pyc File 13.31 KB 0644
DataSourceLXD.cpython-36.pyc File 13.31 KB 0644
DataSourceMAAS.cpython-36.opt-1.pyc File 11.86 KB 0644
DataSourceMAAS.cpython-36.pyc File 11.86 KB 0644
DataSourceNWCS.cpython-36.opt-1.pyc File 3.77 KB 0644
DataSourceNWCS.cpython-36.pyc File 3.77 KB 0644
DataSourceNoCloud.cpython-36.opt-1.pyc File 7.97 KB 0644
DataSourceNoCloud.cpython-36.pyc File 7.97 KB 0644
DataSourceNone.cpython-36.opt-1.pyc File 1.47 KB 0644
DataSourceNone.cpython-36.pyc File 1.47 KB 0644
DataSourceOVF.cpython-36.opt-1.pyc File 9.15 KB 0644
DataSourceOVF.cpython-36.pyc File 9.15 KB 0644
DataSourceOpenNebula.cpython-36.opt-1.pyc File 11.75 KB 0644
DataSourceOpenNebula.cpython-36.pyc File 11.75 KB 0644
DataSourceOpenStack.cpython-36.opt-1.pyc File 7.91 KB 0644
DataSourceOpenStack.cpython-36.pyc File 7.91 KB 0644
DataSourceOracle.cpython-36.opt-1.pyc File 10.99 KB 0644
DataSourceOracle.cpython-36.pyc File 10.99 KB 0644
DataSourceRbxCloud.cpython-36.opt-1.pyc File 7.19 KB 0644
DataSourceRbxCloud.cpython-36.pyc File 7.19 KB 0644
DataSourceScaleway.cpython-36.opt-1.pyc File 10.84 KB 0644
DataSourceScaleway.cpython-36.pyc File 10.84 KB 0644
DataSourceSmartOS.cpython-36.opt-1.pyc File 24.51 KB 0644
DataSourceSmartOS.cpython-36.pyc File 24.51 KB 0644
DataSourceUpCloud.cpython-36.opt-1.pyc File 4.36 KB 0644
DataSourceUpCloud.cpython-36.pyc File 4.36 KB 0644
DataSourceVMware.cpython-36.opt-1.pyc File 23.66 KB 0644
DataSourceVMware.cpython-36.pyc File 23.66 KB 0644
DataSourceVultr.cpython-36.opt-1.pyc File 3.44 KB 0644
DataSourceVultr.cpython-36.pyc File 3.44 KB 0644
__init__.cpython-36.opt-1.pyc File 30.52 KB 0644
__init__.cpython-36.pyc File 30.52 KB 0644