/usr/lib/python2.6/site-packages/cloudinit/distros
Edit: /usr/lib/python2.6/site-packages/cloudinit/distros/rhel.pyc (6837B)
Ñò
¿;Sc
@ s¥ d d k l Z d d k l Z d d k l Z d d k l 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 S( iÿÿÿÿ( t distros( t helpers( t log( t util( t net_util( t rhel_util( t PER_INSTANCEc C s | o d Sd Sd S( Nt yest no( ( t val( ( s: /usr/lib/python2.6/site-packages/cloudinit/distros/rhel.pyt _make_sysconfig_bool# s t Distroc B s¿ e Z d Z d Z d Z d Z d Z d Z d Z d Z d Z
d „ Z d „ Z d
„ Z
d „ Z d d „ Z d
„ Z d „ Z d „ Z d d „ Z d „ Z d „ Z d d d „ Z d „ Z RS( s /etc/sysconfig/clocks /etc/sysconfig/i18ns /etc/locale.confs /etc/sysconfig/networks
/etc/hostnames' /etc/sysconfig/network-scripts/ifcfg-%ss /etc/resolv.confs /etc/localtimec C s8 t i i | | | | ƒ t i | ƒ | _ d | _ d S( Nt redhat( R R t __init__R t Runnerst _runnert osfamily( t selft namet cfgt paths( ( s: /usr/lib/python2.6/site-packages/cloudinit/distros/rhel.pyR
6 s c C s | i d d | ƒd S( Nt installt pkgs( t package_command( R t pkglist( ( s: /usr/lib/python2.6/site-packages/cloudinit/distros/rhel.pyt install_packages> s c
C s˜ t i | ƒ } t i d | | ƒ g } g } | i ƒ } xþ | i ƒ D]ð \ } } | i | } h | d 6| i d ƒ d 6| i d ƒ d 6| i d ƒ d 6| i d ƒ d
6| i d ƒ d 6| i d
ƒ d 6t | i d ƒ ƒ d 6} t i
| | ƒ d | j o | i | d ƒ n d | j o | i | d ƒ qG qG W| p | o t i | i
| | ƒ n | o* h t t ƒ d 6} t i
| i | ƒ n | S( Ns3 Translated ubuntu style network settings %s into %st DEVICEt netmaskt NETMASKt addresst IPADDRt bootprotot BOOTPROTOt gatewayt GATEWAYt broadcastt BROADCASTt hwaddresst MACADDRt autot ONBOOTs dns-nameserverss
dns-searcht
NETWORKING( R t translate_networkt LOGt debugt keyst iteritemst network_script_tplt getR
R t update_sysconfig_filet extendt update_resolve_conf_filet resolve_conf_fnt Truet network_conf_fn(
R t settingst entriest nameserverst
searchserverst dev_namest devt infot net_fnt net_cfg( ( s: /usr/lib/python2.6/site-packages/cloudinit/distros/rhel.pyt _write_networkA s>
c C sj t i ƒ d d \ } } t | i d ƒ d ƒ } | i d ƒ o
| d j p | i d ƒ o
| d j S( Nt disti t .i s Red Hat Enterprise Linuxi t Fedorai ( R t system_infot intt splitt
startswith( R RA t verst major( ( s: /usr/lib/python2.6/site-packages/cloudinit/distros/rhel.pyt _dist_uses_systemde s c C sc | i ƒ o! | p
| i } n | i } n | p
| i } n h | d 6} t i | | ƒ d S( Nt LANG( RJ t systemd_locale_conf_fnt locale_conf_fnR R1 ( R t localet out_fnt
locale_cfg( ( s: /usr/lib/python2.6/site-packages/cloudinit/distros/rhel.pyt apply_localel s
c C sN | i ƒ o t i d d t | ƒ g ƒ n h | d 6} t i | | ƒ d S( Nt hostnamectls set-hostnamet HOSTNAME( RJ R t subpt strR R1 ( R t hostnameRO t host_cfg( ( s: /usr/lib/python2.6/site-packages/cloudinit/distros/rhel.pyt _write_hostnamey s
c C s | o | S| S( N( ( R RV t fqdn( ( s: /usr/lib/python2.6/site-packages/cloudinit/distros/rhel.pyt _select_hostname‚ s c C s6 | i ƒ o
| i } n
| i } | | i | ƒ f S( N( RJ t systemd_hostname_conf_fnt hostname_conf_fnt _read_hostname( R t host_fn( ( s: /usr/lib/python2.6/site-packages/cloudinit/distros/rhel.pyt _read_system_hostname‰ s
c C sr | i ƒ o2 t i d g ƒ \ } } t | ƒ o | S| Sn0 t i | ƒ \ } } d | j o | d S| Sd S( NRV RS ( RJ R RT t lenR t read_sysconfig_file( R t filenamet defaultt outt _errt _existst contents( ( s: /usr/lib/python2.6/site-packages/cloudinit/distros/rhel.pyR] s
c C s> | o$ d | j o t d | i ƒ ‚ n t i i | | ƒ S( Nt alls1 Distro %s can not translate the device name "all"( t RuntimeErrorR R R t _bring_up_interfaces( R t device_names( ( s: /usr/lib/python2.6/site-packages/cloudinit/distros/rhel.pyRj ž s c C s€ | i | ƒ } | i ƒ o' t i | i ƒ t i | | i ƒ n: h t | ƒ d 6} t i | i | ƒ t i
| | i ƒ d S( Nt ZONE( t
_find_tz_fileRJ R t del_filet tz_local_fnt sym_linkRU R R1 t
clock_conf_fnt copy( R t tzt tz_filet clock_cfg( ( s: /usr/lib/python2.6/site-packages/cloudinit/distros/rhel.pyt set_timezone¤ s
c C sÍ | d j o
g } n d g } | i d ƒ | i d ƒ | o! t | t ƒ o | i | ƒ n) | o! t | t ƒ o | i | ƒ n | i | ƒ t i d | ƒ } | i | ƒ t i | d t ƒd S( Nt yums -ts -ys %s-%st capture(
t Nonet appendt
isinstanceRU t listR2 R t expand_package_listRT t False( R t commandt argsR t cmdR ( ( s: /usr/lib/python2.6/site-packages/cloudinit/distros/rhel.pyR ´ s
c C s&