%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python2.7/site-packages/salt/utils/
Upload File :
Create Path :
Current File : //lib/python2.7/site-packages/salt/utils/parsers.pyc

�
���^c@@s�dZddlmZmZmZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlm
Z
ddljZddlZddljjZddljZddljZddlZddlZddlZddlZddljjZddl Zddl!Zddl"Zddl#Zddl$Zddl%Zddl&Zddl'm(Z(ddl)m*Z*ddl+m,Z,ddl-Zddl.m/Z/dd	l0m1Z1e	j2e3�Z4d
�Z5de6fd��YZ7d
e7fd��YZ8de
j9e:fd��YZ;de
j<e:fd��YZ<de/j=e7e:�fd��YZ>de/j=e7e:�fd��YZ?de/j=e7e:�fd��YZ@de/j=e7e:�fd��YZAde/j=e7e:�fd��YZBde/j=e7e:�fd��YZCde/j=e7e:�fd ��YZDd!e/j=e7e:�fd"��YZEd#e/j=e7e:�fd$��YZFd%eFfd&��YZGd'e/j=e7e:�fd(��YZHd)e/j=e7e:�fd*��YZId+e/j=e7e:�fd,��YZJd-e/j=e7e:�fd.��YZKd/e/j=e7e:�fd0��YZLd1e/j=e7e:�fd2��YZMd3e/j=e7e:�fd4��YZNd5e/j=e7e:�fd6��YZOd7e/j=e7e:�fd8��YZPd9e/j=e7e:�fd:��YZQd;e/j=e7e:�fd<��YZRd=e/j=e7e:�fd>��YZSd?e/j=e8e<eBe>eCeDeEe?�fd@��YZTdAe/j=e8eT�fdB��YZUdCe/j=e8e<eJeBe>eCeDeEe?�	fdD��YZVdEe/j=e8e<eBe>eCeDeEe?�fdF��YZWdGe/j=e8e<eBe>eHeGeMeCeKe@e?eIeSeA�fdH��YZXdIe/j=e8e<eMeBe>eHeFeCe@e?�
fdJ��YZYdKe/j=e8e<eBe>eCeMeDe@e?eS�
fdL��YZZdMe/j=e8e<eJeBeKe>eCeMe@e?eIeQeAeL�fdN��YZ[dOe/j=e8e<eBe>eHeCe@e?eMeIeQeSeA�
fdP��YZ\dQe/j=e8e<eBe>eCeFeMe?e@eA�
fdR��YZ]dSe/j=e8e<eCe>eMeBeOeNePeRe@e?�fdT��YZ^dUe/j=e8e<eBeCe>e?�fdV��YZ_dWe/j=e8e<eBeCeEe>�fdX��YZ`dS(Yu�
    :codeauthor: Pedro Algarvio (pedro@algarvio.me)


    salt.utils.parsers
    ~~~~~~~~~~~~~~~~~~

    This is where all the black magic happens on all of salt's CLI tools.
i(tabsolute_importtprint_functiontunicode_literalsN(tpartial(tDEFAULT_TARGET_DELIM(tis_writeable(tverify_log_files(tsix(trangecC@st|dd��S(NtkeycS@st|dd�S(Nu_mixin_prio_i�(tgetattr(tmf((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyt<lambda>8s(tsorted(tmixins_or_funcs((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyt_sorted6st	MixInMetacB@seZdZd�ZRS(icC@sRtt|�j||||�}t|d�sNtdj|j|���n|S(Nu_mixin_setupuPDon't subclass {0} in {1} if you're not going to use it as a salt parser mix-in.(tsuperRt__new__thasattrtRuntimeErrortformatt__name__(tmcstnametbasestattrstinstance((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyRBs!(Rt
__module__t_mixin_prio_R(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR<stOptionParserMetacB@seZd�ZRS(c	C@stt|�j||||�}t|d�s<g|_nt|d�sWg|_nt|d�srg|_nt|d�s�g|_nxmt||f�D]X}t	|dd�}|dk	r�||jkr�|jj|�nt	|dd�}|dk	r'||jkr'|jj|�nt	|dd�}|dk	rg||jkrg|jj|�nx�t|�D]�}|j
d�s�qtnt	||�}t	|d	d�dk	r�qtntjr�t	|d	d
�|j_qtt	|d	d
�|_qtWq�W|S(Nu_mixin_setup_funcsu_mixin_process_funcsu_mixin_after_parsed_funcsu_mixin_before_exit_funcsu_mixin_setupu_mixin_after_parsedu_mixin_before_exituprocess_u_mixin_prio_i�(RRRRt_mixin_setup_funcst_mixin_process_funcst_mixin_after_parsed_funcst_mixin_before_exit_funcsRR
tNonetappendtdirt
startswithRtPY2t__func__R(RRRRRtbasetfunc((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyRMsH		(RRR(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyRLstCustomOptioncB@seZd�ZRS(cO@s%t|_tjj|||||�S(N(tTruetexplicittoptparsetOptionttake_action(tselftactiontdesttargstkwargs((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR0�s	(RRR0(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR+�stOptionParsercB@s�eZejjZdZdZdZ	dZ
eZd�Z
d�Zddd�Zed�Zd�Zejd�Zd	dd
�Zd�ZRS(
u%prog [options]u\You can find additional help about %prog issuing "man %prog" or on http://docs.saltstack.comidcO@s�|jddj|j��|jd|j�|jrN|jd|j�n|jrm|jd|j�n|jdt�tjj	|||�|jr�d|jkr�|jj
d|j��|_ndS(Nuversionu	%prog {0}uusageudescriptionuepiloguoption_classu%prog(t
setdefaultRtVERSIONtusagetdescriptiontepilogR+R.R6t__init__treplacet
get_prog_name(R1R4R5((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR<�s		cO@s%tjj|||�}t|_|S(N(R.R6tadd_option_groupR+toption_class(R1R4R5toption_group((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR?�s	cC@s�tjj|||�\}}d|jkr�|jtkr�tjj�}g|D]}|j	d�^qR}tjj||�\}}|jj
|j�|j|�ntj
r�tjjj|�}n|jr�|j�n|||_|_t|jdd�}tj|dkr"dn|�g}	xH|jD]=}
t|dj|
�d�}|dk	r9|	j|�q9q9Wxdt|	�D]V}y|�Wq�tk
r�}tj|�|j dj|t!j"|���q�Xq�Wxd|j#D]Y}
y|
|�Wq�tk
rC}tj|�|j dj|
t!j"|���q�Xq�W|j$j%dd�dk	r}tj&d|j$d�n||fS(	Nu
args_stdinu
u	log_leveluerroruprocess_{0}uError while processing {0}: {1}u	conf_fileuConfiguration file path: %s('R.R6t
parse_argst__dict__t
args_stdinR,tsyststdint	readlinestrstriptupdatetextendRR'tsalttutilstdatatdecodetversions_reporttprint_versions_reporttoptionsR4R
R#tlogtsetup_temp_loggerRR$Rt	Exceptiontloggert	exceptionterrort	tracebackt
format_excR!tconfigtgettdebug(R1R4tvaluesRQt
new_inargstargtnew_optionstnew_argsttemp_log_leveltprocess_option_funcst
option_keytprocess_option_functerrtmixin_after_parsed_func((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyRB�sX"			


cC@s;tjj||d|�x|jD]}||�q#WdS(Ntadd_help(R.R6t_populate_option_listR(R1toption_listRhtmixin_setup_func((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyRi�s	cC@s0tjj|�|jdddddd�dS(Nu--versions-reportu-VR2u
store_truethelpu4Show program's dependencies version number and exit.(R.R6t_add_version_optiont
add_option(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyRm�scC@s9tdjtj��d|�|jtjjj�dS(Nu
tfile(	tprinttjointversionROtexitRKtdefaultst	exitcodestEX_OK(R1Ro((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyRP�sicC@s�xg|jD]\}y||�Wq
tk
re}tj|�tjdtj|�tj|��q
Xq
W|j	t
kr�tj�tj
dt
�nt|tj�r�|r�|ddkr�dj|�}ntjj|||�dS(NuError while processing %s: %stdaemonizingi����u
u{0}
(R"RTRURVRWRt	text_typeRXRYt_setup_mp_logging_listener_R,RRt shutdown_multiprocessing_loggingt)shutdown_multiprocessing_logging_listenert
isinstancetstring_typesRR.R6Rs(R1tstatustmsgtmixin_before_exit_funcRf((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyRss
	
(cC@s?|jtj�|jtjjjdj|j	�|��dS(u�
        error(msg : string)

        Print a usage message incorporating 'msg' to stderr and exit.
        This keeps option parsing exit status uniform for all parsing errors.
        u{0}: error: {1}
N(
tprint_usageREtstderrRsRKRtRutEX_USAGERR>(R1R((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyRWsN(RRRrt__saltstack_version__tformatted_versionR8R9R;R#R:RtFalseRyR<R?RBR,RiRmREtstdoutRPRsRW(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR6�s		E		tMergeConfigMixIncB@s)eZdZejZd�Zd�ZRS(u�
    This mix-in will simply merge the CLI-passed options, by overriding the
    configuration file loaded settings.

    This mix-in should run last.
    cC@s;t|d�r$t|d�r$dS|jj|j�dS(Nusetup_configuconfig(RR!R$t(_MergeConfigMixIn__merge_config_with_cli(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyt_mixin_setup*s cG@s�x�|jD]�}|jdkr%q
n|jj|j�}t|j|j|�}|j|jkr�|dk	r�||j|j<q�q
|dk	r�t|dt�r�||j|j<q
|j|jkr
t	|j|j|j|j�q
q
Wx|j
D]�}x�|jD]�}|jdkr%q
n|jj|j�}t|j|j|�}|j|jkr�|dk	r�||j|j<q�q
|dk	r�t|dt�r�||j|j<q
|j|jkr
t	|j|j|j|j�q
q
Wq�WdS(Nuexplicit(RjR3R#RtR[R
RQRZR�tsetattrt
option_groups(R1R4toptiontdefaulttvaluetgroup((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyt__merge_config_with_cli4s6'	(RRt__doc__RtMAXSIZERR�R�(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR�!s		
t
SaltfileMixIncB@s eZdZd�Zd�ZRS(i��cC@s|jddddd�dS(Nu
--saltfileR�RluiSpecify the path to a Saltfile. If not passed, one will be searched for in the current working directory.(RnR#(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR�qsc
C@s�|jjdkr0tjjdd�|j_n|jjdkr�ytjjtj�d�}Wnt	k
rzd}nXtjj
|�r�||j_q�tjjtjjd�dd�}tjj
|�r�||j_q�n|jj}|jjsdStjj
|jj�s7|jdj
|jj��ntjj|jj�|j_tjdtj|jj��ytj|�}WnWtjjk
r�}|j|j�|jtjjjdj
|j�|j��nX|s�dS|j�|krdS||j�}x�|jD]�}|jdkr6qn|j|krKqn|jj|j�}t |j|j|�}||kr�qnt!|j|j||j�t"|_#qWx�|j$D]�}x�|jD]�}|jdkr�q�n|j|kr�q�n|jj|j�}t |j|j|�}||kr=q�nt!|j|j||j�t"|_#q�Wq�Wx%|D]}	t!|j|	||	�qrWdS(	Nu
SALT_SALTFILEuSaltfileuu~u.saltu'{0}' file does not exist.
uLoading Saltfile from '%s'u{0}: error: {1}
(%RQtsaltfileR#tostenvironR[tpathRqtgetcwdtOSErrortisfilet
expanduserRWRtabspathRUtinfoRRxRZt_read_conf_fileRKt
exceptionstSaltConfigurationErrortmessageRsRtRut
EX_GENERICR>RjR3R
R�R,R-R�(
R1R�tsaltfile_configRWt
cli_configR�R�R�R�R	((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pytprocess_saltfilexsn

$ 

(RRRR�R�(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR�ns	tHardCrashMixincB@seZdZdZd�ZRS(i(cC@s8tjjdt�}|jdddd|dd�dS(NuSALT_HARD_CRASHu--hard-crashR2u
store_trueR�RluORaise any original exception rather than exiting gracefully. Default: %default.(R�R�R[R�Rn(R1t
hard_crash((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR��sN(RRRR#t_config_filename_R�(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR��stNoParseMixincB@s eZdZd�Zd�ZRS(i2cC@s8tjjdd�}|jdd|dddd�dS(	Nu
SALT_NO_PARSEuu
--no-parseR�RlupComma-separated list of named CLI arguments (i.e. argname=value) which should not be parsed as Python data typestmetavaruargname1,argname2,...(R�R�R[Rn(R1tno_parse((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR��s
cC@sw|jjrgy8g|jjjd�D]}|j�^q%|j_Wqstk
rcg|j_qsXng|j_dS(Nu,(RQR�tsplittstriptAttributeError(R1tx((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pytprocess_no_parse�s8
(RRRR�R�(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR��s		tConfigDirMixIncB@sAeZdZdZejZdZd�Z	d�Z
dd�ZRS(i����uSALT_CONFIG_DIRcC@sftjj|jd�}|sF|j}tjdtj	t
j��n|jddd|dd�dS(NuSYSPATHS setup as: %su-cu--config-dirR�RluDPass in an alternative configuration directory. Default: '%default'.(
R�R�R[t_default_config_dir_env_var_R#t_default_config_dir_RUR\RRxtsyspathst
CONFIG_DIRRn(R1t
config_dir((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR�	s	cC@s�tjj|jj�|j_tjj|jj�sXtjjdj	|jj��ntjj
|jj�|j_t|d�r�t|d�s�i|_ny|jj
|j��Wq�ttfk
r�}|jdj	|��q�XndS(Nu0WARNING: CONFIG '{0}' directory does not exist.
usetup_configuconfigu!Failed to load configuration: {0}(R�R�R�RQR�tisdirRER�twriteRR�RRZRItsetup_configtIOErrorR�RW(R1texc((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pytprocess_config_dirs	cC@s1|dkr|j}ntjj|jj|�S(N(R#R�R�R�RqRQR�(R1t
configfile((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pytget_config_file_path(sN(RRRR#R�R�R�R�R�R�R�R�(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR�s		
	t
LogLevelMixIncB@s�eZdZdZdZdZdZdZe	Z
d�Zd�Zd�Z
d�Zd	�Zd
�Zd�Zd�Zd
�Zd�Zd�Zd�ZRS(i
uwarningulog_fileu	log_levelulog_level_logfilec@s��jdkr-tdj�jj���ntj�dd�}�_�j	|�t
�dt�s�|jddd�j
dttj�d	d
jdjgtjD]}dj|�^q���j��n�fd
�}|jdd�jddddddd|d	dj�j��|jdd�jdttj�d	djdjgtjD]}dj|�^qY��j��dS(Nu(Please set {0}._default_logging_logfile_uLogging OptionsuOLogging options which override any settings defined on the configuration files.u_skip_console_logging_config_u-lu--log-levelR3tchoicesRlu6Console logging log level. One of {0}. Default: '{1}'.u, u'{}'c@sJtjj|�s0tjjtjj|�}nt|j�j|�dS(N(R�R�tdirnameRqtcurdirR�R]t_logfile_config_setting_name_(R�toptR�tparserR4R5(R1(s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyt_logfile_callbackRsu
--log-fileR�R2ucallbackttypeustringtcallbackuLog file path. Default: '{0}'.u--log-file-levelu6Logfile logging log level. One of {0}. Default: '{1}'.(t_default_logging_logfile_R#RRt	__class__RR.tOptionGrouptlogging_options_groupR?R
R�Rnt_loglevel_config_setting_name_tlistRRt
LOG_LEVELSRqtSORTED_LEVEL_NAMESt_default_logging_level_R�t&_logfile_loglevel_config_setting_name_(R1R�tnR�((R1s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR�7sB
		+	
	+cC@s�t|j|jd�st|jj|jd�rXt|j|j|jj|j��qtt|j|j|j�n|jj	|j
�|jj	|j�|jj	|j�|jj	|j
�|jj	|j�|jj	|j�dS(N(R
RQR�R#RZR[R�R�R!R$t&_LogLevelMixIn__setup_extended_loggingt+_LogLevelMixIn__setup_logfile_logger_configt+_LogLevelMixIn__setup_console_logger_configt_setup_mp_logging_listenert_setup_mp_logging_clientt$_LogLevelMixIn__setup_console_logger(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pytprocess_log_levelns		
cC@s�t|j|jd�s�|jj|jd�rXt|j|j|jj|j��q�t|j|j|j�|j|jkr�|jj|j�q�ndS(N(	R
RQR�R#RZR[R�R�tpop(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pytprocess_log_file�s		
cC@s�t|j|jd�s�|jj|jd�rXt|j|j|jj|j��q�t|j|j|jj|j|j��|j|jkr�|jj	|j�q�ndS(N(
R
RQR�R#RZR[R�R�R�R�(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pytprocess_log_level_logfile�s			
c
G@s�|j|jkr>|jj|j�r>|jj|j�nt|j|j|j�}t|j|j|j�}dj	|j
�jdd��}||jkr�|jj|�r�|jj|�n|j|jkr|jj|j�r|jj|j�n|jdrm|jddkrm|dk	rmt
jjjd��t|g|jd�WdQXqmn|dkr�|j}nd	j	|j
�jdd��}||jkr�|jj|�r�|jj|�n|jjd
d�dkr|jjd
d�n|jjd
|jjd|jjdtj���}|jjd
d�dkrs|jjd
d�n|jjdd�dkr�|jjdd�n|jjd
|jjd|jjdd���}t|dt�s
t
jjj�}|jd|kr
|jd}	t
jjj|dtj|	��r
t
jjj�}
tjj|
�ri|
ntjj d�}tjj|�s�tj!|d�ntjj"|j�}t#j$dtj%|�tj%|�tj%|��tjj&|dj	|��}q
q
n|jjdd�}
|jjdd�}t
jj'j(�s�|
dkrkt#j)d�d}
n|dkr�t#j)d�d}q�n||j|j<||j|j<||jd
<||jd
<|
|jd<||jd<dS(Nucli_{0}_log_fileu-u_u
verify_envu	log_leveluquietiuuserucli_{0}_log_file_fmtulog_fmt_logfileulog_fmt_consoleulog_fmtulog_datefmt_logfileulog_datefmt_consoleulog_datefmtu%Y-%m-%d %H:%M:%Stcheck_parentu
publisher_aclt	whitelistu~/.salti�u`The user '%s' is not allowed to write to '%s'. The log file will be stored in '~/.salt/'%s'.log'u{0}.logulog_rotate_max_bytesiulog_rotate_backup_countu3'log_rotate_max_bytes' is only supported on Windowsu6'log_rotate_backup_count' is only supported on Windows(uquiet(*R�RZR[R�R
RQR�R�R�RR>R=R#RKRLtfilest	set_umaskRt_DFLT_LOG_FMT_CONSOLERR,tusertget_usertstringutilstcheck_whitelist_blacklistRtiterkeystxdgtxdg_config_dirR�R�R�R�tmakedirstbasenameRUR\RxRqtplatformt
is_windowstwarning(R1R4tlogleveltlogfiletcli_log_pathtcli_log_file_fmttlog_file_fmttlog_file_datefmttcurrent_usertacltxdg_dirt
user_salt_dirtlogfile_basenametlog_rotate_max_bytestlog_rotate_backup_count((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyt__setup_logfile_logger_config�s�		" #						
			
	



c	C@s�tjjj�r|jrdS|j|j}|j|j}|jd}|jd}|jd}|jd}tj	||d|d|d|d|�x<t
j|jjd	i��D]\}}tj
||�q�WdS(
Nulog_fmt_logfileulog_datefmt_logfileulog_rotate_max_bytesulog_rotate_backup_countt
log_formattdate_formatt	max_bytestbackup_countulog_granular_levels(RKRLR�R�RyRZR�R�RRtsetup_logfile_loggerRt	iteritemsR[tset_logger_level(	R1R�R�R�R�R�R�Rtlevel((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR@s"



+cG@s3tjjj�r|jrdStj|j�dS(N(RKRLR�R�RyRRtsetup_extended_loggingRZ(R1R4((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyt__setup_extended_loggingXscC@s
tj�S(N(RRt!get_multiprocessing_logging_queue(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyt_get_mp_logging_listener_queue_scG@s)|jr%tj|j|j��ndS(N(RyRRt&setup_multiprocessing_logging_listenerRZR	(R1R4((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR�bs	cG@sf|jrbtj|j�tjjj�rbtj|j	��tj
�tj�tj�qbndS(N(
RyRRt)set_multiprocessing_logging_level_by_optsRZRKRLR�R�tsetup_multiprocessing_loggingR	tshutdown_temp_loggingtshutdown_console_loggingtshutdown_logfile_logging(R1R4((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR�is	


cG@s�|jjd|jjdtj��}|jjdd�dkrX|jjdd�n|jjd|jjdd��}||jd<||jd<dS(Nulog_fmt_consoleulog_fmtulog_datefmt_consoleulog_datefmtu%Y-%m-%d %H:%M:%S(RZR[R�R#R�(R1R4tlogfmttdatefmt((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyt__setup_console_logger_config�s				
cG@s�t|jdt�tkrdStjjj�r>|jr>dSt|jdd�dkrrdj
|jd�}n
|jd}tj
|jdd|d|jd	�x<tj|jjd
i��D]\}}tj||�q�WdS(Nudaemonuoutputuyamlu# {0}ulog_fmt_consoleu	log_levelR�R�ulog_datefmt_consoleulog_granular_levels(R
RQR�R,RKRLR�R�RyR#RRZRRtsetup_console_loggerRRR[R(R1R4R�RR((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyt__setup_console_logger�s

+N(RRRR�R#R�R�R�R�R�t_skip_console_logging_config_R�R�R�R�R�RR�R	R�R�R�R�(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR�.s&	7				�						tRunUserMixincB@seZdZd�ZRS(icC@s)|jddddj|j���dS(Nu-uu--userRluSpecify user to run {0}.(RnRR>(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR��s	(RRRR�(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR�stDaemonMixIncB@s�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
dd�ZRS(ic
C@su|jdddtddddj|j���|jdd	d
dtjjtjdj|j���dd�dS(
Nu-du--daemonR�R2u
store_trueRluRun the {0} as a daemon.u
--pid-fileR3upidfileu{0}.pidu9Specify the location of the pidfile. Default: '%default'.(	RnR�RR>R�R�RqR�tPIDFILE_DIR(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR��s		cC@st|d�r|jjd�r|j�rytj|jd�Wqtk
r
}dtj|jd�f}t	j
jj�r�t	j
j
j�}t	j
j
j|�rtj|�tjtj|��qqtj�stj|�tjtj|��qqXqndS(Nuconfigupidfileu PIDfile could not be deleted: %s(RRZR[t
check_pidfileR�tunlinkR�RRxRKRLR�R�t
win_functionstget_current_usertis_adminRUR�R\tgetuid(R1Rfterr_msgR�((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyt_mixin_before_exit�s!

cC@s/ddlm}||jd|jd�dS(Ni(tset_pidfileupidfileuuser(tsalt.utils.processR!RZ(R1R!((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR!�scC@s!ddlm}||jd�S(u1
        Report whether a pidfile exists
        i(Rupidfile(R"RRZ(R1R((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR�scC@s!ddlm}||jd�S(u5
        Return a pid contained in a pidfile
        i(tget_pidfileupidfile(R"R#RZ(R1R#((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR#�scC@sO|jjrA|jtkr.tjdt�ntjjj	�n|j
�dS(NRw(RQtdaemonRyR,RRR{RKRLtprocesst	daemonizeR�(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pytdaemonize_if_required�s
cC@s�|j�r�|j�}tjjj�s^|j�r�|j|�r�tj�|kr�t	Sq�|j�r�|j|�r�tjj
j�|kr�t	SntS(ud
        Check if a pid file exists and if it is associated with
        a running process.
        (
RR#RKRLR�R�t
is_daemonizedR�tgetppidR,Rtget_parent_pidR�(R1tpid((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyt
check_runnings-3cC@sddlm}||�S(Ni(t
os_is_running(R"R-(R1R+R-((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR(scC@s0tjtj|j�tjtj|j�dS(N(tsignaltSIGTERMt_handle_signalstSIGINT(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyt_install_signal_handlersscC@s|j�dS(N(RB(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pytprepare"scC@s|j�|j�dS(N(R3R2(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pytstart%s
cC@sz|jj}|tjkr(|d7}n|tjkrD|d7}ntjt�jd|�|jddj	|��dS(Nu received a SIGINT.u received a SIGTERM.u%s Exiting.texitmsgu{0} Exited.(
R�RR.R1R/tloggingt	getLoggerR�tshutdownR(R1tsignumtsigframeR((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR0)s

icC@s|j||�dS(N(Rs(R1texitcodeR5((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR82sN(RRRR�R R!RR#R'R,R(R2R3R4R0R#R8(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR�s						
							tTargetOptionsMixIncB@s/eZdZdZd�Zd�Zd�ZRS(icC@smtj|dd�}|_|j|�|jdddtdddd	d
d�|jdd
dtddd
d�|jdddtddd
d�|jdddtddd
d�|jdddtddd
d�|jdddtddd
d�|jdddtddd
d�tj|dd�}|_|j|�|jd dtd
d!�|j�dS("NuTarget OptionsuTarget selection options.u-Hu--hostsR�R2u
store_trueR3u
list_hostsRluDList all known hosts to currently visible or other specified rostersu-Eu--pcreuZInstead of using shell globs to evaluate the target servers, use pcre regular expressions.u-Lu--listurInstead of using shell globs to evaluate the target servers, take a comma or whitespace delimited list of servers.u-Gu--grainu�Instead of using shell globs to evaluate the target use a grain value to identify targets, the syntax for the target is the grain key followed by a globexpression: "os:Arch*".u-Pu--grain-pcreu�Instead of using shell globs to evaluate the target use a grain value to identify targets, the syntax for the target is the grain key followed by a pcre regular expression: "os:Arch.*".u-Nu--nodegroupuwInstead of using shell globs to evaluate the target use one of the predefined nodegroups to identify a list of targets.u-Ru--rangeu�Instead of using shell globs to evaluate the target use a range expression to identify targets. Range expressions look like %cluster.uAdditional Target Optionsu(Additional options for minion targeting.u--delimiteru^Change the default delimiter for matching in multi-level data structures. Default: '%default'.(	R.R�ttarget_options_groupR?RnR�tadditional_target_options_groupRt_create_process_functions(R1R�((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR�<sb
							
c@sgx`�jjD]R}�fd�}dj|j�}t�|�s
t�|t||��q
q
WdS(Nc@s(t�j|j�r$|j�_ndS(N(R
RQR3tselected_target_option(R�(R1(s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR%�suprocess_{0}(R=RjRR3RR�R(R1R�R%tfuncname((R1s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR?�s
cC@s�g|jjD]'}t|j|j�tkr
|^q
}t|�dkr�|jdjdj	g|D]}|j
�^qe���n|j|jd<dS(NiuFThe options {0} are mutually exclusive. Please only choose one of themu/uselected_target_option(
R=RjR
RQR3R,tlenRWRRqtget_opt_stringR@RZ(R1R�tgroup_options_selected((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyt_mixin_after_parsed�s'&N(RRRR#R@R�R?RE(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR<6s
	M	
tExtendedTargetOptionsMixIncB@seZd�Zd�ZRS(cC@s�tj|�|j}|jdddtdddd�|jdd	dtd
ddddd�|jd
ddtdddd�|jdddtdddd�|j�dS(Nu-Cu
--compoundR�R2u
store_trueRlu?The compound target option allows for multiple target types to be evaluated, allowing for greater granularity in target matching. The compound target is space delimited, targets other than globs are preceded with an identifier matching the specific targets argument type: salt 'G@os:RedHat and webser* or E@database.*'.u-Iu--pillarR3u
pillar_targetu�Instead of using shell globs to evaluate the target use a pillar value to identify targets, the syntax for the target is the pillar key followed by a glob expression: "role:production*".u-Ju
--pillar-pcreu�Instead of using shell globs to evaluate the target use a pillar value to identify targets, the syntax for the target is the pillar key followed by a pcre regular expression: "role:prod.*".u-Su--ipcidru4Match based on Subnet (CIDR notation) or IP address.(R<R�R=RnR�R?(R1R�((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR��s0
					cC@s|jjrd|_ndS(Nupillar(RQt
pillar_targetR@(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pytprocess_pillar_target�s(RRR�RH(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyRF�s	*tTimeoutMixIncB@seZdZd�ZRS(i
c	C@sVt|d�s-tdj|jj���n|jdddtd|jdd�dS(	Nudefault_timeoutu9You need to define the 'default_timeout' attribute on {0}u-tu	--timeoutR�R�Rlu[Change the timeout, if applicable, for the running command (in seconds). Default: %default.(RRRR�RRntinttdefault_timeout(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR��s		(RRRR�(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyRI�stArgsStdinMixIncB@seZdZd�ZRS(i
c
C@s)|jddtdddddd�dS(	Nu--args-stdinR�R3u
args_stdinR2u
store_trueRluURead additional options and/or arguments from stdin. Each entry is newline separated.(RnR�(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR��s(RRRR�(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyRL�stProxyIdMixIncB@seZdZd�ZRS(i(cC@s#|jddddddd�dS(Nu	--proxyidR�R3uproxyidRluId for this proxy.(RnR#(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR��s
(RRt_mixin_prioR�(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyRM�stExecutorsMixIncB@seZdZd�ZRS(i
c
C@sN|jddddddddd�|jd	dd
dddddd�dS(
Nu--module-executorsR3umodule_executorsR�R�u
EXECUTOR_LISTRluNSet an alternative list of executors to override the one set in minion config.u--executor-optsu
executor_optsu
EXECUTOR_OPTSujSet alternate executor options if supported by executor. Options set by minion config are used by default.(RnR#(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR�s(RRRNR�(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyRO�st
CacheDirMixIncB@seZdZd�ZRS(i(cC@s#|jddddddd�dS(Nu
--cachedirR�u/var/cache/salt/R3ucachedirRluCache Directory(Rn(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR�s
(RRRNR�(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyRPstOutputOptionsMixIncB@sGeZdZeZdZd�Zd�Zd�Z	d�Z
d�ZRS(i(c@s�tj�dd�}�_�j|�|jddddddj�j���|jd	d
ddddd
tdd�|jdddddddd�|jdddddddt	dd�|jdddt	dddd�|jdddt	dddd�|jdd dddd!�|jd"d#dddd$�x`�jj
D]R}�fd%�}d&j|j�}t�|�sOt
�|t||��qOqOWdS('NuOutput Optionsu'Configure your preferred output format.u--outu--outputR3uoutputRluFPrint the output from the '{0}' command using the specified outputter.u--out-indentu--output-indentu
output_indentR�R�u�Print the output indented by the provided value in spaces. Negative values disables indentation. Only applicable in outputters that support indentation.u
--out-fileu
--output-fileuoutput_fileu'Write the output to the specified file.u--out-file-appendu--output-file-appendR2u
store_trueuoutput_file_appendu(Append the output to the specified file.u
--no-coloru--no-colouruDisable all colored output.u
--force-coloru--force-colouruForce colored output.u--state-outputu--state_outputu�Override the configured state_output value for minion output. One of 'full', 'terse', 'mixed', 'changes' or 'filter'. Default: '%default'.u--state-verboseu--state_verboseugOverride the configured state_verbose value for minion output. Set to True or False. Default: %default.c@sG�jj|j�}t�j|j|�tkr7dS|j�_dS(N(RtR[R3R
RQR�tselected_output_option(R�R�(R1(s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR%hsuprocess_{0}(R.R�toutput_options_groupR?RnRR>R#RJR�RjR3RR�R(R1R�R�R%RA((R1s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR�'s`
								cC@s|jj|_dS(N(RQtoutputRR(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pytprocess_outputrscC@s�|jjdk	r�|jjtkr�tjj|jj�r�y)tj	j
j|jjd��WdQXWq�tt
fk
r�}|jdj|jj|��q�Xq�ndS(Nuwu{0}: Access denied: {1}(RQtoutput_fileR#toutput_file_appendR�R�R�R�RKRLR�tfopenR�R�RWR(R1R�((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pytprocess_output_fileus$
	cC@sj|jjdks$|jjdkr3t|j_n3|jjdksW|jjdkrft|j_ndS(NuTrueutrueuFalseufalse(RQt
state_verboseR,R�(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pytprocess_state_verbose�s$$cC@s�g|jjD]B}t|j|j�r
|jjd�sI|jdkr
|^q
}t|�dkr�|jdjdj	g|D]}|j
�^q����n|j|jd<dS(Nu_outuoutputiuFThe options {0} are mutually exclusive. Please only choose one of themu/uselected_output_option(
RSRjR
RQR3tendswithRBRWRRqRCRRRZ(R1R�RD((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyRE�s-&N(RRRR�t_include_text_out_R#RRR�RURYR[RE(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyRQ s	K			tExecutionOptionsMixIncB@s eZdZd�Zd�ZRS(i
cC@stj|d�}|_|jdddddd�|jdddddd	�|jd
ddd
dddddd�|jdddddd�|jdddddd�|jdddtdddd�|jdddtdddd�|jddtd d!dd"dd#�|jd$d%dtdddd&�|jd'd(dtdddd)�|jd*d+dtdddd,�|jd-d.dtdddd/�|jd0dtdddd1�|jd2dddd3�|jd4d5dd6dtdd7dd8�|j|�dS(9NuExecution Optionsu-Lu
--locationR�Rlu#Specify which region to connect to.u-au--actionu�Perform an action that may be specific to this cloud provider. This argument requires one or more instance names to be specified.u-fu
--functiontnargsiR�u<FUNC-NAME> <PROVIDER>u�Perform a function that may be specific to this cloud provider, that does not apply to an instance. This argument requires a provider to be specified (i.e.: nova).u-pu	--profileu/Create an instance using the specified profile.u-mu--mapu�Specify a cloud map file to use for deployment. This option may be used alone, or in conjunction with -Q, -F, -S or -d. The map can also be filtered by a list of VM names.u-Hu--hardR2u
store_trueu�Delete all VMs that are not defined in the map file. CAUTION!!! This operation can irrevocably destroy VMs! It must be explicitly enabled in the cloud config file.u-du	--destroyu"Destroy the specified instance(s).u--no-deployR3udeployustore_falseu2Don't run a deploy script after instance creation.u-Pu
--parallelu1Build all of the specified instances in parallel.u-uu--update-bootstrapu=Update salt-bootstrap to the latest stable bootstrap release.u-yu--assume-yesu6Default "yes" in answer to all confirmation questions.u-ku
--keep-tmpu8Do not remove files from /tmp/ after deploy.sh finishes.u--show-deploy-argsuCInclude the options used to deploy the minion in the data returned.u
--script-argsuIScript arguments to be fed to the bootstrap script when deploying the VM.u-bu--bootstrapiu<HOST> [MINION_ID] [OPTIONS...]uBootstrap an existing machine.(R.R�texecution_groupRnR#R�R,R?(R1R�((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR��s�												cC@s\|jjrX|jj\|_|_|jjd�sEd|jkrX|jd�qXndS(Nu-u=u<--function expects two arguments: <function-name> <provider>(RQtfunctiont
function_nametfunction_providerR&RW(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pytprocess_function	s(RRRR�Rd(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR^�s	jtCloudQueriesMixIncB@s/eZdZdZd�Zd�Zd�ZRS(ic	C@s�tj|d�}|_|jdddtdddd�|jd	d
dtdddd�|jdd
dtdddd�|jddtdddd�|jddddddd�|j|�|j�dS(Nu
Query Optionsu-Qu--queryR�R2u
store_trueRlubExecute a query and return some information about the nodes running on configured cloud providers.u-Fu--full-queryuaExecute a query and return all information about the nodes running on configured cloud providers.u-Su--select-queryudExecute a query and return select information about the nodes running on configured cloud providers.u--list-providersu'Display a list of configured providers.u--list-profilesustoreu�Display a list of configured profiles. Pass in a cloud provider to view the provider's associated profiles, such as digitalocean, or pass in "all" to list all the configured profiles.(R.R�tcloud_queries_groupRnR�R#R?R?(R1R�((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR�s<			
c@sgx`�jjD]R}�fd�}dj|j�}t�|�s
t�|t||��q
q
WdS(Nc@s�t�j|j�r�d}|jdkr7|d7}n�|jdkrS|d7}n}|jdkr�d}�jr��jd�q�nL|jdkr�d}t�j�}|jd�d	kr��jd
�q�n|�_ndS(Nu
list_nodesu
full_queryu_fulluselect_queryu_selectulist_providersu0'--list-providers' does not accept any argumentsu
list_profilesu--list-providersuC'--list-profiles' does not accept '--list-providers' as an argument(R
RQR3R4RWtvarsR[tselected_query_option(R�tquerytoption_dict(R1(s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR%Hs$

	

uprocess_{0}(RfRjRR3RR�R(R1R�R%RA((R1s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR?Fs
cC@s�g|jjD]B}t|j|j�tk	r
t|j|j�dk	r
|^q
}t|�dkr�|jdj	dj
g|D]}|j�^q����n|j|j
d<dS(NiuFThe options {0} are mutually exclusive. Please only choose one of themu/uselected_query_option(RfRjR
RQR3R�R#RBRWRRqRCRhRZ(R1R�RD((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyREds'&N(RRRR#RhR�R?RE(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyRes
	-	tCloudProvidersListsMixIncB@s eZdZd�Zd�ZRS(icC@sutj|d�}|_|jddddd�|jddddd�|jddddd	�|j|�dS(
NuCloud Providers Listingsu--list-locationsR�Rlu�Display a list of locations available in configured cloud providers. Pass the cloud provider that available locations are desired on, aka "linode", or pass "all" to list locations for all configured cloud providers.u
--list-imagesu�Display a list of images available in configured cloud providers. Pass the cloud provider that available images are desired on, aka "linode", or pass "all" to list images for all configured cloud providers.u--list-sizesu�Display a list of sizes available in configured cloud providers. Pass the cloud provider that available sizes are desired on, aka "AWS", or pass "all" to list sizes for all configured cloud providers.(R.R�tproviders_listings_groupRnR#R?(R1R�((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR�xs cC@s�g|jjD]'}t|j|j�dk	r
|^q
}t|�dkr�|jdjdj	g|D]}|j
�^qe���ndS(NiuFThe options {0} are mutually exclusive. Please only choose one of themu/(RlRjR
RQR3R#RBRWRRqRC(R1R�tlist_options_selected((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyRE�s'(RRRR�RE(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyRkus	 tProfilingPMixIncB@seZdZd�ZRS(i�c
C@sntj|d�}|_|jddddddd�|jd	dd
dtdddd
�|j|�dS(NuProfiling supportu--profiling-pathR3uprofiling_pathR�u
/tmp/statsRluFFolder that will hold all stats generations path. Default: '%default'.u--enable-profilinguprofiling_enabledR2u
store_trueu>Enable generating profiling stats. See also: --profiling-path.(R.R�tprofiling_groupRnR�R?(R1R�((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR��s(RRRR�(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyRn�stCloudCredentialsMixIncB@s eZdZd�Zd�ZRS(ic
C@sOtj|d�}|_|jddddddddd	�|j|�dS(
NuCloud Credentialsu--set-passwordR�R_iR�u<USERNAME> <PROVIDER>Rlu�Configure password for a cloud provider and save it to the keyring. PROVIDER can be specified with or without a driver, for example: "--set-password bob rackspace" or more specific "--set-password bob rackspace:openstack" Deprecated.(R.R�tcloud_credentials_groupRnR#R?(R1R�((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR��scC@s|jjrtd��ndS(NuuThis functionality is not supported; please see the keyring module at http://docs.saltstack.com/en/latest/topics/sdb/(RQtset_passwordR(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pytprocess_set_password�s(RRRR�Rs(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyRp�s	t
EAuthMixIncB@seZdZd�ZRS(icC@s�tj|d�}|_|jdddddddd	d
d�|jdd
dtddddd
d�|jdddddd
d�|jdddddd
d�|j|�dS(NuExternal Authenticationu-au--authu--eauthu--external-authR�uR3ueauthRlu1Specify an external authentication system to use.u-Tu--make-tokenumktokenR2u
store_trueu�Generate and save an authentication token for re-use. The token is generated and made available for the period defined in the Salt Master.u
--usernameuusernameR_iu%Username for external authentication.u
--passwordupasswordu%Password for external authentication.(R.R�teauth_groupRnR�R?(R1R�((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR��s2	(RRRR�(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyRt�stMasterOptionParsercB@s0eZdZdZejdZeZd�Z	RS(u1The Salt Master, used to control the Salt Minionsumasterulog_filecC@stj|j��S(N(RZt
master_configR�(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR�s(
RRR:R�RZtDEFAULT_MASTER_OPTSR�R,RyR�(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyRvs
	
tMinionOptionParsercB@s0eZdZdZejdZeZd�Z	RS(u<The Salt Minion, receives commands from a remote Salt Masteruminionulog_filecC@s`tj|j�dtdt�}|jd�r\|jdt�r\|jjr\t|_n|S(Ntcache_minion_idtignore_config_errorsuenginesumultiprocessing(	RZt
minion_configR�R,R�R[RQR$Ry(R1topts((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR�*s	#(
RRR:R�RZtDEFAULT_MINION_OPTSR�R,RyR�(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyRys

tProxyMinionOptionParsercB@s*eZdZdZejdZd�ZRS(u~The Salt Proxy Minion, connects to and controls devices not able to run a minion.
Receives commands from a remote Salt Master.uproxyulog_filecC@sIy|jj}Wntk
r)d}nXtj|j�dtd|�S(NRzt	minion_id(R]tproxyidR�R#RZtproxy_configR�R�(R1R�((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR�Js

(RRR:R�RZtDEFAULT_PROXY_MINION_OPTSR�R�(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR6s
tSyndicOptionParsercB@sCeZdZdZdZejdZejeZe	Z
d�ZRS(u�The Salt Syndic daemon, a special Minion that passes through commands from a
higher Master. Scale Salt to thousands of hosts or across many different networks.umasterusyndic_log_fileu	log_levelcC@stj|j�|jd��S(Numinion(RZt
syndic_configR�(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR�ks	(RRR:R�R�RZRxR�R�R,RyR�(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR�Us


tSaltCMDOptionParsercB@s�eZdZdZdZdZejdZejdZ	ye
j�Wnek
rfe
jd�nXd�Zd�Zd	�ZRS(
iu�Salt allows for commands to be executed across a swath of remote systems in
parallel, so they can be both controlled and queried with ease.u1%prog [options] '<target>' <function> [arguments]umasteru	log_levelulog_fileu1Cannot access current working directory. Exiting!cC@s�|jdddtdddd�|jdd	dtdddd
�|jddtdddd�|jd
dtdddddd�|jddddtdd�|jdddtdddd�|jddddtdddd�|jddtdddd�|jddd dd!dd"dd#�|jd$dddd%dtdd&�|jd'dddd(dtdd)�|jd*dd+dd,dd-�|jd.dd!d/d0dd1�|jd2dd!d/d3dd1�|jd4did/d5dd6�|jd7d8d9dd:dtdddd;�|jd<dd=dd>dd?�|jd@ddAdtddddB�|jdCdd!d/dDddE�|jdFddGdddtddH�|jdIddJdddtddK�|jdLddMdddtddN�dS(ONu-su--staticR�R2u
store_trueRlu>Return the data from minions as a group after they all return.u-pu
--progressu@Display a progress graph. Requires "progressbar" python package.u
--failhardu-Stop batch execution upon first "bad" return.u--asyncR3uasyncu0Run the salt command but don't wait for a reply.u--subsetiR�u�Execute the routine on a random subset of the targeted minions. The minions will be verified that they have the named function before executing.u-vu	--verboseu>Turn on command verbosity, display jid and active job queries.u--hide-timeoutushow_timeoutustore_falseuHide minions that timeout.u
--show-jidu7Display jid without the additional output of --verbose.u-bu--batchu--batch-sizeuubatchu�Execute the salt job in batch mode, pass either the number of minions to batch at a time, or the percentage of minions to have running.u--batch-waitu
batch_waitupWait the specified time in seconds after each job is done before freeing the slot in the batch for the next one.u--batch-safe-limitubatch_safe_limituaExecute the salt job in batch mode if the job would have executed on more than this many minions.u--batch-safe-sizeiubatch_safe_sizeu=Batch size to use for batch jobs created by batch-safe-limit.u--returnR�uRETURNERu�Set an alternative return method. By default salt will send the return data from the command back to the master, but the return data can be redirected into any number of systems, databases or applications.u--return_configu
RETURNER_CONFu--return_kwargsuRETURNER_KWARGSu-Set any returner options at the command line.u-du--docu--documentationudocu[Return the documentation for the specified module or for all modules if none are specified.u--args-separatoruargs_separatoru,u�Set the special argument used as a delimiter between command arguments of compound commands. This is useful when one wants to pass commas as arguments to some of the commands in a compound command.u	--summaryucli_summaryu1Display summary information about a salt command.u
--metadatauMETADATAu-Pass metadata into Salt, used to search jobs.u
--output-diffustate_output_diffu+Report only those states that have changed.u
--config-dumpuconfig_dumpu$Dump the master configuration valuesu--preview-targetupreview_targetuHShow the minions expected to match a target. Does not issue any command.(RnR�RJR,tfloat(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR��s�			cC@sxt|j�dkrz|jjrz|jjrzy|j�Wqztk
rvtjj	d�tj
tjj
j�qzXn|jjr�tj|j��}tjj	tjjj|dt��tj
tjj
j�n|jjr�|jjd�n|jjr�|js#|jjdd�nt|j�dkrN|jjdd�n|jddkrw|jjdd�nt|j�d	kr�|jd
�q�n|jjr/y]d|jdkr�|jdjdd
�jd�|jd<n|jdj�|jd<Wqktk
r+|j
dd�qkXn<y|jd|jd<Wn!tk
rj|j
dd�nX|jrty�d|jdkr�|jdjd�|jd<gg|jd<d}|jdj|jj �t|jd�dkrVx�|jdD]Q}||jj kr7|d7}|jdjg�q�|jd|j|�q�WnAx�|jdD]�}|jj |kr	|j|jj �}x�t!|�D]d\}}|r�|jd|j|�n|t|�dkr�|d7}|jdjg�q�q�Wqd|jd|j|�qdWt|jd�t|jd�kr^|j
dd�n9t|jd�t|jd�kr�|j
dd�nx�t"t|jd��D]=}tjjj#|jd|d|jj$�|jd|<q�WnW|jd|jd<|jd|jd<tjjj#|jdd|jj$�|jd<Wqttk
rp|j
dd�qtXndS(Niu/Invalid options passed. Please try -h for help.tdefault_flow_styleunot_a_valid_commandiu*iusys.dociu:You can only get documentation for one method at one time.u,u uutgti*u4
Cannot execute command without defining a target.

ufunuargu@Cannot execute compound command without defining all arguments.
uCCannot execute compound command with more arguments than commands.
R�u
Incomplete options passed.

(%RBR4RQtdoctpreview_targett
print_helpRTRER�R�RsRKRtRuR�tconfig_dumpRZRwR�RLtyamlt	safe_dumpR�RvR$tinsertRWR�R=R�t
IndexErrortcounttargs_separatort	enumerateRtparse_inputR�(R1tcfgt	cmd_indexR_tsub_argst
sub_arg_indextsub_argti((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyRE7s�/
	
	,

	

&& !

cC@stj|j��S(N(RZt
client_configR�(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR��s(RRRKR:R9R�RZRxR�R�R�R�R�RERsR�RER�(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR�qs


	�	gtSaltCPOptionParsercB@sUeZdZdZdZdZejdZejdZ	d�Z
d�Zd�ZRS(	u�salt-cp is NOT intended to broadcast large files, it is intended to handle text
files. salt-cp can be used to distribute configuration files.u&%prog [options] '<target>' SOURCE DESTiumasteru	log_levelulog_filecC@sstj|d�}|jdddtddddd	d
�|jdddtdd
ddd	d�|j|�dS(NuFile Optionsu-Cu	--chunkedR�R3uchunkedR2u
store_trueRluZUse chunked files transfer. Supports big files, recursive lookup and directories creation.u-nu--no-compressionugzipustore_falseuDisable gzip compression.(R.R�RnR�R,R?(R1tfile_opts_group((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR��s		cC@s�t|j�dkr/|j�|jd�n|jjr�d|jdkrn|jdjd�|jd<q�|jdj�|jd<n|jd|jd<g|jdd!D]}tj	j
|�^q�|jd<|jd|jd<dS(	NiuInsufficient argumentsu,iutgti����usrcudest(RBR4R�RWRQR�R�RZR�R�trealpath(R1R�((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyRE�s
 6cC@stj|j��S(N(RZRwR�(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR��s(
RRR:R9RKR�RZRxR�R�R�RER�(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR��s

		tSaltKeyOptionParsercB@s�eZdZdZeZdZejeZ	d�Z
d�Zej
e_
d�Zd�Zd�Zd�Zd	�Zd
�Zd�Zd�ZRS(
u3salt-key is used to manage Salt authentication keysumasterukey_logfilec	C@s�tj|d�}|jd�|jddddddd	d
�|jdddtd
dd	d�|jddddd	d�|jdddtd
dd	d�|jddddd	d�|jdddtd
dd	d�|jddtd
dd	d�|jddtd
dd	d�|jd dtd
dd	d!�|jd"dtd
dd	d#�|jd$d%ddd	d&�|jd'd(dtd
dd	d)�|jd*d+ddd	d,�|jd-d.dtd
dd	d/�|jd0d1ddd	d2�|jd3d4dtd
dd	d5�|j|�|jd6d7dtd
dd	d8�|jd9d:dtd
dd	d;�|jd<dtd	d=�|jd>dtd	d?�tj|d@�}|j|�|jdAddd	dB�|jdCddDd	dE�|jdFddGdHtd	dI�|jdJdtd
dd	dK�|jdLdddHtd	dM�|jdNdddHtd	dO�|jdPdddHtd	dQ�|jdRdtd
dd	dS�dS(TNuActionsuresolveu-lu--listR�uR�uARGRlu
List the public keys. The args 'pre', 'un', and 'unaccepted' will list unaccepted/unsigned keys. 'acc' or 'accepted' will list accepted/signed keys. 'rej' or 'rejected' will list rejected keys. 'den' or 'denied' will list denied keys. Finally, 'all' will list all keys.u-Lu
--list-allR2u
store_trueu3List all public keys. Deprecated: use "--list all".u-au--acceptu�Accept the specified public key (use --include-rejected and --include-denied to match rejected and denied keys in addition to pending keys). Globs are supported.u-Au--accept-alluAccept all pending keys.u-ru--rejectu�Reject the specified public key. Use --include-accepted and --include-denied to match accepted and denied keys in addition to pending keys. Globs are supported.u-Ru--reject-alluReject all pending keys.u
--include-alluwInclude rejected/accepted keys when accepting/rejecting. Deprecated: use "--include-rejected" and "--include-accepted".u--include-acceptedu%Include accepted keys when rejecting.u--include-rejectedu%Include rejected keys when accepting.u--include-deniedu-Include denied keys when accepting/rejecting.u-pu--printuPrint the specified public key.u-Pu--print-alluPrint all public keys.u-du--deleteu.Delete the specified key. Globs are supported.u-Du--delete-alluDelete all keys.u-fu--fingeru&Print the specified key's fingerprint.u-Fu--finger-alluPrint all keys' fingerprints.u-qu--quietuSuppress output.u-yu--yesu;Answer "Yes" to all questions presented. Default: %default.u--rotate-aes-keyu�Setting this to False prevents the master from refreshing the key session when keys are deleted or rejected, this lowers the security of the key deletion/rejection operation. Default: %default.u--preserve-minionsu�Setting this to True prevents the master from deleting the minion cache when keys are deleted, this may have security implications if compromised minions auth with a previous deleted minion ID. Default: %default.uKey Generation Optionsu
--gen-keysu3Set a name to generate a keypair for use with salt.u--gen-keys-diru.ulSet the directory to save the generated keypair, only works with "gen_keys_dir" option. Default: '%default'.u	--keysizeiR�u�Set the keysize for the generated key, only works with the "--gen-keys" option, the key size must be 2048 or higher, otherwise it will be rounded up to 2048. Default: %default.u--gen-signatureu<Create a signature file of the masters public-key named master_pubkey_signature. The signature can be send to a minion in the masters auth-reply and enables the minion to verify the masters public-key cryptographically. This requires a new signing-key-pair which can be auto-created with the --auto-create parameter.u--privu0The private-key file to create a signature with.u--signature-pathu4The path where the signature file should be written.u--pubu.The public-key file to create a signature for.u
--auto-createu8Auto-create a signing key-pair if it does not yet exist.(	R.R�tset_conflict_handlerRnR�R?R,RJtstr(R1t
actions_grouptkey_options_group((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR��s
													
		
cC@s�|jjrmtj|jjtj�smtjj|jj�sUtj	|jj�n|jj|j_qmnt
t|�j�dS(N(
RQtgen_keysR�taccessR�tR_OKR�R�tgen_keys_dirR�RR�R�(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR��	scC@sHtj|j��}|jjrDtj||j<|jj|d<n|S(Nupki_dir(	RZRwR�RQR�R�tdevnullR�R�(R1tkeys_config((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR��	s
cC@st|jd�r{t|jjtj�r{|jjj�dkrQt|j_q{|jjj�dkr{t|j_q{ndS(Nurotate_aes_keyutrueufalse(	RRQR|trotate_aes_keyRR}tlowerR,R�(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pytprocess_rotate_aes_key�	s
*cC@st|jd�r{t|jjtj�r{|jjj�dkrQt|j_q{|jjj�dkr{t|j_q{ndS(Nupreserve_minionsutrueufalse(	RRQR|tpreserve_minionsRR}R�R,R�(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pytprocess_preserve_minions�	s
*cC@sH|jjsdS|jjjd�sD|jdj|jj��ndS(	Nuaccupreuunurejudenuallu)'{0}' is not a valid argument to '--list'(uaccupreuunurejudenuall(RQR�R&RWR(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pytprocess_list�	scC@sH|jjdkr"|jd�n"|jjdkrD|jd�ndS(Niu%The minimum value for keysize is 2048i�u&The maximum value for keysize is 32768(RQtkeysizeRW(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pytprocess_keysize
scC@s|jj|j�dS(N(R!R$t%_SaltKeyOptionParser__create_keys_dir(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pytprocess_gen_keys_dir
scC@sd|jd<dS(Nuinfouloglevel(RZ(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyRE
scG@s4tjj|jd�s0tj|jd�ndS(Nugen_keys_dir(R�R�R�RZR�(R1R4((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyt__create_keys_dir
s(RRR:R�R,RR�RZRxR�R�R�R�RR�R�R�R�R�R�RER�(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR��s 
	�	
	
						tSaltCallOptionParsercB@saeZdZdZdZejdZejdZd�Z	d�Z
d�Zd�Zd	�Z
RS(
uFsalt-call is used to execute module functions locally on a Salt Minionu&%prog [options] <function> [arguments]uminionu	log_levelulog_filecC@s4|jdddddtdddd	�|jd
ddgdddd
�|jddddddtdddd�|jddddddd�|jddddddd�|jddtdddd�|jddddd�|jddddd �|jd!dddd"�|jd#dtdddd$�|jd%dtdd&dddd'�|jd(dd)dddd*dd+�|jd,dddd-dd.�|jd/dtdddd0�|jd1dtdddd2�|jd3d4dd5dd6d7tdd8�|jd9dd:dddtdd;�dS(<Nu-gu--grainsR3u
grains_runR�R2u
store_trueRlu4Return the information generated by the salt grains.u-mu
--module-dirsuappendu�Specify an additional directory to pull modules from. Multiple directories can be provided by passing `-m/--module-dirs` multiple times.u-du--docu--documentationudocu[Return the documentation for the specified module or for all modules if none are specified.u--masteruumasteru�Specify the master to use. The minion must be authenticated with the master. If this option is omitted, the master options from the minion config will be used. If multi masters are set up the first listed master that responds will be used.u--returnR�uRETURNERuISet salt-call to pass the return data to one or many returner interfaces.u--localu9Run salt-call locally, as if there was no master running.u--file-rootu)Set this directory as the base file root.u
--pillar-rootu+Set this directory as the base pillar root.u--states-diru3Set this directory to search for additional states.u--retcode-passthroughu@Exit with the salt call retcode and not the salt binary retcode.u
--metadatauprint_metadatauuPrint out the execution metadata as well as the return. This will print out the outputter data, the return code, etc.u--set-metadataumetadatauMETADATAu-Pass metadata into Salt, used to search jobs.u--iduidukSpecify the minion id to use. If this option is omitted, the id option from the minion config will be used.u
--skip-grainsuDo not load grains.u--refresh-grains-cacheu$Force a refresh of the grains cache.u-tu	--timeouti<uauth_timeoutR�uNChange the timeout, if applicable, for the running command. Default: %default.u
--output-diffustate_output_diffu+Report only those states that have changed.(RnR�R#RJ(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR�9
s�			cC@s�|jr>|jjr>|jjr>|j�|jd�n�t|j�dkr�|jjro|jd�n|jjr�t|j�dkr�|jd�n|jd|jd<|jd|jd<ndS(Nu$Requires function, --grains or --dociu)-g/--grains does not accept any argumentsu9You can only get documentation for one method at one timeiufunuarg(R4RQt
grains_runR�R�RWRBRZ(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyRE�
s$
!cC@s�|jjr<tj|jdd�dtd|jj�}ntj|j�dt�}|jd�dkr�|j|�s�t	j
t	jj|d<q�n|S(NR�uproxyRzR�u	transporturaetu__role(
RQR�RZR�R�R,R|R[t_find_raet_miniontkindstAPPL_KIND_NAMESt	applKindstcaller(R1R}((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR��
s	cC@s�d}|d}|jd�}|sGd}tj|�t|��n|jd�}|tjkr�djtj|��}tj|�t|��n|tj	tj
jtj	tj
jgkr�dj||�}n1djtj|��}tj|�t|��|tj	tj
jkr�ykd	d
l
m}|j|||�\}	}tjj|	�r�tjj|	�r�tjj|	�r�tSWq�tk
r�}
tjd|
�q�XntS(u@
        Returns true if local RAET Minion is available
        umanorusock_diruidu/Missing role required to setup RAET SaltCaller.u__roleu5Invalid application kind = '{0}' for RAET SaltCaller.u{0}_{1}u7Unsupported application kind '{0}' for RAET SaltCaller.i(tYarduError while importing Yard: %s(R[RURWt
ValueErrorR�t
APPL_KINDSRRRxR�R�tminionR�traet.lane.yardingR�t	computeHaR�R�texistsR�R�R,tImportErrorR�(R1R}tyardnametdirpathtroletemsgtkindtlanenameR�thatex((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR��
s4


,
8cC@s�x}|jjD]o}d|krT|jjdg�jd�|jd�D��q
n|jjdg�jtjj	|��q
WdS(Nu,umodule_dirscs@s!|]}tjj|�VqdS(N(R�R�R�(t.0R�((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pys	<genexpr>�
s(
RQtmodule_dirsRZR7RJR�R$R�R�R�(R1t
module_dir((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pytprocess_module_dirs�
s(RRR:R9R�RZR~R�R�R�RER�R�R�(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR�
s

	x			$tSaltRunOptionParsercB@sUeZdZdZdZdZejdZejdZ	d�Z
d�Zd�ZRS(	iu�salt-run is the frontend command for executing Salt Runners.
Salt Runners are modules used to execute convenience functions on the Salt Masteru&%prog [options] <function> [arguments]umasteru	log_levelulog_filecC@s�|jddddddtddd	d
�|jddtddd	d�|jd
dtddd	d�tj|dd�}|_|j|�|jddtddd	d�dS(Nu-du--docu--documentationR3udocR�R2u
store_trueRluyDisplay documentation for runners, pass a runner or runner.function to see documentation on only that runner or function.u--asyncu:Start the runner operation and immediately return control.u
--skip-grainsuDo not load grains.uOutput Optionsu'Configure your preferred output format.u--quietu&Do not display the results of the run.(RnR�R.R�RSR?(R1R�((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR�s0
cC@s�|jjr1t|j�dkr1|jd�nt|j�dkr]|jd|jd<n
d|jd<t|j�dkr�|jd|jd<n
g|jd<dS(Niu9You can only get documentation for one method at one timeiufunuuarg(RQR�RBR4RWRZ(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyRE>s!
cC@stj|j��S(N(RZR�R�(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR�Ks(
RRRKR:R9R�RZRxR�R�R�RER�(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR��
s

	"	
tSaltSSHOptionParsercB@sXeZdZdZdZejdZejeZd�Z	d�Z
d�Zd�ZRS(u1%prog [options] '<target>' <function> [arguments]umasterussh_log_fileu	log_levelcC@ss|jddddddtddd	d
�|jddddd
d	d�|jdddddd	d�|jdddddtddd	d�|jddddddtd	d�|jdddddd	d�|jddd ddd	d!�|jd"dd#ddd	d$�|jd%d&dtddd	d'�|jd(d)dtddd	d*�|jd+d,dtdddd-d	d.�|jd/d0dtddd	d1�|jd2d3d4dd5dtddd	d6�|jd7dd8d	d9�|jd:dd;d	d<�|jd=ddd	d>�tj|d?d@�}|jdAddBd	dC�|jdDddEddFd	dG�|j|�tj|dHdI�}|jdJddKd	dL�|jdMddNddd	dO�|jdPdQddRdtddd	dS�|jdTddUdtddd	dV�|jdWddXddYd	dZ�|jd[dd\ddd	d]�|jd^dd_dtddd	d`�|jdaddbdtddd	dc�|jddddedtddd	df�|jdgddhdtddd	di�|jdjddkdtddd	dl�|j|�tj|dmdn�}|jdoddpddqd	dr�|jdsddtddud	dv�|j|�dS(wNu-ru--rawu--raw-shellR3u	raw_shellR�R2u
store_trueRluIDon't execute a salt routine on the targets, execute a raw shell command.u--rosterurosteruflatu�Define which roster system to use, this defines if a database backend, scanner, or custom roster system is used. Default: 'flat'.u
--roster-fileuroster_fileuu�Define an alternative location for the default roster file location. The default roster file is called roster and is found in the same directory as the master config file.u	--refreshu--refresh-cacheu
refresh_cacheu�Force a refresh of the master side data cache of the target's data. This is needed if a target's grains have been changed and the auto refresh timeframe has not been reached.u--max-procsu
ssh_max_procsiR�u�Set the number of concurrent minions to communicate with. This value defines how many processes are opened up at a time to manage connections, the more running processes the faster communication should be. Default: %default.u--extra-filerefsuextra_filerefsu4Pass in extra files to include in the state tarball.u--min-extra-modulesumin_extra_modsuTOne or comma-separated list of extra Python modulesto be included into Minimal Salt.u--thin-extra-modulesuthin_extra_modsuQOne or comma-separated list of extra Python modulesto be included into Thin Salt.u-vu	--verboseu'Turn on command verbosity, display jid.u-su--staticu>Return the data from minions as a group after they all return.u-wu--wipeussh_wipeu<Remove the deployment of the salt files when done executing.u-Wu--rand-thin-dirueSelect a random temp dir to deploy on the remote system. The dir will be cleaned after the execution.u-tu--regen-thinu--thinu
regen_thinuoTrigger a thin tarball regeneration. This is needed if custom grains/modules/states have been added or updated.u
--python2-binupython2u2Path to a python2 binary which has salt installed.u
--python3-binupython3u2Path to a python3 binary which has salt installed.u--jidu0Pass a JID to be used instead of generating one.uSSH OptionsuParameters for the SSH client.u--remote-port-forwardsussh_remote_port_forwardsu�Setup remote port forwarding using the same syntax as with the -R parameter of ssh. A comma separated list of port forwarding definitions will be translated into multiple -R parameters.u--ssh-optionussh_optionsuappendu�Equivalent to the -o ssh command option. Passes options to the SSH client in the format used in the client configuration file. Can be used multiple times.uAuthentication Optionsu$Parameters affecting authentication.u--privussh_privuSsh private key file.u
--priv-passwdussh_priv_passwdu$Passphrase for ssh private key file.u-iu--ignore-host-keysuignore_host_keysu}By default ssh host keys are honored and connections will ask for approval. Use this option to disable StrictHostKeyChecking.u--no-host-keysuno_host_keysu=Removes all host key checking functionality from SSH session.u--userussh_userurootu;Set the default user to attempt to use when authenticating.u--passwdu
ssh_passwdu?Set the default password to attempt to use when authenticating.u	--askpassussh_askpassulInteractively ask for the SSH password with no echo - avoids password in process args and stored in history.u--key-deployussh_key_deployu�Set this flag to attempt to deploy the authorized ssh key with all minions. This combined with --passwd can make initial deployment of keys very fast and easy.u--identities-onlyussh_identities_onlyuyUse the only authentication identity files configured in the ssh_config files. See IdentitiesOnly flag in man ssh_config.u--sudoussh_sudouRun command via sudo.u--update-rosterussh_update_rosteruaIf hostname is not found in the roster, store the informationinto the default roster file (flat).uScan Roster Optionsu!Parameters affecting scan roster.u--scan-portsu22ussh_scan_portsu9Comma-separated list of ports to scan in the scan roster.u--scan-timeoutg{�G�z�?ussh_scan_timeoutu,Scanning socket timeout for the scan roster.(RnR�RJR#R.R�R?(R1t	ssh_groupt
auth_groupt
scan_group((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR�dsZ						
	
	cC@s|js#|j�|jd�n|jjrd|jdkrb|jdjd�|jd<q�|jdj�|jd<n|jd|jd<|jd|jd<|jds�|jdr�|j�|jd�n|jjr|jdjddj	|jj��n|jj
r{tjd�|j_xD|j
D]6}x-|jD]"}|jd	krNt|_PqNqNWq>WndS(
NuInsufficient argumentsu,iutgtiuargvu--no-parse=u
Password: u
ssh_passwd(R4R�RWRQR�R�RZR�R$Rqtssh_askpasstgetpasst
ssh_passwdR�RjR3R,R-(R1R�R�((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyRERs,	
 

	cC@stj|j��S(N(RZRwR�(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR�rscC@sS|jjdk	rOtjjj|jj�sO|jdj|jj��qOndS(Nu'{0}' is not a valid JID(RQtjidR#RKRLtis_jidRWR(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pytprocess_jidus(
RRR9R�R�RZRxR�R�R�RER�R�(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR�Os

	�	 	tSaltCloudParsercB@sdeZdZdZdZejdZejdZe	j
d�Zd	d	d�Z
d�Zd�ZRS(
u�Salt Cloud is the system used to provision virtual machines on various public
clouds via a cleanly controlled profile and mapping systemu8%prog [options] <-m MAP | -p PROFILE> <NAME> [NAME2 ...]ucloudu	log_levelulog_filecC@s?tdjtjdt��d|�|jtjjj	�dS(Nu
tinclude_salt_cloudRo(
RpRqRrROR,RsRKRtRuRv(R1Ro((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyRP�scC@sZyddlm}|j�Wn tk
r@}|j|�nXtt|�j||�S(Ni(t
libcloudfuncs(t
salt.cloudR�tcheck_libcloud_versionR�RWRR�RB(R1R4R]R�R�((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyRB�scC@sndtjkrNddl}td�|j|j�|jtjjj	�n|j
rj|j
|jd<ndS(NuDUMP_SALT_CLOUD_CONFIGiu7Salt Cloud configuration dump (INCLUDES SENSIBLE DATA):unames(R�R�tpprintRpRZRsRKRtRuRvR4(R1R�((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyRE�s
	cC@sDytj|j��SWn&tjjk
r?}|j|�nXdS(N(RZtcloud_configR�RKR�tSaltCloudConfigErrorRW(R1R�((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR��sN(RRR:R9R�RZtDEFAULT_CLOUD_OPTSR�R�RER�RPR#RBRER�(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR�{s

		t	SPMParsercB@sNeZdZdZdZdZdZejeZ	d�Z
d�Zd�ZRS(uD
    The CLI parser object used to fire up the Salt SPM system.
    uBSPM is used to manage 3rd party formulas and other Salt componentsu%%prog [options] <function> <argument>uspmuspm_logfilec	C@sj|jdddtdddd�|jdd	dtdddd�|jd
ddtdddd�dS(
Nu-yu--assume-yesR�R2u
store_trueRlu6Default "yes" in answer to all confirmation questions.u-fu--forceu-vu	--verboseu"Display more detailed information.(RnR�(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR��s			cC@sSt|j�dkrO|js2|jddkrO|j�|jd�qOndS(Niiuupdate_repouInsufficient arguments(uupdate_repo(RBR4R�RW(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyRE�s
cC@stjj|j��S(N(RKRZt
spm_configR�(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR��s(
RRR�R:R9R�R�RZtDEFAULT_SPM_OPTSR�R�RER�(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR��s
		t
SaltAPIParsercB@s6eZdZdZdZdZejeZd�Z	RS(uD
    The CLI parser object used to fire up the Salt API system.
    uFThe Salt API system manages network API connectors for the Salt Masterumasteruapi_logfilecC@stjj|j��S(N(RKRZt
api_configR�(R1((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR��s(
RRR�R:R�R�RZtDEFAULT_API_OPTSR�R�(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyR��s
(aR�t
__future__RRRR�RER.R�R6R.RXt	functoolsRtsalt.configRZtsalt.defaults.exitcodesRKtsalt.log.setupRRtsetupt
salt.syspathsR�tsalt.versionRrtsalt.utils.argstsalt.utils.datatsalt.utils.filestsalt.utils.jidtsalt.utils.kindsRLR�tsalt.utils.platformR"tsalt.utils.stringutilstsalt.utils.usertsalt.utils.win_functionstsalt.utils.xdgtsalt.utils.yamlt
salt.defaultsRtsalt.utils.validate.pathRtsalt.utils.verifyRtsalt.exceptionstsalt.extRtsalt.ext.six.movesRR7RRURR�RRR/tobjectR+R6twith_metaclassR�R�R�R�R�R�RRR<RFRIRLRMRORPRQR^ReRkRnRpRtRvRyRR�R�R�R�R�R�R�R�R�R�(((s6/usr/lib/python2.7/site-packages/salt/utils/parsers.pyt<module>
st	4�"M"r"""+"��"
"v"l0""""""|"x"a"4"""'�%8�2�E�$0-

Zerion Mini Shell 1.0