/usr/lib/python3.6/site-packages/cloudinit/sources/helpers/__pycache__
NameSizeModeActions
akamai.cpython-36.opt-1.pyc14840644editdlrm
akamai.cpython-36.pyc14840644editdlrm
azure.cpython-36.opt-1.pyc342340644editdlrm
azure.cpython-36.pyc342340644editdlrm
cloudsigma.cpython-36.opt-1.pyc33720644editdlrm
cloudsigma.cpython-36.pyc33720644editdlrm
digitalocean.cpython-36.opt-1.pyc60990644editdlrm
digitalocean.cpython-36.pyc60990644editdlrm
ec2.cpython-36.opt-1.pyc58930644editdlrm
ec2.cpython-36.pyc58930644editdlrm
hetzner.cpython-36.opt-1.pyc7790644editdlrm
hetzner.cpython-36.pyc7790644editdlrm
netlink.cpython-36.opt-1.pyc91880644editdlrm
netlink.cpython-36.pyc97910644editdlrm
openstack.cpython-36.opt-1.pyc179630644editdlrm
openstack.cpython-36.pyc179630644editdlrm
upcloud.cpython-36.opt-1.pyc54780644editdlrm
upcloud.cpython-36.pyc54780644editdlrm
vultr.cpython-36.opt-1.pyc49160644editdlrm
vultr.cpython-36.pyc49160644editdlrm
__init__.cpython-36.opt-1.pyc1130644editdlrm
__init__.cpython-36.pyc1130644editdlrm
Edit: /usr/lib/python3.6/site-packages/cloudinit/sources/helpers/__pycache__/cloudsigma.cpython-36.pyc (3372B)
3 \me @sXdZddlZddlZddlZdZdZdZejdkr8dZGdd 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/ttyS1ZWindowsZCOM2c@s0eZdZdZdZd ddZddZd d d ZdS) Cepkozb One instance of that object could be use for one or more queries to the serial port. z< {} >NcCs|dkr|j}t|j|S)N)request_pattern CepkoResultformat)selfkeyrr /usr/lib/python3.6/cloudsigma.pyget,sz Cepko.getcCs|jS)N)r )r r r r all1sz Cepko.allcCs|jjd}|j||S)Nz/meta/{})rrr )r r rr r r meta4s z Cepko.meta)rN)r)__name__ __module__ __qualname____doc__rr rrr r r r r$s  rc@sHeZdZdZddZddZddZdd Zd d Zd d Z ddZ dS)rz 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|_|j|j|_dS)N)request_execute raw_result_marshalresult)r rr r r __init__@s zCepkoResult.__init__cCs6tjtttd}|j|jjd|jj dj dS)N)ZportZtimeoutZ writeTimeoutasciis ) serialZSerial SERIAL_PORT READ_TIMEOUT WRITE_TIMEOUTwriterencodereadlinestripdecode)r Z connectionr r r rEs zCepkoResult._executec Cs$y tj|Stk r|SXdS)N)jsonloads ValueError)r rr r r rLs zCepkoResult._marshalcCs |jjS)N)r__len__)r r r r r'RszCepkoResult.__len__cCs |jj|S)N)r __getitem__)r r r r r r(UszCepkoResult.__getitem__cCs |jj|S)N)r __contains__)r itemr r r r)XszCepkoResult.__contains__cCs |jjS)N)r__iter__)r r r r r+[szCepkoResult.__iter__N) rrrrrrrr'r(r)r+r r r r r9sr) rr$platformrrrrsystemrrr r r r s