404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@52.15.254.112: ~ $
3

\�met�@s�ddlZddlZddlmZddlmZmZddlmZddl	m
Z
mZeje
�ZGdd�dej�ZeZeejffgZdd	�ZdS)
�N)�	b64decode)�dmi�sources)�DataSourceHostname)�SERIAL_PORT�Cepkoc@sReZdZdZdZdd�Zedd��Zdd�Zd	d
�Z	ddd
�Z
dd�Zdd�ZdS)�DataSourceCloudSigmaz�
    Uses cepko in order to gather the server context from the VM.

    For more information about CloudSigma's Server Context:
    http://cloudsigma-docs.readthedocs.org/en/latest/server_context.html
    Z
CloudSigmacCs$t�|_d|_tjj||||�dS)N�)r�cepko�ssh_public_keyr�
DataSource�__init__)�selfZsys_cfgZdistro�paths�r�*/usr/lib/python3.6/DataSourceCloudSigma.pyr
szDataSourceCloudSigma.__init__cCs>tjd�tjd�}|s&tjd�dStjd|�d|j�kS)z
        Uses dmi data to detect if this instance of cloud-init is running
        in the CloudSigma's infrastructure.
        z0determining hypervisor product name via dmi datazsystem-product-namez-system-product-name not available in dmi dataFzdetected hypervisor as %sZ
cloudsigma)�LOG�debugrZ
read_dmi_data�lower)Zsys_product_namerrr�	ds_detect!s


zDataSourceCloudSigma.ds_detectcCs�d}y|jj�j}|d}Wntk
r:tjd�dSX|j|jd�g�|_|t	j
kr^dS|jdd�jd�}|jd	d�|_d	|kr�t
|j�|_d
|jdi�kr�|dd
|_||_|d|_d
S)zj
        Metadata is the whole server context and /meta/cloud-config is used
        as userdata.
        N�metaz+CloudSigma: Unable to read from serial portFzcloudinit-dsmode�
base64_fieldsr	�,zcloudinit-user-data�	cloudinitZvendor_datarT)r
�all�result�	ExceptionrrZ_determine_dsmode�get�dsmoderZDSMODE_DISABLED�splitZuserdata_rawrZvendordata_raw�metadatar)rrZserver_contextZserver_metarrrr�	_get_data0s(


zDataSourceCloudSigma._get_datacCsdtS)z/Return the subplatform metadata source details.z
cepko (%s))r)rrrr�_get_subplatformRsz%DataSourceCloudSigma._get_subplatformFcCsDtjd|jd�r&|jddd�}n|jdjd�d}t|d�S)	z�
        Cleans up and uses the server's name if the latter is set. Otherwise
        the first part from uuid is being used.
        z^[A-Za-z0-9 -_\.]+$�nameN�=�uuid�-rF)�re�matchr rr)rZfqdnZ
resolve_ipZ
metadata_only�retrrr�get_hostnameVsz!DataSourceCloudSigma.get_hostnamecCs|jgS)N)r)rrrr�get_public_ssh_keysasz(DataSourceCloudSigma.get_public_ssh_keyscCs
|jdS)Nr%)r )rrrr�get_instance_iddsz$DataSourceCloudSigma.get_instance_idN)FFF)
�__name__�
__module__�__qualname__�__doc__Zdsnamer
�staticmethodrr!r"r*r+r,rrrrrs"
rcCstj|t�S)zK
    Return a list of data sources that match this set of dependencies
    )rZlist_from_depends�datasources)Zdependsrrr�get_datasource_listrsr3)Zloggingr'�base64rrrrZcloudinit.sourcesrZ$cloudinit.sources.helpers.cloudsigmarrZ	getLoggerr-rrrZDataSourceCloudSigmaNetZDEP_FILESYSTEMr2r3rrrr�<module>s
W

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