HEX
Server: Apache
System: Linux aura.ambarhosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User: chicagos (1295)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //lib/python2.7/site-packages/awscli/alias.pyc
�
R$�_c@sddlZddlZddlZddlZddlmZddlmZddlm	Z	ddl
mZeje
�Zdefd��YZdefd	��YZd
efd��YZde	fd
��YZdefd��YZdefd��YZdS(i����N(traw_config_parse(tcompat_shell_quote(t
CLICommand(t emit_top_level_args_parsed_eventtInvalidAliasExceptioncBseZRS((t__name__t
__module__(((s0/usr/lib/python2.7/site-packages/awscli/alias.pyRstAliasLoadercBsYeZejjejjdddd��d�Zd�Zd�Zd�Z	d�Z
RS(	t~s.awstclitaliascCs||_d|_dS(s�Interface for loading and interacting with alias file

        :param alias_filename: The name of the file to load aliases from.
            This file must be an INI file.
        N(t	_filenametNonet_aliases(tselftalias_filename((s0/usr/lib/python2.7/site-packages/awscli/alias.pyt__init__!s	cCs/|j�|_|j|jjdi��dS(Nttoplevel(t
_load_aliasesR
t_cleanup_alias_valuestget(R((s0/usr/lib/python2.7/site-packages/awscli/alias.pyt_build_aliases,scCs3tjj|j�r(t|jdt�Siid6S(Ntparse_subsectionsR(tostpathtexistsRRtFalse(R((s0/usr/lib/python2.7/site-packages/awscli/alias.pyR0scCs)x"|D]}||j�||<qWdS(N(tstrip(RtaliasesR
((s0/usr/lib/python2.7/site-packages/awscli/alias.pyR6s
cCs/|jdkr|j�n|jjdi�S(NR(R
RRR(R((s0/usr/lib/python2.7/site-packages/awscli/alias.pytget_aliases<s
(RRRRt
expandusertjoinRRRRR(((s0/usr/lib/python2.7/site-packages/awscli/alias.pyR s	$				tAliasCommandInjectorcBseZd�Zd�ZRS(cCs||_||_dS(s�Injects alias commands for a command table

        :type session: botocore.session.Session
        :param session: The botocore session

        :type alias_loader: awscli.alias.AliasLoader
        :param alias_loader: The alias loader to use
        N(t_sessiont
_alias_loader(Rtsessiontalias_loader((s0/usr/lib/python2.7/site-packages/awscli/alias.pyRCs		cCs�x�|jj�j�D]{\}}|jd�rCt||�}nD|||j||g}||kr{|j||�nt|�}|||<qWdS(Nt!(R"Rtitemst
startswithtExternalAliasCommandR!tappendtServiceAliasCommand(Rt
command_tabletparsert
alias_nametalias_valuet	alias_cmdtservice_alias_cmd_args((s0/usr/lib/python2.7/site-packages/awscli/alias.pytinject_aliasesOs	(RRRR1(((s0/usr/lib/python2.7/site-packages/awscli/alias.pyR Bs	tBaseAliasCommandcBsAeZeZd�Zd�Zed��Zejd��ZRS(cCs||_||_dS(s%Base class for alias command

        :type alias_name: string
        :param alias_name: The name of the alias

        :type alias_value: string
        :param alias_value: The parsed value of the alias. This can be
            retrieved from `AliasLoader.get_aliases()[alias_name]`
        N(t_alias_namet_alias_value(RR-R.((s0/usr/lib/python2.7/site-packages/awscli/alias.pyRgs
	cCstd��dS(Nt__call__(tNotImplementedError(Rtargstparsed_args((s0/usr/lib/python2.7/site-packages/awscli/alias.pyR5tscCs|jS(N(R3(R((s0/usr/lib/python2.7/site-packages/awscli/alias.pytnamewscCs
||_dS(N(R3(Rtvalue((s0/usr/lib/python2.7/site-packages/awscli/alias.pyR9{s(	RRtTruet
_UNDOCUMENTEDRR5tpropertyR9tsetter(((s0/usr/lib/python2.7/site-packages/awscli/alias.pyR2ds
	
	R*cBsDeZddgZdd�Zd�Zd�Zd�Zd�ZRS(tdebugtprofilecCsAtt|�j||�||_||_||_||_dS(s�Command for a `toplevel` subcommand alias

        :type alias_name: string
        :param alias_name: The name of the alias

        :type alias_value: string
        :param alias_value: The parsed value of the alias. This can be
            retrieved from `AliasLoader.get_aliases()[alias_name]`

        :type session: botocore.session.Session
        :param session: The botocore session

        :type command_table: dict
        :param command_table: The command table containing all of the
            possible service command objects that a particular alias could
            redirect to.

        :type parser: awscli.argparser.MainArgParser
        :param parser: The parser to parse commands provided at the top level
            of a CLI command which includes service commands and global
            parameters. This is used to parse the service commmand and any
            global parameters from the alias's value.

        :type shadow_proxy_command: CLICommand
        :param shadow_proxy_command: A built-in command that
            potentially shadows the alias in name. If the alias
            references this command in its value, the alias should proxy
            to this command as oppposed to proxy to itself in the command
            table
        N(tsuperR*RR!t_command_tablet_parsert_shadow_proxy_command(RR-R.R#R+R,tshadow_proxy_command((s0/usr/lib/python2.7/site-packages/awscli/alias.pyR�s
 			cCs�|j�}|jj|�\}}|j||�|j|�tjd|j||j�|j	|j}|j
r�|j
j}||jkr�tjd|j
|j�|j
}q�n|||�S(Ns/Alias %r passing on arguments: %r to %r commands/Using shadowed command object: %s for alias: %s(t_get_alias_argsRCtparse_known_argst_update_parsed_globalstextendtLOGR?R3tcommandRBRDR9(RR7tparsed_globalst
alias_argstparsed_alias_argst	remainingRKtshadow_name((s0/usr/lib/python2.7/site-packages/awscli/alias.pyR5�s$	
	
cCs�ytj|j�}Wn2tk
rJ}td|j||jf��nXg|D]}|jtj�^qR}t	j
d|j|j|�|S(NsLValue of alias "%s" could not be parsed. Received error: %s when parsing:
%ss2Expanded subcommand alias %r with value: %r to: %r(tshlextsplitR4t
ValueErrorRR3RRtlinesepRJR?(RRMtetarg((s0/usr/lib/python2.7/site-packages/awscli/alias.pyRF�s%cCsS|j|�}t|j|�x-|D]%}t||�}t|||�q&WdS(N(t _get_global_parameters_to_updateRR!tgetattrtsetattr(RRNRLtglobal_params_to_updatet
param_nametupdated_param_value((s0/usr/lib/python2.7/site-packages/awscli/alias.pyRH�s	
cCs�g}xst|�j�D]_\}}|jj|�|kr||jkrhtd||jf��qx|j|�qqW|S(NsZGlobal parameter "--%s" detected in alias "%s" which is not support in subcommand aliases.(tvarsR&RCtget_defaulttUNSUPPORTED_GLOBAL_PARAMETERSRR3R)(RRNRZtparsed_paramR:((s0/usr/lib/python2.7/site-packages/awscli/alias.pyRW�sN(	RRR_RRR5RFRHRW(((s0/usr/lib/python2.7/site-packages/awscli/alias.pyR*�s	%			
R(cBs eZejd�Zd�ZRS(cCs||_||_||_dS(s0Command for external aliases

        Executes command external of CLI as opposed to being a proxy
        to another command.

        :type alias_name: string
        :param alias_name: The name of the alias

        :type alias_value: string
        :param alias_value: The parsed value of the alias. This can be
            retrieved from `AliasLoader.get_aliases()[alias_name]`

        :type invoker: callable
        :param invoker: Callable to run arguments of external alias. The
            signature should match that of ``subprocess.call``
        N(R3R4t_invoker(RR-R.tinvoker((s0/usr/lib/python2.7/site-packages/awscli/alias.pyR�s		cCse|jdg}|jd�|D��dj|�}tjd|j|j|�|j|dt�S(Nicss|]}t|�VqdS(N(R(t.0ta((s0/usr/lib/python2.7/site-packages/awscli/alias.pys	<genexpr>st s1Using external alias %r with value: %r to run: %rtshell(R4RIRRJR?R3RaR;(RR7RLtcommand_componentsRK((s0/usr/lib/python2.7/site-packages/awscli/alias.pyR5s(RRt
subprocesstcallRR5(((s0/usr/lib/python2.7/site-packages/awscli/alias.pyR(�s(tloggingRRQRhtbotocore.configloaderRt
awscli.compatRtawscli.commandsRtawscli.utilsRt	getLoggerRRJt	ExceptionRtobjectRR R2R*R((((s0/usr/lib/python2.7/site-packages/awscli/alias.pyt<module>
s""|