%PDF- %PDF-
| Direktori : /proc/thread-self/root/usr/lib/python2.7/site-packages/salt/modules/inspectlib/ |
| Current File : //proc/thread-self/root/usr/lib/python2.7/site-packages/salt/modules/inspectlib/kiwiproc.pyc |
�
���^c @@ s� d d l m Z d d l Z d d l m Z d d l Z d d l Z y d d l Z d d l Z Wn e k
rs n Xd d l
Z d d l m
Z
y d d l m Z Wn! e k
r� d d l m Z n Xd e f d � � YZ d S( i ( t absolute_importN( t minidom( t InspectorKiwiProcessorException( t etree( t ElementTreet KiwiExporterc B@ sq 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
RS( s;
Exports system description as Kiwi configuration.
c C@ s4 | | _ | | _ t d d i � | _ d | _ d S( Nt data( ( t
__grains__t formatt typet _datat Nonet name( t selft grainsR ( ( sD /usr/lib/python2.7/site-packages/salt/modules/inspectlib/kiwiproc.pyt __init__, s c K@ s4 x- | j � D] \ } } t | j | | � q
W| S( sK
Load data by keys.
:param data:
:return:
( t itemst setattrR
( R
t descrt objR ( ( sD /usr/lib/python2.7/site-packages/salt/modules/inspectlib/kiwiproc.pyt load2 s c C@ s� | | _ | j � } | j | � | j | � | j | � | j | � | j | � d j g t j t
j | d d d t �� j
d d � j d � D] } | j � r� | ^ q� � S( sJ
Export to the Kiwi config.xml as text.
:return:
s
t encodings UTF-8t pretty_printt indents ( R t _create_doct _set_descriptiont _set_preferencest _set_repositoriest
_set_userst
_set_packagest joinR t parseStringR t tostringt Truet toprettyxmlt splitt strip( R
R t roott line( ( sD /usr/lib/python2.7/site-packages/salt/modules/inspectlib/kiwiproc.pyt export>