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/helpers/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

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

}��f�
�@sXdZddlZddlZddlZdZdZdZe��dkrdZGdd	�d	�ZGd
d�d�Z	dS)a
cepko implements easy-to-use communication with CloudSigma's VMs through
a virtual serial port without bothering with formatting the messages
properly nor parsing the output with the specific and sometimes
confusing shell tools for that purpose.

Having the server definition accessible by the VM can ve useful in various
ways. For example it is possible to easily determine from within the VM,
which network interfaces are connected to public and which to private network.
Another use is to pass some data to initial VM setup scripts, like setting the
hostname to the VM name or passing SSH public keys through server meta.

For more information take a look at the Server Context section of CloudSigma
API Docs: http://cloudsigma-docs.readthedocs.org/en/latest/server_context.html
�N�<�
z
/dev/ttyS1�Windows�COM2c@s0eZdZdZdZddd�Zdd�Zdd	d
�ZdS)
�Cepkozb
    One instance of that object could be use for one or more
    queries to the serial port.
    z<
{}
>�NcCs|dur|j}t|�|��S�N)�request_pattern�CepkoResult�format��self�keyr	�r�F/usr/lib/python3/dist-packages/cloudinit/sources/helpers/cloudsigma.py�get,sz	Cepko.getcCs|��Sr)r�r
rrr�all1sz	Cepko.allcCs|j�d�}|�||�S)Nz/meta/{})r	rrrrrr�meta4sz
Cepko.meta)rN)r)�__name__�
__module__�__qualname__�__doc__r	rrrrrrrr$s
rc@sHeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dS)r
z�
    CepkoResult executes the request to the virtual serial port as soon
    as the instance is initialized and stores the result in both raw and
    marshalled format.
    cCs"||_|��|_|�|j�|_dSr)�request�_execute�
raw_result�_marshal�result)r
rrrr�__init__@s
zCepkoResult.__init__cCs6tjtttd�}|�|j�d��|���	d��
d�S)N)�port�timeout�writeTimeout�asciis
)�serial�Serial�SERIAL_PORT�READ_TIMEOUT�
WRITE_TIMEOUT�writer�encode�readline�strip�decode)r
�
connectionrrrrEs
�zCepkoResult._executecCs$zt�|�WSty|YSwr)�json�loads�
ValueError)r
rrrrrLs
�zCepkoResult._marshalcC�
|j��Sr)r�__len__rrrrr2R�
zCepkoResult.__len__cC�|j�|�Sr)r�__getitem__)r
rrrrr5U�zCepkoResult.__getitem__cCr4r)r�__contains__)r
�itemrrrr7Xr6zCepkoResult.__contains__cCr1r)r�__iter__rrrrr9[r3zCepkoResult.__iter__N)rrrrrrrr2r5r7r9rrrrr
9sr
)
rr.�platformr#r&r'r%�systemrr
rrrr�<module>s

Spamworldpro Mini