HEX
Server: LiteSpeed
System: Linux s1049.use1.mysecurecloudhost.com 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: xedaptot (3356)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //lib/python3.6/site-packages/awscli/customizations/__pycache__/ecr.cpython-36.pyc
3

�T_��@s`ddlmZddlmZddlmZddlZdd�Zdd�ZGd	d
�d
e�Z	Gdd�de�Z
dS)
�)�BasicCommand)�!create_client_from_parsed_globals)�	b64decodeNcCs|jdt�dS)Nzbuilding-command-table.ecr)�register�_inject_commands)Zcli�r�/usr/lib/python3.6/ecr.py�register_ecr_commandssr	cKst|�|d<t|�|d<dS)Nz	get-loginzget-login-password)�ECRLogin�ECRGetLoginPassword)Z
command_tableZsession�kwargsrrrrsrc
@sZeZdZdZdZejd�Zddddd�d	d
d	dddd
d�ddddd	ddd�gZdd�Z	dS)r
zLog in with 'docker login'z	get-loginzecr/get-login_description.rstzregistry-idszbA list of AWS account IDs that correspond to the Amazon ECR registries that you want to log in to.F�+)�name�	help_text�required�nargsz
include-email�
store_true�
include_emailTaESpecify if the '-e' flag should be included in the 'docker login' command.  The '-e' option has been deprecated and is removed in Docker version 17.06 and later.  You must specify --no-include-email if you're using Docker version 17.06 or later.  The default behavior is to include the '-e' flag in the 'docker login' output.)r�action�
group_name�dest�defaultrrzno-include-emailzInclude email argZstore_false)rrrrrrrc
Cs�t|jd|�}|js|j�}n|j|jd�}x~|dD]r}t|d�j�}|jd�\}}ddd|d	|g}	|jr||	jd
dg�|	j	|d�t
jjd
j
|	��t
jjd�q6WdS)N�ecr)ZregistryIds�authorizationData�authorizationToken�:ZdockerZloginz-uz-pz-eZnoneZ
proxyEndpoint� �
r)r�_sessionZregistry_ids�get_authorization_tokenr�decode�splitr�extend�append�sys�stdout�write�join)
�self�parsed_args�parsed_globals�
ecr_client�result�auth�
auth_tokenZusername�passwordZcommandrrr�	_run_mainEs 

zECRLogin._run_mainN)
�__name__�
__module__�__qualname__�__doc__�NAMEr�	FROM_FILE�DESCRIPTIONZ	ARG_TABLEr0rrrrr
s,

r
c@s&eZdZdZdZejd�Zdd�ZdS)rz?Get a password to be used with container clients such as Dockerzget-login-passwordz&ecr/get-login-password_description.rstc	Cs\t|jd|�}|j�}|dd}t|d�j�}|jd�\}}tjj|�tjjd�dS)Nrrrrrr)	rrrrr r!r$r%r&)	r(r)r*r+r,r-r.�_r/rrrr0`szECRGetLoginPassword._run_mainN)	r1r2r3r4r5rr6r7r0rrrrrYs
r)Zawscli.customizations.commandsrZawscli.customizations.utilsr�base64rr$r	rr
rrrrr�<module>
s<