https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/awscli/customizations/codedeploy/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/awscli/customizations/codedeploy/__pycache__/install.cpython-310.pyc
o

.&�am�@sTddlZddlZddlZddlZddlmZddlmZmZm	Z	Gdd�de�Z
dS)�N)�BasicCommand)�validate_region�validate_s3_location�validate_instancec@sdeZdZdZdZddddd�dd	d
dd�d
dd
dd�gZdd�Zdd�Zdd�Zdd�Z	dd�Z
dS)�Install�installzMConfigures and installs the AWS CodeDeploy Agent on the on-premises instance.zconfig-filez--config-file <path>TzBRequired. The path to the on-premises instance configuration file.)�name�synopsis�required�	help_textzoverride-config�
store_trueFz@Optional. Overrides the on-premises instance configuration file.)r�action�defaultrzagent-installerz--agent-installer <s3-location>z2Optional. The AWS CodeDeploy Agent installer file.c
Cs�|}|j|_t||�t|�|j��|�|�|�|�z
|�|�|�	|�WdSt
yL}ztj�
�tj�d�|��WYd}~dSd}~ww)Nz�ERROR
{0}
Install the AWS CodeDeploy Agent on the on-premises instance by following the instructions in "Configure Existing On-Premises Instances by Using AWS CodeDeploy" in the AWS CodeDeploy User Guide.
)�_session�sessionrr�system�validate_administrator�_validate_override_config�_validate_agent_installer�_create_config�_install_agent�	Exception�sys�stdout�flush�stderr�write�format)�self�parsed_args�parsed_globals�params�e�r#�J/usr/lib/python3/dist-packages/awscli/customizations/codedeploy/install.py�	_run_main=s$





���zInstall._run_maincCs&tj�|jj�r|jstd��dSdS)Nz�The on-premises instance configuration file already exists. Specify --override-config to update the existing on-premises instance configuration file.)�os�path�isfiler�CONFIG_PATH�override_config�RuntimeError�rr!r#r#r$rTs���z!Install._validate_override_configcCsjt|d�d|vrd�|j�|_d|vr#d�|jj�|_|jj|_dS|j�d�d}|j|d�|_dS)N�agent_installer�bucketzaws-codedeploy-{0}�keyz
latest/{0}�/�)	rr�regionr.r�	INSTALLERr/�	installer�rfind)rr!�startr#r#r$r]s
z!Install._validate_agent_installerc
Cs�tj�d�z	t�|jj�Wnty)}z|jtj	kr|�WYd}~nd}~ww|j
|jjkr:t�
|j
|jj�tj�d�dS)Nz8Creating the on-premises instance configuration file... �DONE
)rrrr&�makedirsr�
CONFIG_DIR�OSError�errno�EEXIST�config_filer)�shutil�copyfile)rr!r"r#r#r$rhs����zInstall._create_configcCs(tj�d�|j�|�tj�d�dS)Nz'Installing the AWS CodeDeploy Agent... r7)rrrrrr,r#r#r$ruszInstall._install_agentN)�__name__�
__module__�__qualname__�NAME�DESCRIPTION�	ARG_TABLEr%rrrrr#r#r#r$rs2��
�
��	
r)r;r&r>r�awscli.customizations.commandsr�&awscli.customizations.codedeploy.utilsrrrrr#r#r#r$�<module>s


https://t.me/RX1948 - 2025