%PDF- %PDF-
Direktori : /usr/lib/python2.7/site-packages/salt/utils/ |
Current File : //usr/lib/python2.7/site-packages/salt/utils/mako.pyc |
� ���^c @@ s� d Z d d l m Z m Z y d d l m Z m Z e Z Wn e k rU e Z n Xe r� d d l Z d d l m Z d d l Z d d l Z d e f d � � YZ n d S( u+ Functions for working with Mako templates i ( t absolute_importt unicode_literals( t TemplateCollectiont TemplateLookupN( t urlparset SaltMakoTemplateLookupc B@ sD e Z d Z d e d � Z d � Z d � Z d d � Z d � Z RS( u Look up Mako template files using file:// or salt:// URLs with <%include/> or <%namespace/>. (1) Look up mako template files on local file system via files://... URL. Make sure mako template file is present locally on minion beforehand. Examples: <%include file="file:///etc/salt/lib/templates/sls-parts.mako"/> <%namespace file="file:///etc/salt/lib/templates/utils.mako" import="helper"/> (2) Look up mako template files on Salt master via salt://... URL. If URL is a relative path (without an URL scheme) then assume it's relative to the directory of the salt file that's doing the lookup. If URL is an absolute path then it's treated as if it has been prefixed with salt://. Examples:: <%include file="templates/sls-parts.mako"/> <%include file="salt://lib/templates/sls-parts.mako"/> <%include file="/lib/templates/sls-parts.mako"/> ##-- treated as salt:// <%namespace file="templates/utils.mako"/> <%namespace file="salt://lib/templates/utils.mako" import="helper"/> <%namespace file="/lib/templates/utils.mako" import="helper"/> ##-- treated as salt:// u basec C@ sC | | _ | | _ d | _ | | _ t d d � | _ i | _ d S( Nt directoriesu /( t optst saltenvt Nonet _file_clientt pillar_rendR t lookupt cache( t selfR R R ( ( s3 /usr/lib/python2.7/site-packages/salt/utils/mako.pyt __init__4 s c C@ s1 | j s* t j j | j | j � | _ n | j S( u6 Setup and return file_client ( R t saltt fileclientt get_file_clientR R ( R ( ( s3 /usr/lib/python2.7/site-packages/salt/utils/mako.pyt file_client<