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/ec2/__pycache__/addcount.cpython-36.opt-1.pyc
3

�T_��@sbddlZddlmZddlmZeje�ZdZdeZ	dd�Z
dd	�Zd
d�ZGdd
�d
e�Z
dS)�N)�model)�BaseCLIArgument�aY
<p>Number of instances to launch. If a single number is provided, it
is assumed to be the minimum to launch (defaults to %d).  If a range is
provided in the form <code>min:max</code> then the first number is
interpreted as the minimum number of instances to launch and the second
is interpreted as the maximum number of instances to launch.</p>cCs|jdt�|jdt�dS)Nz)building-argument-table.ec2.run-instancesz'before-parameter-build.ec2.RunInstances)�register�
ec2_add_count�set_default_count)Z
event_handler�r�/usr/lib/python3.6/addcount.py�register_count_events sr
cKstd�|d<|d=|d=dS)N�countz	min-countz	max-count)�
CountArgument)Zargument_table�kwargsrrr	r'srcKs|jdt�|jdt�dS)N�MaxCount�MinCount)�
setdefault�DEFAULT)Zparamsr
rrr	r-src@sbeZdZdd�Zedd��Zedd��Zedd��Zejd	d��Zed
d��Z	dd
�Z
dd�ZdS)rcCs"tjdddi�|_||_d|_dS)Nr�type�stringF)rZShapeZargument_model�_name�	_required)�self�namerrr	�__init__4szCountArgument.__init__cCs
d|jS)Nz--)r)rrrr	�cli_name9szCountArgument.cli_namecCsdS)Nrr)rrrr	�
cli_type_name=szCountArgument.cli_type_namecCs|jS)N)r)rrrr	�requiredAszCountArgument.requiredcCs
||_dS)N)r)r�valuerrr	rEscCstS)N)�HELP)rrrr	�
documentationIszCountArgument.documentationcCs|j|j|jdd�dS)NzNumber of instances to launch)�metavar�help)�add_argumentrZpy_name)r�parserrrr	�
add_to_parserMszCountArgument.add_to_parserc	Csh|dkrdSy>d|kr&|jd�\}}n
||}}t|�|d<t|�|d<Wnd}t|��YnXdS)N�:rrz<count parameter should be of form min[:max] (e.g. 1 or 1:10))�split�int�
ValueError)rZ
parametersrZminstrZmaxstr�msgrrr	�
add_to_paramsRs
zCountArgument.add_to_paramsN)�__name__�
__module__�__qualname__r�propertyrrr�setterrr#r)rrrr	r2sr)ZloggingZbotocorerZawscli.argumentsrZ	getLoggerr*Zloggerrrr
rrrrrrr	�<module>
s