/usr/lib/python2.6/site-packages/cloudinit/sources
Edit: /usr/lib/python2.6/site-packages/cloudinit/sources/DataSourceCloudSigma.pyc (5061B)
Ñò
èØ3[c @ sÄ d d k l Z d d k Z d d k l Z d d k l Z d d k l Z e i e
ƒ Z d Z d e i
f d
„ ƒ YZ d e f d „ ƒ YZ e e i f e e i e i f f g Z d
„ Z d S( iÿÿÿÿ( t b64decodeN( t log( t sources( t Cepkot localt nett disabledt DataSourceCloudSigmac B sJ e Z d Z d „ Z d „ Z d „ Z e e d „ Z d „ Z d „ Z RS( sÍ
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
c C s; d | _ t ƒ | _ d | _ t i i | | | | ƒ d S( NR t ( t dsmodeR t cepkot ssh_public_keyR t
DataSourcet __init__( t selft sys_cfgt distrot paths( ( sJ /usr/lib/python2.6/site-packages/cloudinit/sources/DataSourceCloudSigma.pyR
% s c C s« t i ƒ d } | i d ƒ p
| d j o t i d ƒ t St i d ƒ t i d ƒ } | p t i d ƒ t St i d i | ƒ ƒ d | i
ƒ j St i d
ƒ t S( s
Uses dmi data to detect if this instance of cloud-init is running
in the CloudSigma's infrastructure.
i t armt aarch64s5 Disabling CloudSigma datasource on arm (LP: #1243287)s0 determining hypervisor product name via dmi datas system-product-names2 failed to get hypervisor product name via dmi datas detected hypervisor as {0}t
cloudsigmas0 failed to query dmi data for system product name( t ost unamet
startswitht LOGt debugt Falset utilt
read_dmi_datat warnt formatt lower( R t
uname_archt sys_product_name( ( sJ /usr/lib/python2.6/site-packages/cloudinit/sources/DataSourceCloudSigma.pyt is_running_in_cloudsigma+ s
c C s d } y | i i ƒ i } | d } Wn t i d ƒ t SX| i d | i ƒ } | t j o t i
d | ƒ d } n | d j p | | i j o t S| i d d ƒ i d ƒ } | i d
d ƒ | _ d
| j o t
| i ƒ | _ n | | _ | d | _ t S(
sj
Metadata is the whole server context and /meta/cloud-config is used
as userdata.
t metas+ CloudSigma: Unable to read from serial ports cloudinit-dsmodes, Invalid dsmode %s, assuming default of 'net'R R t
base64_fieldsR t ,s cloudinit-user-dataR N( t NoneR
t allt resultR R R t getR t
VALID_DSMODESR t splitt userdata_rawR t metadataR t True( R R t server_contextt server_metaR$ ( ( sJ /usr/lib/python2.6/site-packages/cloudinit/sources/DataSourceCloudSigma.pyt get_dataB s(
c C sF t i d | i d ƒ o | i d d S| i d i d ƒ d Sd S( s†
Cleans up and uses the server's name if the latter is set. Otherwise
the first part from uuid is being used.
s ^[A-Za-z0-9 -_\.]+$t namei= t uuidt -i N( t ret matchR- R+ ( R t fqdnt
resolve_ip( ( sJ /usr/lib/python2.6/site-packages/cloudinit/sources/DataSourceCloudSigma.pyt get_hostnameb s c C s
| i g S( N( R ( R ( ( sJ /usr/lib/python2.6/site-packages/cloudinit/sources/DataSourceCloudSigma.pyt get_public_ssh_keysl s c C s | i d S( NR3 ( R- ( R ( ( sJ /usr/lib/python2.6/site-packages/cloudinit/sources/DataSourceCloudSigma.pyt get_instance_ido s (
t __name__t
__module__t __doc__R
R" R1 R R9 R: R; ( ( ( sJ /usr/lib/python2.6/site-packages/cloudinit/sources/DataSourceCloudSigma.pyR s
t DataSourceCloudSigmaNetc B s e Z d „ Z RS( c C s# t i | | | | ƒ d | _ d S( NR ( R R
R ( R R R R ( ( sJ /usr/lib/python2.6/site-packages/cloudinit/sources/DataSourceCloudSigma.pyR
t s ( R<