Spamworldpro Mini Shell
Spamworldpro


Server : Apache/2.4.52 (Ubuntu)
System : Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64
User : www-data ( 33)
PHP Version : 8.1.2-1ubuntu2.21
Disable Function : NONE
Directory :  /lib/python3/dist-packages/cloudinit/sources/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/cloudinit/sources/__pycache__/DataSourceDigitalOcean.cpython-310.pyc
o

}��f��@s~ddlZddlmmmZddlmZmZe�e	�Z
ddiZdZdZ
dZdZGdd	�d	ej�ZeejffgZd
d�ZdS)�N)�sources�util�metadata_urlz'http://169.254.169.254/metadata/v1.json��Tcs^eZdZdZdd�Zdeddf�fdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
edd��Z�Z
S)�DataSourceDigitalOcean�DigitalOceancCs�tj�||||�||_t�|_t�t�|ddgi�t	g�|_
|��|j
d|_|j
�
dt�|_|j
�
dt�|_|j
�
dt�|_|j
�
dt�|_d|_d|_dS)N�
datasourcerr�retries�timeout�	use_ip4LL�
wait_retry)r�
DataSource�__init__�distro�dict�metadatar�
mergemanydict�get_cfg_by_path�BUILTIN_DS_CONFIG�ds_cfg�
_deprecate�metadata_address�get�
MD_RETRIESr
�
MD_TIMEOUTr�
MD_USE_IPV4LLr�
MD_WAIT_RETRYr
�_network_config�
metadata_full)�self�sys_cfgr�paths�r#�J/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceDigitalOcean.pyr s$
���
zDataSourceDigitalOcean.__init__�ci_pkl_version�returnNcst��|�|��dS�N)�super�	_unpickler)r r%��	__class__r#r$r)5sz DataSourceDigitalOcean._unpicklecCstjdddd�dS)Nrz23.2z.Deprecated in favour of DataSourceConfigDrive.)�
deprecated�deprecated_version�
extra_message)r�	deprecate�r r#r#r$r9s

�z!DataSourceDigitalOcean._deprecatecCst��Sr')�	do_helper�read_sysinfor0r#r#r$�_get_sysinfo@sz#DataSourceDigitalOcean._get_sysinfocCs�|��\}}|s
dSt�d|�d}|jrt�|j�}tj|j|j	|j
|jd�}||_|�
d|�|jd<|�
d|�|jd<|�
d�|jd<|�
d	�|jd
<|�
dd�|jd
<|�
dd�|_|�
dd�|_|rmt�|j|�dS)NFz&Running on DigitalOcean. droplet_id=%s)r�sec_betweenr
�
droplet_idzinstance-id�hostnamezlocal-hostname�
interfaces�public_keyszpublic-keys�region�default�availability_zone�vendor_data�	user_dataT)r3�LOG�inforr1�assign_ipv4_link_localr�
read_metadatarrr
r
rrr�vendordata_raw�userdata_raw�del_ipv4_link_local)r �is_dor5�
ipv4LL_nic�mdr#r#r$�	_get_dataCs0�z DataSourceDigitalOcean._get_datacCst�|��d�S)Nzsystem-serial-number)r�instance_id_matches_system_uuid�get_instance_id)r r!r#r#r$�check_instance_ides�z(DataSourceDigitalOcean.check_instance_idcCsP|jr|jS|j�d�}t�|�|std��|jdd}t�||�|_|jS)z�Configure the networking. This needs to be done each boot, since
        the IP information may have changed due to snapshot and/or
        migration.
        r7z'Unable to get meta-data from server....�dns�nameservers)	rrrr>�debug�RuntimeErrorrr1�convert_network_configuration)r r7rMr#r#r$�network_configjs
�z%DataSourceDigitalOcean.network_config)�__name__�
__module__�__qualname__�dsnamer�intr)rr3rHrK�propertyrQ�
__classcell__r#r#r*r$rs"rcCst�|t�Sr')r�list_from_depends�datasources)�dependsr#r#r$�get_datasource_list�sr\)�logging�&cloudinit.sources.helpers.digitaloceanr�helpers�digitaloceanr1�	cloudinitr�	getLoggerrRr>rrrrrrr�DEP_FILESYSTEMrZr\r#r#r#r$�<module>s
�
f�

Spamworldpro Mini