OS : Linux
PHP Version : 7.4.33
Software : Apache/2.4.6 (CentOS) PHP/7.4.33
Information System : Linux apprendre2 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
Disable Function : ó
oBú]c @ s€ d Z d d l Z d d l m Z d d l m Z d d l m Z d d l m Z e d g ƒ Z d „ Z
d „ Z d
„ Z d S( sQ
Debug
-----
**Summary:** helper to debug cloud-init *internal* datastructures.
This module will enable for outputting various internal information that
cloud-init sources provide to either a file or to the output console/log
location that this cloud-init has been configured with when running.
.. note::
Log configurations are not output.
**Internal name:** ``cc_debug``
**Module frequency:** per instance
**Supported distros:** all
**Config keys**::
debug:
verbose: true/false (defaulting to true)
output: (location to write output, defaulting to console + log)
iÿÿÿÿN( t StringIO( t
type_utils( t util( t safeyamlt log_cfgsc C su t ƒ } | j d d ƒ | j d ƒ | j | j d d ƒ ƒ | j d ƒ | j d d ƒ | j d ƒ | j ƒ S( Nt -iP s
t ( R t writet centert getvalue( t textt header( ( s= /usr/lib/python2.7/site-packages/cloudinit/config/cc_debug.pyt _make_header) s
c C s% t j | d t d t ƒ} | j ƒ S( Nt explicit_startt explicit_end( R t dumpst Falset rstrip( t objR
( ( s= /usr/lib/python2.7/site-packages/cloudinit/config/cc_debug.pyt _dumps4 s c C sx t j | d d t ƒ} | r1 | d } t } n t j | d ƒ } | s] | j d | ƒ d St j | ƒ } x t D] } | j | d ƒ qs Wt | ƒ } x0 | D]( } | j
d ƒ r | j | d ƒ q q Wt ƒ }
|
j t
d ƒ ƒ |
j t | ƒ ƒ |
j d
ƒ |
j t
d ƒ ƒ |
j t | j j ƒ ƒ |
j d
ƒ |
j t
d ƒ ƒ |
j d
t j | j ƒ ƒ |
j d t j | j ƒ ƒ |
j d | j t ƒ ƒ |
j d | j ƒ ƒ |
j d | j ƒ ƒ |
j d | j ƒ |
j ƒ } g } x+ | j ƒ D] }
d |
}
| j |
ƒ q W| rRt j | d j | ƒ d d ƒ n" t j d j | ƒ d t d t ƒd S( s' Handler method activated by cloud-init.t debugt verboset defaulti t outputs3 Skipping module named %s, verbose printing disabledNt _t Configs
t MetaDatat Miscs Datasource: %s
s Distro: %s
s
Hostname: %s
s Instance ID: %s
s Locale: %s
s Launch IDX: %s
s ci-info: %s
t i¤ t wt consolet stderr( s debugs verbose( s debugs output( R t get_cfg_by_patht TrueR t copyt deepcopyt SKIP_KEYSt popt Nonet listt
startswithR R R R t
datasourcet metadataR t obj_namet distrot get_hostnamet get_instance_idt
get_localet launch_indexR t
splitlinest appendt
write_filet joint multi_logR ( t namet cfgt cloudt logt argsR t out_filet dump_cfgt kt all_keyst to_printt contentst content_to_filet line( ( s= /usr/lib/python2.7/site-packages/cloudinit/config/cc_debug.pyt handle9 sN
"(
t __doc__R" t sixR t cloudinitR R R t frozensetR$ R R RC ( ( ( s= /usr/lib/python2.7/site-packages/cloudinit/config/cc_debug.pyt